Reputation
7,098
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 23 30
Newest
 Guru
Impact
~212k people reached

Mar
17
comment Is scientific code a different enough realm to ignore common coding standards?
Clean code having a lot of coding standards is a bad argument. The Agile manifesto may not have anything to do with coding standards, but Agile does promote flexibility and responding to change and sticking to coding standards or best practices supports that. So - in a very indirect and circumspect way agile may not have anything to do with coding standards, but coding standard do have a lot to do with agile.
Mar
14
comment Test cases do all the work through helper method — bad practice?
@Attilio Exactly. And from my point of view intelligibility trumps duplication-avoidance. Also DRY is a much broader concept than simply avoiding code duplication. It is not so much about avoiding code duplication as it is about avoiding knowledge (business rules, algorithms) repetition.
Mar
10
comment Does the visitor pattern violate the Liskov Substitution Principle
Behavior can be changed without changing the contract of the ancestor. Not violating the contract is what substitutability is about. For example a set of persisters that all read and save data correctly but the sources and targets they read from and save to can be completely different. As long as the contract of the ancestor only stipulates that saved data is read back unchanged and does not require any specifics with regard to storage type used, there is no LSP violation.
Mar
10
comment Implementing software licensing
@RobertHarvey: licensing keys etc have their drawbacks just as well. Most of which are addressed by the software phoning home on a regular basis. Okay, a couple of days without the ability to phone home is usually allowed, but that can be arranged for any method used to check licenses.
Mar
10
comment How to separate public and “mostly private” code in C#? (Friend classes, PIMPL pattern, etc.)
Out of curiosity: why is this class static? Especially as it seems to preclude deriving a descendant with the "there be dragons" methods?
Mar
10
comment Word to unambiguously represent data used at the input to a template?
For completeness (and out of curiosity): what does XSLT call the transformed result?
Mar
10
comment Benefits of Structured Logging vs basic logging
+1 Want to add that it's not only about speed and efficiency. Relevance of search results will be a lot higher when using structured logging and thus "structured queries". Without that searching for any words that occur in different contexts will give you tons of irrelevant hits.
Mar
8
comment What kind of license to put a private project?
Ah yes, but those who stole it may hand it off to other people who may first assume that the thieves obtained it legally and who may, upon seeing the license, contact the original copyright holder? Having just the copyright in the code wouldn't do anything to raise alarm bells. Of course the thieves can take it out, but most thieves aren't very sophisticated and if you bury a notice in every source file...
Mar
7
comment How to represent an object with actions that can only be used in a specific situation?
@JDT, they don't mistake. They panic and just push one of them regardless. But... I get your point. Then again, I didn't say to just enforce constraints from the UI. I am dead set against that. Just like validation, the server should always validate / enforce constraints. Any UI validation/enforcing of constraints is only a UI-acceleration issue and cannot be trusted by the server. It may after all be accessed directly.
Mar
7
comment SQL - Design concepts - Relationships - Referential Integrity - Cascading
The basic trade off for an IsDeleted field: Having one means easy access of deleted records at the cost of burdening every single query with an extra "not IsDeleted" condition. Not having one means your "happy" cases don't have to worry about soft-deleted records (yay!) and having your "extra ordinary" cases (undelete) worry about archive tables/databases.
Mar
7
comment Reasons not to have flexible role management system
+10 for your last paragraph: business concerns always trump implementation concerns. And never assume that high development costs are prohibitive. The business may well be more than happy to pay the extra implementation cost. Developers often don't have enough information to figure out the actual cost/benefit of features. (They usually see only the costs.)
Mar
7
comment Should we factor time in for UAT fixes & deployments as part of a sprint?
I like your KanBan approach especially with going down to function level before putting them "up" for development. Gave me some new ideas to try.
Feb
29
comment Web Application using only REST API
Moving all the static content to a CDN (Content Delivery Network) would decrease the number of requests significantly.
Dec
1
comment Are there any significant disadvantages to depending upon abstractions?
Obligatory statement: "Yagni is only a viable strategy if the code is easy to change"
Nov
21
comment How to mitigate complexity of fallbacks introduced to automatically retry upon failure?
"How can you mitigate some of this complexity?" Abstraction. Your classes look like they have a truckload of tool-specific methods on them (eg ZenDesk and SalesForce). You can write out an entire sync app without ever referring to specific apps and protocols. Advantage is that you can concentrate on the big picture and don't get bogged down by the app/protocol specific details. You put those details in descendant/implementing classes that you instantiate as needed by the specific sync. Bonus advantage: it also allows for a clean path forward when you need to add syncs with other apps.
Oct
27
comment Dependency Injection: Field Injection vs Constructor Injection?
@hstoerr Nice. However, that must mean that Mockito is using reflection (or whatever the Java equivalent of that is called)...
Oct
27
comment Is it a good idea to make method behavior depend on the calling thread?
+1 This should be the accepted answer. Seems to me that this would get you both the "ease of use" (less boilerplate) and explicitness I like.
Oct
27
comment Is it a good idea to make method behavior depend on the calling thread?
Thanks @Brian! Didn't about that feature. Love to learn. And seems to me that this would get you both the "ease of use" (less boilerplate) and explicitness I like.
Oct
26
comment Better To Call In Dive Into Submethods Or Pass Around a result
Oh and by the way, provided the method names in your actual code make it obvious what is going on, I would prefer option 1 if the steps are fairly independent and may even be optional. This way the recipe for returning and verifying a result is easily understood from OnRequest. Much more so than in option 2, where much of the logic is hidden "downward".
Oct
26
comment Better To Call In Dive Into Submethods Or Pass Around a result
I can understand - sort of - why you would call method2 from method1, but why is verify(result) in method3? Wouldn't it be better if the verification of the returned result was as close to the request as possible, ie in OnRequest, after the call to Method1 that creates it?