logoalt Hacker News

array_key_firsttoday at 7:09 AM2 repliesview on HN

From a developer POV, or at least my developer POV, less code is always better. The best code is no code at all.

I think getting results can be very easy, at first. But I force myself to not just spit out code, because I've been burned so, so, so many times by that.

As software grows, the complexity explodes. It's not linear like the growth of the software itself, it feels exponential. Adding one feature takes 100x the time it should because everything is just squished together and barely working. Poorly designed systems eventually bring velocity to a halt, and you can eventually reach a point where even the most trivial of changes are close to impossible.

That being said, there is value in throwaway code. After all, what is an Excel workbook if not throwaway code? But never let the throwaway become a product, or grow too big. Otherwise, you become a prisoner. That cheeky little Excel workbook can turn into a full-blown backend application sitting on a share drive, and it WILL take you a decade to migrate off of it.


Replies

mycalltoday at 7:59 AM

You can use AI to simplify software stacks too, only your imagination limits you. How do you see things working with many less abstraction layers?

I remember coding BASIC with POKE/PEEK assembly inside it, same with Turbo Pascal with assembly (C/C++ has similar extern abilities). Perhaps you want no more web or UI (TUI?). Once you imagine what you are looking for, you can label it and go from there.

wouldbecouldbetoday at 11:31 AM

yeah AI is perfect at refactor and cleaning things up, you just have to instruct it. I've improved my code significanlty by asking it to clean up, refactor function to pure that I can use & test over a messy application. Without creating new bugs.