469,631 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Help Requested for Legacy Code

Hi,

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP
Jul 22 '05 #1
9 1187
Suzie wrote:
Hi,

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP


Get a code programming editor or s.th like an 'indent' utility. That
should help you.

--
Karthik.
Jul 22 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suzie wrote:
Hi,

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP

Yikes! Now that's what I call munged code! But seriously, since this is
MS specific, you might have a hard time getting help on this one from
this group. I suggest you try one of the more MS specific news groups.

Evan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBU1bMoo/Prlj9GScRAk6iAJ9O17QMHYXXS+hHJCDNte2HNkYWmACfZvUt
Waov2WFzzDq+BF1ipWcFB4g=
=tK/g
-----END PGP SIGNATURE-----
Jul 22 '05 #3
Suzie wrote:
I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP


Wow! There's a different style violation on each line!!

This kind of code has no excuse. It reminds me of prima-donna code written
to "fit the most words into a character terminal". But that was before yours
or this guy's time.

Code must be readable by people first, compilers second.

If your boss thinks this code has any value, or that any extra time spent
working on it is your fault, you are screwed. Change your project or your
boss or something.

Any effort to reformat this code, or clean it up, will only throw good money
after bad. The code does so little, with such burden on everything it does,
that only a rewrite will make it better.

If you get clearance to fix the code, write what it does again, bit by bit,
into a new project. Make sure that project goes one feature at a time, and
test each feature (preferrably with automated tests) before pulling in the
next feature.

Use this code only as a cheat sheet, to show you things like how to call
SetPriorityClass() or RasEnumConnections().

Along the way, write the cleanest code you can, following rules such as
found in style guidelines like /Code Complete 2nd Ed/ by Steve McConnell.
And _frequently_ review your current progress and your code's state with
your boss and colleagues.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #4
"Suzie" <wi******@yahoo.com> wrote in message
news:ec**************************@posting.google.c om...
Hi,

I've inherited some code from a developer who has moved onto other
things.


Track him down and shoot him.

--
Cy
http://home.rochester.rr.com/cyhome/
Jul 22 '05 #5
Cy Edmunds wrote:
"Suzie" <wi******@yahoo.com> wrote in message
news:ec**************************@posting.google.c om...
Hi,

I've inherited some code from a developer who has moved onto other
things.

Track him down and shoot him.

....and *then* get mean!

!
--ag

--
Artie Gold -- Austin, Texas

"If you don't think it matters, you're not paying attention."
Jul 22 '05 #6
"Suzie" <wi******@yahoo.com> wrote in message
news:ec**************************@posting.google.c om...
Hi,

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP


Smells like a troll. First, your e-mail address is "wi******@yahoo.com".
Second, the code is unbelievably bad and looks like it was intentionally
obfuscated. Third, you claim is a text editor (software which few people
write these days except for kicks) but it contains "News.Individual.NET" and
Phone_Nums[] = { "337-5075", "495-5075" }; It sounds to me like you're
trying to trick someone into compiling and running some malicious software.

--
David Hilsee
Jul 22 '05 #7
* Suzie:

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP


LOL. Thanx. :-)
PS: Are you Jeff Relf?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 22 '05 #8
In message <Yr********************@comcast.com>, David Hilsee
<da*************@yahoo.com> writes
"Suzie" <wi******@yahoo.com> wrote in message
news:ec**************************@posting.google. com...
Hi,

I've inherited some code from a developer who has moved onto other
things. The code makes up a rather simple application: a text editor.

The problem is, I'm still a novice programmer and I'm having trouble
accustoming myself to the programmer's coding style.

Could someone please take a look at the code and reformat it in the
way that the newbie books format code?

I ask because I feel it would only take a few moments for experts like
you guys, and it would do wonders for me.

Here is the code: http://www.Cotse.NET/users/jeffrelf/X.CPP
Smells like a troll. First, your e-mail address is "wi******@yahoo.com".
Second, the code is unbelievably bad and looks like it was intentionally
obfuscated. Third, you claim is a text editor (software which few people
write these days except for kicks) but it contains "News.Individual.NET" and
Phone_Nums[] = { "337-5075", "495-5075" };


Suzie is (a) a troll, and (b) late (compare and contrast my posting from
not so long ago "Programmer seeks employment...")
It sounds to me like you're
trying to trick someone into compiling and running some malicious software.


I think she's just sharing the joke. Does the name J*ff R*lf mean
nothing to you?

--
Richard Herring
Jul 22 '05 #9
"Richard Herring" <ju**@[127.0.0.1]> wrote in message
news:zb**************@baesystems.com...
<snip>
I think she's just sharing the joke. Does the name J*ff R*lf mean
nothing to you?


No, not really, but looking at http://www.cotse.net/users/jeffrelf/ gave me
an idea of what he's about. I just wanted to point out that the post was
not serious, because a few people were responding with serious answers.

--
David Hilsee
Jul 22 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by gs | last post: by
6 posts views Thread by Ben Terry | last post: by
1 post views Thread by treelife | last post: by
2 posts views Thread by trihanhcie | last post: by
20 posts views Thread by Mike | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.