on January 17, 2020. in Software, Development. A 1 minute read.
I’ve been using screen a lot more recently, but not enough to have all the commands in muscle memory. Writing down a quick cheat-sheet for working with split panes/windows.
Continue reading Split screen panes...
on January 13, 2020. in Programming, Development. A 5 minute read.
I’m working on a small side project to gather stats about my blog. Posts published, words written, number of code examples. Good for practicing TDD. I want to share how I made one part of it better.
Continue reading A refactoring example...
on January 09, 2020. in Software, Development. A 1 minute read.
Today I ran into a strange error with screen. I was working on a remote server, executing commands in screen
when my connection got dropped. I reconnected, wanted to reattach to my screen session with the usual -r
option:
Continue reading Attach to an already attached screen...
on January 08, 2020. in Software, Development. A 1 minute read.
Today I had to delete all lines from a CSV file where the last column has a 1
:
Continue reading Delete lines containing a pattern in vim...
on January 08, 2020. in Programming, Development. A 2 minute read.
From time to time I come across a mistake in unit tests that makes them useless. The mistake is that we use the class and method that we are testing to create the expected result of the test:
Continue reading Don't use the class under test to create the expected result...
on January 03, 2020. in Blablabla. A 2 minute read.
2019 was a not so great year for my blogging. 7 posts in total. There are multiple reasons for that, all the regular stuff like “I didn’t find the time” and “Nothing to blog about”.
Continue reading Making it easier to blog...
on January 02, 2020. in Development, Software. A 1 minute read.
Yesterday I was looking at a rather large diff, but for the type of change I was after, I wanted to look only at the newly added files. Turns out, git diff has a filtering option with --diff-filter
.
Continue reading Filter git diff by type of change...
on November 22, 2019. in Programming, Development. A 3 minute read.
Legacy code has many definitions. It is code without tests. It is code written by someone else. It is code written X time ago. It is obsolete code that is difficult to replace with newer code. It is code that has no documentation. It is all of these things.
Continue reading Unit tests in legacy code...
on March 29, 2019. in Software, Development. A 1 minute read.
PhpStorm 2019.1 was released yesterday. During the first run after the upgrade PhpStorm usually asks from what previous version would I like to import the settings from, but this time it didn’t ask that. It rather imported some of my old settings, but not the latest ones I had for 2018.3.
Continue reading PhpStorm previous version settings not imported...
on February 08, 2019. in Development, Software. A 3 minute read.
Today I was using interactive git rebase to squash some commits together to clean up the commit history of a git branch. At one point I went a bit overboard with it and squashed together two commits by mistake.
Continue reading Use git reflog to split two squashed commits...