2,618 reputation
11125
bio website andreaferretti.it
location Bonn, Germany
age
visits member for 3 years, 5 months
seen yesterday

Jun
11
comment Is there a phrase or word to describe an algorithim or program is complete in that given any value for its arguments there is a defined outcome?
That seems to me predictable and deterministic. It just does not spit out a result, and this is what you expect.
Jun
11
comment Is there a phrase or word to describe an algorithim or program is complete in that given any value for its arguments there is a defined outcome?
In the abstract sense (without an underlying language) if you missed the else clause you would not have an actual algorithm, only part of it
Jun
11
comment Is there a phrase or word to describe an algorithim or program is complete in that given any value for its arguments there is a defined outcome?
To be more precise, even if your example lacked the else clause, you still would have a pretty well-defined behaviour: either a compilation error, which means that you failed to specify correctly your algorithm after all, or some default return value, such as nil, depending on the language
Jun
11
comment Is there a phrase or word to describe an algorithim or program is complete in that given any value for its arguments there is a defined outcome?
I am actually struggling to find out what would be an algorithm where it is false that "given any possible value for its arguments there is a predicatable outcome". Ok, the C specification sometimes uses undefined behaviour, but even in this case implementations actually define one. Even random number generators can only be pseudo random, and look random because we do not consider in the input state such as the computer clock.
Jun
8
comment Is there a website that scrapes job postings to determine the popularity of web technologies?
I would love to see a job ad for lolcat!
Jun
7
comment Advice for learning Javascript with prior knowledge of C++?
Function scope has not much to do with dynamic this. The reason this is dynamic is that objects are just hash maps whose members may happen to be functions. As such, there is a need for this functions to get a reference to the containing object you are using in a given moment.
Jun
6
answered Getting data from a webpage in a stable and efficient way
Jun
5
comment Challenges in multi-player Android Game Server with RESTful Nature
It will definitely be possible. Not all APIs need to be REST. REST is fine for what is designed: accessing resources, creating, changing and deleting them. It is a pull technology. When you need continuous communication - and games are the typical example - sockets are more suitable. On the browser you can even use a library like Socket.IO and have it fake the socket by using continuos polling for browsers that do not support WebSockets
Jun
5
comment Challenges in multi-player Android Game Server with RESTful Nature
Yes, provided the platform support Sockets. In the browser world, you will actually have to use WebSockets, which are a little more limited, but it is definitely feasible.
Jun
5
comment Challenges in multi-player Android Game Server with RESTful Nature
Short story: REST is not suited for the task. You should reconsider using Sockets
Jun
4
comment T9 patented while QWERTY is not?
Indeed swipe is used for autocompletion on Android
May
29
comment Transaction Design Pattern for MVC and location of responsibility?
You want to move the transactions as high in the chain as possible. The entity managing the transactions should be aware of the process as a whole. Hence the controller is usually a good fit.
May
23
awarded  Nice Question
Apr
10
comment What's wrong with JavaScript
Unfortunately, not all libraries will support AMD, which means you have to patch them if you want to use AMD. I agree for use strict. And no, Object.create is anything but elegant - you just cannot set the properties as in object literals; you also have to declare whether they are enumerable, configurable and so on.
Apr
6
comment Weaknesses of 3-Strike Security
The usual solution is to bound the rate of attempts coming for a given user from a fixed ip to say 5 per minute. It is not perfect but usually you do not create problems to other users, unless you happen to be behind the same proxy
Apr
6
comment Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
...most specific cases. A typical example is defining a default ordering for models in Django. All query results will follow that ordering unless you specify otherwise. Fourth, if you ever need to denormalize your data for performance reason, you only have to tweak the ORM rather than rewriting all your queries.
Apr
6
comment Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
Actually not. You are abstracting away the SQL, which buys you a lot of advantages. First, you avoid injection. Then, you can change the underlying database without worrying about slightly different versions of the SQL dialect, since the ORM handles this for you. In many cases, you can also put a NoSQL backend without noticing. Third, these query builders are objects that you can pass around like anything else. This means that your model can construct half the query (for instance you could have some methods for the most common cases) and then it can be refined in the controller to handle the..
Apr
6
answered Strategies for avoiding SQL in your Controllers… or how many methods should I have in my Models?
Mar
27
comment Why does the word “Pythonic” exist?
I don't know, I happen to find the upvoted examples on that question fairly readable.
Mar
26
awarded  Enthusiast