Alex Krupp writes the Sensemaking blog on software architecture, Django for startups, Urbit, writing, and learning to code.
HN commenters cite his Django architecture guide in discussions of service layers and his early Urbit introduction as the source of claims about it.
I was expecting something like this article https://alexkrupp.typepad.com/sensemaking/2021/06/django-for-startup-founders-a-better-software-architecture-for-saas-startups-and-consumer-apps.html (discussed at the time https://news.ycombinator.com/item?id=27605052) but was greeted with something far more abstract and less helpful. Look at the difference in quality of their table of contents!
- What does our app do?
- Microservices usually don't work well for startups
- Move fast and outsource things
- Consider building reusable things
- Be pragmatic
- Boundaries along sync/async communication patterns
- How we did it and how we would do it next time
- About flexibility
- Predictability
- Rule #1: Every endpoint should tell a story
- Rule #2: Keep business logic in services
- Rule #3: Make services the locus of reusability
- Rule #4: Always sanitize user input, sometimes save raw input, always escape output
- Rule #5: Don't split files by default & never split your URLs file
- Readability
- Rule #6: Each variable's type or kind should be obvious from its name
- Rule #7: Assign unique names to files, classes, and functions
- Rule #8: Avoid *args and **kwargs in user code
- Rule #9: Use functions, not classes
- Rule #10: There are exactly 4 types of errors
- Simplicity
- Rule #11: URL parameters are a scam
- Rule #12: Write tests. Not too…
I develop software for a living, and I dare say I'm better than most at it. I've been doing it about 20 years, since I was writing Z80 assembly as a middle schooler [1]. It would take a lot more than a year for someone to learn to do my job. But I'm a lead engineer, not an entry level developer.
However, it would take less than the total amount of time I've been building software to do what I do, because my path to my job took me through all sorts of software development I don't do anymore. That includes 8 years of higher ed, of which I apply only a tiny fraction on a daily basis. Don't get me wrong, I wouldn't trade all that education for the world. I draw upon it in plenty of indirect ways. I just know there are more direct routes for someone who simply wants to become an application developer.
I know this, because I know plenty of people who have taken less than a year to get into the industry, and are now productive developers. One of my friends even wrote about how he did it in detail [2]. There's a fantastic episode of Software Engineering Daily interviewing a guy who landed a lucrative job at AirBnB little more than a year after doing a dev bootcamp [3]. My own brother has been in the industry less than a year after coming through General Assembly and is doing quite well. I interview people all the time who have similar stories. They're not unicorns.
Developing software isn't easy. But it's also not that hard. At least the sort of software most of us build. You…
I want to agree and disagree with a minor point. The argument that error codes should be digits[0] is misguided. Errors should be named. E.g.: {"invalid_username": "An invalid username was provided."} is better than {"40001": "An invalid username was provided."}.
Why? Because you'll often add coded errors far into the future or multiple at the same time on different branches. When you merge two errors will have the same code but totally different messages. This can lead to regressions in userspace or annoying merges where an error code has to be manually looked up and changed.
Its unlikely that you'll define the "invalid_username" error code more than once and if you do it will likely have a similar error message. Plus, in your test suite `assert error.code == "invalid_username"` is much more explanatory than `assert error.code == 40001`.
Just my two cents.
0. https://alexkrupp.typepad.com/sensemaking/2021/06/django-for-startup-founders-a-better-software-architecture-for-saas-startups-and-consumer-apps.html#rule10
Urbit is a weird thing that feels like it comes from a parallel universe of computing. It's a bit hard to wrap your head around it at first, but it has some neat ideas.
I like this article which introduces it:
Urbit is perhaps how you'd do computing in a post-singularity world, where computational speed and bandwidth are infinite, and what's valuable is security, trust, creativity, and collaboration. It's essentially a combination of a programming language, OS, virtual machine, social network, and digital identity platform.
http://alexkrupp.typepad.com/sensemaking/2013/12/a-brief-introduction-to-urbit.html
Some recommends Service layers, but not the total extreme extent that the service layer is flexible/transferable between frameworks/databases.
https://alexkrupp.typepad.com/sensemaking/2021/06/django-for-startup-founders-a-better-software-architecture-for-saas-startups-and-consumer-apps.html
https://news.ycombinator.com/item?id=27605052
The actual source is this blog post
http://alexkrupp.typepad.com/sensemaking/2013/12/a-brief-introduction-to-urbit.html
, which has mutated over time into "full of backdoors", apparently. As for the original statement from that post, the creator of Urbit "definitely would not endorse" it.
https://news.ycombinator.com/item?id=8581416