Home
Hi, I’m Vladimír Zdražil
I work as a Frontend Engineer at Mews where I work with TypeScript, React, HTML, CSS and other technologies.
Recent posts
- You don’t need that complexity: A fresh look at your project
- Streamline long-term projects. Challenge the notion of necessary complexity, and make your work easier.
- Option A vs A | null
- When representing the absence of a value in TypeScript, you can use a union type A | null, or a tagged union type Option A. In this post, we’ll discuss the differences between these two approaches and when to use each.
- Deep and shallow modules: Module design for reduced complexity
- Learn how to design modules that reduce code complexity by thinking in the terms of deep and shallow modules.
Recent TILs
TILs are things that I’ve discovered or picked up along the way. They’re more like notes than full blog posts.
- Exceptions are just gotos with some constraints
- Despite the additional structure around exceptions (like stack unwinding and catching), exceptions operate similarly to `goto` by altering the program's control flow in a more complex fashion than simple function returns.
- shfmt can simplify your shell scripts
- shfmt has a flag called -s, --simplify that can make your shell scripts simpler. This flag can remove unnecessary quotes, for example.
- Aspect-oriented programming
- Aspect-oriented programming (AOP) is a technique that aims to modularize and manage cross-cutting concerns in software development
More posts
- Binary search debugging: Simplify your debugging process
- Learn how to use binary search debugging to efficiently locate and resolve bugs in your code. Divide and conquer for faster results.
- Why Object.keys doesn’t and shouldn’t return (keyof T)[]
- Discover why Object.keys() doesn’t return (keyof T)[] in TypeScript, and the potential issues this could cause. See code examples and a workaround.
- The AHA principle: Avoid hasty abstractions
- Improve your code’s flexibility and maintenance with AHA (Avoid Hasty Abstractions) principle. Learn why duplicating code is sometimes better than creating abstractions.
- Links from the past few weeks (Nov 30, 2022)
- List of links, articles, and other resources you might find interesting from the past few weeks. (Nov 30, 2022).
- Git tips and tricks
- A collection of Git tips and tricks you might not know.
- Links from the past few weeks (Oct 30, 2022)
- List of links, articles, and other resources you might find interesting from the past few weeks. (Oct 30, 2022).
- Fuzzy search through files in Visual Studio Code
- Visual Studio Code already supports searching across all the project files. But let’s make searching inside them even more ergonomic and easier to use.
More TILs
- Barrel files slow down JavaScript tooling
- Many projects are littered with files that just re-export other files. These barrel files are one of the reasons why JavaScript tooling is slow in bigger projects.
- Barrel files
- Barrel files are files that re-export selected exports of other modules.
- Exercises in programming style (2014) - Cristina Videira Lopes
- This book provides a clear and understandable overview of different programming styles. Each chapter explains the style, offers commentary and historical context and shows you its implementation in Python together with some exercisees.
- Analyzing code data with git and Code Maat
- There are various techniques to analyze code for improvement and reducing technical debt. Here’s sum of the techniques I found useful after reading Your Code as a Crime Scene.
- Lehman’s laws of software evolution
- Lehman and Belady noticed that software often changes over time, so they wanted to find laws that describe how these changes usually happen, or must happen in order for the software to survive.
- Negative indexing with at() method
- JavaScript supports negative indexing via at() method.
- Yarn workspace fish completions
- I wanted to write something in the fish language and also learn how fish completions work, so I added completions for yarn workspace command that autocomplete workspace names and their scripts.
- Use git checkout -- to limit the autocompletions to files only
- When you execute git checkout with the double dash (–) after it, it instructs the terminal to only suggest file names as autocompletions.
- Tips for grokking Git
- What has helped me understand Git better and was not obvious to me from the documentation. Article assumes you already read about how git works internally.
- git push --force-with-lease --force-if-includes is a safer alternative to git push --force
- When you’re force pushing into a remote with git push -f, the operation is not safe. If somebody else already commited into the branch, you’ll remove their commits from the branch.
- fish abbreviations
- I found out that fish has something called abbreviations, which are better than aliases in many cases. With abbreviations, you can shorten a command like git to just g.
- Efficiently adding a new file to the file explorer tree using a shortcut
- I got annoyed during this scenario: Click or otherwise put focus inside the file explorer tree. Press Cmd+n.
- Using light/dark theme in delta based on system settings
- I tried to change the color of delta based on the system settings because the default theme is not very readable when you have a light terminal theme.
- Web scalability for startup engineers (2015) - Artur Ejsmont
- It has become increasingly important for me to understand what web architecture should actually look like. I had been treating the backend as a black box for far too long.
- Programming as theory building (1985) - Peter Naur
- Peter Naur’s classic 1985 essay Programming as theory building argues that a program is not its source code.
- Big ball of mud (1999) - Brian Foote & Joseph Yoder
- While much attention has been focused on high-level software architectural patterns, what is, in effect, the de-facto standard software architecture is seldom discussed.
- Enshittification
- Enshittification occurs when an online platform becomes more focused on making money and less concerned about its users as time goes on.
- Cunningham’s law
- Cunningham’s Law humorously says that if you want to find the right answer online, it’s often better to post the wrong answer instead of asking a question directly.
- The source code is the design (2005) - Jack W. Reeves
- In his article What is software design?, Jack W. Reeves presents an interesting assumption: What if we consider the source code itself as the software design?
- Email this bookmarklet
- I recently modified a particular Pinboard bookmarklet to send the current page I’m on to my email instead of bookmarking it to a service like Pinboard.
- Git diff vs git log: When to use two dots vs three dots
- git log and git diff support two and three dots and their meanings differ. When to use each?
- Measure how long a command takes
- If you want to know how long it takes for a process you run in the command line to finish, use the time command.
- Squash commits that have a merge-commit in between them
- This Git command sequence shows how to squash commits that have a merge-commit in between.
- GTD in 15 minutes
- A straightforward guide to GTD whose ideas I still use to this day.
- Forgotten ideas in computer science (2018) - Joe Armstrong
- In the early days of computing there were many good ideas that were 'before their time' and for one reason or another, these ideas were dropped! As time passes, perhaps we should revisit some of these ideas.
- Git REPL
- Tired of typing git when you run git commands? You can install git-extras and use its git repl to run multiple commands in a row.
- Auto setup remote on push
- Git version 2.37 introduced a new config option: push.autoSetupRemote. You can use it to automatically set up a remote when you push.
- Git commit message template
- I used this guide and template to learn how to write good commit messages.
- Use git bisect to find buggy commits
- If you have a bug in your code, and you want to find out which commit introduced it, you can use git bisect.
- Import Git configs
- You can include other configs in your .gitconfig file.
- Setup Git SSH signing
- In version 2.34, Git introduced SSH signing. Git supported GPG signing for a long time, but I found it cumbersome.
- Avoid unnecessary merge commits on pull
- When you pull a branch, Git will by default create a merge commit. If you don’t want to have a merge commit, you can use the following setting to rebase the local commits instead.
- Reuse recorded resolution of conflicted merges
- Git rerere can automatically resolve merge conflicts you resolved before, but you need to enable it first
- Find the most recent branches
- The following command will show you the branches sorted by the date of the last commit.
- Find the most frequently changed files
- To find the most frequently changed files in the repository, you can use the following command.
- Philosophy of software design (2018) - John Ousterhout
- The book Philosophy of software design really influenced my programming style and how I approach software design. At the end of the book, there’s a summary of design principles and red flags that I still use as a go-to reference.
- Programming paradigms for dummies (2009) - Peter Van Roy
- Chapter Programming paradigms for dummies: What every programmer should know provides an introduction to supposedly all the main programming paradigms (so not just functional programming and object-oriented programming), their underlying concepts, and the relationships between them.
- Typeclassopedia
- When I wanted to understand standard typeclasses in Haskell and fp-ts, I turned to Typeclassopedia as a good starting point.
- Out of tar pit (2006) - Ben Moseley & Peter Marks
- Out of the tar pit is a 2006 paper by Ben Moseley and Peter Marks about the causes and effects of complexity in software systems.
- No silver bullet (1986) - Frederick P. Brooks, Jr.
- In No silver bullet (1986), Fred Brooks argues that there is no magical solution or breakthrough that can significantly improve productivity, reliability, or simplicity in software development within a short period of time.
- Types and programming languages (2002) - Benjamin C. Pierce
- Types and programming languages by Benjamin C. Pierce is a great book about type theory and type systems, although lot of it went over my head.
- Structure and interpretation of computer programs (1996)
- At first, I didn’t quite grasp this book, but now I have a newfound appreciation for it. It’s an excellent resource for understanding how programming languages work.
- Pro Git (2014)
- The book Pro Git provides you with everything you would and would not like to know about git, and it does so in an understandable way.
- The pragmatic programmer (1999)
- The Pragmatic Programmer is a well-deserved classic, and I highly recommend it.
- Agile manifesto (2001)
- When you ignore all the unnecessary stuff, the Agile manifesto is all you need to remember when you want to be agile.
- Git - the simple guide
- Using git can be overwhelming. This guide was a helpful reference when I was starting out and needed to focus on the essentials.
- The little Schemer (2007)
- I used the book The little Schemer while learning about recursion.
- Refactoring (1999) - Martin Fowler & Kent Beck
- The book “Refactoring” by Martin Fowler & Kent Beck has some interesting ideas about refactoring.
- Frontend developer roadmap
- When I decided to learn frontend development, I had no idea where to start or what exactly I needed to learn.
- Secrets of the JavaScript ninja (2016) - John Resig, Bear Bibeault & Josip Maras
- I used the book Secrets of the JavaScript ninja at the beginning of my JavaScript learning journey.
- JavaScript: The good parts (2008) - Douglas Crockford
- When I was learning JavaScript, the book JavaScript: The good parts provided a guideline on what to focus on and the correct way to use it.
- The Better Parts (2014) - Douglas Crockford
- I watched and learned from the talk The Better Parts at the beginning of my JavaScript learning journey.
- The lectures on JavaScript (2007) - Douglas Crockford
- I used these lectures at the beginning of my JavaScript learning journey.
- Head first design patterns (2004)
- A book I used to learn about object-oriented design.
- Head first object-oriented analysis and design (2006)
- A book I used to learn about object-oriented design.
- The algorithm design manual (2008) - Steven S. Skiena
- A useful book to keep as a reference, where you can browse through and try to find a known algorithm for your problem.
- Don’t make me think (2006) - Steve Krug
- The book Don’t make me think! by Steve Krug helped me understand how to think about website design.
- Learn CSS layout
- The site Learn CSS layout helped me grasp CSS layout. After reading and comprehending it, I stopped randomly trying solutions from StackOverflow — I understood what I needed to do.
- A complete guide to flexbox
- I use this guide to remind myself how flexbox works (it’s regularly updated).