8,759 reputation
1636
bio website
location
age 32
visits member for 4 years, 3 months
seen yesterday
C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, then you really ought to show it.  If you're happy and you know it, syntax error!
Syntax error

Project Euler Status


1d
comment Are there any benefits of using this extra variable in the for loop annotation?
@PieterB Then lets agree to disagree. If I load a webpage, and it takes 10 seconds to download all the content, and 0.5 seconds to run the loading javascript, of which only 50 ms was spent in that loop, of which optimization would give you only a 10% speedup, then you've saved 5 ms, am I right? In my humble opinion, your time is better spent reducing that 10 seconds of page download, not making optimizations based on principle that makes the code harder to read.
1d
comment Are there any benefits of using this extra variable in the for loop annotation?
Unless you've panned over every line in your code and you're trying to garner any little optimization possible however small, don't do it this way. It is far more difficult to read, and something should be said for doing things the way the compiler expects you to do them. That said, if I find that I have to correct your code one day and it is written like this, I will bitch slap you.
2d
comment How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
@SteveJessop You can do an integration test, though to be thorough, you'd need to perform a test of the individual component itself so that if the component tests succeed and the integrated controller tests fail, then you know it is a problem with the controller. Though, I tend to stray away from created tests more complicated than I have to.
2d
answered How to test a method which is not as much as a unit, because it is more of a 'orchestrator' / 'process' / 'controller' / 'coordination' class
Jan
22
comment Architectural / Application Practices to guard against 'breaking changes'
I would argue to remove the C# tag. This type of thing is applicable to any language capable of building a large client application like this.
Jan
20
comment Is address 0000000C a special address?
Excellent point. Perhaps null pointer case was covered, but null pointer ++ is just a normal (and in this case invalid) address, thus it fails only upon accessing it.
Jan
20
comment How to remove a middle element from queue?
If you need to perform operations on elements in the middle, you need a List, not a Queue. It's conceptually wrong to do otherwise.
Jan
16
comment What is the best way to initialize a child's reference to its parent?
...you wind up with a overly complicated database which only gets further complicated when you have to have to add new tables. The problem is a priori.
Jan
16
comment What is the best way to initialize a child's reference to its parent?
@supercat I would argue that such complexity as you call it is always avoidable. Perhaps it is difficult to get a god object to interact with other parts of your program, but therein is the problem. What changes is our ability to understand the relationships between such objects that makes it difficult to fit into easy-to-understand models like parent-child. The closest analogy that comes to mind is the "many-to-many" relationship in a database. It can always be simplified into 3 tables with "many-to-one" and "one-to-many" relationships. However, if one doesn't know that...
Jan
16
awarded  Nice Answer
Jan
15
comment Is there a pattern for a more “natural” way of adding items to collections?
@t3chb0t In spoken language, you can read things normally or reflexively. "John, please add this apple to what you're carrying." vs "The apple should be added to what you're carrying, John." In the world of OOP, reflexive doesn't make much sense. You don't ask something to be affected by another object generally speaking. The closest to this in OOP is visitor pattern. There's a reason that this isn't the norm though.
Jan
15
comment Does it make sense to say if an OS is Turing complete
Turing-complete is like saying it can potentially do anything a modern computer can do, time permitting (disregarding the theoretical infinite memory and such). That doesn't make much sense being applied to a program being run on the "turing-complete" machine unless the operating system were simulating a machine in of itself (which as operating systems go, they generally don't).
Jan
14
comment Parsing input into multiple subclasses
@bh3333 Glad I could help.
Jan
13
answered Parsing input into multiple subclasses
Jan
13
comment What kind of applications are built using C
@glampert What would you classify as an "entirely different thing" in a language if not the syntax? Isn't that the very definition of a programming language? I'm afraid I don't see your point.
Jan
12
revised What kind of applications are built using C
added 77 characters in body
Jan
12
comment What kind of applications are built using C
@FelixTitiati That entirely depends on what you wish to accomplish. C# and Java are decent business languages and at least in today's market, you almost surely stand to benefit from learning them. Javascript is rapidly becoming the new language for anything web (both client-side as well as server-side) and would seem to be a smart investment if you enjoy programming web applications.
Jan
12
comment What kind of applications are built using C
@FlorianMargaine I suppose because Nvidia decided C was the best language to model their Cg language.
Jan
12
answered What kind of applications are built using C
Jan
9
comment Service layer - fat service classes?
You can consider it all part of "Job Offer" business logic and still break it into smaller components. Pertaining to the same part of the program doesn't necessarily mean you can't separate it into read operations, update operations, insert operations, etc.