472,331 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 1287
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: masood.iqbal | last post by:
In this day and age, you never say no to any work that is thrown at you ---- so when I was offered this short-term contract to convert legacy C...
3
by: Sai Kit Tong | last post by:
Hi, I am developing a new application running on Windows platform that needs to interface with existing legacy code - written in basic C / C++. I...
4
by: gs | last post by:
I have searched Google, MSDN,... for a week. I am still unable to make available functions in my csharp dll as native windows functions for some...
6
by: Ben Terry | last post by:
Hello, I have a VS 2003.NET solution which consists of four c++ unmanaged legacy projects. I am adding a new project to the solution which will...
2
by: Mark Olbert | last post by:
First off, the sympathy is for all you poor buggers out there who have to figure out how to marry Managed Extensions for C++ onto your legacy code....
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to...
20
by: Mike | last post by:
Hi all, I am cramming for an technical interview about C++ and programming... I believe there will be problems on data-structures and...
10
by: brooksr | last post by:
I know VB5/VBA very well but have not used VB to create web pages but need to do so. Can someone explain the purposes and differences between...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.