Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "locs"
-
Me: code quality is important
Everyone: <no shit given>
Director: code quality is important
Everyone: yes, it is very important, hurray!
Fast forward few weeks/months...
Me: why this function accepts 14 arguments?
ShitDev: yhm, you know, we need to fix it... maybe
Me: why this exception is swallowed?
ShitDev: oh, really? yhm, yhm
Me: why this function is copy-pasted and repeated (20 LoCs)?
ShitDev: yeah, true, but we wanted to make it fast.
Me: Dear director, this project sux and its quality is shit.
Director: you're exaggerating, it can't be that bad, it works, right?
Me: <polishing CV>
ShitDev: got praised for delivery14 -
This talk by Rich Hickey had a tremendous influence in how I approach my work:
https://youtu.be/f84n5oFoZBc
His Hammock Driven Development is my absolute favorite when it comes to work principles in programming/engineering. It also the one that is the hardest to explain to most PMs and leads because it can look like you are slacking off while others are producing hundreds LOCs. That you'll write better, less error prone code that won't need as much QA iterations is something you first have to prove to them but to me, it's well worth the effort.
If you have 40 minutes of time, do yourself a favor and watch the video. Maybe it'll have as much influence on you as it had on me 😃 -
To all self made seniors (and those who got granted this title because it was a morale boost): is it really so difficult to grasp ideas like: Single responsibility? Don't repeat yourself? Encapsulation?
Seriously? Is it difficulty level of some quantum physics or what?
I'm not a fucking genius myself either, but when I see 300-500 LoCs function, accepting 10 parameters, having half of code duplicated in different parts of solution - I really wanna start firing people ON THE SPOT.
P.s.
To all shitty developers advocates - I know that everyone makes mistakes sometimes - I'm talking here about consistent "don't give a shit about code" behaviour.23 -
I just found out that they added locs to the avatar hairstyles.
@dfox big up and ratings from Jamaica!2 -
So i recently inherited some legacy code.
Its actually not to bad. Just a few thousand locs which are mostly stretched across a handfull of functions lmao (800lines per function yay).
So the main thing i wana ask. Does someone here know of good techniques to gradually reimplement all of this.
Since im not gonna apply bandaids to this mess anymore than is needed.
Unfortunately this is a very important system and it only runs on production xD.
Idealy i would somehow be able to duplicate the tcp traffic to the reimplementation but that doesnt seem feasible.
Also what the individual modules classes and so on do wa snever documented and no one even knows how or why certain things even exist.
If anyone has any idea of what i can do. Apart from hoping to god i dont miss any weird quirky edge cases. Do let me know7 -
Sub Window_(some 20+ params)
...
Window_Fenster(...)
Sub Window_Fenster(even more params)
....
Altogether, these two procedures had ~20k LOCs.