|
Legacy code is always a major pain, no matter what language it's written in, or who it was written by -- and the fact that you have "strong opinions" means that you are unlikely to be happy with code written by almost anyone else.
Look at it this way: You're getting paid to do what you do well. What more do you want?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I walked into a situation loosely similar twice.
My first coop(internship basically), I was hired explicitly to fix some bugs in a bit of program by their 'Genius programmer', who wrote a random (and important) app in C# rather than VB the Engineers turned programmers knew how to handle and had since left. After about two days it occurred to me that he was literally playing with everything he could fit into the application, without regard to if something made sense to be used there or not, because he was exploring the language. Now, I'm two weeks in to the job, an intern, and this is the legacy of their 'best' programmer, I can't just say it's crap and needs to be replaced. I took a bit of time, translated what he was doing into a pseudo VB/English bit for my boss. Being a bit of a programmer he was every bit as confused as I was, I outlined a basic approach to cleaning it up and how that'd make working on it easier in the future, and got his approval. This became a theme fairly quickly, and to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means.
My real job, nearing my first year here at the moment, I was hired to replace some contractors who were price gouging and delivering late. Well, on top of that they were doing things in some of the most inefficient ways imaginable. There was a particular bit of page load logic which had the potential for N^3 database connections to be fired off, every load, and it was about 1/3rd the content of the page. They didn't hire me to fix that, they hired me to finish up some work they needed done ASAP, so I mentioned it and ignored it until they made a related request. Once touching any bit of it was back on the table I reminded them of the N^3 connections, and stated I could do it in 2(not N^2, TWO) as well as adding the new features they wanted, as well as reducing the time to implement any other features in the future if I could re-write the entire chunk. I quantified the differences in load time, detailed the reduction in resource utilization, tossed a few more buzzwords and statistics in the right directions and they approved it.
What's the point of all that? Show them why it would benefit them if it changes, you need to learn the system before you can alter it anyway, note the problem sections, note any improvements you can make off the top of your head, and find a way to quantify the improvement in the software that they'd see. Execution time, maintenance costs/time, and development time have all been winners as far as I've seen.
Edit:
But these where all production software, if this is legacy code you're dealing with you probably won't have half the luck, but it may be worth a shot. I managed to get my paws into re-writing a few legacy apps at my internship when I noted certain improvements that could be made easily.
|
|
|
|
|
Distind wrote: to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means
It means "wear glasses".
HTH.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
This is my first time happening something like this. The good side is that the manager admits i know better than him and he thinks i'm a good asset. He says that if it works like it is, why change ? anyway. Now i know what i have to do 
|
|
|
|
|
Lucian-aSterX wrote: and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application
To be fair, what did you expect? He is not going to let every new programmer rewrite the project from scratch just because they don't like the code base. I *never* liked the code base I had to work with (for different reasons and to a different degree). And if even you start a new project, count on the next guy hating it. Such is life
|
|
|
|
|
Ah yes, been in this business since 89 - always hated the previous person's work for various reasons. Surely, they have hated mine too when someone would come in and work on my code base too.
But, my current job, I took over a project being developed from scratch from a guy who had left the company. The software was so well designed and written, that I understood exactly what he was doing, and had to change VERY little of it (mostly to add features to it that he hadn't thought of).
So, there are cases where the person coming in does like the previous person's software, but admittedly they are very rare.
|
|
|
|
|
I'd recommend re-factor. It's slow, tedious and causes bruising on the brain. But if applied consistently, you could end up with a much better code base that includes testing and documentation.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
very good advice. thanks 
|
|
|
|
|
I won't touch VB.Net, but I've become somewhat of a specialist in taking over crap. The first thing to remember is to not break what works. Some bad applications started out good, but went bad over the years or may look horrible, but do solve the problem.
The second thing is to be EXTREMELY aware of the politics--I have gotten into huge trouble by fixing code I wasn't supposed to even suggest wasn't working right. (Essentially got fired early in my career when the CEO discovered I'd redesigned "his" app and rewritten much of "his" code [which wasn't crap, but wasn't great either--very utilitarian]. I thought that's why I'd been hired and the VP of R&D knew I was doing it so defended me. Eventually I was "laid" off with a good severance package when that VP was out-of-town [and out-of-sorts with the CEO].)
As has been suggested, start small. One thing this really helps in is understanding the code. Quite often the code does work, but isn't very good because the engineer isn't a good programmer and/or, in my case since I only work on Windows, doesn't keep up with the Win32 API. But, the code DOES work and breaking what works is very, very bad. You'll also find that despite the mess, there often is a style, however perverse, that will be very helpful when making changes.
|
|
|
|
|
Christina Schmid deserves respect for the eulogy[^] she paid to her husband.
A few choice lines:
In my eyes my husband, my son’s father, was a warrior. Warrior are unique; our protectors, not destroyers.
Becoming his widow has been the hardest thing I have ever done with him
We now have a duty to not just honour what he stood for, but to live lives which honour the sacrifice he made. Please do not allow him to die in vain.
The link contains the full eulogy, please read it and understand what hundreds of families, here and across the globe, are facing.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I saw it on the news last night, she showed courage, and I wish her well.
------------------------------------
In science, 'fact' can only mean 'confirmed to such a degree that it would be perverse to withhold provisional assent.' I suppose that apples might start to rise tomorrow, but the possibility does not merit equal time in physics classrooms. Stephen J Gould
|
|
|
|
|
Well "scam" is probably a little harsh but I've basically found that the popular belief that you can get some great deals and savings on Black Friday seem to be mostly untrue. These are my brief observations so far :
* Every store has a "limited" number of good deals (typically some high end HDTV at $300 off, but the limit is never more than 5 per store)
* They mark up prices and then offer a 30-50% discount (even then Amazon usually has it cheaper)
* Selling obsolete electronics (like a Nikon D40 at the same price as a newer equivalent such as the D3000)
* Selling unknown models at a discount. People see a 32" LCD TV at 400 bucks and rush to buy it (most likely a bad model, and that too a 32").
* Assuming you wait in line 2 hours and actually do get some savings, say 50 bucks. Is that worth the 2 hour wait in the cold? (I assume November is chilly in most parts of the country).
* No price match guarantee (except Walmart)
Overall my plan is to completely avoid the Black Friday sale. And while only one guy got killed last year, I don't want to risk being stuck in a stampede.
|
|
|
|
|
Exactly my thoughts on 'sales'.
I avoid January sales like the plague.
Whenever I have been before, the shops get rid of all the items they would normally sell and fill up to the brim with tons and tons of crap that no one would otherwise buy.
"People who don't like their beliefs being laughed at shouldn't have such funny beliefs." ~ Anon
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
Now reading: 'The Third Reich', by Michael Burleigh
|
|
|
|
|
They also sell seasonal stock at a discount where it would be prohibitively expensive to keep it. January is an excellent time to buy Christmas cards and wrapping paper, for example*. Less often, you cansometimes get a good deal on a warm winter coat in the spring.
* Of course, you have to keep it somewhere for 11 months, instead of the shop
|
|
|
|
|
Very simple adage here:
If it seems to good to be true, it probably is.
|
|
|
|
|
I'm sure you are correct: saw an ad on telly and the 'small print' clearly stated that some lines ahd been bought in just for the sale. Still, it is fun watching the sales day hysteria over here. Who the hell needs to go shopping, for anything, at 0400??? (Yes, some of the shops here are opening around that time: madness I tells ya, madness).
|
|
|
|
|
Totally agree, normally, if something is in on sale it's for a good reason! i.e. Old model, disconinued line, crap, all of the above.
He who makes a beast out of himself gets rid of the pain of being a man.
|
|
|
|
|
Probably with the valuable exception of Sony; sometimes in order to smash competition and/or to promote some new model they make enormous discounts for a limited period of time.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Ever seen that wildlife footage of a massive herd of wildebeest struggling to cross a river whilst the crocodiles drag them under?
Just wondering.
|
|
|
|
|
They act like this only in front of the cameras, trying to become famous. In reality crocodiles and the buffalos are the best friends out in the wild. In fact if the camera men are not there, the crocodiles use to make a pontoon bridge using their backs and helping the antelopes and buffalos to cross the river.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Nishant Sivakumar wrote: Assuming you wait in line 2 hours and actually do get some savings, say 50 bucks. Is that worth the 2 hour wait in the cold? (I assume November is chilly in most parts of the country).
I don't even try to go to stores during this time. To me it is nuts.
Last year, I did however cash in on the 35% live.com eBay cashback and ended up getting a Quad core intel Q9550 + 6GB quality DDR2 memory + 650W ANTEC 80+ PS + ASUS P5Q Pro all for under $400 US. I know now its not as great of a deal now but back then the Q9550 was a $300 chip alone. I am hoping there is an insane bing cash back this year as well.
John
|
|
|
|
|
Yes, it's the same everywhere, this stuff happens at home with stocktake sales. It's all lies, they get people into a frenzy and then sit back.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
DFS springs to mind - here in the uk.
|
|
|
|
|
Nishant Sivakumar wrote: Every store has a "limited" number of good deals
Sure they cannot put everything on sale. Stores want to make profit. If everything they sell is at a loss they will go bankrupt in no time. The idea is that you put limited number of things on sale and lure customers inside the store once inside the store they will buy a few more things which will be at a better deal.
It is not a scam, it is just a selling strategy.
That being said, intelligent shoppers can usually find good deals. This requires lot of research, patience and targeted shopping. Now you may also have to consider the risk vs reward. Standing in line at 4 AM is no fun. I have seen people camp starting at 12:30 AM. Over the years, I have been able to get pretty excellent deals on electronics, clothes and toys.
Here is a strategy that works the best:-
1. Check the ads. It is usually 50c to get the ads paper.
2. See if things that are at a discount are .
3. Check the online prices. If the online prices are same order online.
4. Do not focus on the best deals unless you want to camp out. Focus on those deals which are not very good and not very bad that is you will not get those things at the BF price later.
5. Do not go to the store too early nor go to the store too late. Stores open at 6 AM, 5 AM seems to be the ideal time to get in the line.
6. Be prompt to fill in the mail in rebates.
|
|
|
|
|
All my favorite stores are open 24 hours a day, every day, and there's never any line! In most cases, too, they're the cheapest source for all the things I want. Just click...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|