Code Smells – Issue Number 3

Code Smells Welcome to the third edition of Code Smells! Periodically I’ll be posting about how to detect code smells and what they mean in terms of the big picture of your code. The previous installment can be found right here. What’s a code smell? Wikipedia says it perfectly: In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem. Code smells are usually not bugs—they are not technically incorrect and don’t currently prevent the program from functioning. Instead, they indicate weaknesses in design that may be slowing down development or increasing the risk of bugs or failures in the future. These code smells are often based on my own opinion and experience with programming. If you disagree with what I'm saying in my post, please don't hesitate to post a comment.…

0 Comments

How and Why to Avoid Excessive Nesting

Background This probably sounds really nit-picky or OCD, but I think it's an issue worth addressing. Excessive nesting of logic within code can make things nightmarish to read. Even a few of years ago I never thought anything of this. I mean, how much could it really affect someone reading it? He/she must be a complete newb to not be able to read my logic. Fast forward to a co-op placement where this was more closely moderated by my managers, and I began to pay more attention to it... Why? Alright, so all that you know so far about my opinion on this is that excessive nesting bothers me. So far, my mission is accomplished. Everything else is just extra. The first issue with excessive nesting is that it actually makes logic hard to follow. If you're doing code reviews…

0 Comments

End of content

No more pages to load