|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
| View Poll Results: Who hates rewritting BAD code? | |||
| I HATE TO DO IT! | | 19 | 70.37% |
| I LOVE TO DO IT! | | 8 | 29.63% |
| Voters: 27. You may not vote on this poll | |||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Who here HATES rewriting BAD code?
I just have to vent a second...
I HATE REWRITING RENARDO CODE!!! It's like being the "pooper scooper" that follows the animals in a parade. I wish I was able to just start from scratch on some of these projects. The database indexing is MESSED UP! There are 25 different SQL queries in the first 75 lines of code in one of these files. I packed them all into one query, and you know what? It's 1,000,000,000 times faster. What was he thinking? Ok, I am done now. |
|
#2
|
||||
|
||||
|
I enjoy rewriting poorly written code. It provides me an opportunity to become a better programmer. It provides me an opportunity to see how another programmer approached a problem - what steps they took to solve it, their thought process(es) while solving it, the design and logic choices they made, etc. Its kind of an ego kick for me as well, because I'm usually much better at coding than the person's code that I'm rewriting, so I get that little personal satisfaction thing.
![]()
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
|
#3
|
||||
|
||||
|
Here is an overview of my works website that was done by a web development firm just before I joined the company.
200 or so PHP files. No templating, all non-OOP code. No database abstraction. Usage of dreamweaver templates meaning that common items (ie menu) are repeated on every page. Standard SQL queries that are ran on each page are not used in functions, they have sperate copies of them. The code is written to work with Register Globals on and variable naming is quite often cryptic and useless. It is my job now to maintain this pile of crap. Yay. Need more be said. I really know what you are going through ![]() |
|
#4
|
||||
|
||||
|
Hey andreas if you get a copy of ConTEXT it might help you a bit. You can open the whole website in it and then tell it to do search and replace on all open files so you could get it to replace all the menu code with an include or something...
|
|
#5
|
||||
|
||||
|
Quote:
Dreamweaver MX will allow for the same thing... sounds like, if they're using DW templates, they've already got it... |
|
#6
|
||||
|
||||
|
I have dreamweaver MX and have been doing that for some sections. The thing is that none of these files have any Dreamweaver templating comments in them, they have all been removed!?!
Also some sections are slightly different which cause the search and replace not to get them so I still have to go through and check all of the files, this does take its time. |
|
#7
|
||||
|
||||
|
Quote:
Now see, that's the difference between "poorly written code" and "BAD code". Poorly written code has some structure and some thought process behind it. BAD code is usually an accumilation of copy/pasted code with values changed until it stops crashing. I'm all to intimate with rewritting BAD code. |
|
#8
|
||||
|
||||
|
I'm all about the bad code. Call me the rebel of PHP, and don't don't even look at my C++ it'll poke your eye out...
Hah j/k just feeling goofy cuz work ends in less than 20 minutes, and it's been a decent Monday. I've worked alongside a bad coder or two before. What irked me the most was that these were people I knew were brighter than me (though that's not saying much) or stronger in their programming background (Caltech vs a liberal arts college, which isn't the best choice for someone interested in computers ) but were just too lazy to do things the right way. Sure it worked, for the time being but a month or two down the road, they were kicking themselves for silly mistakes.-b
__________________
PostgreSQL, it's what's for dinner... |
|
#9
|
||||
|
||||
|
Even though I voted for "love," I have mixed feelings about it. If the program went through an efficient design process, and analyzed requirements and feasibility efficiently, but the syntax and code organization is sloppy, I don't mind. However, if the programmer jumped headfirst into coding without planning, then s/he can get him/herself out of the mess without my assistance.
|
|
#10
|
||||
|
||||
|
*ack* eeeep!!!
I have just read what some of you guys are up to - with Dreamweaver this, and MX that... Guys, can I just draw your attention to a very useful little thing known as UNIX, and it's common x86 implementation, Linux - Which I have found actually accellerate development by such an appreciable difference, that developing enterprise-level applications on a Windows desktop would be to me about as good a torture as cutting off my hands. </sarcastic, but serious message> christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Backingline: Advanced betting software, dutching calculator |
|
#11
|
||||
|
||||
|
lol. The best code rewrite I have ever done was chopping about 300 lines of code down to about 50. The programmer was taking a large amount of info from the db and reworking it using about 4 arrays and so many string checks and ifs that it was just criminal. I then wrote out an SQL statement that did all of that in the database and removed all his code. It was still bad code but it was better. The database has been developed and everything was nearly ready for launch when the client wanted to do something extra and this was a 'hack' that meant we didnt have to change the database design.
|
|
#12
|
||||
|
||||
|
Quote:
Don't have a choice @ work - the other 2 people in my dept are designers, and we use the check in/out aspect of MX to keep from overwriting files. I'm using Zend Studio 2.6 for all of my coding, and MX is basically a glorified FTP client. I also have a Sun Blade 100 running Solaris 9 in my office, as my own development server... but, not *allowed* to write code on it, just run PHP/MySQL/SunONE (yes, we actually use SunONE here, not Apache. No, really.). |
|
#13
|
||||
|
||||
|
Well I do quite a bit of WYSIWYG table work since Dreamweaver does it well and I can get it done quicker than I can if I typed out the HTML. I still do all my own code in its coding view. I also support access databases so Linux wouldnt really work.
|
|
#14
|
||
|
|