Join Hands to Build a Smarter India: Sign in | Join now
News

12 common mistakes done by programmers

By SiliconIndia  |   Tuesday, 07 December 2010, 14:47 Hrs   |    12 Comments
Print Email
12 common mistakes done by programmers
Bangalore: Most often, software developers seem locked into certain failure modes that can't be avoided and such is the frequency with which they fall prey to a particular poor programming practice.Peter Wayner of Computerworld writes about twelve most common programming mistakes, each of which is accompanied by its opposing pair. Below are the twelve programming pitfalls developers should stay away from.

Playing it fast and loose
Failing to prop up the basics is the easiest way to make errors in coding. There are a lot of small places where a developer may make a mistake which causes software to fail. And the worst part about sloppy programming is that advances in language design aimed to fix these problems don't do their job. There have been improvements in syntax in programming languages. For instance, the latest version of Java tries to make null-pointer checking easier by offering shorthand syntax for the endless pointer testing. But such syntax improvements can only prevent code from crashing. They don't eliminate the root of the problem: the proliferation of null values due to fast and loose programming.

Overcommitting to details
On the flip side, overly buttoned-up software can slow to a crawl. Relentless devotion to detail can even lock up software if the obsessive checking requires communicating with a distant website over the network. Here, the challenge is to design the layers of code to check the data when it first appears, which is much easier said than done.

Not simplifying control
Not simplifying control over tasks in their code may invite disaster for developers. The software assumes that if someone creates an object of type Name with two fields first and last, then it should immediately create a database table called Name with two columns, first and last. The names are specified in only one place, avoiding any problems that might come if someone fails to keep all of the layers of configuration in sync.

Delegating too much to frameworks
Sometimes the magic tools lead only to confusion. By abstracting functionality and assuming what we want, frameworks can all too often leave developers at a loss for what's gone wrong in their code. The rules are, while quite reasonable, not entirely trivial. As the app grows, it depends on more and more of these almost-trivial bits of external knowledge.

Trusting the client
Many of the worst security bugs appear when developers assume the client device will do the right thing. For example, code written to run in a browser can be rewritten by the browser to execute any arbitrary action. If the developer doesn't double-check all of the data coming back, anything can go wrong.

Not trusting the client enough
Sometimes too much security can lead paradoxically to gaping holes. Because of this, many Web developers are looking to reduce security as much as possible, not only to make it easy for people to engage with their products but also to save them the trouble of defending more than the minimum amount of data necessary to set up an account.

Relying too heavily on magic boxes
Many programmers assume they can link in the encryption library, push a button, and have iron-clad security. But many of these magic algorithms have subtle weaknesses, and avoiding these weaknesses requires learning more than what's in the Quick Start section of the manual.

Reinventing the wheel
Then again, writing your own libraries just because you think you know a better way to code can come back to haunt you. But grow-your-own cryptography is a welcome sight to attackers. Many libraries don't need to be perfect, so grabbing a magic box is more likely to be better than the code you write yourself.

1   2  Next>
Experts on SiliconIndia
Zafar  Ahmad
IT Project Manager
Infogain
Prakash  Kumar
Director IT
Delta Electronics In
Aakash  Mulchandani
Sr. Engg
Qualcomm
Siddharth  Sharma
Assistant Manager
Manipal
Guruprasad  Hegde
Founder and CEO
RealGuruu
Suresh  Avantsa
Founder
hubVirt Software
Chayan  Bhattacharjee
HR-Manager
TBG
Manoj Chandraprakash Powar
Managing Partner
Fountainhead
Sign Up for DailyDose and Read the Day's Highlights
Write your comment now
 
Reader's comments(12)
1: Great story!

Check out:

http://www.programmerinterview.com/
Posted by:shilpi - 09 Dec, 2010
2: To all those who can't see... The following line is clearly mentioned in the article...
"Peter Wayner of Computerworld writes about twelve most common programming mistakes". This comment is dedicated to 'sandy', 'Joseph', 'fallu'. Wash your faces and consult with an eye specialist soon.
Posted by:One who can see - 08 Dec, 2010
3: Virtual World is ready. Remember Work is God n Health is Wealth!
Posted by:Gods must be crazy - 08 Dec, 2010
4: Virtual World is ready. Remember Work is God n Health is Wealth!
Posted by:Gods must be crazy - 08 Dec, 2010
5: Worst thing is Silicon India though copy paste the article, but doesn't even give credit to the original article as other guys do.
Posted by:sandy - 08 Dec, 2010
6: Gud points for developers
Posted by:Param - 08 Dec, 2010
7: http://infoworld.com/d/developer-world/12-pro gramming-mistakes-avoid-292 ...SILICON INDIA is the copy paster repo .. best articles from various places.. COPIED and PASTED
Posted by:joseph - 07 Dec, 2010
8: is this a copy paste from this article: http://infoworld.com/d/developer-world/12-programming-mistakes-avoid-292?page=0,0

Silicon India should discourage copy paste article.
Posted by:fallu - 07 Dec, 2010
9:
http://infoworld.com/d/developer-world/12-programming-mistakes-avoid-292 ...SILICON INDIA is the copy paster repo .. best articles from various places.. COPIED and PASTED
dev Replied to: fallu - 07 Dec, 2010
10:
in above link a space is coming between pro & gramming, so its not taking to correct page. here is another url:

http://www.codeproject.com/News.aspx?ntag=55315287363534040
fallu Replied to: fallu - 07 Dec, 2010
11: Freshers should not be allowed to work on WYSIWYG design editors ...which makes them perfect in basics..
Posted by:FunInStore.com - 07 Dec, 2010
12:
Nobody thought Sergey Brin and Page were not considered freshers, when they did google, me thinks!
:-P Replied to: FunInStore.com - 08 Dec, 2010
SiliconIndia About Us   |   Contact Us   |   Help   |   Community rules   |   Advertise with us   |   Sitemap   |  
News:       Technology   |   Enterprise   |   Gadgets   |   Startups   |   Finance   |   Business   |   Career   |   Magazine  |   Newsletter   |   News archive  
Cities:        CEO   |     Startup   |   Mobile   |   CIO   |   Women   |   BI   |   HR   |   SME   |   Cloud   |   Marketing   |   QA   |   Java   |   Web Developer  
Community:      Members   |   Blogs   |   Indian Entrepreneurs   |   Gyan   |   Advice   |   Community   |   Find   |   Events   |   CXO Insights  
Job Board:      Jobs   |   Freshers   |   Companies   |   HR Speak   |   Forum  
Online Courses:   Web Developer   |   Java Developer   |   CCNA Training   |   SEO   |   SAS   |   SQL Server 2005   |   J2EE
Education:   MBA   |   MCA   |   Engineering   |   Training Institute
Life:          Real Estate   |   Travel   |   Finance   |   Gadgets   |   Movie Reviews   |    Jokes  
Send your feedback and help us continue to improve SiliconIndia
© 2014 InfoConnect Web Technologies India Pvt Ltd. all rights reserved