A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.md 8.2KB

4 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. title: Simplicity (II)
  2. url: https://bastianallgeier.com/notes/simplicity-part-2
  3. hash_url: e199025da35cbdb18e2103000dd931a3
  4. <p>Once in a while, I have to fix small issues in very old projects. Some of my client sites from more than a decade ago are still around. One could argue that they probably should have been re-launched three times since. But it's also quite nice to enter the time machine.</p>
  5. <p>There are two eras of those projects: pre-built-process and and post-build-process. Whenever there's no package.json I know it's going to be a good day. Whenever there's one, Pandora is coming along the way with her fucking box.</p>
  6. <p>When you ever had to fix just a few lines of CSS and it took two hours to get an ancient version of Gulp up and running, you know what I'm talking about.</p>
  7. <p>Yes, I know, there's Docker and if you are a real professional you would put everything in containers. But don't ever tell me that this is making your life as easy as editing a plain HTML or CSS file.</p>
  8. <hr/>
  9. <p>We've come a long way as web developers. We have wonderful tools that help us optimize, prettify, test, deploy and scale our work in seconds and it's great.</p>
  10. <p>Working on Kirby, we use quite a lot of those tools. We rely heavily on Git and Github, we use the Vue cli with Webpack in the background to build our Panel, PHPcs and ESlint to enforce the same coding style throughout the team, PHPUnit, Jest and Cypress.io with Travis CI to test our code, Coveralls.io to analyze our test coverage. We auto-deploy our site whenever changes are pushed to master. etc. etc.</p>
  11. <p>When everything works, it feels like magic. When something breaks, it's hell.</p>
  12. <p>The amount of time and knowledge that you need to have to setup such tools and services and to keep them up and running is insane.</p>
  13. <p>Yes, they save a lot of time once they are working. If you don't touch them they are probably stable for a while. But I never learned to love them in all those years. It's more like a love-hate relationship, slightly tilted to hate.</p>
  14. <hr/>
  15. <p>There are a few major issues I have with modern web dev tooling:</p>
  16. <h2>Dependency Hell A - Code</h2>
  17. <p>I can never get over the fact that the most "simple" build process setup comes with 120 petabyte of node_modules. No matter if you want to "just" convert your Sass to CSS or optimize some images.</p>
  18. <p>I have a simple rule of thumb when it comes to programming:</p>
  19. <pre><code>less code === less potential issues</code></pre>
  20. <p>This rule of thumb controls my own feelings towards a solution. It shouldn't take 120 MB of code to uglify some JS. But maybe I'm wrong.</p>
  21. <p>In practice, this dependency hell has bitten me so often already that my life expectancy probably sank by 2-3 years. You want to build a JS file? Please update Webpack first. Oh, that new version of Webpack is no longer compatible with your Node version. Oh, your new Node version is no longer compatible with that other dependency. Oh, now you have 233 detected security issues in all your node_modules but you can't fix them because that would break something completely unrelated.</p>
  22. <p>It's a UX nightmare and I haven't found a single exception yet. Vue Cli or Parcel are the most positive examples, where positive means: not as horrible as the rest.</p>
  23. <p>This dependency hell is also the reason why old projects are almost like sealed capsules. You can hardly let a project lie around for more than a year, because afterwards it's probably broken.</p>
  24. <h2>Dependency Hell B - Services</h2>
  25. <p>How do you make money in a world of open-source projects? SaaS! It all starts nice and simple: Github free plan, Algolia free plan, Travis CI free plan, ZeitHQ free plan, Netlify free plan, Azure free plan, Firebase free plan, etc. etc.</p>
  26. <p>But all of them share the same goal. They want to lure you in and then convert you to their paid plans. That's the only way for them to make money. The free plans are sponsored by their investors or the high margins of their paid plans.</p>
  27. <p>When you start using services like Firebase it becomes instantly clear that you lock yourself in. The more time you invest, the harder it gets to move away from them one day. The more painful it gets if they ever shut down.</p>
  28. <p>Other services are more subtle. With Github you only realize the dependency if you build your community there and it starts to grow. If you leave, you basically loose the community. With Github Actions they now try to add another layer of customer glue.</p>
  29. <p>With services like Algolia it gets massively painful if you grow out of the free plan or jump to the next tier.</p>
  30. <p>Netlify and Zeit have the same issue and also try to bind you with their attractive additional features that are exclusive to them.</p>
  31. <p>The more you bind a project to a certain service, the harder it can backfire later. The longevity of a project is suddenly in the hand of another player and you have to play by their rules. When they decide to change the way their service works, you have to adjust to that.</p>
  32. <p>The comfort that they provide comes at a high price. All those services look simple on the outside, but they all come with complex related issues and potential risks.</p>
  33. <hr/>
  34. <p>We love to talk about simplicity. "Simple" is probably one of the most overused words in our industry. Not only in documentation.</p>
  35. <p>Is something really "simple" if you have to be an experienced developer before being able to use it?</p>
  36. <p>Is something really "simple" if the best case scenario works great, but whenever it fails you are stuck for hours?</p>
  37. <p>Is something really "simple" when you are cosily wrapped in an over-engineered blanket that comes at a high price once you need to unwrap yourself?</p>
  38. <hr/>
  39. <p>Talking about simplicity, I made the comparison on Twitter between a headphone jack and a bluetooth connection.</p>
  40. <p>Modern web dev tools and services are like AirPods. It's fantastic to get rid of the cable. The experience is far better 95% of the times. But they also have connection issues from time to time, they are massively over-engineered, expensive and you can easily loose them.</p>
  41. <p>Bluetooth headphones are likely the future. But I still have more love for a set of standard headphone with a regular cable and headphone jack that has been working reliably for decades.</p>
  42. <p>I just have to put this over-used quote by Antoine de Saint-Exupery here again:</p>
  43. <blockquote>
  44. <p>Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.</p>
  45. </blockquote>
  46. <p>Yes, we have new possibilities to solve problems. But sometimes it might make sense to take a step back and ask ourselves if something that has already been solved needs to be solved again – but more complex this time.</p>
  47. <hr/>
  48. <p>As always, such questions are very personal. It depends. If you are in a team, your priorities are completely different than for someone who works alone. Big teams have different problems than small teams. Your project might not need to be around for years or decades etc.</p>
  49. <p>It's important though to reflect on what we are doing. It's as important to reflect what affects the user. They don't care about our issues behind the curtains.</p>
  50. <p>When we talk about the time that modern tools save us, we also need to be honest. How much time do they save us today and how much time might they cost us later?</p>
  51. <hr/>
  52. <p>I personally try to take such time-machine rides as lessons.</p>
  53. <p>We face the same problems with Kirby. We try to keep it "simple" but is it really simple? What are the true obstacles for beginners. What are the pain points for our users when something breaks? How can we take care of such situations and make sure nobody gets stuck for hours? And what happens when you need to maintain a Kirby site in 5 or 10 years from now? Can we somehow help to make this easy? Is it even made to last that long? How can we avoid that our users are locked in? Etc.</p>
  54. <p>All those questions are important to me, because they are the qualities that I appreciate in software myself.</p>
  55. <hr/>
  56. <p><em>I wrote about simplicity in a similar fashion five years ago. That's why this article is called Simplicity (II). This topic never really gets old to me as it seems :) <a href="http://bastianallgeier.com/notes/simplicity">http://bastianallgeier.com/notes/simplicity</a></em></p>