4 ms·
I worked with a really energetic guy a few years ago, I remember these things - he wrote code that looked sort of like this: const antilooped = []; const loop
by bryanrasmussen 5y ago
I worked with a really energetic guy a few years ago, I remember these things - he wrote code that looked sort of like this:
const antilooped = [];
const looped = [];
const looper = data.map((item) = {
if (item.nonX) {looped.push(item) }
if (item.nonY) {antilooped.push(item)}
});
then would not use half of the variables he instantiated, and probably merge looped and antilooped arrays in some weird way. Invariably debugging his code led to me just rewriting it all.
And I remember just about the first thing he asked me is if I went to prison in Jylland in Denmark and a big guy named Ole wanted to make sweet love to me would I do it or would I rather die, and then he volunteered he would rather die. This turned out to be his typical lunch time small talk.
on edit: just to be clear, he didn't use the looper array for anything.
- kache_ 5y ago
- elevenoh 5y ago
- bryanrasmussen 5y agoI think I would prefer not to but it is not one of the preoccupying thoughts of my daily routine.
- sublimefire 5y agoPeople need to be trained at work. There is nothing wrong with a person making mistakes; we all did them. AFAIK the problem is usually mentoring. At work, I observe "leaders" not having time to give a hand and explain stuff. Otherwise, there is a simple rule for engineers: do not write the code that makes the next engineer fantasize about your death.
- dymk 5y agoPeople should be on-the-job trained for specific technologies or in new/advanced techniques. If somebody doesn't understand the fundamentals of writing code for a code-writing job, though, that's a different story. That's what self-study and the education system is for.
- kube-system 5y agoIf you have an employee that has troubles with a fundamental, you either train them, fire them, or do nothing. Training them is the lowest risk and lowest cost option of these.
- askafriend 5y agoWrong. Firing is the lowest risk, lowest cost, least distracting option.
- kube-system 5y agoIf there are severe issues, of course. If someone wrote a loop in a strange way and it was an honest mistake, it's pretty silly to fire them without communicating with them first... and then firing them if they aren't able to turn it around.
- askafriend 5y agoAgreed. The loop thing is a simple issue to navigate. I was speaking more generally.
- bryanrasmussen 5y agoIn Denmark it's sometimes difficult to fire someone, and some industries are more regulated than others. There were layoffs coming and the manager told me he was on his way out, that is to say if he hadn't gotten a better job at a competitor. No longer doing frontend development however. As far as his being trained I mean, yes he was young, but this wasn't his first job and as I understand it had certainly talked his skills up in the interview.
- itronitron 5y agoDid he think he was still in the job interview?
- agumonkey 5y agohe never ran into foreach or partitions/groupby functions (in general I mean)
- edmcnulty101 5y agoI'm not going to lie, that code looks fun to me.
- bryanrasmussen 5y agobelieve me, I have improved it immeasurably in just showing one little aspect of what he did.