<pedrocorreia.net ⁄>

<Refactor the code before you write it ⁄ >

clicks: 3145 3145 2006-12-03 2006-12-03 goto tecnologia myNews tecnologia  Bookmark This Bookmark This

Have you ever heard the saying "If you don't know where to look, don't look at all"? Think about this saying and coding. If a piece of code somewhere in the system is causing an error, don't split the whole thing apart to find it. Know where to look for it before you cause even more damage.

The same principle can be applied to new features, functions or methods you want to create in your application. You know exactly how the feature has to work and you start coding. A lot of people start by writing proof-of-concept (POC) code first and then cleans it up and refactors it afterwards. Think of the saying and twist it a little, then it could sounds like this "If you don't know how to write the code, don't write it at all".

That sounds a bit harsh, but in most cases it takes even longer to clean up the POC code and start refactoring than if you've already did it to begin with. Visualize how the code must be structured before you write everything in one very long method. It gives you that flexibility in the code you want when developing new things and the refactoring afterwards is kept to a minimum.

este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:


Subscribe News RSS  Subscribe News Updates by E-mail

myNews <myNews show="rand" cat="tecnologia" ⁄>

MongoDb Architecture new ...

NOSQL has become a very heated topic for large web-scale deployment where scalability and semi-struc (...)

clicks: 18995 18995 2012-05-14 2012-05-14 goto url (new window) horicky.blogspo... goto myNews tecnologia

A Hopefully Fair and Useful Comparison of Haskell Web Frameworks new ...

Recently there has been a lot of discussion and questions about the differences between the big thre (...)

clicks: 21120 21120 2012-05-13 2012-05-13 goto url (new window) softwaresimply.... goto myNews tecnologia

Retina graphics for your website new ...

retina.js is an open source script that makes it easy to serve high-resolution images to devices wit (...)

clicks: 15399 15399 2012-05-11 2012-05-11 goto url (new window) retinajs.com/ goto myNews tecnologia

What every programmer should know about memory, Part 1 new ...

In the early days computers were much simpler. The various components of a system, such as the CPU, (...)

clicks: 16768 16768 2012-05-10 2012-05-10 goto url (new window) lwn.net/Article... goto myNews tecnologia

The State Of HTML5 Video

HTML5 has entered the online video market, which is both exciting and challenging for developers in (...)

clicks: 6992 6992 2012-02-14 2012-02-14 goto url (new window) longtailvideo.c... goto myNews tecnologia

A Tour of Amazon's DynamoDB

Amazon's recent release of DynamoDB, a database whose name is inspired by Dynamo, the key-value data (...)

clicks: 6485 6485 2012-02-13 2012-02-13 goto url (new window) paperplanes.de/... goto myNews tecnologia

Google BigQuery Service: Big data analytics at Google speed

Rapidly crunching terabytes of big data can lead to better business decisions, but this has traditio (...)

clicks: 6280 6280 2011-11-30 2011-11-30 goto url (new window) googlecode.blog... goto myNews tecnologia

Video: CSS3 Secrets: 10 things you might not know about CSS3

A number of prominent front-end developers delivered helpful talks at this year's Fronteers 2011 con (...)

clicks: 7005 7005 2011-11-30 2011-11-30 goto url (new window) css.dzone.com/a... goto myNews tecnologia