r/learnprogramming • u/BullCityPicker • Mar 22 '22
Don't be that guy.
I just took over a project for a guy who left. Don't be this guy:
ZERO comments in your codebase.
One and two character variable names with no discernable pattern.
Comment characters used to comment out big chunks of code for no discernable reason.
No error checking.
Reliance on data files that you forgot to include or explain, going in to meaningless data frame names.
Making outrageous claims about how much your code improves things with zero baseline performance.
People like this think you're an idiot because you can't make their code work, and get to be all smug. We will track you down and find you. You will need references someday....oh my.
2.6k
Upvotes
3
u/Citan777 Mar 23 '22 edited Mar 23 '22
Weeeeeell... (sorry for the text block, don't know how to give details without context).
I had been hired to lead a "team of developers" upon refactoring a semi-sensitive content website from old&abandoned framework to a more modern and perennial one. Contract was 3 years, which seemed damn overkill to me given the apparent specs.
Turns out a few "details" were left out...
1/ Clustered organization with development team, product manager and "traditional project manager" all in different departments and cities.
2/ My team was in fact no developers. At ALL. People that basically did support on scripts and minor modifications but never had training or real experience on projects, let alone web.
3/ Management decided to go for new framework (Drupal), new methology (Scrum/Agile), and give Product Owner role not to me (although I really was the best fit for this since I had the two visions, technical and business) but someone that knew nothing about web.
As you can guess, most ingredients of the recipe for epic... Fail! Still, in 3 years, was really feasible. 8 months focusing on training team to web development, in parallel spending time to think about architecture from user stories, then developing in iterative ways, perfectly manageable.
Long story short, it obviously didn't go that way, since management never admitted they did had a "casting problem" thus never gave my people any time to learn.
So after a few months they brought a "Drupal expert / senior developer" the project manager had already worked with on a previous project.
This guy quickly enough gave off several alert signals, but since he had a decent reputation and misunderstandings can always happen my and my OPS really engaged to work with. Because he managed to make some things work "for sprint demo" (whether that was actually workable production code or not), while my team was (understandably) completely crushed under the sheer amount of layers to grasp simultaneously and thus unable to produce, in a few months project manager made him the decisive guy (we later got three more people that were actual senior developers, although Javaist, from there we started making true progress but it was too late to change management dynamics).
Was he a professional? I'll let you judge. Among a few pearls...
- Zero interest in following best practices and git branching everyone had decided together.
- Always pushed code straight on mainline, forcing OPS to develop some weird process to prevent automatic builds on Jenkins if a local build without errors wasn't first made.
- Systematically made commits mixing A, B and Z, and only after several clashes started giving a reference to ticket (but still no indication on what's done, and sometimes mixing topics from different tickets).
- Fulfilled a mission to "align header text on left" *by increasing font size*, then complained it was not its fault layout broke later when we decided to increase font size globally because was not readable enough (we do agree that any decent person would have used text-align right?).
- Wrote several modules, A depending on B, then commited without specifying the dependance "in Drupal" resulting in build crashing, held OPS responsible for "not adjusting pipeline to make modules activate in the right order" (FYI, module definition takes care of that, it's the second thing you learn in Drupal development, it's definitely NOT ops's responsibility).
- Forked code from mainline to work on the backend part, straight up modified code *that was still used for the frontend* in spite of my numerous warnings NOT to do that, and of course never ever updated that code from frontend branch (I'll let you imagine the wreckage it resulted in when we finally could grab control of project again).
- Rarely commented code, was fine with generic variable names or typos in "human-readable" variable/function names, was fine with 4+ nesting level, "Utils" classes with completely unrelated things inside...
- And "of course" never wrote any single test (didn't even know how to write it).
- Fun fact: I had made some architectual analysis before project started, which had several flaws but was still decent enough on some critical points. More importantly, that guy ignored it fully to do things "his way" instead of simply demonstrating how his way was better (or mine was plain wrong), which was nothing more that I asked for.
Consequently, the backend that was supposed for 300 active authenticated users crashed server with... 10 people. On a mainframe with 2 web servers (each 16 core, 32Go), 1 cache proxy (similar specs) and 1 database server (similar specs). For what amounted to, in spite of weirdly complex validation process, a glorified documentation production.
Disclaimer: even if Drupal is reputed for being resource-hungry for authenticated, this is *not* normal. xd
Fun fact, bis repetitae: after some refactoring under my architecture choices, and huge work of rewriting code to make it less bloated and more reliable, we optimized database requests and caching so much that performance graphs were basically staying bottom line so we could divide platforms by a factor of 4 without users feeling any difference. xd
EDIT: sorry for what's nearly a pure rant. I just didn't completely make peace with this experience yet. Nearly cost me my sanity and broke several people in my team due to absolutely outrageous behaviour of management. Plus several *millions* of public money wasted because that guy was an expert factured ~1500 on a daily basis. For MONTHS.