News for hackers. Stuff that matters.
Re:The Worst Programmer by tempodox on Saturday September 02, 2023 @11:56AM (#37362662)
The saddest thing is that some bosses want throwaway code. I had a short stint once in a company where the owner wanted the web service rewritten from scratch every 6 months so they could use the newest web framework and follow the current fashion. He would hire a 5000 LoC per week hero on the spot.
Re:The Worst Programmer by andai on Saturday September 02, 2023 @12:11PM (#37362833)
Tangential but I was doing a web app for a client and gave a time estimate, which accounted for doing things properly (i.e. learning a frontend framework first).

He asked "can you do it faster" and I agreed, thinking I'll make a throwaway version first and fix it later. Needless to say the project was a disaster, rapidly became unmaintainable.

That's how I learned my job isn't to do what the client asks, it's to make sure their project succeeds even if it means making them (temporarily) unhappy.

Re:The Worst Programmer by nine_zeros on Saturday September 02, 2023 @12:22PM (#37362927)
> That's how I learned my job isn't to do what the client asks, it's to make sure their project succeeds even if it means making them (temporarily) unhappy.

And I learned that doing it my way will get me fired because the manager has asked to do faster.

The way I have learned to get around this is by making the manager publicly document the request to go faster. If they don't document, I don't see or act on it. Once they document it, I happily go faster and let it all crash and burn. Then when they inevitably try to blame me, I point at the public documentation of the request to go faster and let the blame fall on the person responsible.

Re:The Worst Programmer by jareklupinski on Saturday September 02, 2023 @01:25PM (#37363540)
that's great for covering your a, but the project will still fail and no one will get value / praise for all that time spent

if time is the only actual concern for the project's success, a good approach is to explicitly re-scope the feature list and start asking managers things like:

"do we really need feature X to release? can feature Y wait until after beta? did the request for feature Z come from a user or a stakeholder?"

document all that too of course ;) but then at least there is a chance for safety _and_ success

Re:The Worst Programmer by nine_zeros on Saturday September 02, 2023 @07:46PM (#37366443)
> that's great for covering your a, but the project will still fail and no one will get value / praise for all that time spent

Yes the project will fail. But if my manager only cares about speed, why should I care about anything more? Why should an engineer be responsible for a manager's poor decisions?

Re:The Worst Programmer by CapstanRoller on Saturday September 02, 2023 @10:32PM (#37367229)
>Why should an engineer be responsible for a manager's poor decisions?

Because the corporate hierarchy demands it. Front-line workers are expendable, much like front-line soldiers. Corporations are not democracies, and neither are militaries.

If your job is to write and commit code, you are the corporate equivalent of infantry. In short: a grunt.

Re:The Worst Programmer by nine_zeros on Sunday September 03, 2023 @07:07AM (#37369413)
> your job is to write and commit code, you are the corporate equivalent of infantry. In short: a grunt.

And if I am being treated as a grunt, I will act like a grunt aka I don't care more than my bosses. I will even abandon ship at the sign of incompetence and point out the incompetence to others.

Re:The Worst Programmer by jonathanlydall on Saturday September 02, 2023 @01:35PM (#37363645)
This sounds like possible malicious compliance.

Regardless, it’s an important life skill to learn that it’s generally not enough to ask people to do what you want, you need them to actually “buy in” to what you want, and then they’ll actually care enough to at least try make it happen.

This applies to managers and their employees, or also when trying to get on the ground employees to adopt a product initially sold to their manager/execs.

Re:The Worst Programmer by nine_zeros on Saturday September 02, 2023 @02:07PM (#37363971)
"Buy in" is what you use for people acting in good faith. But managers aren't acting in good faith. They just want it done so that they look good to their own bosses. They don't actually care about the product/service. Their ask to "go faster" is a bad faith argument where there is no real need to go faster except for the manager to look good.

I don't feel the need to get "buy in" for bad faith managers.

Re:The Worst Programmer by cjaybo on Saturday September 02, 2023 @03:04PM (#37364480)
> but managers aren’t acting in good faith

An overly broad statement which, my experience, is not true. Managers come in many shapes.

Although, I suppose ironically, if you act in bad faith as a response to this perception, then I think that perception will quickly become true.

Re:The Worst Programmer by gremlinunderway on Saturday September 02, 2023 @05:20PM (#37365622)
Why is asking for requests to be in writing an "act of bad faith"? Literally cna't see a single outcome that would be an act of bad faith here.

If the project fails, and the manager tries to blame it on you, they are de facto acting out of bad faith given the request. Documenting it just identifies this. If the project succeeds or fails, but no one blames you, then the documented request is just there for the record.

Re:The Worst Programmer by ebiester on Saturday September 02, 2023 @12:42PM (#37363124)
It depends on “when” along the timeline of the project.

If we don’t know if anyone will want the product, the quality of the product is less valuable than validation of product market fit.

Later, I care much more about avoiding accidental complexity and having a great technical foundation.

Re:The Worst Programmer by tilne on Saturday September 02, 2023 @06:09PM (#37365944)
But you can’t have the technical foundation later because you’ve already built on something else.
Re:The Worst Programmer by jen20 on Saturday September 02, 2023 @09:32PM (#37366965)
Sure you can - you just have to be willing to throw what you have away. If the outcome of that is having to rewrite one of five experiments because it is a hit, that is a _great success_, not a failure.
Re:The Worst Programmer by tempodox on Sunday September 03, 2023 @04:32AM (#37368739)
But only in theory. In practice you would never get the time to rewrite what “already works”. And objectively, even with the best intentions, every rewrite comes with its own kinds of risks.
Re:The Worst Programmer by jen20 on Sunday September 03, 2023 @12:19PM (#37371619)
Perhaps not at the kind of shop that deserves to go out of business. I do this literally every day from function snippets to entire systems.
Re:The Worst Programmer by adolph on Saturday September 02, 2023 @01:13PM (#37363407)
> where the owner wanted the web service rewritten from scratch every 6 months so they could use the newest web framework and follow the current fashion

This sounds like an improvement over the opposite, a code base that is rarely touched and uses eol frameworks. Software is a living thing and if you don’t act as a ruthless gardener you wind up a museum curator with 1990s DEC hardware running in the 2010’s.

The right balance of staying current and not reinventing the wheel is not trivial.

Re:The Worst Programmer by hnfong on Saturday September 02, 2023 @01:38PM (#37363673)
If you choose the right frameworks which have sufficient momentum to last you say 10 years, you don't have to put yourself in the dilemma.

And yes, 10 years is quite possible these days. Besides the infamous Javascript framework churn, things are moving quite a bit slower in recent years.

Re:The Worst Programmer by adolph on Saturday September 02, 2023 @03:55PM (#37364944)
“If you choose the right frameworks” is a big if. Even within a framework, there is versioning and dependency management to account for. Consider the log4j vulnerability. The cost and risk of patching something untouched for 10 years is higher than something touched more recently.

In part, this is due to the risks inherent to change have been spread out over 10 years instead of backloaded to the end.

Practicing mitigating risks by proactively taking them has value of its own. The parable of ergodic cakes shows this.[0] What % of cakes will fail if 10 people each bake one, versus one person baking 10 over time?

https://luca-dellanna.com/what-is-ergodicity/

Re:The Worst Programmer by kagevf on Saturday September 02, 2023 @04:44PM (#37365373)
> Besides the infamous Javascript framework churn

reactjs came out in 2013, so it meets the 10y metric, but it has some internal churn, such as classes, hooks, etc

Re:The Worst Programmer by bitwize on Saturday September 02, 2023 @03:01PM (#37364453)
Hey, if the 1990s DEC hardware still works, and it'd be more expensive to change it...

There are PDP-11s running nuclear plants today with support contracts to keep them running until 2050.

PDP-11s.

Re:The Worst Programmer by adolph on Saturday September 02, 2023 @04:13PM (#37365110)
That is a great example. By not taking account of risk on the front end by embracing change, the system gets progressively more expensive to maintain (extended support contracts) and the risk of eventual inevitable change grows higher. Further, the system becomes progressively less valuable compared with newer systems.
Re:The Worst Programmer by jen20 on Saturday September 02, 2023 @09:34PM (#37366970)
> becomes progressively less valuable compared with newer systems.

Indeed, business people do not typically model depreciation curves for software as they should. That doesn't mean that the plant control system becomes less valuable (the value is tied to the operation of the plant, probably for the lifetime of the plant), but in many other situations it does mean that.