Earlier quoted context omitted.
> In many companies (think FAANG) > The more complicated the design, the more 'foresight', the better. Certainly not in Amazon. Surely there can be exceptions but in general the company has a culture of simplifying stuff anywhere is possible.
You must not have spent long at Amazon. My original comment was 100% based on my experience as a developer at Amazon.
Ask HN: How to avoid over-engineering software design for future use cases?
151–160 of 258 posts
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#152Re: Ask HN: How to avoid over-engineering software design for future use cases?
#153Something I've recently realised after having listened to Kevlin Henney talk about software engineering is how much of the existing knowledge we ignore. The early software engineers in the '60s and '70s were discovering pattern after pattern of useful design activities to make software more reliable and modular. Some of this work is really rigorous and well-reasoned. This is knowledge most engineers I've met complete…
Agreed. But something I'd like to add: You can read all the papers you want. At the end of the day, you actually need to practise writing code! Every piece of software involves a different domain, different requirements, etc. I feel like the majority of developers these days just copy and paste stuff from the internet and glue some npm/nuget/maven packages together, brush their hands together and feel like gods. That…
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#154Earlier quoted context omitted.
Also: have a framework in place, which supports worry-free refactoring. Comprehensive Unit/Integration tests, a robust type-system, pick whatever suits your style. It's a lot easier to refactor stuff when you don't have to worry about breaking something hard to debug with a big code change.
Unit tests are absolutely fantastic during refactoring. I once had to rewrite a piece of code where nobody really knew what it did or what it had to do, and the original author just made some guesses about the intention. I started out by writing unit tests for everything, which became my handhold and documentation for what the system originally did. Then I started reorganising the code into a more structured and more…
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#155Other thought: good engineers can guess future cases more accurately, that's why they're good engineers.
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#156Earlier quoted context omitted.
>simplifying stuff anywhere is possible https://raw.githubusercontent.com/aws-samples/aws-refarch-wo... Ironically, that's how you are supposed to run Wordpress on AWS.
You seem to be confusing Amazon's internal infrastructure and its development model to how AWS is used by customers.
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#157Earlier quoted context omitted.
>simplifying stuff anywhere is possible https://raw.githubusercontent.com/aws-samples/aws-refarch-wo... Ironically, that's how you are supposed to run Wordpress on AWS.
You seem to be confusing Amazon's internal infrastructure and its development model to how AWS is used by customers.
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#158Earlier quoted context omitted.
I've reprogrammed myself to only get the dopamine hit when I delete old or unneeded code :-)
Deleting code is one of the most satisfying things in the world. Puff and gone are all the worries, all the bugs, all the maintenance hassle, all the limitations that code imposed on you.
As you learn to code, it becomes increasingly satisfying to solve problems, so you write more code, which provides more satisfaction, but it gets unwieldy quickly and you start to get lost in the spaghetti.
As you learn to abstract, it becomes increasingly satisfying to create abstractions and manipulate them afterwards, allowing you to not get lost thanks to the now beautiful mental map of your code. But at some point in time it leads to excessive abstractions and issues start to pile up, and you can't quite make sense of the map anymore because everything is a little bit too generic and doesn't carry any more meaning, and such abstractions invariably leak through the lasagna. You usually start by writing more abstractions, but this only feeds the loop.
And finally, as you learn to delete code, you get back to simplicity, and the disappearance of the mental and causality weight associated with that deleted code becomes increasingly satisfying. You start inlining code, you start repeating code, only for the repeating patterns to emerge by themselves, you start thinking about names for those, and the names come naturally. Instead of powering through, there is a state of continuous, unstoppable flow based on a loop of implementation and emergence, where a giant Rubik's cube effortlessly solves itself by throwing it in the air and falling into place.
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#159Something I've recently realised after having listened to Kevlin Henney talk about software engineering is how much of the existing knowledge we ignore. The early software engineers in the '60s and '70s were discovering pattern after pattern of useful design activities to make software more reliable and modular. Some of this work is really rigorous and well-reasoned. This is knowledge most engineers I've met complete…
Agreed. But something I'd like to add: You can read all the papers you want. At the end of the day, you actually need to practise writing code! Every piece of software involves a different domain, different requirements, etc. I feel like the majority of developers these days just copy and paste stuff from the internet and glue some npm/nuget/maven packages together, brush their hands together and feel like gods. That…
I've been disappointed with the industry for the opposite reason: I don't want to be doing this, but this is what is being asked of me.
Re: Ask HN: How to avoid over-engineering software design for future use cases?
#160You should immediately stop designing for future use cases. Use TDD and only write only just enough code for the currently known required functionality. When you get to know more required functionality the tests protect you from breaking existing functionality and you can extend your code to support the new use cases as well. At this point you should make your code just generic enough to support all known use cases w…
TDD has costs. It's expensive and only works on certain types of systems. It also makes exploration of the problem domain extremely costly and makes refactoring a nightmare. I dislike TDD full stop but there are some domains where it's unambiguously a bad idea. It implies: - Behaviour can and should be compartmentalised - Certain types of efficiency are ignorable - Data structures are better off being relatively simp…
I kind of feel you live in some kind of alternate universe. None of these sound true to me, at all. The most important misunderstanding that seems to be going on here is the assumption that in TDD it is a given that one is testing single classes and/or methods. This is not the case. In fact, in most cases it is much more beneficial to test a set of classes/methods at the same time in a way that is representative of something that the customer values.
Honestly, I have seen TDD work so well in so many different circumstances that I have started to consider people who do not do not write test for most possible scenarios as being on the not-so-very professional side of things.