1,483 reputation
21025
bio website
location
age
visits member for 1 year, 8 months
seen 8 hours ago

Dec
1
accepted Do the implementations of the Node interface in Web API violate Liskov Substitution Principle?
Nov
30
asked Do the implementations of the Node interface in Web API violate Liskov Substitution Principle?
Nov
26
awarded  Nice Question
Nov
21
comment How to introduce Google Analytics code in a modular way?
What if the button's function depends on outside conditions? For example, a "Create new" button may create different types of files depending on a menu setting.
Nov
20
asked How to introduce Google Analytics code in a modular way?
Aug
25
awarded  Guru
Aug
24
comment What is referential transparency?
So how would one get the length of a string read from terminal in Haskell?
Aug
13
comment Is splitting up a function into several inner functions an anti-pattern?
+1 for a radically different approach.
Aug
13
comment Is splitting up a function into several inner functions an anti-pattern?
@Warbo I disagree. Classes are easily and routinely implemented in Javascript. Properly declared, a method object would provide better encapsulation and testability.
Aug
12
awarded  Good Question
Aug
11
awarded  Notable Question
Aug
11
awarded  Nice Question
Aug
11
awarded  Popular Question
Aug
11
revised Is splitting up a function into several inner functions an anti-pattern?
spellng
Aug
11
comment Should I place functions that are only used in one other function, within that function?
This is a great answer. The problem of broken encapsulation is something many don't consider when using inner functions.
Aug
11
revised Is splitting up a function into several inner functions an anti-pattern?
added 207 characters in body
Aug
11
comment Is splitting up a function into several inner functions an anti-pattern?
@KilianFoth The previous question was motivated by perceived "callability" of the smaller methods into which the original method was split up. When using inner functions, the programmer seems to be able to indicate a more narrow scope for a function. I wanted to see whether there are significant drawbacks to this. In particular, janos notes that these functions may be hard to test.
Aug
11
comment Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
After almost a year trying out different approaches, I find myself turning to this practice more and more, which often boils down to using strategy pattern. This is why I'm choosing this answer as accepted.
Aug
11
accepted Is “If a method is re-used without changes, put the method in a base class, else create an interface” a good rule-of-thumb?
Aug
11
asked Is splitting up a function into several inner functions an anti-pattern?