Click here to Skip to main content
15,924,402 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon22-Jun-16 10:23
professionalJeremy Falcon22-Jun-16 10:23 
GeneralRe: Office politics and sh*tty code. Pin
Kirk 1038982122-Jun-16 19:52
Kirk 1038982122-Jun-16 19:52 
GeneralRe: Office politics and sh*tty code. Pin
agolddog21-Jun-16 3:40
agolddog21-Jun-16 3:40 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon22-Jun-16 10:24
professionalJeremy Falcon22-Jun-16 10:24 
GeneralRe: Office politics and sh*tty code. Pin
thoiness21-Jun-16 4:13
thoiness21-Jun-16 4:13 
GeneralRe: Office politics and sh*tty code. Pin
Steve Naidamast21-Jun-16 4:22
professionalSteve Naidamast21-Jun-16 4:22 
GeneralRe: Office politics and sh*tty code. Pin
Herbie Mountjoy21-Jun-16 4:50
professionalHerbie Mountjoy21-Jun-16 4:50 
GeneralRe: Office politics and sh*tty code. Pin
SeattleC++21-Jun-16 5:36
SeattleC++21-Jun-16 5:36 
Bad code comes from (lack of) expectations. Most devs are capable of writing good code. But they are human beings, and humans are lazy when there's no penalty for being lazy.

It's pretty hard, as a peer, to get people to write good code. You can't just say, "Why do you write such sh*tty code?" because people will (rightfully) think you're an a**hole if you trash-talk their work. You may get slightly more traction with a helpful comment like, "Do you know about RAII? If you use RAII here, you won't have to explicitly delete all those pointers."

(Huh, codeproject auto-censors my cuss-words. I thought the authors were doing it...)

You could try to get your peers to take up a static checker tool or de-linter. Sometimes even a reformatter helps, to get the whole code base into a common-looking form.

You may have more leverage by encouraging your manager to promote the use of these tools. As I said, humans are lazy when there's no penalty. If your manager wants you to write better code, that's a pretty big penalty for laziness. The Holy Grail would be to convince your manager to adopt a code review methodology.

When you ask your manager for help improving the code base is generally when you learn if there is any hope. If your manager views any attempt to review or refactor the code base as time wasted, then you're never going to get any traction. It is my sad experience that most managers are this way, making the usual fallacious arguments about efficiency and how the company can't afford to slow down. When you hear this, all you can do is polish your resume. You'll want to get moving.

GeneralRe: Office politics and sh*tty code. Pin
Andreas Mertens21-Jun-16 5:59
professionalAndreas Mertens21-Jun-16 5:59 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon22-Jun-16 10:25
professionalJeremy Falcon22-Jun-16 10:25 
GeneralRe: Office politics and sh*tty code. Pin
raildude21-Jun-16 6:16
professionalraildude21-Jun-16 6:16 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon22-Jun-16 10:26
professionalJeremy Falcon22-Jun-16 10:26 
GeneralRe: Office politics and sh*tty code. Pin
Harley L. Pebley21-Jun-16 8:09
Harley L. Pebley21-Jun-16 8:09 
GeneralRe: Office politics and sh*tty code. Pin
Gerry Schmitz21-Jun-16 9:10
mveGerry Schmitz21-Jun-16 9:10 
GeneralRe: Office politics and sh*tty code. Pin
baersteven21-Jun-16 9:14
baersteven21-Jun-16 9:14 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon22-Jun-16 10:28
professionalJeremy Falcon22-Jun-16 10:28 
GeneralRe: Office politics and sh*tty code. Pin
Fernando Takeshi Sato23-Jun-16 14:00
professionalFernando Takeshi Sato23-Jun-16 14:00 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon23-Jun-16 15:12
professionalJeremy Falcon23-Jun-16 15:12 
GeneralRe: Office politics and sh*tty code. Pin
Gary Wheeler27-Jun-16 2:17
Gary Wheeler27-Jun-16 2:17 
GeneralRe: Office politics and sh*tty code. Pin
Jeremy Falcon27-Jun-16 7:00
professionalJeremy Falcon27-Jun-16 7:00 
GeneralRe: Office politics and sh*tty code. Pin
Gary Wheeler27-Jun-16 7:07
Gary Wheeler27-Jun-16 7:07 
GeneralRe: Office politics and sh*tty code. Pin
mbb0112-Jul-16 22:15
mbb0112-Jul-16 22:15 
General@&#@^&@*!& MICROSOFT!!! DAMMIT! Pin
Mark_Wallace20-Jun-16 10:44
Mark_Wallace20-Jun-16 10:44 
General@&#@^&@&*!& MICROSOFT!!! DAMMIT! PinPopular
Kevin Marois20-Jun-16 8:59
professionalKevin Marois20-Jun-16 8:59 
GeneralRe: @&#@^&@&*!& MICROSOFT!!! DAMMIT! Pin
Cornelius Henning20-Jun-16 9:05
professionalCornelius Henning20-Jun-16 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.