Hearing "we don't deploy on Fridays" makes me sad, because I always encounter it as a precautionary measure. Fear and precaution The subtext is "it's not safe to deploy" and "if there is a problem, it takes too long to fix". There is plenty out there about this topic. Search for "deployment on Friday". I almost forgot I've also written about this before . The arguments are more or less the same.…
I caught myself relying too much on manual tests for a feature I was building on top of a Stimulus controller. Manual tests were enough for the initial proof of concept phase. However as I was adding more features to the prototype, I was also causing regressions. As I threw away the prototype and started over with a test-driven approach, I thought about how I test in general and how that applies…
Look at any Rails codebase that's older than a few months. I bet you'll find a sub-directory of app called services . It comes with the best of intentions for separation of concerns. The developers want to keep controllers straightforward and focused on understanding a request and providing a response. They also want to keep models small, because those files have gotten too big and tedious to…
In 2015 I read a great blog post on contempt culture . I had already noticed the described behaviour by that point, but I didn't have a word for it. Interestingly, the author of the post mentions starting programming in 2001. I started around that time, too. Probably 2002. It took 13 years before I stumbled upon an article pointing out bad behaviour I had both experienced and perpetuated. That…
I ran the first edition of Helvetic Ruby with two friends. This post reflects my own experience and my personal thoughts on it. Preparation We started working on the conference early. Our first meeting was in early January 2023 and the conference was on 24th November 2023. While there were periods of more intense preparation, we usually did a little bit every week. That kept stress levels low for…
Do you find catching up tedious when you return to work after a holiday? I do. It took me a while to do something about it. I'd even start dreading my return to work on the last day of holiday. On my first day back, I'd open my email inbox and see tens, if not hundreds, of new messages. Then dozens of notifications in Slack, and GitHub, and Trello, and so on. In recent years, I've drastically…
I'm the person on your team who does not fear deploying half an hour before the end of the workday. Not because I'm reckless, but because I'm confident in the process of recovering from errors. I work in short iterations, developing and deploying small changes one at a time. I have automated tests, code review, production monitoring and error alerts. If the deployment breaks something, it's easy…
When I'm joining a new organisation, I want to be useful as early as possible. I record what I observe until I get used to the new environment. Chances are my observations can turn into documentation or change of process that will make onboarding easier for the next newcomer. I want to prove myself, to show what I can do and be given responsibility. When I'm onboarding somebody else, I want them…
Making SVG icons look right alongside text in web applications can be tricky. I'm writing down the techniques that have worked well for me, because I tend to forget them by the time I need them again. For me it's about: preserving the icon's aspect ratio and internal spacing, scaling the icon proportionally to the text, vertically aligning the icon to the text. Let's how these come together. Icon…
In 2018 I chose to become an engineering manager. It was clear to me that good teams, like good code bases, require constant work. Only, I wasn't just interested in shaping my team. I wanted to influence how the company worked in general, all with the top-level goal of creating a good environment for myself. I started getting involved in hiring, sales pitches, writing offers, strategic meetings…
Although the Apple Thunderbolt Display is discontinued, it's still a good monitor and can serve as a docking station. It has a serviceable webcam, loudspeakers, an Ethernet port and USB 2 ports. The Linux kernel supports Thunderbolt. After connecting the device, check if it's listed by lspci . If it's not, you may have to enable "Thunderbolt assist mode" in the BIOS (at least for Thinkpads). The…
There is a lot of value in testing work-in-progress features in production. You discover edge cases by using real data and you can measure the performance impact in a production setting. Of course, testing in production doesn't necessarily mean releasing an unfinished feature to all users. This is where feature flags come in, allowing you to enable or disable functionality for specific users or…
Let's say you're using early 2000s web tech to speed up page transitions, but with slightly newer APIs. When a link is clicked, the new page is loaded asynchronously (for example with fetch ). Then a subsection of the current page is replaced by (a subsection of) the new page, using replaceWith (or replaceChild or a similar method depending on the implementation. There are many out there). It…
At work I take care of many aspects of an application's life cycle: provisioning servers and configuring monitoring, setting up and verifying backups, automating certificate renewal, developing and maintaining the application, etc. A lot of it is a consequence of client requirements about the location of their data. Still, I'm always on the lookout for ways to eliminate most of this work for…
I wrote some flaky frontend tests using Cypress and then learned how to make them deterministic. This is the tale of that adventure. An application I am working has a video player that should continue playing when changing pages. Additionally the player should be visible on the dedicated page of the video it is playing and hidden on other pages. The <video> element cannot move within the DOM,…
Update (2019-11-06): I think what I describe is an example of what people call " parse, don't validate ". I wrote a simple video player in Elm as an experiment. My earliest realization was that authoritative source for player state the HTML media element ( <audio> or <video> ) and not the Elm application. I decided to keep the Elm model in sync by sending the JSON-encoded HTMLMediaElement over a…
I needed a way to run a process alongside a Rails application for an always-running live data ingestion task. Sidekiq is only meant for short jobs, but Sidekiq itself is a long-lived process. That gave me the idea to look at the source code of Sidekiq, Resque and Puma for inspiration. Update: In the meantime, Sidekiq itself has removed this capability and relies on a supervising process like…
Implementing and consuming APIs is very error-prone. I've now worked on multiple single page applications written in Elm and I've grown to love the constraint of having to explicitly define JSON decoders. They are very helpful in exposing bugs and errors in documentation. In this post, I describe a strategy I've adopted to catch compatibility mistakes as early as possible. It involves JSON Schema…
After watching Ryan Davis present a way to write a test framework from scratch , I knew I wanted to try that on my own. Before I could get to it, I stumbled upon a video of Kent Beck writing a small self-tested test library in CoffeeScript . In it, Kent Beck demonstrates the effect immediate feedback has on a test-driven workflow, but it was the self-testing aspect that fascinated me. I set out to…
Update (2018): While the ideas in this post are still valid elm-live will get you started a lot faster. Also check out the Elm guide section on minification . elm-reactor is good for iterating quickly on self-contained programs. You run elm-reactor , you navigate to the source file that contains the entry point to your program and you are up and running. elm-reactor automatically compiles your…
If you are building an API application with Ruby on Rails, you will notice that the jbuilder gem is suggested in the default Gemfile . Jbuilder allows you to create JSON using a builder domain specific language. Some people prefer ActiveModel::Serializers which has its own DSL, is more declarative and handles structural conventions for you. This is convenient if you want your API to conform to the…