When I was in grad school and struggling with my Master’s thesis, I started a small side project in order to distract myself and work on something that felt more rewarding. This project was basically a clone of vim – a terminal-based text editor I called badavi . That was around seven years ago. I haven’t worked on it continuously since then, but I would occasionally go back and…
I like out-of-tree builds. Out-of-tree builds are nice for lots of reasons. You can have multiple builds of the same project coexisting side-by-side – for example a debug build for development, a release build, and an instrumented build for code coverage runs. All the generated build artifacts are together underneath one directory which you can easily delete without having to maintain a make…
Update (2022-09-05): The issue described in this post was addressed by PEP 479 , which made it so that StopIteration is automatically changed into a RuntimeError when raised inside a generator. As of python 3.5 (which was already available when this post was written), it was possible to opt into the new behavior with from __future__ import generator_stop , and the default was changed in python…
This is a quick post about a bug I ran into at work which turned out to be caused by passing a literal 0 instead of NULL to a function. Here’s a small program reproducing it:
The past few months at work I’ve been working with a large legacy codebase, mostly written in C. In order to debug problems as they come up, I wanted to use gdb – but it seemed like the program was only ever compiled with optimizations turned on ( -O2 ), which can make using gdb a frustrating experience, as every interesting value you might want to examine has been optimized out. After…
I use vim. I’ve used vim since I started programming; the very first program I wrote – hello world in C, following along a cprogramming.com tutorial – was typed out in vim, inside a cygwin environment on Windows. Naturally, at first it was hard and intimidating. I didn’t know how to do anything, least of all edit text. I learned about insert mode and normal mode. I learned…
It’s common to be asked a question like “what’s the hardest bug you’ve debugged?” at job interviews in tech. This post is about the bug I usually describe. The snag is that it’s quite involved and I don’t actually understand it all the way through – there are one or two aspects to it I often hand-wavingly gloss over. The hope was that by writing it…
Disclaimer: I’m not quite sure who the audience is for this. I guess it’s describing a fun little project I put together, but it’s also written kind of like a tutorial, so you can maybe follow along. I don’t think it’s particularly beginner-friendly, though. Some knowledge of Java is assumed, but not much. The code is available on github . Code coverage is a software…
Hi, you’ve reached my website. I’m Ismail Badawi. I currently work as a software engineer at a big technology company called Cisco Systems. Previously I was a graduate student at McGill University, where I did compiler stuff for MATLAB as part of the McLab project. I also interned at Google a couple of times along the way. If you’d like to get in touch with me for any reason, the…