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

Converting generated code to something readable

tolkienarda
316 100+
hi all

i came to work for the company i work for now in september and they have a lot of Dreamweaver generated ASP, PHP and Javascript. as well as some other scripts that no one understands but they work. my job it to maintain and upgrade these scripts. my question is should i go through all of the hidious code we currently use and replace it with clean code or should i leave the mess Dreamweaver made and just try to fix it bit bit as we need upgrades.
example. today i had to add some creative form validation to a online application and the software used to generate the code did a terriable job. and the script was several pages long. i could have re written the same thing in about a half page of php and had a better grasp on what was going on for future changes. i chose to work with what was there and know three hours later i am starting to regret my decision.

what do you all think
Mar 13 '07 #1
4 1957
AricC
1,892 Expert 1GB
hi all

i came to work for the company i work for now in september and they have a lot of Dreamweaver generated ASP, PHP and Javascript. as well as some other scripts that no one understands but they work. my job it to maintain and upgrade these scripts. my question is should i go through all of the hidious code we currently use and replace it with clean code or should i leave the mess Dreamweaver made and just try to fix it bit bit as we need upgrades.
example. today i had to add some creative form validation to a online application and the software used to generate the code did a terriable job. and the script was several pages long. i could have re written the same thing in about a half page of php and had a better grasp on what was going on for future changes. i chose to work with what was there and know three hours later i am starting to regret my decision.

what do you all think
It has been my experience that when you use Dreamweaver/Frontpage/GoLive etc.. you get a ridiculous amount of code and like you said you could have done a client + server side validation in less than half length. If you are comfortable with doing the validation yourself I would reccomend doing it that way. Also, don't forget that extra length is increasing the file size and perhaps the processing time as well.

HTH,
Aric
Mar 13 '07 #2
drhowarddrfine
7,435 Expert 4TB
If you can rewrite it then do so. Document it well and there will be no reason for anyone to complain. Three pages of a mess to one-half is worth it in my book.

The only code I would change, though, is the code that needs changing. If it isn't broke, don't fix it. But if they need you to make changes, that's when I would consider rewrites if faced with the part you mentioned above.
Mar 13 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
I don't know much about Dreamweaver generated code but in my experience if time allows then replacing 'hideous' code with concise well designed code saves time in the long run. The time you waste trying to interpret what the hideous code is doing is better done now when it is non urgent then trying to do it later during a time critical change.

Mary
Mar 13 '07 #4
tolkienarda
316 100+
that is what i was thinking. and after the nightmare i just went through with this simple change i think i will do that from now on

thanks

eric
Mar 13 '07 #5

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

Similar topics

20
by: Al Moritz | last post by:
Hi all, I was always told that the conversion of Word files to HTML as done by Word itself sucks - you get a lot of unnecessary code that can influence the design on web browsers other than...
29
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant...
13
by: Glen Richards | last post by:
Is there a way to do this. I mean there is a company who converts asm to their wsl language and then from that to c is there a way that we can do this?
8
by: Howard Kaikow | last post by:
I've been trying to convert the following C# Dispose to VB .NET: protected override void Dispose(bool disposing) { if (excelThread != null) {
2
by: TofuTheGreat | last post by:
I'm using "Now.ToOADate" for a record timestamp in a small database app (it's what I want to do so don't try to disuade me ;-D). Anyway. I store the value of Now.ToOADate in a string field in...
6
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET...
10
by: Ron | last post by:
I want to calculate the surface area of a sphere from an inputed radius with option strict on. I guess I am not converting something correctly. Here is what I am doing: I have a textbox...
2
by: DBuss | last post by:
OK, I'm reading a multicast socket. It attaches fine, reads fine, all of that. The problem is that while some of the data I get is normal text (ASCII String), some of it is Binary Integer. ...
25
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.