Office politics and sh*tty code.
-
Jeremy Falcon wrote:
I'm about to switch projects
That is good news, because things sounded pretty bad (been there, done hated that). It's easier (and a lot less work!) to start fresh than to dig your way out of a hole, so all the best and good luck!
I wanna be a eunuchs developer! Pass me a bread knife!
Thanks man, and thanks again for the advice.
Jeremy Falcon
-
Yes. All that worked well for me. Better to jump overboard and watch them going full speed into the iceberg. Be diplomatic or fight it out, it does not matter. The only difference will be what's left of you when you finally get out.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
"I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.Hating seems easy and right when you're doing it, but it makes your life so much harder, and you're usually in the wrong to do so. We all work with people who are less talented than ourselves (and, if we're lucky, we also realise it when we work with people who are more talented). Do you give the receptionist sh1t? Or the cleaning lady? If you don't, then that implies that you value them more highly than a developer who is marginally less talented than you. That's a pretty sucky attitude, no? But it makes you willing to make receptionists/cleaning ladies feel happy in their work, but your actual peers (even if only slightly less talented/knowledgeable than you) have to suffer your vengeful ire.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
It's not only you. I'm bbq-ed here with a bad code grill.
-
It's not only you. I'm bbq-ed here with a bad code grill.
Good times!
Jeremy Falcon
-
Good times!
Jeremy Falcon
Sanford and son. :)
-
Sanford and son. :)
Nice! :-D
Jeremy Falcon
-
Sanford and son. :)
Gawd! It's "Steptoe", OK? "Steptoe and Son". Don't accept cheap Chinese American knock-offs, Harold.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
Some sage advice in the responses, I'll have to keep them in mind as I often respond with "this is crap". However my current problem is not that the code is lousy it is that the data source is Excel. Who in their right mind builds a mission critical database system based on a spreadhseet as a data source. The boss has got sick of me telling him that we are building a support nightmare.
Never underestimate the power of human stupidity RAH
-
Hating seems easy and right when you're doing it, but it makes your life so much harder, and you're usually in the wrong to do so. We all work with people who are less talented than ourselves (and, if we're lucky, we also realise it when we work with people who are more talented). Do you give the receptionist sh1t? Or the cleaning lady? If you don't, then that implies that you value them more highly than a developer who is marginally less talented than you. That's a pretty sucky attitude, no? But it makes you willing to make receptionists/cleaning ladies feel happy in their work, but your actual peers (even if only slightly less talented/knowledgeable than you) have to suffer your vengeful ire.
I wanna be a eunuchs developer! Pass me a bread knife!
Simply because those poor dears do exactly what you accuse me of doing. They pat themselves on the back for der ingenious ideas that nobody else came up with without ever asking themselves why that could be. The fall flat on their noses each and every time and can be grateful that some customers don't stand in front of their door with torches and pitchforks. One of them is a real star among the car manufacturers and I will never buy one of their cars if it has been produced with that particular software I had the geat fun to work on. Pushing the blame for the current desaster onto the guy who says 'I told you so' is convenient and eases their pain. Being blamed for their clever ideas then banned from all 'important' activities actually makes me feel less ashamed to have worked there. The cleaning lady at least never claimed it's somehow my fault that there still was dirt lying around and the receptonist was occasionally moved to tears by the way she was treated. There is more and others have had less patience and left for the same reasons. If you ask me, they have a very weak grip on reality by now. You want to know their latest grand plan? Now that the n*ggers on the field have deserted them, it can't be that the guys left over are responsible for any of the still abundant errors or downright embarrasments. It's the fault of the testers who did not find everything. And that's why I valued the receptionist, the cleaning lady, the testers and all who fled from this place more than those who crated the whole mess. If anything at all, I was an idiot for putting up with this as long as I did. In other places I finished projects all by myself and had customers who praised the results. The poor dears you are protecting can't claim very much in that direction, but that does not keep them from anything.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
"I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns. -
Some sage advice in the responses, I'll have to keep them in mind as I often respond with "this is crap". However my current problem is not that the code is lousy it is that the data source is Excel. Who in their right mind builds a mission critical database system based on a spreadhseet as a data source. The boss has got sick of me telling him that we are building a support nightmare.
Never underestimate the power of human stupidity RAH
Run, don't walk!
My CodeProject Articles :: Our forgotten astronomic heritage :: My website.
"Sorry, buddy, but this mission counts on everyone being as silent as possible, and your farts are just too much of a wildcard." - Korra to Meelo, "Kuvira's Gambit" -
Run, don't walk!
My CodeProject Articles :: Our forgotten astronomic heritage :: My website.
"Sorry, buddy, but this mission counts on everyone being as silent as possible, and your farts are just too much of a wildcard." - Korra to Meelo, "Kuvira's Gambit"(If that is possible!) [Edit] I do not mean that, in one way, because this world is founded upon such ideas, and that has made money for organizations (people) like you work in. Hopefully, you can point them towards responses such as this, and they will see more clearly that the tools they are using are not appropriate for the job. Yes, they may be working, but, having worked with a $20 million a year company that also used spreadsheets, I can say for certain that they are FAR from optimal!!!!! Hopefully, more members can chime in, and give you more ammunition to work with.
My CodeProject Articles :: Our forgotten astronomic heritage :: My website.
"Sorry, buddy, but this mission counts on everyone being as silent as possible, and your farts are just too much of a wildcard." - Korra to Meelo, "Kuvira's Gambit" -
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
Often the biggest problem is being viewed as objective. I find myself often in a position of defending code from people who are upset that they couldn't join in, and pointing out bad code in projects (including my own) to get people to up their game. The thing which I've found works best if to have tooling which can provide an objective view of the code. My two favourites being ReSharper and SonarQube, the first because it provides immediate feedback and helps fix a number of issues and the latter because it provides some great metrics that can be tracked (great if you can make it part of your build process). Building these up to show the team and your manager gives you the ammunition to show that you know what you're talking about and helps the team measure themselves against an objective measure. Of course there may be things like coding styles which people don't agree on (yourself included) but if everyone follows the same rules then things improve and it makes sure that everyone can read the code easily. Once these are in place you can build up some internal guides on coding practice to help new starters and as refreshers for existing people. It can be a long journey, but if you can present it as "it's not me complaining, look here's the proof" then it's an easier pill to swallow.
Eagles may soar, but weasels don't get sucked into jet engines
-
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
I used to be a real PIA about code quality and pissed of most of the department ... but as I was as hard on older, "less optimal" code written by myself and that I also listened to them and theirs complaint about my code, it worked out in the long run. Nowadays I mostly preach "Code Complete" and lends my copy to anyone even remotely curious. As most programmers really wants to improve it usually ends with them keeping the copy -- "Ahh, I have a older copy at home, you just keep that one". For "less optimal" code it's refactoring time wherever and whenever it's discovered :cool:
-
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
Jeremy Falcon wrote:
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects.
Noooooo! Of course not! It's only you! You alone have been "blessed" with cow-orkers that write stupid code! :doh: Seriously, my suggestion would be as follows: Everybody with half a mind would be able to understand that it is a huge advantage if code is written in the same way by all coders. There are several VS plugins that can enforce code standards available out there. Pick a standard and use it (all of you) - or tweak it to your common liking. My personal recommendation is IDesign's Juwal Lowy's "C# Coding Standards", which can be downloaded freely from their web site[^] As for existing code, it can be refactored and rewritten when it's practical and when time permits it...
Anything that is unrelated to elephants is irrelephant
Anonymous
-----
The problem with quotes on the internet is that you can never tell if they're genuine
Winston Churchill, 1944
-----
I'd just like a chance to prove that money can't make me happy.
Me, all the time -
Kevin Marois wrote:
I schedule it for a refactor.
Let me put it to you like this, the people running this show have probably never refactored anything in their life. And I seriously doubt they know what that is without googling it.
Jeremy Falcon
But why are you still there, seriously?
Make love, not Warcraft!
-
I'm very meticulous about the code I write. I always use regions, and I use the same regions in the same order in every class. This way I know exactly where code parts are. Also, all of my class members are listed alphabetically in their regions. When I see bad code, I schedule it for a refactor. I'm actually sitting here right now refactoring some offshore code. These guys just throw code in anywhere and its annoying and flat out lazy. Unlike you, my manager is totally on board with me cleaning up the code.
If it's not broken, fix it until it is
Having neat code doesn't mean that you have good code. You can always use Code maid to tidy up your code but if it's poorly written, that's not great. Also, how big are you classes that you need to use regions to manage everything? That would set warning bells off in my mind that I've violated SRP three ways to Sunday.
This space for rent
-
Well, the good news is, I'm about to switch projects, so the person in particular I've been working with in the past months will no longer be a concern (I hope) in about a week. That being said, you are right about someone being the bigger person, but I don't think that means apologizing since I've never once told them directly their code was crap. But he (the main person responsible) has insulted me to my face more than once. That being said, your points are great. I'll keep them in mind for the next project for sure.
Jeremy Falcon
Jeremy Falcon wrote:
But he (the main person responsible) has insulted me to my face more than once.
Sounds to me like your manager has told him that you were complaining about his code and this is his way of saying "Fork you". It's not enough to complain that something is wrong. You have to be prepared to show them why something is wrong - but, before you do that, why not take them to one side and say something like: "Hey, I'm just looking at this piece of code here and I was wondering why you implemented it this way. I know I must be missing something because I'm sure you will have considered doing x first, and I don't want to change something elsewhere that's going to break this, so I was hoping you could walk me through this and any touch-points that could impact it."
This space for rent
-
I'm very meticulous about the code I write. I always use regions, and I use the same regions in the same order in every class. This way I know exactly where code parts are. Also, all of my class members are listed alphabetically in their regions. When I see bad code, I schedule it for a refactor. I'm actually sitting here right now refactoring some offshore code. These guys just throw code in anywhere and its annoying and flat out lazy. Unlike you, my manager is totally on board with me cleaning up the code.
If it's not broken, fix it until it is
Kevin Marois wrote:
I always use regions
I really hate regions! :sigh: They obfuscate the code, you only get to see parts of it, but I want it all! If your code is really so properly written you shouldn't need regions. If you have regions in a single function then refactor that function so the regions now become functions. If you have regions in a single class then refactor that class so the regions now become classes. The only thing I usually put in a region is the Dispose function. Mostly because that's in the default Visual Studio snippet. And ordering alphabetically is just tedious and unnecessary, Visual Studio lists everything in an ordered list already. And huge big ass unwieldy functions and classes can still be ordered :rolleyes: I'm not complaining, I'm trying to make your code better ;p Also a nice examples how one programmers clean code is another programmers nightmare :)
Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
You've got to work on how you complain. Taking the direct route ("This is cr@p!" or a paraphrase thereof) might seem the logical route, because it's the truth, but it's not the way to put the point across. You're working with people, not machines, so you have to take feelings into account, just as you'd like others to take your feelings into account. As you said, you (and you are not alone) have written shall we say "less than optimal" code, in the past, so before pointing out errors/problems, think about how you would like people to point out the errors/problems in your own code. Then think of someone you work with whom you don't particularly like, and imagine how you would react to their "negative analysis" of your errors. Take that into account when you want to tell someone that something is "less than optimal" -- e.g. phrase it "Hey, this was a good start, and I think we could build on it!", rather than "This needs to be rewritten!" If you've already developed the rep of being a moaner, you should work very hard on getting things done without making that rep worse. Treating people as you would like to be treated yourself costs nothing more than a little thought.
I wanna be a eunuchs developer! Pass me a bread knife!
Feelings shmeelings! :sigh:
Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects. Now, I'll be the first to say in my day I've written crap, so who am I to judge right? But, over the decades of development I've done, I'd like to at least think I've learned what crap is and what's it's not. And as such, I find myself in a position at a job I've been at since mid February, where I tend to complain a lot - because the quality of code is so poor it's just sad. But, I complain because I want to see it improve. Seeing that nobody wants to be told their code sucks (even if it's true), I've been labeled a bit of a complainer unfortunately. And while I get that, the fact remains, the code is actually not that great. Which is pretty evident by virtue of the fact they always have problems with it. Well duh, I wonder why. But who wants to be the party pooper right? Whatever the case, my manager is getting fairly tired of hearing me complain, which is a bit of a downer since I've only been doing it because some things needs to be addressed to make our projects top quality. So, is there some fancy judo mind trick to get my point through, or must I accept you cannot fit a square peg into a round hole, and if people don't care about the quality of their work then you can't force them to?
Jeremy Falcon
Jeremy Falcon wrote:
I'm just curious to know how everyone else here deals with poorly written code in pre-existing projects
Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander