by DeathArrow · 5y ago · 0 comments
If you are a big corporation and can afford more resources, I guess it pays off to think about code quality from the start.
If you are doing some project for fun or as a POC, it doesn't pay much to spend time on writing quality code.
I think that writing modular code is paramount. That way you can replace it little by little if needed.
I'd add that for doing projects for fun or POC, it still pays to pull in something like TypeScript if it's a JavaScript project, even if you're not overly fussy with the typings -- the benefits will outweigh the drawbacks, and you never know when a POC will turn into something bigger.
Choose some sensible tools with a good balance of structure and pragmatism and write some damn code. Keep it modular. Don't spend weeks obsessing and agonising.
I'd argue code quality matters a lot more than in a company with already a lot of inertia, for which a week or two of delays on a new feature matters a lot less.
I don't think you need super high quality code, but everyone uses "we don't have the time or resources!" as an excuse to completely ignore code quality.
Putting a reasonable amount of effort into code quality isn't a lot of effort anyway and pays for itself in a very short time. Like a year or two.
You better hurry up too, because you have a problem if you don’t finish before your debt catched up to you.