Live data from Hacker News

What 10k Hours of Coding Taught Me: Don't Ship Fast

sotergreco.com

111–116 of 116 posts

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#111
post #105

Earlier quoted context omitted.

Poor architecture/design make code unmaintanable, or at least very expensive to maintain. I would rather have my junior spend 3 more days to understand the FSM we use to handle our front before changing anything than him adding 2 random useState an a random useEffect because it just works. How you handle your data is also very telling of the code quality. I'm not against the "write shit fast, fix later", it is in fac…

> I would rather have my junior spend 3 more days to understand the FSM we use to handle our front before changing anything than him adding 2 random useState an a random useEffect because it just works. React hooks obsoleted most use of state management tools years ago (there is even a native useReducer now so you don't have to install Redux just for that), especially if they're using SSR (Next.js) where state manage…

We don't use Redux and use useReducer.

A Login page is typically a page that if you don't use a FSM, i will make you redo your work. How do you handle MFA? Errors, including network errors since we work with offshore stations that don't have the most stable connexions? I don't see a single way using a handful of states wouldn't result in poor code. What do you do if a new oidc provider will be used? Or if we migrate to AWS and use cognito, what states should you remove, what should you add? How to you order the rendering?

Nah, if you don't want to reuse our hooks and functions that's fine, but you need a decent architecture, and using a handful of state is not it, especially not for a login page. As long as you have a process to follow in the component, not using a reducer will hurt you and the maintainability (we avoid putting business logic on the front-end to be fair, but sometimes you have no choice). And simple component that just display shit (thus don't need a reducer) aren't often given to juniors are this part of the job is uninteresting and quick to do for non-juniors. We tend to do a lot more backend and ops than front anyway.

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#112

Earlier quoted context omitted.

Is code more like poetry or more like a recipe? If the former, then yes we should be allowed the time and space to craft the highest syntactic art imaginable. But if it's the latter, it should just be quick, correct, readable, and extensible. If it's art - how dare you ruin my masterpiece? If it's business - we had a solution deployed for the customer in less than an hour. If syntax (poetry) is your #1 take your time…

I have found that "it depends" is an almost universal solvent for all technical quandaries. I have found in my experience (and I have a lot of that), that the search for "One Solution To Rule Them All" is a snipe hunt. You can't get there from here. It always (in my experience) comes down to context[s]. That "[s]" is important. There's the current context, and then, there is the future context. You survived your bapt…

The mythical "later" never happens. Today we need to get version 1.0 to the market ASAP. Tomorrow we will need to get version 2.0 to the market ASAP. Etc.

It's like people who promise that they will stop smoking later. Twenty years later, they usually still smoke. Twenty years later, if the software still exists, all the technical debt tickets will probably still be in the backlog.

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#113
post #111

Earlier quoted context omitted.

> I would rather have my junior spend 3 more days to understand the FSM we use to handle our front before changing anything than him adding 2 random useState an a random useEffect because it just works. React hooks obsoleted most use of state management tools years ago (there is even a native useReducer now so you don't have to install Redux just for that), especially if they're using SSR (Next.js) where state manage…

We don't use Redux and use useReducer. A Login page is typically a page that if you don't use a FSM, i will make you redo your work. How do you handle MFA? Errors, including network errors since we work with offshore stations that don't have the most stable connexions? I don't see a single way using a handful of states wouldn't result in poor code. What do you do if a new oidc provider will be used? Or if we migrate…

Didn't say MFA, said state of username / password (useState is fine for that).

Also said "use hooks", not "don't use hooks" and never said don't re-use functions.

Would hate to be on that team, I bet those PRs are brutal.

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#114
post #34

Earlier quoted context omitted.

> I’ve pushed some trash tier code over the years because it worked just well enough to drive growth/revenue With all respect, this summarizes everything I’ve come to hate about our industry over the years. I understand why this happens, and I’ve also been the person churning out crappy code at points in my career. But I think it also highlights how backwards the incentives have become, and we’re constantly seeing th…

One big problem is that you often don't know yet what you actually need, you only find that out when your software is in front of real users. So the later versions might be substantially different than your MVP. Building a very robust first version might be entirely useless if you have to throw away most of it after discovering it doesn't actually solve the user's needs.

> So the later versions might be substantially different than your MVP. Building a very robust first version might be entirely useless if you have to throw away most of it after discovering it doesn't actually solve the user's needs.

IME, the core foundation of the product should be built such that no more than ≈20% or so of the MVP is ejectable in this manner. Not that it can’t, but more importantly: that it doesn’t have to. An MVP should be so basic that the majority of it would be foundational to anything being built, and so would remain in part or in whole no matter what redirection is taken.

This is not always possible, but for most ideas there is a core element that you can start with, even if usefulness won’t really be there without a lot more functionality.

> you often don't know yet what you actually need, you only find that out when your software is in front of real users.

Which is why an MVP should only ever be the absolute minimum viable product - so that as soon as it ends up in front of users, you can lurk in whatever user forum you stand up and advertise for the product (subreddit, etc.) and listen to what the users are saying. Some of them may inadvertently drop ideas that can make or break your product, and it’ll be things you never thought of. Being able to pivot on a dime is why an MVP is so vital to begin with.

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#115
post #111

Earlier quoted context omitted.

We don't use Redux and use useReducer. A Login page is typically a page that if you don't use a FSM, i will make you redo your work. How do you handle MFA? Errors, including network errors since we work with offshore stations that don't have the most stable connexions? I don't see a single way using a handful of states wouldn't result in poor code. What do you do if a new oidc provider will be used? Or if we migrate…

Didn't say MFA, said state of username / password (useState is fine for that). Also said "use hooks", not "don't use hooks" and never said don't re-use functions. Would hate to be on that team, I bet those PRs are brutal.

Exactly what I meant to say, as soon as you have to add complexity, just adding useState over and over breaks, and that's what I call bad code.

It's fine if it's just a get in a component out of the way, we do not use a reducer to print our 'about' page, but typically the login is where a lot of logic has to happen.

I think I misunderstood your comment, you talked about a global manager and I thought you talked about our library.

And since we pair/mob program often enough (10 hours a week roughly, per affinity or when someone ask for help), our PR meetings are more a way to show off to the whole team a new idea or present library upgrades, but it's true that we are quite brutal, especially when i compare with my previous job where I worked with Indians and north Americans, I think it is cultural though.

Re: What 10k Hours of Coding Taught Me: Don't Ship Fast

#116

Strongly disagree with “Do the Refactoring First”. It is inevitable that your project will grow in ways you can’t anticipate. If you spend too much time up front on architecture, one of two things will happen: 1. You build abstractions that are not useful in the future, or 2. Worse, you build abstractions that constrain you from making future changes. Of course, either of these can happen anyway, but at least then yo…

Refactor first and overarchitecting up front are completely different things, though.

From the article:

> What I propose is to spend your first 40-50 hours planning and refactoring. Just create a few controllers, brainstorm how that would scale in the future, refactor, and then continue.

That is overarchitecting up front. What I would propose is to follow those steps but stop after “create a few controllers”.

Post reply on HN