2,068 reputation
618
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 6 months
seen yesterday

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.


Apr
6
comment If this is camelCase what-is-this?
Sometimes called kebab-case, but hyphen-separated is also fine. What is important that libraries (like underscore.string actually know all these apart (camelCase, PascalCase, snake_case, kebab-case), albeit sometimes with different names, and allow you to use them as a fact of being.
Feb
26
comment How to unit test correct implementation of an interface is used?
@ThomasRuiz Interesting one. Using the vocabulary of it, I realized I rarely write other than contract tests - but without its counterpart, so @jbrains would not accept them as those, since there is no matching, but I do not like to overmock everything, so I mostly skip them. But that sweet spot, the place where the objects to fulfill the contract is instantiated, is not covered. In an aftermath, it looks that the problem is the new FooImpl(bar) in Java/JavaScript. If it was createFoo(bar) consistently, I could run my contract test against its result, not against new FooImpl(testbar).
Feb
25
comment How to unit test correct implementation of an interface is used?
That's what I mentioned by createApp(indirectA, indirectB).getFoo() just did not call it sociable test. That's what I basically do now.
Feb
25
comment How to unit test correct implementation of an interface is used?
Testing that should "drive the process" and / or "give early feedback" should not be that hard, or it loses its meaning. Testing for testing correctness, there yes.
Feb
25
comment How to unit test correct implementation of an interface is used?
Yes, I was concerned about the third case. I have some feeling towards "do not test it and make it as obvious as possible" as well. Just wasn't that sure. I would still have bad feelings a bit and will feel the need for some smoke test anyway.
Feb
25
comment How to unit test correct implementation of an interface is used?
That's duplication, though. You essentially copy same tests you did in unit tests (not always, of course, but for some scenarios, when the number of combinations in sub-part is big, integration test must test them all, albeit in complicated setup).
Feb
25
comment How to unit test correct implementation of an interface is used?
@ThomasRuiz Thanks, I will look.
Feb
25
comment How to unit test correct implementation of an interface is used?
@Doval Yes, but I should test that some object was actually created, and that that object is correct. The question is, how to test the glue code that creates and setups it, when you already have full coverage on the class itself, but how to test the code that may look like var client = new FooClient(); client.connect(this.config.foo);. This code, that actually creates the pieces and glues them, should be tested, too; the question is, how.
Feb
25
comment How to unit test correct implementation of an interface is used?
I don't have the problem of "not importing the mocks". I have the problem of "test that the thing instantiated is the right one". Especially in the duck-typing world. So when there is some this.foo = new Bar(this.baz, this.quux) somewhere in the glue code, how to sanely test the this.foo is actually the good object implementing all the behaviour that is wanted, initialized properly, etc.
Feb
25
comment How to unit test correct implementation of an interface is used?
@Doval I don't understand.
Jan
17
comment Visitor Pattern still useful in languages supporting class extensions?
GoF book says nothing about traversal. The fact is, most uses of Visitor pattern are traversals (including my example of Pharo's AST-Core).
Jan
15
comment Does boostrapping limit the achievable speed of the new compiler?
Assembler is not as low as you can get. Machine code is lower. ;-)
Jan
6
comment I failed FizzBuzz, would you hire me?
In my opinion, you failed it epically by not including the && correctly. The == 0 is an unimportant detail. This code gives the impression you are a cowboy.
Apr
10
comment Google Blink (new WebKit fork): Meaning of “Moving DOM into Javascript”?
From what I know (from es-discuss mailing list, for example), it is definitely the latter. There is a wish to have DOM written in JS, not just because of marshalling cost (which is there), but also for removing as much of the "exotic", "non-native", "special" objects from the language space as possible. DOM is big PITA for language designers, because it is special.
Jan
18
comment Are there any programming languages that follow a minimalist development approach?
@MattFenwick: Ok, in fact I did not know and drew the analogy from Smalltalk ifTrue: which is defined in the library and can be fully redefined; but of course, it is low-level so it contains <primitive: ...> pragma.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@Giorgio: Not all. The minimal ones (like ones I mentioned) don't. There was no change in Smalltalk syntax since its inception except one, brought in by Squeak: the curly-braced computed arrays. Library is also very stable at the core (Behavior and Collection hierarchies). It seems to me that C is lot less stable with all those C89, C99 and whatnot.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JimmyHoffa: There's a lot more in the comments. But I added an edit, if you think it is needed.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JoanVenge: stackoverflow.com/questions/1007250/…
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JoanVenge: I can't say for Lisp in detail, but both Liso and Smalltalk have very minimal syntax (because they are built around one big metaphor, either functional or message-passing objects). Thus, the languages in fact did not change, there was no point to. Libraries did, but everything including "control structures" is part of the library in these languages, so it is hard to separate. And as for "everything planned in great detail", I don't believe that can happen. BTW Ada is such "planned" language, it originated in army.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JörgWMittag: Isn't V8 the fastest VM? ;-) Jokes aside, I knew that Hotspot was created from Stringtalk VM which took a lot from Self, but does it reaaly not use static type information (much like Strongtalk didn't)? I assumed it uses it once it specialized to Java.