I have been one of the toxic persons in a workplace. I was young and immature and an ungrateful arrogant prick. Not saying I'm totally reformed now (I still have my moments!). But every so often I see a little former-me running around. After a certain point I stop them and ask them to please calm the fuck down, because they are acting fucking nuts. That can sometimes result in a 180-degree behavior change (especially after a manager has already talked to them) because they usually don't want to get fired. I can't "fix" them, but I can give them the benefit of the doubt that they may want to be better, and may just need a nudge now and then to re-adjust.
Sometimes the people aren't toxic, they're just encouraged to be that way by the management and company culture. Lots of younger engineers have only worked at a single company and don't have the benefit of experience. Always good to assume the best, even with a highly toxic person.
At my current company there really isn't a technical promotion track. You either get into management or stagnate. That's created some unfortunate situations where excellent technical contributors with poor personalities keep slamming up against the invisible wall preventing advancement instead of being encouraged to stay technical. Also, weak management allows minor technical disputes to turn into all out wars. Pretty sad. Good for me I guess, as my aging brain's best contribution seems to have been in moderating the conflicts.
> Is it ok to have if clauses that will basically never be run?
Yep.
> But when I thought about it more: should it be improved?
Nope.
If you are an average programmer, you should write your code first to be legible and maintainable.
If you are a smart programmer, you should add performance tests to your test suite (since you need to do performance testing anyway for any production-critical code) and run your app on the appropriate-sized machine.
If you are a very smart programmer, you should rely on performance hacks when your application no longer meets performance requirements under heavy load.
If you are a freaking genius, you should think about optimizing your code.
A lot of companies talk big about wanting to make their company "a great place to work". They talk about benefits, about inclusion, about a lot of ancillary things other than the work.
But when you start working on work, you find out there's a hornet's nest of beaurocracy, of office politics, departments run by finance rather than commitment to executing business needs effectively, lack of training, lack of industry standards, a sprawl of independent redundant silos, and a lot of people who seem to have no idea what the hell is going on. And of course they'll put you on-call 24/7 and force you to work overtime to meet unrealistic deadlines, without extra pay.
Most companies I've worked for, all of the engineers have known how shitty things are, and they've known how to fix
it all. They tell their line-managers, and the line managers tell the middle managers, and the middle managers don't tell the executives. Everything stays shitty because the engineers are the ones who have to deal with the shit and can't do anything about it.
A contractor only has to deal with that shit in small bursts and can produce good work that somebody else can deal with actually running. It's the best way to avoid the long-term nightmare of working in shitty permanent roles. And the pay is better. And you can take a vacation!
New Ideas aren't crazy. Crazy Ideas are crazy. That's why people say it won't work, because it sounds crazy. It sounds crazy because the person proposing it hasn't made a good enough case for it.
Getting people to agree with a new idea is about salesmanship. If people think your idea is crazy, you suck at sales. Coffee's for closers.
If you don't experience seeing an American contractor getting decapitated by ISIS, then you may never have the gut-punch visceral understanding of how certain parts of the world works. Aside from actually getting kidnapped by ISIS, you can't experience it and truly feel the emotions of that act. Until you see a grainy, badly-compressed mobile phone video of someone slicing through cartilage and bone and sinew, a body twitching, blood trickling out from under the knife, a bunch of guys screaming and hollering and celebrating the victory of a murder. The body, headless, lifeless, being picked up and tossed in a ditch.
Now, watching that video won't help you understand ISIS at all. It may even completely color your interpretation of why the events took place, or who was doing it, or why. Is it better to walk around ignorant to a visceral understanding of horrible things? Or to walk around with new biases, after having seen something horrible with no context? Even if the "truth" is lost somewhere in between, I would rather know a little than know nothing.
We live in a world of "Nightly News" and platforms full of rules and restrictions. "Truth" will always elude us there, as long as someone else is deciding for us what we are allowed to see. It's nice to have at least one place where you can remove the filter.
Why can't these people just create a blog post and link to it? It takes 5 minutes. Blogging is free. You can actually maintain the blog post over time. It doesn't include 50 idiots' snarky comments. (That's what HN is for)