8,954 reputation
63681
bio website
location
age
visits member for 3 years, 5 months
seen 6 hours ago

0x2B | ~0x2B


Nov
24
comment Objects in smalltalk and c++
You could compare the C++ model in which all objects live on the same stack and method calls are synchronous, with the actor model, in which objects are asynchronous and (possibly) live in different threads.
Nov
24
comment Why are self-hosting compilers considered a rite of passage for new languages?
"A compiler seems like a very significant piece of software to write, and I imagine not all languages are well-suited to creating them.": I would consider this a very good reason for trying to write a compiler in a new language, namely to prove that the language is up to the task.
Nov
22
comment How to prevent others from using non-thread safe variables in a multithreading environment?
Do you need to share these four variables among the threads? Can you perhaps have local variables and use some kind of message passing to exchange information between the threads?
Nov
20
comment How do quick & dirty programmers know they got it right?
@James Anderson: I agree and I think it makes a lot of sense to look at finished code and try to understand the thinking behind it before dismissing it as nonsense. In this respect, I think that a big downside of pair programming is that too many good ideas are dismissed as nonsense by one member of the pair before the other has the time to properly write them down into working code. This happens because it would take some time to really understand somebody else's thinking, whereas in pair programming everything happens very quickly. In this way, many good ideas simply go lost.
Nov
20
comment Why do functional programs have a correlation between compilation success and correctness?
"It's likely a mix of both in my experience.": I have the same experience. Static typing catches errors at compile time also when using an imperative language (e.g. Pascal). In FP, the avoidance of mutability and, I would add, the use of a more declarative programming style makes it easier to reason about code. If a language offers both, you get both advantages.
Nov
20
comment Why do functional programs have a correlation between compilation success and correctness?
"Once those things have been checked, what other ways are left for the programmer to screw up?": This somehow confirms my experience that (1) static typing + (2) functional style leave less ways to screw up things. As a result I tend to get a correct program faster and need to write less unit tests when using FP.
Nov
19
comment Batching immutable object changes?
What is wrong with your idea of using immutable fields and calling a constructor to create a new snapshot of the object?
Nov
19
comment Why is imperative programming preferred over functional programming?
@MainMa: I agree with you regarding abstraction. Abstraction is a very good tool to master the complexity of software. Without abstraction we get lost in the details. Abstraction makes complex problems easy to understand.
Nov
19
comment Why is imperative programming preferred over functional programming?
"Functional languages are for language purists, imperative languages are for people who wants to get thinks done in time.": According to my experience this is not true. I can get things done more quickly using functional languages. Imperative style is much more verbose and less declarative and when I have to use an imperative language I definitely need more iterations before I get things right.
Nov
19
comment type infered statically typed languages?
haskell.org
Nov
19
comment Defining data model in Agile methodology
If your domain / data model is relatively simple you can develop it incrementally from sprint to sprint. Otherwise you either need some upfront design before the development sprints start, or you dedicate one sprint or two to redesign / refactor your model later into the project.
Nov
18
comment Convert procedural code to object oriented
I agree with Robert Harvey: What makes you think that converting from procedural to object-oriented will improve your code?
Nov
17
awarded  Popular Question
Nov
16
comment How to do Test Driven Development
"I am identifying components and just writing test for them before I actually write components.": I find this correct: you first identify the coarse architecture of your system and then start coding. During coding (TDD) you work out the details of the individual components and possibly discover problems with your architecture that you can fix along the way. But I find it OK that you do not start coding without any prior analysis.
Nov
13
comment Understanding of concatenation, union and iteration at regular language
+ can be used in Mathematics to denote the disjoint union of two sets.
Nov
12
comment When should you start unit testing? (during which development stage?)
@Telastyn: super. +1.
Nov
12
comment When should you start unit testing? (during which development stage?)
"For Agile development shops, this means having the unit tests done during your sprint.": As far as I know, Kanban does not have sprints. I think it would be more precise to say that you have to have your unit tests done before you consider the implementation of some functionality done.
Nov
12
awarded  Nice Answer
Nov
11
comment Abstract List Functions in Racket/Scheme
1+ and -1+ seem to be only in MIT-scheme (stackoverflow.com/questions/24228642/…)
Nov
11
comment Abstract List Functions in Racket/Scheme
Maybe I have it: use the functions -1+, positive?, 1+ with map, filter, and map.