473,379 Members | 1,190 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,379 software developers and data experts.

New Job:How to tackle???

7
I just started a new job, this is actually my first job out of college. The old programmer left the company abruptly and there was no transition between him and myself. I pretty much have a code base and naming conventions to try and piece this application together because he did not comment his code. There are no database diagrams to view relations in the db. How do you guys usually attack trying to make modifications to code your unfamiliar with?
Jun 19 '07 #1
9 1981
pbmods
5,821 Expert 4TB
Heya, l3d007. Welcome to TSDN!

First off, visit Worse Than Failure every day so that you don't feel so bad.

Second, get it working. I'm working on an (abhorrent) PHP/MySQL app right now, and it's pretty much the same situation: barely functional, no comments, no consistent coding style. But by running it, fixing errors, running it again, and so on, I'm starting to get a pretty good feel for what everything does.

Third, write your own comments for the other guy's code. Even if you're not sure what it does, jot down your guesses and/or findings. Leave yourself lots of notes so that at least you know what YOU were thinking!

[EDIT: Fourth, don't make it personal. Some of that code will more likely than not have you wanting to pull your hair out. But whatever you do, don't flame the other guy in your comments. Management doesn't like that so much.]
Jun 19 '07 #2
l3d007
7
thanks for the response...i was thinking about leaving comments in the code myself thats a good idea
Jun 19 '07 #3
RedSon
5,000 Expert 4TB
When I am faced with an unmanageable code base, in any language, I have this program that I use called Source Insight. Its a 3rd party IDE but it will scan your code and create a crossreference database so you can worm your way through the code. I also creates logic flow and caller/callee graphs. I suggest you check it out. Its a free trial for 30 days but it might give you the insight to the source that you need.
Jun 25 '07 #4
Dököll
2,364 Expert 2GB
Keep copies of the original, then beat it to death. Keep copies of your modified versions.

And yes do not make the same mistakes one made, comment for the next person. Good luck!
Jun 28 '07 #5
r035198x
13,262 8TB
When I get code like that, I simply ask what the code was supposed to do then I rewrite it from scratch.
Jun 28 '07 #6
gits
5,390 Expert Mod 4TB
When I get code like that, I simply ask what the code was supposed to do then I rewrite it from scratch.
... thats probably the best way to build new maintainable code out of a bunch of 'prototype-like' code (we always learn that from the old rapid-prototyping development paradigm) ... but it is not always a straight way for that ... imagine an app that is productive already (i know that an productive app is not (almost should not be) a prototype ;) but thats theory only ... most of you know that ... i know! ;) ) ... so you have to maintain the productive app and besides that, you refactor or rewrite it at the same time - in a way of creating an new application ... i always use to do it that way ... therefore you probably need a feature-freeze ... until your rebuilt app is ready to replace the old one ... and: it is always a good hint by pbmods not to flame the old developer ... or to flame the old code either ... try to 'sell' this only by the advantages you would get out of refactored code ... maintainance, robustness and performance are always points that are to be considered ...

kind regards ...
Jun 29 '07 #7
praveen2gupta
201 100+
I just started a new job, this is actually my first job out of college. The old programmer left the company abruptly and there was no transition between him and myself. I pretty much have a code base and naming conventions to try and piece this application together because he did not comment his code. There are no database diagrams to view relations in the db. How do you guys usually attack trying to make modifications to code your unfamiliar with?
Hi

This is common problem in small companies. Remember

1. Don't over commit to management for overnight updations. Tell them the basic project management or software project management problem is there.

2. Make a personal diary, write flow diagrams there.

3. it's not easy to understand others logic and source code. What ever you will understand at first instance will not be correct.

4. Be careful to update the code. One wrong update will create many new problems.

5. Learn Faster This is an Opportunity.
Jul 7 '07 #8
LacrosseB0ss
113 100+
When I get code like that, I simply ask what the code was supposed to do then I rewrite it from scratch.
sometimes management doesn't like this either. The best way to do it I've found is:
Ask your supervisor what it's supposed to do. Document what you think it's supposed to do through diagrams (flow charts, use cases, whatever you need to feel for it). Show your supervisor again and make changes as he/she advises.
Slap a code break at the beginning and step through everything. It's going to take a while, but it'll help. As you go make notes.
While studying the code, make your own comments. This will help not only you but others to follow.
If, after stepping through the code, your results don't match the original flow charts, ask for permission to re-write everything (if required). Again, some companies don't like this approach for whatever reason. But if you can prove the existing code is crap, you could win your right.

I don't mean to keep beating a dead horse but comments are your best friend. You will benefit from them when it comes time to debug or after vacation or whatever. But also the corporation will benefit from the comments later on. Most times my initial plan of attack when approached to write a module or whatever is to create a comment "to do" list. Say 1. define variables 2. initialize 3. while loop to do xyz 4. return abc. This will keep you on track, remind you what needs to be done AND you'll have comments in your code at the end!

I may have gone a bit off course there, sorry. Hope it works out!
- LB
Jul 9 '07 #9
Dököll
2,364 Expert 2GB
Job search is back on, now my boss is trying to kick me out...means well, wants me to explore my horizon whatever that means:-)

Anyway, just wanted to let you know I will aain try everything you've proposed...Thanks!
Sep 7 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ano1optimist | last post by:
I've tried several different possibilities but don't have enough basic understanding of the ownerships and permissions that are involved so I'm looking for someone to explain what is required: I...
11
by: hilz | last post by:
Hi all: I have a FILE pointer that points to a file on disk (not any other io stream). is there a way to get the filename of that FILE? i thought it would be the _tmpfname part of the struct, but...
0
by: Kueishiong Tu | last post by:
I have a window form application. It requires to retrieve data from a web site. Since the web request is very time consuming, so I create a work thread to do the job. How does the window main form...
37
by: salad | last post by:
If one looks at job listings one will read the requirements of for it; ..Net, SQL, C#, etc. How much skill, if years experience in the discipline isn't listed, is needed. Could one simply get...
1
by: raji20 | last post by:
I want to make the script to run automatically everyday that checks for the new emails, if any new mails are there, it need to forward to the specified address. I need this to be via CRON JOB, how to...
1
by: =?Utf-8?B?VG9t?= | last post by:
I have a web form and I'm able to list db servers and Job listed in the SQL Server Agent Job list, now my question is, how can I execute a . so for example dropdown 1 has all my db servers on...
3
by: richardson | last post by:
How to create a job.how could it be efficiently managed without any locks occuring while a job runs.The scope and how to construct an effecient job.
2
by: EVH316 | last post by:
Hi, Is DTS can automate like schedule job? How? Thanks in advance
5
mrjohn
by: mrjohn | last post by:
Hey, I've been working with Java a bit, and I think I'm getting the basics, but I want to be able to use it effectively as a job. Are there any specific things that every Java programmer should know?...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.