Reputation
6,774
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 21 30
Newest
 Nice Answer
Impact
~177k people reached

Jan
7
comment Should if/else statements be arranged by rareness of cases or difficulty of dealing with them?
Yep, double negatives, negatives combined with and's and/or or's (sic!) and negatives combined with a method/var with Not in the name, get my brain in a twist every time :-)
Jan
6
comment Constructor Injection, Single Responsibility and List initialisation
@pdr +1 instantiating the list in this case is part of the "construction process" and rightfully belongs in the constructor regardless of whatever else you are injecting into it.
Jan
5
comment API design with references to root object
@Telastyn Oh heck, you are right. I just went with the MS Office way of doing things and forgot the OP was just using that as an example. (Shakes head and returns to baking a cake, which probably is a much better activity considering the state of brain :-D )
Jan
5
comment API design with references to root object
@Telastyn: Yeah, if you are going to pass around classes (objects). There is no problem if you pass around a generic IApplication interface that various applications can extend into IWhateverApplication and clients investigate to see whether the IApplication reference they received also supports IWhateverApplication. Which it probably does, because clients generally know what application they are calling stuff on, so they would know that the IApplication is also an IWhateverApplication and could simply use a "soft" cast. (app as IWhateverApplication).
Jan
5
comment Should if/else statements be arranged by rareness of cases or difficulty of dealing with them?
Order by simplicity / understandability of the conditions! The rest can be taken care of by optimisers, branch predictors and refactoring.
Jan
5
comment Should if/else statements be arranged by rareness of cases or difficulty of dealing with them?
For performance I might agree. But then again, most optimisers and branch predictors are perfectly capable of taking care of that. For readability I might agree if the most likely case has significantly more lines than the less likely case. But to me that would sooner indicate the need to extract a method than to use a not. Personally I would concentrate on avoiding not conditions. They have been proven to induce more cognitive load to understand than "positive" conditions and are detrimental to readability / understandability of code. I tend to use them in guard statements only.
Jan
5
revised Development console commands registration
edited title
Jan
5
comment API design with references to root object
The reference in and of itself does not preclude re-use in other environments. It just offers the API user a convenient way to get back to the root and access other parts of the API from there. Re-use is / would be precluded if the child would actually call methods on the root reference. That would indeed create implicit dependencies that you might not be aware of and that would be better handled through dependency injection to make them explicit.
Jan
5
comment Two months in my new job, still having trouble learning a new codebase. How can I improve?
Related: programmers.stackexchange.com/questions/201724/…
Jan
3
comment Which methods should be put in an interface and which in abstract classes?
Nope, just hope that any Delphi developers that read this do :-)
Jan
3
comment Motivate developers to keep up with admin tasks
Change the Kanban board so they don't have to write out a new card, but can just move cards from one kanban to the next.
Jan
3
comment Which methods should be put in an interface and which in abstract classes?
Sorry, don't understand your comment. Delphi doesn't have visibility modifiers on interfaces either. All methods in an interface are implicitly public. And virtual doesn't have anything to do with visibility, but with polymorphism in a class hierarchy.
Jan
2
comment TDD and complete test coverage where exponential test cases are needed
This scenario and similar ones is why I developed a "TMatrixTestCase" and enumerator for which you can write the test code once and feed it two or more arrays containing the inputs and the expected outcome.
Jan
2
comment Company name already taken at github
While a very good answer, you are assuming that someone within the company registered the project. However, as there is more than one dog named Fido, it is also perfectly possible that there is another company with the same name that registered the name before OP and did so perfectly legitimately.
Jan
2
comment Which methods should be put in an interface and which in abstract classes?
"There's no difference..." I don't know php enough, but in Delphi you would need to re-declare implementation of the interface when inheriting from a (library) base class (that you don't want to or can't change) that neglected to mark one or more interface methods as virtual. Without re-declaring the interface on the descendant, calling the method on an interface reference would call the base class' method instead of the method of the class that the interface reference refers to.
Dec
31
comment Preferring Database Normalization vs. Schema Transparency?
You might find Martin Fowler's ideas on roles an interesting read.
Dec
30
comment Is there a guide for software development to design efficient hotkeys for actions?
@DougM: where did you get that impression? And what would be wrong with L for find & replace ("locate" comes to mind) if that is what is most intuitive for your user base?
Dec
25
comment What is the difference between 'code readability' and 'language conventions' used within a community?
@Izkata: Thanks!
Dec
22
comment What is the difference between 'code readability' and 'language conventions' used within a community?
@DocBrown: Don't you think I know that? GIMF. The point is that too many people use acronyms without any consideration for the fact that others may not be familiar with them. Admittedly, not so bad in comments, but I absolutely abhor questions throwing acronyms around like there is no tomorrow and expecting everybody to either know them or google them. It's just plain lazy and inconsiderate towards the people you are asking to help you. I knew what a call to action was long before coming across the CTA acronym. Never crossed my mind that call to action is what the poster meant.
Dec
20
comment What is the difference between 'code readability' and 'language conventions' used within a community?
@jozefg: TIMTOWDI ?? means what ???