2,030 reputation
618
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 6 months
seen May 18 at 21:45

Garbage-collecting duck-typer. Test-infected. Hopefully he is not alone who would like UNIX rewritten with GC memory and closure support in system, kernel API in Javascript, (Python, Ruby, Smalltalk), and C layer deprecated and emulated on top of the former.

I use Windows on workstation and FreeBSD on server.

Recently dipped myself into the mobile app world.


Aug
1
comment How have languages influenced CPU design?
There is also ENTER counterpart to this RET n...
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
@MichaelBorgwardt: ... in statically typed world. They are not needed in dynamically typed case, where polymorphism works out of the box. (Added just to show they are not essential, they are more like "neccessary workaround for environment with restricted expressiveness")
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
I know, of course, just ... sometimes the term is explained as one of it, sometimes as the second, sometimes as combination of both... and now, learner, be confused.
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
BTW. this is a good article: surfscranton.com/architecture/KnightsPrinciples.htm A little funny way to show OOP from other than dogmatic way, and very true.
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
BTW, encapsulation is unhappy term, since it defined as (wikipedia) "In a programming language, encapsulation is used to refer to one of two related but distinct notions, and sometimes to the combination thereof: A language mechanism for restricting access to some of the object's components. A language construct that facilitates the bundling of data with the methods (or other functions) operating on that data." You mentioned the second definition, while I was always using the first meaning of the word.
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
Wrong. OOP is mainly about polymorphism. Encapsulation is useful concept, yes, and it is fine to have to public/protected boundary; and inheritance is frowned upon at least the last decade, saying "composition rather than inheritance".
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
You may try download Squeak and learn step-by-step using free Squeak-by-example book. It may be very helpful to get Kent Beck's Test-Driven Development By Example and try to follow as well. TDD is very useful methodology, it aims at simple and working design first, and is also very friendly in that you can take as little steps as you need. Lot of big minds in the area of doing OOP (and agile) right collaborate in www.c2.com wiki, where you can learn just by browsing, but that's a bit higher level. Of course, after some time, you should read the classic Design Patterns.
Jul
25
comment I cannot understand the application of oops How can I develop the understanding of application of oops?
Invest your time to code a hobby application (like the stripped one that you do in PHP) in Smalltalk. It is the father of OOP, it has yet lot of ideas that are novel after being here for 30 years, and there is school of thought that all "new", "revolutionary" steps (C->C++, C++->Java, Java->Python||Ruby) were just stealing things already known in Smalltalk (OO, GC, dynamic typing). From my personal experience, nothing has given me more as for knowing OOP than a course of Smalltalk at college.
Jul
20
comment How to indicate the word is method name in Objective-C?
In that case, use 'method Xxx' or use the '- selector' and '+ selector' syntax of Objective-C used to distinguish between instance and class methods.
Jul
16
comment What is a normal “functional lines of code” to “test lines of code” ratio?
@KonradRudolph: I did not pretend anything, I just put it very densely [the price ... is at ... time-to-market], as is often the case with me; but it meant what I said in the reply to you.
Jul
16
comment What is a normal “functional lines of code” to “test lines of code” ratio?
@KonradRudolph: It isn't when compared to the price of finding errors later, and it also saves a lot more in simplicity of the result system. In TDD, you should grow system from test-to-test, using simplest thing that work. In reality, you end up with simpler implementation. So no, it is not pricey, and no, I am not doing things wrong (I know very well it is hard to write good tests).
Jul
15
comment What is a normal “functional lines of code” to “test lines of code” ratio?
It depends on what you mean by "methods are long". What image it created in my head, is that methods are unnecessary long, doing too much work and having too much responsibilities (often having too many parameters). In that case, such method needs proportionally more combinations to cover by tests, so I don't think the ratio would change much...
Jul
15
comment What is a normal “functional lines of code” to “test lines of code” ratio?
... vaguely remember ... I already don't remember where it was (maybe in the Kent Beck's TDD By Example, maybe in somewhere in c2.com). I remember the meaning, though, that three times more test code than production code is ok.
Jul
15
comment What is a normal “functional lines of code” to “test lines of code” ratio?
@ElYusubov: I don't agree that it's "pricey" at all. It seems so for those who still count amount of work in LOCs. But the price is not in LOC, it is in money and time-to-market. And there, TDD is not more pricey than any other reasonable development process.
Jul
15
comment What is a normal “functional lines of code” to “test lines of code” ratio?
@tomwrong: In Kent's book he cites Ward that you should write tests until your fear transforms into boredom.
Jul
5
comment Is committing/checking in code everyday a good practice?
+1 merge conflicts
Jul
3
comment UI message passing programming paradigm
I also thought of CQRS, but the question was about UI paradigm, and CQRS is general. So I wonder if this was the sought answer of there is something else there.
Jul
2
comment How do you call the process of taking a part of a function and making an individual function of it?
@LarryHector: I'm not sure it's (GoF) Design Patterns. There is thing called Template Method there that is a bit similar, and of course DP is fundamental read, but Extract Method as well as lots of other refactorings are in fact in other piece of literature and that is Martin Fowler's Refactoring.
Jun
29
comment Why is HTML/Javascript minification beneficial
@chilis42: The servers are able to serve pre-gzipped file from the filesystem itself, if that's the problem.
Jun
19
comment Why are so many languages passed by value?
Also, passing expression by temporary reference can lead to bad bugs (in stateful language), when you happily change it (since it's just temporary), but then it backfires when you actually pass a variable, and you must devise ugly workaround like passing foo+0 instead of foo.