Arch Linux on ASUS X205T/X205TA

I recently found an old ASUS X205T laptop squirreled away in my closet. When I tried to boot it, it constantly rebooted back to the BIOS. Since it was 100% unsalvagable, I decided to try putting Linux on it. To save others my pain, I have decided to chronical my steps from nothing to boot. There are several other tutorials »

Being a Dick with Pointers in C

I like to argue that C can be a boring language. Boring here is a good thing. This is boring code: void some_function(int param1, void *param2) { if( param1 == 0 || param2 == NULL ) { return; } char *casted_value = (char*)param2; if( casted_value[param1] == 'A' ) { //do something } } It's boring because it's obvious what each piece does, even with nonsensical variable names. »

C fgetln and strcpy

This is a continuation of the exploring C articles I started here. This will focus on a quirk that caused me some debugging pain. In fairness, this is documented on the man-page of fgetln: This line is not a C string as it does not end with a terminating NULL character. A simple implementation of fgetln to iterate through every »

Debugging Running Processes with GDB

This is a continuation of the exploring C articles I started here. This one will focus less on C and more on some obscure commands in GDB. When compiling a program with gcc or clang, you can pass the -g switch to produce a dsym file along with a debugging version of your program. This allows you to see the »

C Multi-Level Pointers

I feel like I have read a lot of anti-C articles recently. Don't worry, I'm not going to sit here and claim C is the greatest language ever invented. However, at this point, it has taken the unfairly assigned mantel of all the worst things about unprotected programming. I thought it might be fun to take a break from that »