News for hackers. Stuff that matters.
Re:Reviewing the worst piece of code ever by bane on Sunday August 02, 2020 @12:11AM (#24026264)
Ha, this is nothing. We once fired a programmer and had her turn over her code after she failed to turn any work in after a few months. Her code was atrocious and also none of it worked...or even was runnable. The biggest sin was that she wrote all of her code in MS-Word, smart-quotes and all on all the literals. Never once ever tried to run or test any code, just thousands of lines of useless stuff that "looked" like code.

Oh yeah, she's also an adjunct CS professor at a local college.

Re:Reviewing the worst piece of code ever by t0mmel on Sunday August 02, 2020 @01:13AM (#24026535)
I can’t help wonder “where are the colleagues?”

It’s not that I expect someone to try and salvage a situation where someone is coding in Word - but is there more to the story when you say this went on for months ? I don’t think I have ever been in an environment where that would ha e been allowed to continue for that long... ? Sounds like an environment scared of dealing with things ?

Re:Reviewing the worst piece of code ever by ibejoeb on Sunday August 02, 2020 @08:30AM (#24028270)
Could've been and overactive HR situation. Sometimes it's clear that it needs to end, but despite that clarity, the organisation dictates that there be PIP, which then kicks off a documentation period, and so on, which can in fact take months.
Re:Reviewing the worst piece of code ever by bane on Sunday August 02, 2020 @11:15AM (#24029214)
Pretty close. It was a perfect storm of her being a subcontractor, buried under a hierarchy of a mix of incompetent subcontractors and incompetent employees who also happened to be fairly senior. In the mix was also a dose of HR sensitive health issues, and subcontractor politics.

In other words it was a mess. And it took a lot of firings to get rid of all of them once the tower of failure was discovered by a new outside hire department head. There appeared to be a something an effect of the incompetent senior person surrounding himself with incompetents who then hired incompetents and turtles all the way down.

It was almost comical that we ended up with such a group of terrible technical staff in this area, but "types code in MS-Word" was definitely the low point and is now a bit of a company legend.

Re:Reviewing the worst piece of code ever by m463 on Sunday August 02, 2020 @03:07AM (#24026937)
And this is why the interview process has coding questions.

  11. Do new candidates write code during their interview?
wow, this is 20 years old:

https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-s...

Re:Reviewing the worst piece of code ever by nurettin on Sunday August 02, 2020 @08:35AM (#24028310)
We had a guy nicknamed jellyfish. He was responsible for crafting a frontend to the university's remote education system in flex and connect it to flash media server. After six months of "coding", he was asked for a demo and all he did was to showcase one of the existing products. After getting fired, he sued the university and got back in to get a few more paychecks before leaving. He was excentric, drawing role playing swords and printing entire books that he never read.
Re:Reviewing the worst piece of code ever by riffraff on Sunday August 02, 2020 @08:42AM (#24028337)
How was he able to get back in ? The firing seems to have been fully motivated according to your story.
Re:Reviewing the worst piece of code ever by nurettin on Sunday August 02, 2020 @08:57AM (#24028426)
He managed to drag the case from court to court and it looked bad for PR.
Re:Reviewing the worst piece of code ever by catacombs on Sunday August 02, 2020 @10:44AM (#24029007)
> it looked bad for PR.

It's a shame the lengths universities will go just to make sure they look good, even if that includes rehiring problematic employees.

Re:Reviewing the worst piece of code ever by colmvp on Sunday August 02, 2020 @12:23AM (#24026318)
> We once fired a programmer and had her turn over her code after she failed to turn any work in after a few months

How did that go un-noticed for months?

Re:Reviewing the worst piece of code ever by mercer on Sunday August 02, 2020 @07:45AM (#24028023)
We had a guy who, after a month of sitting smack-dab in the center of the IT department being busy on his new MacBook, got caught with his pants down because he finally asked for help, and me and a bunch of other devs stood behind him watched in horror as we discovered that not only did he know nothing about programming, he didn't know /any/ keyboard shortcuts.

When we asked him to copy some code from one file to another, he'd click on 'edit' and 'copy', struggle to get to the other file, and then click on 'edit' and 'paste'.

How it went unnoticed is that we were all busy with our own stuff, he was put on some small project that none of us were working on, and we just assumed that nobody would be stupid enough to hire someone without at least /some/ vetting.

He slipped through the cracks because he got hired into another department, and when they found out that he'd worked as a 'developer' at Microsoft they figured he'd be more useful in our department.

In hindsight I feel I should've known something wasn't quite right when every time I walked past his brand-new MacBook, he seemed to /really/ be struggling with something and it never looked like it was code. I imagine he spent the entire month figuring out how to deal with not having a 'start' button.

EDIT: I'll add that while this was in my top 10 of worst situations, there are many others that, for me, provided a convincing argument against the idea that corporations are somehow more efficient or whatever than the government.

My experience with both the public and private sector, beyond a certain size at least, is that they're largely similar in wastefulness/inefficiency/idiocy/etc.

Re:Reviewing the worst piece of code ever by onionisafruit on Sunday August 02, 2020 @10:03AM (#24028770)
That’s what I felt like when ai joined a company that issued me a macbook for the first time. There’s nothing quite like demonstrating your code to somebody and having the conversation turn into a tutorial on cmd vs ctrl keys. It was probably only a week or two before I had it mostly worked out, but the imposter syndrome was pretty bad for a while. I can imagine falling into the same trap as the fellow in your story if I had trouble with the code too. At some point you start thinking that anything you say will out you so you just shut up and hope to delay the inevitable.
Re:Reviewing the worst piece of code ever by noir_lord on Monday August 03, 2020 @01:49AM (#24034575)
Happened to me at the start of the year, I chose macbook because reviews on 16" keyboard said not horrible and the rest of the team where already on it (and I had juniors to support).

I resolved from day one to not fight the machine into behaving like Fedora instead learning the actual shortcuts (and I installed Rectangle).

It took about a week before I was comfortable and a lot of that was remapping my IDE since I have extensive altered keybindings and shortcut keywords for that on linux.

Once I accept it was just a unix with a different DE it wasn't so bad, messes me up more the other way I keep hitting alt+C etc on linux now.

Re:Reviewing the worst piece of code ever by CM30 on Sunday August 02, 2020 @04:53PM (#24031653)
Same here. Started a company where employees had Macbooks to work on, and was all kinds of lost for the first few weeks because of it.

Then again, that's still a problem even now, since switching between a PC and Mac on a fairly regular basis still leaves me a tad confused about the shortcuts and key bindings.

Re:Reviewing the worst piece of code ever by agustif on Sunday August 02, 2020 @12:02PM (#24029469)
Been the same for me using a Windows PC on work having a Mac home.

having different keymappings in different machines is hard

Re:Reviewing the worst piece of code ever by RulerOf on Sunday August 02, 2020 @02:49PM (#24030640)
I was okay when I had the proper keyboard in front of me, but I still stumble with reflexively using the correct keys for shortcuts when I'm remote controlling one from the other.

I've found it very difficult to use Ctrl+C to copy from Windows and then Cmd+V to paste on Mac OS without pretty frequently using the wrong modifier key.

Re:Reviewing the worst piece of code ever by agustif on Sunday August 02, 2020 @03:03PM (#24030761)
Also, Hyper.app has ctrl+shift+v/c for copy paste, Git-ui has some weird shit like alt-shift-fn-c/v too LOL...
Re:Reviewing the worst piece of code ever by mercer on Monday August 03, 2020 @02:57AM (#24034870)
This guy truly just didn't know about keyboard shortcuts in general!
Re:Reviewing the worst piece of code ever by rtlfe on Sunday August 02, 2020 @08:16AM (#24028201)
> How it went unnoticed is that we were all busy with our own stuff, he was put on some small project that none of us were working on, and we just assumed that nobody would be stupid enough to hire someone without at least /some/ vetting.

I'm still confused about how this could have happened. Did anybody ever ask how his work was going? Did he just lie and say it was great? Did the person have a manager? Shouldn't the two of them have set some kind of goals and milestones for their first project? Does the company do code review? Wouldn't it be considered odd that the person wasn't sharing any code to be reviewed?

It seems like there must have been some serious culture/management problems at this company.

Re:Reviewing the worst piece of code ever by Aeolun on Sunday August 02, 2020 @08:51AM (#24028394)
Yeah, the problem is that you need a marginally decent company to make all of this work.
Re:Reviewing the worst piece of code ever by chiph on Sunday August 02, 2020 @09:59AM (#24028744)
Back during the dot-com era, we hired someone (and paid for their relocation across the country!) who didn't know how to code. We were a VB6/COM shop at the time and they spent easily 3 days on a simple if..else statement before someone noticed. To their credit, the company was generous with the severance.

There were a couple of reasons why this happened. Firstly because at the time, companies were hiring anyone who could spell "programming". There was this huge shortage of talent. And secondly, everyone was too busy and tired from 14+ hour days to have done a proper interview.

Re:Reviewing the worst piece of code ever by mercer on Monday August 03, 2020 @03:06AM (#24034905)
> I'm still confused about how this could have happened. Did anybody ever ask how his work was going? Did he just lie and say it was great?

Yes and yes. I suppose he also lied to get his previous job as a 'programmer', or made the whole thing up.

> Did the person have a manager? Shouldn't the two of them have set some kind of goals and milestones for their first project?

He'd been given time to 'get comfortable' and familiar with the codebase, and was left with some really minor tasks. I think management just forgot to check in with him after a week or so, and everyone else around assumed he was busy working on something. Quite a few freelancers in the department who sort of just did their own thing.

> It seems like there must have been some serious culture/management problems at this company.

Maybe. I remember that particular time being really busy because of some big feature that was about to be deployed and, as I mentioned, it was quite common for freelancers to come and go and work on things that didn't really involve the rest of the team.

I think it wasn't really a serious culture/management problem, but more a consequence of the fact that he came from another department after someone discovered that he was a 'programmer', bypassing the usual process.

When I started at this company I got some time to get comfortable too, but I was hired to work on something specific, so the manager in charge of that came up to me pretty soon.

Re:Reviewing the worst piece of code ever by bane on Sunday August 02, 2020 @11:35AM (#24029320)
> It seems like there must have been some serious culture/management problems at this company.

Yes. In almost every case I've seen it seems to come down to a localized culture/management issue in the area where the person works. Usually fixed on a particularly terrible senior manager who has the clout and connections to distract from the problem while problem employees fester forever.

Re:Reviewing the worst piece of code ever by rcurry on Sunday August 02, 2020 @10:52AM (#24029057)
My favorite was the guy who would come into work, put his jacket on his chair, and then... go to his other full time job. He'd return in the evening to get his stuff and make it look like he'd been working long hours. He got away with it for almost a month.
Re:Reviewing the worst piece of code ever by lr4444lr on Sunday August 02, 2020 @09:32AM (#24028590)
Makes me wonder if one of the major factors of agile methodology is simply that incompetent people can't hide behind a long predeploy process.
Re:Reviewing the worst piece of code ever by bdavis__ on Sunday August 02, 2020 @10:30AM (#24028914)
you have a point.

allow me a counter.

incompetent people can do little snippets of work for a sprint, and then get promoted. and be absolutely unable to deal with anything more complex that a small bit of functionality. after a couple of sprints, they have the 'chops' to become a manager, or a director, or an engineering VP.

Re:Reviewing the worst piece of code ever by jarym on Sunday August 02, 2020 @08:08AM (#24028153)
I was in a situation where it went NOTICED for months but the managers were too scared to fire him (a contractor so should have been easy) because there was some 'HR mess-up' that they were very cagey with details on.
Re:Reviewing the worst piece of code ever by bane on Sunday August 02, 2020 @11:37AM (#24029333)
Depending on the situation, subcontractors can also be extra hard to fire. If they were hired to fill out staff on a contract, they may be entitled to some kind of workshare percent and threaten breach of contract if you pull their terrible people off work without a replacement. Then they fail to produce a replacement in a timely fashion.
Re:Reviewing the worst piece of code ever by watwut on Sunday August 02, 2020 @07:33AM (#24027957)
We had something similar with a dude. Went "unnoticed" for months, then moved around teams doing nothing in multiple for months.
Re:Reviewing the worst piece of code ever by tgv on Sunday August 02, 2020 @10:19AM (#24028848)
Probably by making the right noises in meetings.

Quite some time ago, I worked in a company that hired a independent contractor for writing some non-trivial code (low level NLP) in C or C++ and interfacing it with a slightly opaque proprietary API. The guy came with an impeccable resume, or so we thought until we found out 6 weeks later that he'd been busy typing garbage, and not a lot of it either. He claimed these 100 to 200 lines were some form of design, but it was so utterly ridiculous that he was sent away immediately. I did have some experience with the API, and ended up with a working module of 2600 lines over a few days.

Re:Reviewing the worst piece of code ever by gav on Sunday August 02, 2020 @03:54AM (#24027135)
I was on a project where a recently hired Senior Java Developer managed to avoid committing code for three weeks with various excuses. When we finally looked at their code, it was a couple of hundred lines code that looked like Java, but with no semicolons. It didn’t compile.
Re:Reviewing the worst piece of code ever by 5Qn8mNbc2FNCiVV on Monday August 03, 2020 @08:43AM (#24036986)
Probably searched for "Java script" and got "JavaScript" as a result
Re:Reviewing the worst piece of code ever by skinkestek on Sunday August 02, 2020 @10:07AM (#24028796)
As someone who is well liked but often feel I'm not good enough:

Maybe I should bookmark this thread? This and the other examples in this thread is so crazy it should make me feel super productive any day ;-)

Re:Reviewing the worst piece of code ever by bane on Sunday August 02, 2020 @11:31AM (#24029290)
There are some truly abysmal people in technology. I work in a multidisciplinary environment and deal with not only coders but people from other sci/tech areas and there's also some pretty bizarre, completely incompetent, personalities in other fields as well.

They seem to exist through some kind of combination of manifesting some kind of acute highly-sensitive HR problems (health, special class, etc.), bouncing around from unsuspecting job to job to keep the paychecks coming in, and simply being walking Dunning–Kruger manifestations. Eventually they accumulate enough time in enough jobs that it gets easier and easier to get new jobs due to being experienced and some of them will end up in senior positions where they no longer have to code (or perform in the core of their technical area).

They can come in from all sorts of places, often have stunning educational credentials and backgrounds, often have great looking resumes.

Re:Reviewing the worst piece of code ever by 488643689 on Sunday August 02, 2020 @06:46PM (#24032452)
Lol. Reads a little bit like cells accumulating mutations, becoming increasingly unchecked. Cancer analogy would be complete, if they end up training other idiots.
Re:Reviewing the worst piece of code ever by Darmody on Sunday August 02, 2020 @08:38AM (#24028325)
We had a PHP programmer who didn't know the PHP tags (<?php ?>).

He would stare at the screen doing nothing and when every body else was busy and not paying attention to him, he would watch videos and visit gaming websites.

Re:Reviewing the worst piece of code ever by motogpjimbo on Sunday August 02, 2020 @11:45AM (#24029374)
That sounds like several PHP developers I've worked with, who have learned to code in the post-framework era and who have therefore literally never written a vanilla PHP script, or even in some cases used standard library functions.
Re:Reviewing the worst piece of code ever by Darmody on Sunday August 02, 2020 @06:45PM (#24032443)
He wasn't actually a developer. He got in with a 3 month apprenticeship after finishing his studies.

He was supposed to be a web developer but honestly I don't know how we passed his classes. He didn't know anything.

And, of course, we didn't hire him after the 3 months period ended.

Re:Reviewing the worst piece of code ever by awinder on Sunday August 02, 2020 @10:39AM (#24028969)
Might have been the best php programmer ever tbh.
Re:Reviewing the worst piece of code ever by himinlomax on Sunday August 02, 2020 @08:32AM (#24028281)
Re:Reviewing the worst piece of code ever by centimeter on Sunday August 02, 2020 @12:29AM (#24026340)
Given that I've seen people like this IRL, I'm more curious how she got hired in the first place.
Re:Reviewing the worst piece of code ever by Viliam1234 on Sunday August 02, 2020 @07:40PM (#24032740)
Someone forgot to give them a programming task at the job interview.

I have met people like this at a job interview (where I gave them a programming task, and the interview ended soon afterwards), and they were charismatic extraverted talkers, with CVs that contained previous software development jobs. I could easily imagine them passing the interview with a non-technical interviewer.

Re:Reviewing the worst piece of code ever by jgwil2 on Sunday August 02, 2020 @10:45AM (#24029010)
Do companies not have any kind of onboarding process that involves pairing and training? Even if someone knows how to code every project has its own tools and conventions that fresh hires cannot be expected to know. This is really on the company for just leaving her alone for months.
Re:Reviewing the worst piece of code ever by colordrops on Sunday August 02, 2020 @12:41AM (#24026407)
How long ago was this? I've seen shit like this in the 90s, but I'd be surprised if businesses could tolerate waste like that right now.
Re:Reviewing the worst piece of code ever by TeMPOraL on Sunday August 02, 2020 @08:23AM (#24028231)
Why wouldn't they? Businesses didn't go through any magical transformation over the last 30 years that would unbreak them. I think it's just a consequence of size: the larger your company is, the less individual contributions matter on the margin, and thus it's easier to coast undetected while not doing anything.

Arguably, the modern obsession with metrics and monitoring is creating even more waste than there was before, as managers invent bullshit metrics, and employees perform fake-work to optimize for them.

Re:Reviewing the worst piece of code ever by dr_kiszonka on Sunday August 02, 2020 @12:38PM (#24029696)
FWIW, Word's comments and changes tracking are pretty slick compared to, say, Sublime Text ;)
Re:Reviewing the worst piece of code ever by thwarted on Sunday August 02, 2020 @01:18PM (#24029971)
But worse than a real revision control system like git in every way except UI (although I find Word's track-changes and comments interface and presentation to be really clunky and maybe as user hostile as so many say git's CLI UI is)
Re:Reviewing the worst piece of code ever by dr_kiszonka on Sunday August 02, 2020 @01:46PM (#24030132)
Agreed about revision control; I wish there was GIT for .docx for situations when you can't use plain text / LaTex.

I do like Word's comments interdace. I wish there was a format for replying to comments in code (aka "comment conversations"), so that IDEs could render them similarly to how Word / Google Docs do.

(I am genuinely looking forward to a vim/emacs user telling me that they have been using such a format for the last 30 years!)

Re:Reviewing the worst piece of code ever by naavis on Sunday August 02, 2020 @09:51AM (#24028693)
How do people like this get hired for a programming job in the first place?
Re:Reviewing the worst piece of code ever by ThrowawayR2 on Sunday August 02, 2020 @11:19AM (#24029234)
> "How do people like this get hired for a programming job in the first place?"

No whiteboarding or coding test during the interview process. As much as I detest them, I wouldn't work for a company that doesn't use them to screen candidates.

Re:Reviewing the worst piece of code ever by drkstr on Monday August 03, 2020 @06:47PM (#24044383)
I've been developing software professionally for a little over 12 years, and believe myself to be a fairly component. About a year ago I was flown in for an onsight interview for a fairly high level Sr engineer position at upstairs Amazon. During this interview I was handed a blank piece of paper and a pen to implement a fairly trivial programming task. I couldn't even put a couple nested for loops together. I guess over time it just becomes musscle memory. I was totally befuddled even just trying to write a curly brace.

I bet came across to them as totally incompetent fool... "Slipping through the cracks of multiple pre-screening technical interviews before the onsite..."

Re:Reviewing the worst piece of code ever by raverbashing on Sunday August 02, 2020 @08:42AM (#24028338)
> Oh yeah, she's also an adjunct CS professor at a local college.

Why is this not surprising at all.

Oh I know, because people think it's "ok" to put CS papers with pseudocode out there.

At this point I'm not sure you can even blame the person if the interview process was so bad that it let a person like that get in.

(Yes please interviewers bore me with another long winded description of FizzBizz or somethng because you don't know how to ask constructive questions that show competency)

Re:Reviewing the worst piece of code ever by noema on Sunday August 02, 2020 @11:52AM (#24029410)
Isn't the whole point of pseudocode that it's a language-agnostic description of an algorithm? Pseudocode written in the 1970s still stands up -- imagine if a COBOL block had been in its place.
Re:Reviewing the worst piece of code ever by raverbashing on Monday August 03, 2020 @08:23AM (#24036790)
Yes, and up to some point it's fine (like, giving an overall description of the algo)

But today it's more of a crutch than anything else, when you can have actual code running.

Re:Reviewing the worst piece of code ever by dijksterhuis on Sunday August 02, 2020 @11:34AM (#24029310)
Pseudocode is useful for academic papers to demonstrate an idea/algorithm in a condensed form - i.e. Without having to write out many detailed paragraphs.

Although I personally prefer a link to a public repo of code. But I'm a code monkey.

Re:Reviewing the worst piece of code ever by lecunn on Sunday August 02, 2020 @10:59AM (#24029099)
Where is the problem in putting pseudocode in a CS paper?
Re:Reviewing the worst piece of code ever by johndough on Sunday August 02, 2020 @11:28AM (#24029274)
At least in my experience, pseudocode is often too ambiguous to be implemented correctly, missing crucial details or simply wrong.

With real code, those problems are less likely.