Keyboard driven development means using your keyboard as much as possible while programming, avoiding the use of mouse or touchpad. The advantages include being much faster and showing off your unix foo, and being more ergonomic, since repeatedly moving your hand from keyboard to mouse is a waste of time that will eventually give you a repetitive strain injury. This post serves as a cheatsheet for myself, in case to need to review one of the less used keyboard shortcuts. A lot of people like to bind their prefix to the caps lock key, but I already use that to activate my Karabiner layer (to be explained in another post). ...

Motivation In 2013 I was setting up an Ubuntu dualboot environment, accidentally selected the wrong partition, and saw it immediatly be deleted from the partition table, instantly erasing 300GB worth of data. While I could have recovered most of it with a tool like Recuva, I instead swallowed my pride and accepted this as a lesson: you need a backup. Having had external drives fail on me before, I since longed for a more disaster proof solution that would give me the flexibility I needed. ...

Communication and webapp central Franz Franz is my go to app for web apps. It’s well integrated to many services, from Trello, to WhatsApp, to Gmail. Rather than keeping tabs open in your browser, or installing a handful of individually tailored Electron memory hogs for each service you use, Franz keeps all your RAM them all in one place. brew cask install franz Productivity Effortless Effortless is my favourite app for managing my current tasks, allowing me to effectively timebox my activities. It’s currently a bit on the pricy side. ...

Thinking, Fast and Slow is a popular book I recently finished reading. Written by Nobel prize holder Daniel Kahneman, it summarizes decades of his work on researching cognitive biases, prospect theory, and happiness. It includes a lot of interesting insights from academia and the IDF (Israel Defense Forces). While there is a lot to take away from the 499 pages, I still find myself sharing relevant chapters with friends and family as they provide great insight in common phenomena. I wanted to highlight some of the most interesting and eye-opening insights in this post in a short format. Overall, this book has helped me think more rationally as I became more aware of my own biases. ...

The solution to node-gyp & Ruby FFI problems After almost every update of MacOS, my Nodejs and Ruby set up seem to break. This has to do with the xcode command line utilities, as these are required when compiling a native extension like fsevents using Apple’s clang compiler. The errors look something like this: xcode-select: error: tool 'xcodebuild' requires Xcode, butactive developer directory '/Library/Developer/CommandLineTools'is a command line tools instance xcode-select: error: tool 'xcodebuild' requires Xcode, butactive developer directory '/Library/Developer/CommandLineTools'is a command line tools instance No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 Approach 1: Have you tried turning it on and off? (are they actually installed?) xcode-select --install This installs the command line tools. ...

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. Everyone seems to hate regular expressions. I hated them for years. When I needed to get a phone number out of a string, or an attribute of an HTML element, I’d Google it and copy and paste the first StackOverflow results together into my language of choice. In a university level compilers course, I learned how to appreciate regular expressions for the beautiful thing they are. While I am by no means an expert, I have a solid appreciation for the problem they are designed to solve. In this article I will try to show this to you by starting not from regular expressions, but formal languages. So let’s start from the other side. ...

Note: This was originally written by me & submitted to the Technical University of Munich as an entrance essay. Motivation The election of American president Donald J. Trump in 2016 propelled misinformation, often called “fake news”, into the mainstream discourse. The revelation that Russian troll farms and media outlets produced misinformation that supported Trump and undermined his opponents shocked American voters [1], [2]. This example demonstrates the the need for effective, preventive means to avoid misinformation. ...

As part of a course on Information Security, part of the course assesment came from a semester project. We had to exploit an application, preferably a web application, of our choice. Given that our university uses the Moodle platform for the course web pages, Moodle became an obvious first choice. Moodle is an excellent target because it is an old project, written in PHP, full of obscure features that are questionably maintained. Therefore it has a huge attack surface, and there are plenty of known vulnerabilities to exploit. Besides, PHP makes it easy to write insecure code: plenty of dynamic-language fun like eval() and unserialize(), magic methods, an extremely poor type system, and a long legacy of functions that require input sanitization before use. ...

Visual Studio Code is a powerful editor right out the box, but some extensions can provide nice additions to your workflow, or at the very least make your code easier to read and work with. I won’t delve too much into language specific extensions such as the plenty of C, Ruby, etc. specific extensions. In reality, the most useful extensions for your workflow will be language specific, and there are too many out there to list the best ones here. For some language specific suggestions, and plenty other cool extensions, this Github repo is a great start. ...

Note: Programmers generally spend way too much time messing around with tools and tweaking aesthetics than being productive with the tools that should be making them more productive. Here is a small selection of my favourite color schemes. I almost exclusively use dark themes, and I appreciate contrast and colourfulness. The font is Fira Code iScript. This gives you the hipster cursive look. 1. September Steel 2. One Dark Pro ...