Hacker News new | ask | show | jobs
by alxmng 1184 days ago
I do consulting work on web apps. I would estimate the majority of my time is not spent implementing the rather clear requirements, but fighting abstractions put in place by other engineers. And the larger the organization or more modules/frameworks/design patterns used the worse this tends to be.

Recent example: A new view of some data had to be added. So all that needs to be done is query the DB and return HTML with the correct styles. But the ORM used didn’t support ordering results with nulls last. So I had to add code to the ORM. The view doesn’t return HTML. Elements like <ul> are wrapped in a class. I had to modify the class constructor and render function to be able to return the HTML I needed, and modifying other code that used the class. In the end, what would have taken me 20 minutes took 2 hours. Was the ORM solving a real engineering or user problem? Nope. Were the view classes solving a problem? Ostensibly they were to make caching and testing easier, but none of that was actually happening. Most of my time wasn’t spent writing the code necessary to perform the task: an SQL query and constructing a string of HTML.

1 comments

So much of coding is a simple SQL -> HTML string but its mind-blowing how far abstracted we are from this today. Give some credit to PHP for simplicity here.

Something I noticed too that when there is simplicity, there is so many abstracted layers beneath that makes things slow, impossible to debug, and god help you if you if it doesn't do what you need. Things like React + Next.js. If you tried to follow the actual stack traces of what is going on underneath you would die.