What are bad programming practices in C?
I would just like a few things that you guys see as bad programing practices in pure C, so I can watch out for those. ...
I would just like a few things that you guys see as bad programing practices in pure C, so I can watch out for those. ...
I'm just wondering what are some of the classic mistakes we all make. I think before working on writing good code, you must learn to recognize bad code... especially when it's YOUR code! ...
Let me start by saying that I do not advocate this approach, but I saw it recently and I was wondering if there was a name for it I could use to point the guilty party to. So here goes. Now you have a method, and you want to return a value. You also want to return an error code. Of course, exceptions are a much better choice, but for...
I have inherited a monster. It is masquerading as a .NET 1.1 application processes text files that conform to Healthcare Claim Payment (ANSI 835) standards, but it's a monster. The information being processed relates to healthcare claims, EOBs, and reimbursements. These files consist of records that have an identifier in the first few...
By favorite I mean the one that gets your goat the most, not the one you enjoy using the most. I'm fairly new to the concept of anti patterns and I'd like a list of do not do's. An explanation of why it's an antipattern and what problems it causes would be good too. ...
Hi, Despite that the work of the guys from SUN with the Java core API is awesome, as they are humans, they are not infallible. I have read in several books some criticism about Some huge mistakes that (my guess) are still there for backward compatibility and legacy code. My question here is which ones do you know? As examples: Observa...
Can you post a short example of real, overdone spaghetti code, possibly saying what it does? Can you show me a little debugger's nightmare? I don't mean IOCCC code, that is science fiction. I mean real life examples that happened to you... Update The focus has changed from "post some spaghetti code" to "what is exactly spaghetti code?...
Are there any other sources of programming type riddles on the internet? I started my set of daily programming riddles, jokes, and quotes partly to help myself and my team grown in some technical areas... like new .NET 3.5 features, design patterns, anti-patterns, code smells, etc. I would love to find other short programming riddles o...
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding ActionForms. Some of them have only String properties (even for numbers), some of them use the seemingly appropriate types (Integer, Date, String, etc). What's the best practice here? Also, it seems that if a property is of type Intege...
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding Actions. Most of the pages have exactly one Action, and the processExecute() methods are hideous monsters (very long and tons of nested if statements based on request parameters). Given that Actions are an implementation of the command...
I periodically am called upon to do maintenance work on a system that was built by a real rocket surgeon. There's so much wrong with it that it's hard to know where to start. No, wait, I'll start at the beginning: in the early days of the project, the designer was told that the system would need to scale, and he'd read that a source...
I'd asked a question a while back about ways to encourage my team to collaborate. The tool we use is a wiki. Since this is the first time we are using the wiki (formally and as a team), we are learning by committing mistakes. One of the lessons has been that a wiki isn't suitable for tracking activities. It is better to use a tool buil...
On a recent Dot Net Rocks podcast, Jon Skeet mentioned possible abuses of LINQ syntax. What examples have people seen where crazy things are being done with LINQ? ...
Are there, in the canonical Gang of Four list, any design patterns that you often find misused, misunderstood or overused (other than the highly debated Singleton)? In other words, is there a design pattern you would advise to think twice before using? (And why?) ...
What are the most common Antipatterns you see in ASP.NET applications and how should we avoid them? ...
For those of you who aren't familiar with the concept, abstraction inversion is the implementation of low-level constructs on top of high-level constructs, and is generally considered a bad thing because it adds both needless complexity and needless overhead. Of course, this is a somewhat imprecise, subjective definition. In your opini...
What is the worst (due to either prevalence or severity) example of abstraction inversion that you see in programming today? For those of you who are not familiar with the concept, abstraction inversion is implementing low-level constructs on top of high-level constructs. More precisely, assume you have constructs A and B. B is implem...
as a follow up on my previous question Having a function with combined generic bounds such as: <T extends Foo & Bar> void doStuff(T argument) { //do stuff wich should only be done if arguments is both foo and bar } Because this is not castable from a unspecified object, you need to have knowledge of some object which actually implem...
anti-pattern : there must be at least two key elements present to formally distinguish an actual anti-pattern from a simple bad habit, bad practice, or bad idea: Some repeated pattern of action, process or structure that initially appears to be beneficial, but ultimately produces more bad consequences than beneficial results, and A ref...