Reputation
3,746
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 12 31
Newest
 Good Answer
Impact
~64k people reached

17h
comment Would there be any benefit to writing synchronous code using the syntax of promises
Oh god no please don't do this, it's harder to debug, introduces asynchronisity to synchronous code and can't be "escaped". stackoverflow.com/q/28937788/1348195 which you also asked is the better of this one.
Jul
21
awarded  Good Answer
Jul
3
comment Creating two-way object references and keeping data integrity
People will warn you about circular references - don't listen to them. They are cargo cult programming module responsibility as an argument for data references. In fact - it is perfectly fine to have these references, ORMs like Hibernate (and NHibernate and EF) have them in Java, Python and Ruby ORMs also have them. People are confusing mixing data and mixing module responsibility. Make sure your design is clear and your data is modelled in a way that makes sense - that's a lot more important than "not having a back reference".
Jun
30
comment Is functional language without runtime written in C possible?
In Haskell, laziness is just implemented with thunks - that is, the value becomes a function that calculates the value the first time it is used and then caches (memoizes) it as long as it remains in scope for.
Jun
16
awarded  Yearling
Jun
15
awarded  Curious
Jun
14
asked How to research API usage?
Jun
4
comment Is there an issue with closing our database connections in the “Finally” block of a Try statement?
Of course, it would be way better to just use a try(resource){ block (try-with-resource). Assuming you can run Java 7.
May
10
comment Why create a Global-ish Object.create function?
It's a polyfill. It fills it in old (ES3) browsers.
May
10
comment Why create a Global-ish Object.create function?
@Zirak before that it was called beget and he defined it in whatever scope he was in and not on Object - so this answer is not really chronologically wrong.
Apr
16
comment What exactly makes the Haskell type system so revered (vs say, Java)?
@Doval it certainly is a reason it's popular though, working with data types with pattern matching on type is one of the key things that make using a type system like that nice. It's part of what makes it revered.
Apr
16
comment What exactly makes the Haskell type system so revered (vs say, Java)?
Pattern matching is also really important, it means you can use the type of an object to make decisions super easily.
Apr
16
revised What exactly makes the Haskell type system so revered (vs say, Java)?
edited title
Apr
14
comment Why are native ES6 promises slower and more memory-intensive than bluebird?
Because it's not an anti-pattern "proper", but maybe it should be added because it's useful to know
Feb
18
comment What is the purpose of planning poker in a sprint?
I'd just like to add that there are counterarguments and some smart people consider planning poker a waste of time - so take answers you get with a grain of salt.
Feb
8
comment Why is instance creation the way it is?
@CortAmmon I think you have a typo there, clearly you meant "work with polymorphism" rather than copy/pastable on that code :D
Feb
1
comment Why would many duck-typed dynamic programming languages use a class-based approach instead of prototype-based OOP?
First thing first: JavaScript itself supports the class keyword as of the next ECMAScript standard (ECMAScript 6). Support for classes in JavaScript has been planned for a long time. Now for what it is - classes are just syntactic sugar, an easier to reason about model for objects of the same type. It's this way in JS and it's this way in Python and other dynamic languages.
Jan
23
comment Throw exception or let code fail
@Philipp if we think about it LoadMaterial has the following constraints: "After calling it the material is always loaded and the number of materials loaded did not decrease". Throwing an exception for a third constraint "The material cannot be added twice" seems silly and counterintuitive to me. Making the function idempotent reduces the code's reliance on execution order and application state. It seems like a double win for me.
Jan
17
comment How should nodes in a chain be connected?
It's worth mentioning that the events approach is similar. Just like the imperative equivalent of a Task is a callback - an event emitter that shoots a single event multiple times is the imperative equivalent of an Observable. Just like Tasks are stronger than callbacks and people prefer them so are Observables stronger than events in this case.
Jan
17
revised How should nodes in a chain be connected?
deleted 26 characters in body