How can I write graceful codes?

E

emailwrong

My codes are very ugly , and not well organized . I want it looks
graceful . How can I improve ?
 
E

EventHelix.com

My codes are very ugly , and not well organized . I want it looks
graceful . How can I improve ?

I would recommend:

Code Complete 2nd Edition by Steve Mcconnell
 
I

Ian Collins

My codes are very ugly , and not well organized . I want it looks
graceful . How can I improve ?
Beauty is in the eye of the beholder, only you can structure your code
in a style you find attractive.

Learn to modularise your code, a good start is learning how to spot
blocks of code that would be clearer extracted into functions.
 
B

Boris

My codes are very ugly , and not well organized . I want it looks
graceful . How can I improve ?

Make up some rules and follow them strictly. It doesn't matter where the
rules come from: If you are the only developer you can make up your own
rules. If you are or plan to work in a team it's probably better to take
over existing rules (or if you have no idea where to start :).

Rules can be anything including naming conventions, code formatting, best
practices etc. Have a look at the code conventions for Java for an idea:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

HTH,
Boris
 
D

dave_mikesell

My codes are very ugly , and not well organized . I want it looks
graceful . How can I improve ?

For starters, read "Refactoring" by Fowler. If you're talking about
code style/formatting, download a source code formatting tool, like
SourceFormatX.
 
P

Puppet_Sock

Make up some rules and follow them strictly. It doesn't matter where the
rules come from: If you are the only developer you can make up your own
rules.
[snip]

Hee hee. Yes indeed, make up any old rules you want.
- All code lines must end with // Penguin
- All dates must be commented with cryptic references to
the names of famous people who were born on that day.
As for example, any date that is close to Mozart's birthday
must be commented with "happy birthday Wolfy"
- Code must be right justified.
Socks
 
P

Puppet_Sock

I would recommend:

Code Complete 2nd Edition by Steve Mcconnell

I really liked the 1st edition. How much difference is there with
the second? Is it worth getting since I already have the first?

There are other books out there along this line, but few are
anywhere close to as good as Code Complete. Several have
quite bad advice. Some get very mixed reviews.

You can find some helpful book reviews at www.accu.org
Socks
 
E

EventHelix.com

I really liked the 1st edition. How much difference is there with
the second? Is it worth getting since I already have the first?

There are other books out there along this line, but few are
anywhere close to as good as Code Complete. Several have
quite bad advice. Some get very mixed reviews.

You can find some helpful book reviews atwww.accu.org
Socks

I think the second edition has more focus on object oriented
programming. The examples are in C# and Java.
 
P

Phlip

Puppet_Sock said:
I really liked the 1st edition. How much difference is there with
the second?

The second recommends Test Driven Development, as one of the decade's most
important advances. (The decade since the last Code Complete.)

TDD all but forces your code to be clean, as a side-effect of resisting
bugs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top