I started writing before the generative AI became popular. Even a simple article always took me a lot of time to write. Nowadays, authors can produce1 and publish high-quality content faster than ever before, with almost zero effort. On the other hand, consumers no longer have to search and browse the Internet for the answers – they can generate curated content on almost any topic just for themselves. If any answer can be instantly generated by an LLM, what’s the point of writing?| Szymon Krajewski
In my home, I have a mechanical ventilation system with heat recovery powered by Stiebel Eltron V-400. Basically, it’s a large fan with air inflows and outflows ducts. Besides some built-in automation, it’s a pretty dumb device. Without a dedicated gateway (which costs extra money), I can only control it or see its current parameters on the controller, either on the unit or in the hall. I thought it would be nice to collect some data from this device, both for some kind of analysis and ou...| Szymon Krajewski
I couldn’t find any better phrase that describes the approach I’ve learned in the last year. It’s a simple piece of advice: Test your plans by reducing time. It’s easy to fall into the trap of thinking that the amount of our free time is stable and we’ll also be able to spend the same number of hours on things in the future. Sooner or later, you’ll need to put most of your effort and attention in a specific direction. Eventually, you’ll push every insignificant activity in the b...| Szymon Krajewski
When I clone a new project, I put the proper email address (e.g., a company email) as an author email in the local config stored in the repository. It worked fine until I started working for a client whose project is spread across many repositories that I cloned when needed. I can’t count how many times I forgot to put the correct email into the local config of the newly cloned repository before committing anything into it – just because I was in a rush. In effect, my personal email (whic...| Szymon Krajewski
Some tasks seem easy when we perform them manually, but new things come to light once we want to automate them. What can go wrong if we remove hard spaces from a text file using a script? If it’s a one-time operation, we run the editor, use the find-and-replace functionality, and that’s enough. Otherwise, we need to find a more automatic-friendly approach.| Szymon Krajewski
Some companies send encrypted PDF documents. If you’re a macOS user, Preview will ask you for the password each time you use quick look or open the document. Moreover, if you print that document, you’ll end up with a blank sheet of paper. At least I got it. So secure.| Szymon Krajewski
Recently I received notification that somebody post information about my article on Twitter (thanks!). Twitter usually renders a link to blog posts as nice-looking cards. The card to my article shown up without a featured image. I checked my Twitter feed, and some of my other entries also suffer from missing featured images.| Szymon Krajewski
There are a few different methods to enforce a line break in the same paragraph in Markdown syntax: HTML’s , backslash and double space. Let’s consider each case.| Szymon Krajewski
I do not use iCloud backup for my iPhone. Instead, I do local encrypted backup, more or less regularly. I wanted to browse and find something from one of these backup. Did you know, that there is no native way on macOS to browse and restore something from your encrypted iPhone backup? I didn’t.| Szymon Krajewski
I struggled with the strange behavior of dhcpcd on my Raspberry Pi powered by Raspbian. The RPi does many things on my local network, including ad-blocking thanks to the pihole service. I run pihole1 as a docker container, and it does its job perfectly well. Thanks to the port binding, I could bind port 53 (DNS) directly to the host and use its address as a DNS server.| Szymon Krajewski
In one of my side projects in Node, I wanted to test if the object with the date is formatted correctly as a Markdown entry. The setup of the test was the easiest part. However, comparing the outcome of the formatted Date object wasn’t so convenient because of the timezone. Because I live in the Europe/Warsaw timezone, I experience an offset relative to UTC.| Szymon Krajewski
We get used to reading about big things – high-level architectural solutions, design patterns in action, or big data processing. However, most of our problems are small and lie at the low-level in our code. One of them is: how to synchronize a collection of entities with another collection, which is its simplified representation? Imagine you have a collection of entities. You receive an updated version of that collection, e.g., from the API endpoint. But what if data are transferred using D...| Szymon Krajewski
When you ever develop an API in the Symfony framework1, you probably heard of the serializationGroup option. It allows you to define different groups of attributes to serialize and deserialize. However, defining these groups without proper consideration may make the whole development hard, e.g., if you need to deal with different scopes of the object’s attributes in many other endpoints. I want to show you our approach to serialization groups in one of our projects. Together with my team, w...| Szymon Krajewski
I use restic as my backup solution, and I haven’t had any problem so far, but recently one of my health checks suddenly stopped working, telling me that something is wrong with my backup. On the other side, restic has done its job, and everything works fine, so what was the problem?| Szymon Krajewski
The problem with Social Media lies in its social component, where we treat everyone as a friend. Some people take it seriously, and they share almost everything with people who often don’t really care. As long as the publisher does it consciously, know the consequences, and have fun with sharing – it’s OK. However, the problem occurs on the consumer’s side because not everyone is interested in somebody else’s life details, political opinion, religion, or other stuff that friends act...| Szymon Krajewski
Last time I’ve experimented with applying various encryption solutions to the public cloud storage such as Google Drive or OneDrive. They are relatively cheap online storage. However, I don’t consider them the best place for all my files, especially sensitive ones. To make them more useful to me, I was looking for an end-to-end encryption mechanism I could use with clouds in tandem, and I finally discovered rclone. In this article, I’d like to show you my approach to use rclone as the w...| Szymon Krajewski
This blog is my third approach to regular writing. It’s almost three years old now, so it’s a good indicator, that this attempt was the successful one. Over time, I published more than 40 articles, which is many and few at the same time, especially when I’ll consider my approach to writing. The start wasn’t easy since I hadn’t picked any niche or the main topic. I collected some ideas for articles I could write about. I narrowed the scope to the programming field, but as time went b...| Szymon Krajewski
I’ve heard a lot of good things about Emacs and Org-mode package as the approach to write and organize plain-text notes. I recently found a doom-emacs project and I decided to give it a try. Unfortunately, in the default configuration, I was unable to type polish characters. Here are two solutions, how to fix it.| Szymon Krajewski
You’ve probably heard about draw.io which is one of the best free, open-source diagramming software. The tool is powerful. It supports many storage backends and could be integrated into other apps. But the one crucial feature is still missing – it has lack of collaborative editing. Remote collaboration is something we need these days. Last time, Visual Studio Code announced extension called Live Share, allowing developers to share their workspace with other people. In consequences, it ope...| Szymon Krajewski
When we talk about software development, sooner or later someone starts a discussion about tests. In our world, tests are considered as something helpful and crucial to our work. However, sometimes we need to face with people who have a different opinion about it. Moreover, it’s hard to find a proper argument, especially for a person who pays you and who wants to utilize your time effectively. How can you convince your boss to let you write tests? Should you even ask for permission?| Szymon Krajewski
Before you start your blog, you have to perform a set of essential choices – topics you want to write about, domain name, and the way you’ll publish your content. I choose the self-hosted WordPress platform with a slightly customized theme that I found on the Internet. After more than two years of blogging, I migrated all my content to Hugo. In this article, I would like to show you why I decided to move on from WordPress to Hugo – a static page generator.| Szymon Krajewski
Almost every modern computer has a dedicated menu to choose from which device the system should boot. If not, there is an option in BIOS/UEFI to change that. But what if both options failed for some reason?| Szymon Krajewski
Sometimes I feel a surge of creativity. It’s a shame not to use this state to create something remarkable. However, once I sit down to my desk trying to write some words or code, I realize that I should do this in a particular way. Why? Because it’s how I use to do these things. And you know what? The form may limit you.| Szymon Krajewski
I would like to confess a small lie that I told myself each time when I found something interesting on the Internet, but I didn’t have enough time to read it. It was Read later.| Szymon Krajewski
Create connections between notes is the essential part of the whole note-taking process, and for sure, it leads to discovering outstanding ideas in the future. However, it requires extra effort during writing: you have to find a proper note, copy the reference and paste it to the original memo. Some software has a built-in feature to handle it, but when it comes to plaintext notes, the implementation depends on the user. In this article, I’ll show you how to create Alfred workflow that auto...| Szymon Krajewski
When I think about a new idea or my next goal in life, I usually think big. The goal has to be ambitious and attractive to me, otherwise, it’s not worth putting effort into it. However, big goals also overwhelm me, because I don’t know where I should start. So I prepare. And I think. And I prepare. And I think. And this loop goes on. It changed. The endless loop of thinking about the best approach to achieve the goal or to do whatever you want means that you probably try to start with som...| Szymon Krajewski
MacOS has a special shortcut I wish I have known them at the beginning of my journey with this system. The functionality is hidden in the menu in almost every app when you click on Help. I talk about this little search box.| Szymon Krajewski
The end of the year is presumably a good time for reflection and review. I don’t have any strict structure for annual reviews. I did them many times before, but I haven’t found any process that I stick to. I used to set goals and check if I accomplished them. However, this year I tried something different.| Szymon Krajewski
List of books. Inspiring food for thoughts. Things I’ve done today. Big ideas that can help the community I live with. That’s are examples of running notes – useful notes, that I update all the time. This is one type of notes I use in my plaintext personal note-taking system. In this article, I’m going to show you, how to make use of them in an effective way – using tool called Alfred.| Szymon Krajewski
Each professional group has own specialized vocabulary. It consists of words often related to tools, technologies or processes. They make everyday communication smooth and effective. Yet, this way of communication is appropriate only for specific environments.| Szymon Krajewski
For most people, keeping notes and other stuff in text files is ridiculous – tons of services and apps could do it better. But what the better means? Despite the availability and diversity of note-taking solutions on the market, I haven’t found any that would meet my expectations. I tried to stick to the one app but I had felt the internal resistance to settling in one specific, often a vendor-locked solution. The breakthrough was when I ask myself – why I even want to note this informa...| Szymon Krajewski
One of the problems during traveling in pair is to take photos of us together. Since we have enough photos “from hand” in our albums, I decided to buy a selfie stick.| Szymon Krajewski
In this article, I would like to show you how to prepare the script that will back up your important files to the cloud storage using a tool called restic. Even though the article is specific for macOS and Backblaze B2, you can use some techniques for creating a similar script for Linux systems.| Szymon Krajewski
The first draft of this article was about the code-style. I wanted to show you why it is important and why we should care about it. But the longer I thought, the stronger conviction I gained, that the code-style – whatever it means – is only a way to achieve a much more important goal. I’m a big advocate of well-quality code. Besides good architecture, I pay attention to style – consistent spacing and indentation, coherent naming convention and other rules that make the code visually ...| Szymon Krajewski
The Internet is teeming with services you can take advantage of. You can store your files in the cloud, share movies, organize photo collections, talk with friends, manage your projects and so on. It also means that your data is stored outside your computer and you don’t have full control over it. You may use self-hosted counterparts of services. Instead of accepting vague privacy policies, you may set the rules. However, you are fully responsible for sustaining your data. I used to conside...| Szymon Krajewski
I collect lots of thoughts in my private notes. Some of them could be quite useful if I show them in a decent form. Unfortunately, they are too small to be a full article, so I decided to introduce another form of posts – tiny thoughts.| Szymon Krajewski
During development, you probably take advantage of some extra command-line tools. In PHP world it could be a mess detector or program to check the code style. The framework you use also exposes some functionalities to clear cache, migrate database or generate documentation. All these commands are helpful but you need to look for them until you memorize the most useful ones. Sometimes you need to perform a task, like project initialization or restoring a stable snapshot of the database.| Szymon Krajewski
5 years have passed since I had started working as a professional software developer. Although the programming was my hobby since the early years, my skill started to grow when I had taken a real job. I was surprised when I had recalled my very beginning because I noticed how much I had changed and how big progress I had taken. So, I decided to write it down. In this article, I’ll take you on a short journey where I’ll tell you about my development process. You’ll find out what I’ve b...| Szymon Krajewski
I create a lot of notes. Seriously, I write tons of notes. Inspired by Getting Things Done method, I treat my mind as a thoughts generator rather than the storage. I capture thoughts, ideas, inspiring quotes, links, and pictures. Mostly using files. Although I’m on the early stage of creating my custom note-taking solution, I’ve done some work to synchronize notes between devices and versioning them. In this article, I’d like to focus on the latter and I’m going to show you how to set...| Szymon Krajewski
If someone would ask me about my favorite keyword in PHP, I would certainly answer: final. It doesn’t mean I write this modifier in each class or method. It not only shows the intention but also provides a mechanism to protect the code. At least from the assumption. The final keyword can be used both on the class level and on the method level. It prevents future extension of functionalities in a non-effective way. If a class is marked as final, then we can’t inherit from it. If a method i...| Szymon Krajewski
Repositories are a special example of a class. They usually have a lot of methods designed to retrieve data from the database or the other storage. To mark this operation in the name of the method, we can use one of the common words: find, get, search. Are all them mean the same? In this article, I would like to show you a practical difference between getById and findById methods.| Szymon Krajewski
JavaScript is one of the most versatile programming languages I know, however, I had a constant problem with the testing. Since I run into TDD, I was looking for something that allows me to build my solutions using this approach. When I had been creating a small project in React, I accidentally discovered Jest. It surprised me because it hadn’t required any extra configuration. I thought that the configuration was built-in into the create-react-app tool. It turns out that zero-configuration...| Szymon Krajewski
I remember this time when I discovered Vagrant. The magic behind this tool and the general idea of scaffolding the whole environment using single command was pretty genius. Moreover, I had programmed on Windows and thankfully I could get rid of the XAMP and any other Windows-oriented web server packages. In my previous job, my boss showed me a tool called Docker. I instantaneously got the point of the concept behind it and I started exploring the big universe of the possibilities of use. In...| Szymon Krajewski
A long time since my last article. During the last few months, I was fully involved in my last big project at my university. Dozens of articles and books, hundreds of visited pages and thousands of words later I had finished it and a few weeks later I defended my master’s thesis. Since I took a short break from almost every activity, I had a lot of time for thinking. When I look at 2012, I see the young guy who knows everything he needs and he wants to only the paper to confirm it. Now, in ...| Szymon Krajewski
I joined to the project that was developed by one guy. He was an amazing developer with plenty of ideas and skills. He had also the best knowledge about the system – its domain, architecture, used solutions, hidden tricks, and workarounds. In every single task, I needed his support because I didn’t understand how things worked. My main goal was to retrieve as much knowledge as possible from his head. The reason was simple – his contract is ending in a month. I wish I didn’t know about...| Szymon Krajewski
I didn’t always work in a larger team. At the beginning of my journey as a computer programmer, I was the only one person in a project. It meant that I had had a free-hand (or semi-free-hand) to choose how I could write a code and which solutions I could use. From day to day I could perform a little revolution in the codebase. No consequences and no problems because the only user of the code was me. Although this situation might look as the best case for a programmer, it doesn’t. Especial...| Szymon Krajewski
It may sound obvious or even weird for people who programming in statically typed or compiled languages. In my work, I use PHP which is a dynamically typed language with optional strict typing introduced in version 7. At the beginning of my journey with PHP, I didn’t care so much about typing. I had a trivial cause — they didn’t exist yet. I used to write a code without thinking about types. It was convenient and fast. Furthermore, it allowed writing proxy functions which recognize para...| Szymon Krajewski
Whenever people say about New Year’s changes they, mainly think about resolutions, plans and set up goals. But this is also a great time to small retrospective both your personal and digital life. Let’s talk about the digital once. Do you realize how many registrations have you performed over the last year? Or over the last 5 years? Who did you give your email, personal data, photos, documents or other files to? Too often, it’s too much to know about all this. Think about each website, ...| Szymon Krajewski
Every day at least 30 new messages land in my mailbox. Newsletters, reminders, status updates, mentions, recommendations and even personal or business messages – each of them need my time and an attention. And no one besides me is responsible for handling them. I had my very first email account on the public news site. I received tons of advertising messages until I got the invitation to the Gmail. This mail service was capable of identifying unwanted messages. That was what I have been loo...| Szymon Krajewski
When we talk about arrays we usually mean the vector of something – primitives, objects or even arrays. But there are a lot of situation when we need to carry extra information with our data. We can use nested arrays but it doesn’t cause that the specific item within the array will be easy to identify. To achieve it we should use custom keys. They provide easy access to any element of the array as long as we know the key corresponding with that value. There are some reasons why we can use...| Szymon Krajewski
If you frown after reading idempotence, don’t worry. Although this word sounds unusual it conceals a simple mathematics property. Needless to say, this characteristic has also a big meaning in Computer Science. Idempotence operation is an operation that can be applied multiple times without changing the result beyond the initial application. It may sound difficult but after a couple of examples, the general concept will be obvious.| Szymon Krajewski
I remember how I was excited discovering how much frontend frameworks like AngularJS could make my work easier. Even though I was a strong backend-oriented programmer I decided to learn the concept of Angular. I dug into it at ease and I started using this tool in my daily work. Since I changed my job I lost the opportunity to use frontend technologies regularly. However, I’m still fascinated about this part of software development and I follow trends and latest changes. Therefore AngularJS...| Szymon Krajewski
Loop is the basic construction in each programming language. All repeatable operations are being done using loops. I think you know how the basic loops like while, do and for work and when you should use one of them. But are you sure? Maybe should you use array functions? How many of your operations in a loop rely on building objects based on the value? Or selecting only a few items from the array using a predicate? Maybe you use array values to calculate something? Whatever you do, read why ...| Szymon Krajewski
Among thousands of files on my computer, I have some with special meanings for me. Photos, videos, papers, and spreadsheets – they occupy dedicated places within my filesystem. That’s the problem – they exist only on my hard drive. However, I sometimes need a quick access to these files from my smartphone or other computers. The solution seems to be simple: migrating to the cloud. But what if I definitely don’t want to keep these files outside?| Szymon Krajewski
ECMAScript 6 has an amazing feature called Arrow Function. It allows writing a function expression faster and smarter than traditional way (using functionkeyword). Worth to know, it’s not a one to one replacement for standard functions.| Szymon Krajewski
Lots of JavaScript projects use a dozen of various frameworks, libraries, and third-party scripts. More often code which you produce largely depends from vendors’ work. The good example is jQuery and Lodash libraries which are involved in our pretty code. They are designed to facilitate the work and they are the remedy for especially commonly used, repeatable pieces of code. This kind of libraries (and frameworks) provide an another abstraction layer behind our code making the execution pro...| Szymon Krajewski
Everyone has an own version of a truth. I have the own truth, you have your own. JavaScript has many truths and it’s probably no problem until you’ll start to use it implicitly. This article shows and explains one of the popular JavaScript’s trap – inconsistent evaluation in If Statement and Equality Comparison.| Szymon Krajewski
Do you use constants in your code? Probably a lot. Even if you don’t define your own is highly probable that you use some constants defined by other libraries or a language itself. Constants are very powerful unless you use it in the wrong way.| Szymon Krajewski
In September, I wanted to try something new, so I started a simple project to check my abilities in UX and front-end development. The idea was simple — create customizable, reusable and highly accessible buttons. I have experience with front-end but I usually use CSS frameworks like Bootstrap or Foundation. But not now. I decided to design the whole page completely from scratch.| Szymon Krajewski
When I started my journey as a computer programmer, I had written my code in various way. In most cases, I translated requirements into specific conditions and statements, but I hadn’t taken too much care of readability or quality of my code. “It works, that’s it” – and the code base grew and grew in time. Thousands of written methods later, I had discovered that a lot of these little pieces of logic could look better if I reverse some condition within them. Unconsciously, I’ve st...| Szymon Krajewski