Bad designed software.
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
You should ask JSOP, he is the resident VB.Net Expert now! [David Ducks for cover and hides under a desk]
------------------------------------ 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
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
Do what you're told and STFU.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
It's called legacy code. Yes, most projects I've done involved some of it. I have an app in my current job where the UI is still in VB6. My policy is don't re-write for the sake of it, but write everything new to conform to current standards and good design patterns. As necessary the business logic and data access code sections have been extended with C#. Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.
Simon
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
Lucian-aSterX wrote:
does anyone have similar experiences ?
all the f***ing time but my pet peeve at the moment is functionality being developed in a release branch for several releases in the future as it's not approved for any of the next 2 releases, and features being developed out of this functionality in the same branches and then at the last minute someone decides they want it going into the next release due tomorrow. It keeps happening and always results in a variety of interesting merge errors.
-
It's called legacy code. Yes, most projects I've done involved some of it. I have an app in my current job where the UI is still in VB6. My policy is don't re-write for the sake of it, but write everything new to conform to current standards and good design patterns. As necessary the business logic and data access code sections have been extended with C#. Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.
Simon
Simon Stevens wrote:
Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.
That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
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'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
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 h
-
Simon Stevens wrote:
Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.
That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.
Dave Parker wrote:
- Variable names must be a maximum of 3 characters.
I remember when it was Single Character for variables!, Three would be glorious!
Dave Parker wrote:
- Every function should start with "On Error Resume Next" in order to avoid runtime errors.
Seems ok to me, in a test situation anyway, not it final code though. BUT...
Dave Parker wrote:
- All variables should be global. Local variables in a function are no no.
Oh dear, I have been guilty of this and had some horror stories in order to, er, correct it with 'similar' variable names. I have since learnt my lesson :)
------------------------------------ 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
-
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 h
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!
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
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 :)
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
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]
-
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.
-
Simon Stevens wrote:
Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.
That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.
Dave Parker wrote:
Variable names must be a maximum of 3 characters.
check this [^] out.
-
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 h
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 ? :doh: anyway. Now i know what i have to do ;)
-
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 :)
-
Dave Parker wrote:
Variable names must be a maximum of 3 characters.
check this [^] out.
Eek - yes that'd get annoying. Imagine it without intellisense!
-
i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?
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.
-
Do what you're told and STFU.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001...and forever be someone's bitch.
-- Kein Mitleid Für Die Mehrheit