473,382 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How can I write graceful codes?

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

May 8 '07 #1
8 1629
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

--
EventStudio 4.0 - http://www.EventHelix.com/EventStudio
Model in Plain Text; Generate Sequence Diagrams in PDF/Word

May 8 '07 #2
em********@gmail.com wrote:
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.

--
Ian Collins.
May 8 '07 #3
On Tue, 08 May 2007 10:16:42 +0900, <em********@gmail.comwrote:
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/ht...nvTOC.doc.html

HTH,
Boris
May 8 '07 #4
On May 7, 9:16 pm, emailwr...@gmail.com wrote:
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.

May 8 '07 #5
On May 7, 11:46 pm, Boris <b...@gtemail.netwrote:
[snip]
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
May 9 '07 #6
On May 7, 9:30 pm, "EventHelix.com" <eventhe...@gmail.comwrote:
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 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

May 9 '07 #7
On May 9, 1:11 pm, Puppet_Sock <puppet_s...@hotmail.comwrote:
On May 7, 9:30 pm, "EventHelix.com" <eventhe...@gmail.comwrote:
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 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.

--
EventStudio 4.0 - http://www.EventHelix.com/EventStudio
Model in Plain Text; Generate Sequence Diagrams in PDF/Word
May 10 '07 #8
Puppet_Sock wrote:
>Code Complete 2nd Edition by Steve Mcconnell

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.

--
Phlip
http://www.oreilly.com/catalog/9780596510657/
"Test Driven Ajax (on Rails)"
assert_xpath, assert_javascript, & assert_ajax
May 10 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Evgeny Gopengauz | last post by:
"Do something for each row of the query" The only way I know is: --- declare @C cursor set @C= cursor for select F from T where ... declare @F int open @C while 0=0 begin
6
by: _andrea.l | last post by:
I'd like to write a program that running all the time: just a simple program, but written in php. 1)How can i do that? 2) I'd like that this program listens on a port to recive a message: how can...
7
by: eyh5 | last post by:
Hi, I'm writing some C codes to run simulations. I'm wondering if there is a website that may contain useful information on how to make one's code run more efficiently and in a...
5
by: Confused User | last post by:
I am working on device that utilizes a Motorola 68HC16 microcontroller. I am using an old unsupported piece of crap Whitesmith's / Intermetrics / Tasking compiler. The embedded compiler business...
0
by: Welman Jordan | last post by:
Hello, I would like to write a simple forum for my site, which enables some formating, like , , and some other BBS format code. For example, the user inputs this string in a multiline...
3
by: Billy Smith | last post by:
I'm trying to write a little utility that will write some binary data to a file via a javascript and Windows Script Host under Windows XP. The only way to do this that I can find is to convert...
74
by: lovecreatesbeauty | last post by:
My small function works, but I have some questions. And I want to listen to you on How it is implemented? 1. The function does not check if parameter x is larger or smaller than parameter y. ...
1
by: pseudomagazine | last post by:
Little problem: Using the document.write() function and an enormous string, I have managed to create self-generated pages with functions calling code located in external scripts. The code that...
2
by: csgonan | last post by:
I have a new 64 bit apache 2.2.4 server on Solaris 10 with openssl 0.9.8e. When I DO NOT have the ssl.conf file included and I "apachectl graceful" to apache, all my processes that are gracefully...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.