1,883 reputation
515
bio website blog.herby.sk
location Slovakia
age 40
visits member for 2 years, 11 months
seen Oct 18 at 21:50

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.


Sep
19
comment Test Driven Development Code Order
@martiert: It is a wrong test. You do not test anything in that test (existence of class is implementation detail).
Sep
19
comment Test Driven Development Code Order
@ollins: Yes. Or, from the bigger PoV, "Never write a line of code without a failing test.", that is, never write any piece of production code which is not necessitated by existence of failing test and which makes this failing test pass. Kent Beck calls this approach "test-infected".
Sep
18
comment Misunderstanding Scope in JavaScript?
Sort of. I said it can't be "passed" because by passing I meant giving it to someone else to manipulate. But it is not passed in that sense, it is just "brought with" the closure - only the code inside the closure can see/manipulate it. But these are the details (the devil is in the details ;-) ). BTW, functions returning functions are pretty common stuff in JavaScript; usage of closures to "simulate private variables" etc. are common patterns which all base upon closures (returned from other functions) having lexical scope.
Sep
18
comment Misunderstanding Scope in JavaScript?
GlenPeterson said it right. apply and call are about setting this for a call; there is no way to pass scopes at all. But you must take into account that functions are in fact lexical closures so they take hold of their scope for their lifetime. The articles aim to show this, that is why I recommended them.
Sep
6
comment software architecture (OO design) refresher course
I would add more than +1 if it was possible...
Sep
5
comment Does software testing methodology rely on flawed data?
IIRC, Kent Beck did not say the curve is flat after the first rise, only that it is "almost flat" but still rises slightly.
Sep
4
comment How to write reusable code in node.js
It is not very clear what is your problem, maybe rephrase it. I'd have two comments: 1. Maybe you just need to get used to async/callback way of doing things, I do not see anything like "unmanageable code soup" there. 2. Ad "loosely coupled classes": do you really need "classes" there? Classes are not needed to do OO neither to do good design. Maybe change the title.
Sep
3
comment Is there a difference between multi-tasking and time-sharing?
With multiprocessor / multicore, you can have true multitasking where more programs actually run at the same time in parallel.
Aug
28
comment Why the overhead when allocating objects/arrays in Java?
C also has an overhead, each malloc-allocated block of memory needs a header which free then uses.
Aug
9
comment Is there a programming language where 1/6 behaves the same as 1.0/6.0?
In all Smalltalk-80 derivates (that is, nearly all Smalltalks). Amber is one of contemporary exceptions (which is understandable, being compiled to JavaScript).
Aug
1
comment How have languages influenced CPU design?
Maybe a possibility to reuse code without its recompilation is also of some marginal usability point for BP addressing. And God knows if BP addressing instructions are not faster in circuitry than SP addressed ones, since BP addressing is sort of standard...
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.