r/learnprogramming • • 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

427 comments sorted by

View all comments

Show parent comments

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.

2

u/ThisIsNotWhoIAm921 Mar 26 '22

Hey man, thanks for taking the time to draw out the input. A lot of the details are flying over my head as im still a beginner, but ya it does seem that the guy is a little bit over his head, even though he is not technically sound.

1

u/Citan777 Mar 26 '22

Which would have been a problem for nobody if he had been honest about it, since most of the team had been put in a similar boat of "too heavy for current shoulders", so we were definitely not gonna judge harshly someone that is actually still learning the ropes.

His behaviour sadly was that of a true con man... Pretending you're a professional when you work less efficiently than a 1st year studient? That's someone I'll have no trouble gunning down (metaphorically speaking of course).

Which brings me to a few tips and advices, that you may take or ignore at your leisure. ^^

1/ Don't be afraid to say if one wants to drop upon you a task you don't have any clue about, or gives you a timeline you know from gut you can't respect. Does not mean you should refuse to take it (you have to improve anyways, best way is to work on actual thing, and searching/self-learning is possibly the most important skill) but it will help ensure expectations on both sides match and avoid frustrations later.

2/ Don't be afraid to ask for help, as long as you really did as much search/try/thinking as possible yourself. This will seen positively because a) that way you can bring a question properly formulated, with bits of code b) you prove you can take up challenges without going overboard from ego and blocking project). And if it's not seen positively, then imo it's a red light from a human resource management aspecT.

3/ Don't short yourself, but don't take credit for others. If someone gave you the breakthrough on a problem, say it during review. If you reused some algorithm from third-party, credit it in code (and ensure licence is compatible with your own project).

4/ Whenever you have some criticism / alert to bubble up your hierarchy about something that you deem significant,

a) always tell it, b) ALWAYS in a written form (having proof),

Wherever you work there will be sharks at some point, more or less close to you in responsability chain. Plus when shit hits the fan the less competent people are actually the most skilled at diverting it upon others, and sadly the "newcomers" are often their favored choice. If you were supposed to be aware of that problem, and you didn't alert about, you'll be roasted, whatever your reasons for keeping silent may have been.

Of course, this also means you need to keep a *non-synchronized* copy of your pro mails somewhere (I've lived the case of mails "mysteriously disappearing" from server then being deleted on my local client. Some people have no limits).

c) never use any word explictely or implicitely putting a negative judgement on a person,

For example, don't write this...

"X decided we should implement the drafts as full Entities, that's completely stupid it will mess everything up" (or worse: "X is incompetent because" some hard truths will just reward you with immediate firing squad) BUT

"It has been recently set that we should implement the drafts as full Entities instead of Revisions. I think we should strongly reconsider because this would cause the following problems down the line. (bullet points following)

d) give context, and e) make a 5-liner max summary version first

Most people won't ever try to read past that, even if they know you and are the prime recipients of your message, believe my experience xd (best is putting full details argumentation in attached/external document). So summary is the "actual message", everything else is just here for "giving weight" but chances are you could put a middle finger in there without anyone viewing it (don't do it though. Just in case xd).

For context at least a one-liner for summary, and concise but precise enough for the "full". Because even if initial recipients are supposedly familiar with topic, they may not have their brain "on it" when they read (multitasking, reading this days after, etc).

Plus, consider by default that every mail you send will be propagated horizontally and vertically as if you had published it on Facebook and mass-mailed the link. So past the first link of the hierarchy chain, chances are people won't know anything about it (and probably have no technical knowledge). Bringing to final point.

f) In summary be light on technical aspects and stress the benefits/risks from business/project point of view. Taking earlier example, bullet points would not be in summary, instead, you'd have "Going through with full Entities approach has 100% chances to bring severe problems of performance and maintenance, multiplying operating costs and dev team's immobilization by a factor 2 or 3 (put numbers if you are confident, otherwise "significant/huge" factor is enough).

People don't care about quality, they care about costs. Up to you to translate one into other. xd

So maybe you knew all this because you already have fair experience of "work life", in case not here are you warned (in spite of that dark drawing, most people are actually neutral or even caring. Sadly following those practices is the only way to prevent bad surprises from the sharks lurking around).

Good continuation on your work :)