473,569 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1347
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/Prlj9GScRAk6iAJ 9O17QMHYXXS+hHJ CDNte2HNkYWmACf ZvUt
Waov2WFzzDq+BF1 ipWcFB4g=
=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
SetPriorityClas s() or RasEnumConnecti ons().

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.goo gle.com...
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.goo gle.com...
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.goo gle.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.Individua l.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************ ********@comcas t.com>, David Hilsee
<da************ *@yahoo.com> writes
"Suzie" <wi******@yahoo .com> wrote in message
news:ec******* *************** ****@posting.go ogle.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.Individua l.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******** ******@baesyste ms.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
1760
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 code to C++, I did not say no. Personally I believed that it was a somewhat futile exercise since one of the main requirements was for the existing API (a functional interface written in C) to remain...
3
3998
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 am trying to evaluate Java vs C# implementations. Originally, I have the impression that C# should be a clear winner. I started with Java and using the guideline from the book "Java Native...
4
1666
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 legacy non dotnet application I just want to expose the regex function to my old legacy application built with some tools that runs a VM with capability to access windows native DLL via...
6
2773
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 be in c#. What do I need to do to my c++ projects in order to call my c# modules from within c++? From what I understand, I need to convert my c++ code from unmanaged to managed using the /clr...
2
1631
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. My condolences; my brief experience with the process leads me to believe the Microsoft hates all of its VC++ developers :) Now, the question. I'm getting a NullReferenceException in a __gc class...
1
4327
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 import apache def handler(req): req.content_type = 'text/plain' req.write("Under Construction")
2
2895
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 5.0.18. After downloading from MYSQL.COM the package on the site, I made : rpm -i MySQL-server-5.0.18-0.i386.rpm then i have errors that relate to many conflicts. I cannot figure out why -and- cannot...
20
2172
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 algorithms... could anybody recommend some online resources/references/websites so that I can find summary sheet about the confusing points of C++ and typical storage/time complexity of common data structures...
10
4594
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 VBScript and VB.NET to create web pages? Also where do Visual Web Developer Express Edition and Microsoft Frontpage fit into the picture? It seems there are a bewildering array of choices in...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.