1,919 reputation
615
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 1 month
seen 4 hours ago

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.


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.
Jun
19
comment Benefits of classic OOP over Go-like language
+1 for "not necessarily the best one". Citing Alan Kay: "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." (nor did he have C# and/or Java, I would humbly guess)
Feb
14
comment New to TDD. Should I avoid private methods now?
"It's my understanding that private methods make objects more encapsulated, thus more resistant to change and errors. Thus, they should be used by default and only those methods that matter to clients should be made public." This seems to me like counter point of view of what TDD is trying to achieve. TDD is development methodology that leads you to create simple, workable and open-to-changes design. Looking "from private" and "only publicize..." is turned around completely. Forget there is such a thing as a private method to embrace TDD. Later, do them as needed; as a part of refactoring.
Jan
11
comment What are the complexities of memory-unmanaged programming?
Missed free is not the worst thing. Early free is much more devastating.
Jan
10
comment Automatically update copyright date range from git?
You should add a year / enlarge range whenever you do substantial change to a file, afaict. So the raason is there. Problem is, it should not be automatic - git cannot tell when the change is substantial.
Dec
22
comment What would be an appropriate algorithm to factorise numbers in the range of a few billion?
I'd say using isPrime is an overkill. Just doing n/=2 while n%2==0 and then starting i with 3 and then looping if (n%i==0) n/=i; else i+=2; is enough (well, it can be stopped once i*i > n).
Dec
17
comment What language/framework/workflow sets do you recomend for a small office?
And if you are going to do thing like Ericsson does (telephone switches that must work with lot of concurrent data and heal from failures) go for Erlang.
Dec
13
comment How should semi-agile team operate during management-imposed waterfall-like “testing phase”
Ok, not from scratch, but by treating old code as legacy and poisoned and instead of "fixing bugs" simply refactor and nothing more, using all methods that are used to work with legacy code, making it right in the process. The bosses can hear about "big fixing" if they need to, though it will be really just "development done right at last".
Dec
9
comment Why is it impossible to produce truly random numbers?
Are you really asking why you cannot produce truly random number on a deterministic device? Doesn't the question already include the answer?
Dec
8
comment Is Dijkstra's algorithm an appropriate solution to this signal routing problem?
@PeterTaylor: Would it matter if they were multiplicative? They have exact same semantics as additive (provided they are positive) by applying a logarithm. Or is it something more complicated behind it?
Dec
6
comment Is Dijkstra's algorithm an appropriate solution to this signal routing problem?
@KimBurgess: Edited the answer.