News for hackers. Stuff that matters.
Re:How to Design Software Good by xgbi on Friday November 09, 2018 @03:52AM (#18413173)
Disclosure: small-ish company (~100 employees) in France

You know, I kind of went through the same questioning: at my current company we have an employee that has his niche/historical role on one of the key infrastructure of our product.

The guys works from his home and whatever hours, commits 300+ lines per commit (90% of which is unrelated to the commit name, just commenting things or uncommenting others). The code is a spagetti of if else if else, it has monstruous "client specific" code (like: if the current client is this guy, then do that, otherwise for all other clients do this).

There's even a load of "if the program runs in test, answer what the test expects, otherwise in prod send something else".

Every time I look at the commit tree (a balance of wanting to have fun and wanting to see what is going on), I'm in horror. The guy rewrote the java.lang.string, the java.lang.date, and some other base classe of the language to incorporate his own version of the Date handling.

Fun fact, at one point his date parsing code "wasn't happy with october"... why? because October contains the letter 'T', and he botched his ISO date parsing (format: YYYY-MM-DDTHH:mm:ss) by checking the presense of the letter T..

I have many many stories of him commiting some bad code, only to spend 12h in a row trying frantically to correct the bug by adding ifs and elses.

The last time I looked at his code, he was rewriting a huffman compression algorithm by himself (NIH syndrome) to compress his on disk data. Complete with loads of code to handle per-bit operations that he wrote b y himself instead of relying on a battle-proof library.

Management-wise, they accept his behavior because this guy, working from his own home, often can work at scandalous hours and be on the bridge when he pushes a botched version to production at 2AM. At the time of this comment, his last 4 commits on master are at the following time: 08:57PM, 10:40PM, 12:11PM, 01:02AM

I know I'm venting hard, but this guy is probably be the best paid engineer of the company, he is a huge liability IMO, and is present at all-hands meeting maybe once a month. So yeah, why bother coding great code, making sure that your tests and CI are green, when some other guy with a bit more history in the company can get away with doing shitty work and having poor life balance, as long as he shows "commitment" when he botches his software releases.

This is really some life-long questioning of mine: should I care about things or should I focus on politics and disregard others. Aren't those on top of the pyramid the more "sharky" people that climbed the ladder not by pure skill but by showing the appropriate (bad) behavior when needed and correctly compartimentalized their own questions about ethics and got away ?

Re:How to Design Software Good by noir_lord on Friday November 09, 2018 @10:54AM (#18415307)
I replaced that guy at my company (similar size) and a year in I'm barely scratching the surface of the horror, a lot of the time I end up putting a safe interface in front of it and a big note saying fix this at some point.

It's nor even that the code is bad (and it is) it's that he couldn't think straight, the business logic is all insane as well.

Still boss hired me to sort it out and the time scale is measured in years (week is a mix of new stuff and fixing old stuff).

Typical performance improvement is two orders of magnitude.

When I started it took 70s to search for a quote.

Now it takes 200ms and mine includes the line details on the quote in a easy to eyeball format.

My boss seems happy at least.

Re:How to Design Software Good by thwy12321 on Friday November 09, 2018 @04:11AM (#18413260)
It really depends on what type of business youre in for the quality to matter. If you were say, writing a real time data infrastructure platform for a whole company, or something else related to distributed systems, then the code needs to be good. If you are working on CRUD line of business software with some complexity, then it can be garbage. In general, the closer the code approaches to actual computer science problems (and this is out of necessity), then the greater the need for good code. Few businesses have this requirement.
Re:How to Design Software Good by Viliam1234 on Saturday November 10, 2018 @07:17PM (#18424281)
It's funny how when you make a bug and then stay awake at 1AM to fix it in production, the managers will mostly remember the latter.

Now that I'm thinking about it... do the managers actually know the bug was caused by his "programming style"? Because, if they are under impression that he is fixing other people's mistakes... then it would make sense to pay him better than the rest.

> This is really some life-long questioning of mine: should I care about things or should I focus on politics

I guess you need both; and the exact proportion depends on the company.

> Aren't those on top of the pyramid the more "sharky" people that climbed the ladder not by pure skill ...

This already assumes that those on the top have climbed the ladder. As opposed to already starting somewhere higher than you will ever get.

Re:How to Design Software Good by pnongrata on Friday November 09, 2018 @07:00AM (#18413834)
I've worked with people like that, not exactly on my team. Managers loved him because he was always "committed", working late hours to fix bugs his own botched code created.
Re:How to Design Software Good by lucio on Friday November 09, 2018 @09:41AM (#18414652)
I bet the cost/benefit for the company is positive, and as long the clients are happy and paying, how this guy works is irrelevant. he was rewriting a huffman compression algorithm by himself because he's bored and he wants to learn and experiment. I bet is not a good life he's living. There's a great disorder in working from your home at odd hours, it's not healthy. He would be happier working normal, fixed hours, and with a manager to guide him.
Re:How to Design Software Good by philangist on Friday November 09, 2018 @10:44AM (#18415211)
> There's a great disorder in working from your home at odd hours, it's not healthy

I'd be curious in hearing you elaborate on this. I've been in a WFH setup like this for about 4 months, and while I enjoy it right now I do wonder if it'll be something I might regret after 2-3 years on this schedule.

My primary reasons for working like this are that: 1. I hate being in the corporate office environment, it feels very artificial and constraining 2. I tend to have my most productive coding sessions very late at night anyway

Re:How to Design Software Good by kool_moe_d on Friday November 09, 2018 @05:31PM (#18418604)
I did the WFH for a year, and while the freedom is enjoyable it is very easy to slip into working very late going into 'hermit mode'. You have to be very diligent in training yourself to be productive during normal hours so you can be social in the evening.

My new situation is categorized as flexible office hours. I go into the office 2-3 days a week, enjoy good rapport with the people I work with, then WFH on Mondays and Fridays (typically). I find this to be a good balance - I have enough structure Tuesday to Thursday that I can continue this trend Monday and Friday.

Re:How to Design Software Good by de_watcher on Friday November 09, 2018 @06:26AM (#18413715)
If you are valuable enough or underpaid then make everyone around suffer when they force you to work on these tasks. People will learn and you'll have easier time.
Re:How to Design Software Good by donquichotte on Friday November 09, 2018 @09:45AM (#18414690)
Beautiful!

I would pay for a book with more anectotes of kafkaesque, nightmarish visions of horrendous programs.

Re:How to Design Software Good by noir_lord on Friday November 09, 2018 @10:56AM (#18415318)
I could spend a year writing blog posts on the one I inherited :)