2,666 reputation
11225
bio website andreaferretti.it
location Bonn, Germany
age
visits member for 3 years, 10 months
seen 3 hours ago

Nov
11
comment Is there any mechanism to make programming language more stable(compatible) for changes?
Yes, but not necessarily. For instance, the compiler of Scala happens to be written in Scala, but when you set the Scala version in sbt, it is just fetched as a Jar and used to compile your sources. Even if it was an opaque binary, that would do as well. Now, there are reasons to define as much of the language as possible should be defined in importable packages, but those are covered in amon's answer
Oct
8
comment JVM memory and zero-copy (de)serialization
Thank you! It turns out that Javolution also has partial support for references to other objects, by using DirectBuffers and reading their address.
Sep
17
comment Front end written in languages used for back end!
Given your last sentence, you may enjoy code.google.com/p/php-to-js :-P
Aug
12
comment Where should an object in CQRS+ES be fully initialized: in the constructor, or when applying the first event?
I understand better the question. So, I would say, the correct answer should be the third one. I think your entities should always be in a valid state. If this requires that a shopping cart has a customer id, then this should be provided at creation time, hence the need of a constructor that accepts a customer id. I am more accustomed to CQRS in Scala, where domain objects would be represented by case classes, which are immutable and have constructors for all possible combinations of parameters, so I was giving this for granted
May
30
comment Do input template languages exist?
He is not looking for a recommendation, he is asking if a library like this even exists, or if the concept has a name. Please, please, do not be so rush in closing questions. This site is becoming unusable
May
21
comment Why don't we completely de-couple frontend JS frameworks and backend APIs?
I am not sure why you wouldn't do it, but I do it all the time :-)
Apr
24
comment Is test coverage an adequate measure of code quality?
I was maybe a little rushed when I wrote - I was on a phone - but I still think there is a point. I do not want to bash on PHP, but I think that saying that in comparison Haskell gives a much greater degree of reliability is an objective statement
Apr
24
comment Is test coverage an adequate measure of code quality?
@gnat this is of course my opinion. Still, it says what is says. I took Haskell as an example of language whose compiler is very strict and gives many guarantees about the well-formedness of input, the types, the side effects, the mutation of data. I took PHP as an example of a language whose interpreter is very lenient and which does not even have a specification. Even in the absence of tests, the presence of all the guarantees from the types and effects system usually yields a decent degree of reliability. To compensate that with tests, one would need to have a very comprehensive suite
Apr
24
comment Is test coverage an adequate measure of code quality?
Then I am left to wonder what testing is
Mar
10
comment How to avoid duplicating the domain model in a multi-language distributed application?
If you only need to share data classes and not application logic, you may want ti have a look at avro or protobuf
Oct
17
comment What will be correct answer to “why is NoSQL faster than SQL” on interview?
As I have said in the answer, one can do the same in SQL; it is just that when this becomes the rule instead of the exception, NoSQL databases are usually faster and more natural to use. In theory, SQL is the best model one can use, but when data grows over a certain size, it just cannot accomodate some models, and data duplication becomes faster and easier to reason about.
Oct
15
comment Is there a need for garbage collection in a stack-based language?
Actually factor is garbage collected
Sep
13
comment Are there any advantages of SASS over LESS?
Well, they are different beasts. Bootstrap is a set of conventions and widgets, while Compass os a collection of reusable mixins
Jun
28
comment How do people get rid of conditional branches in Functional Programming?
It depends on the language. Scala, for instance, is a functional language that also has object-oriented capabilities, so you just do the same. Cloure has multimethods. In Haskell you may have a function that are defined on a certain typeclass and different datatype may give different implementations of the function.
Apr
12
comment Why do some of object oriented languages let programmer use primitive types?
@ratchetfreak There is no reason why one could not have primitive types appear as objects at the language level and be converted during code generation, without losing speed. This is, for instance, the approach of Scala.
Mar
25
comment Dynamically generating HTML and CSS
I understand that, but this question is more than one year old. The point anyway, was that Opa is a language with native datatypes for Html and Css that maybe would make it easier to write the design logic the OP was looking for.
Feb
12
comment Is using '{}' within format strings considered Pythonic?
As the Zen of Python goes, "Explicit is better than implicit". So in my view this does not look very pythonic
Feb
7
comment Error checking in actor-based paradigm
Yes, I think that some sort of queue, possibly with a durable mailbox, is needed in front of the actors that are most prone to crashing - think actors connected to db, web services and so on. In your design, you would have a single actor who has the role of saving entities. Have you tried that? Does it become a bottle neck?
Feb
6
comment What's the point of those technique detailed interview question for Senior dev?
I am sorry if I misundesrtood your question. There are lots of people that ask similar questions here, essentially to get support if they performed poorly on interviews. If your point is that you know how to answer those questions, but you'd rather been asked more sophisticated questions about software design, I can only say that these questions are not as bad and mnemonical as may others asked in interviews. It is certainly possible to do better, but they are reasonable.
Feb
6
comment What's the point of those technique detailed interview question for Senior dev?
Those are not memory questions. I can recognize a person talking about, say, garbage collection from memory from one that knows what he is talking about. Now, I may agree that one could want to ask also some questions about design (but isn't the one on event delegation going in that direction?), but this is not an excuse to perform poorly on the questions listed here.