K. Sabbak

Code Princess

This is a blog

DRY

April 05, 2018

On the surface "Don't Repeat Yourself" (DRY) seems pretty self-explanatory. It's the concept in writing code that one should … never repeat oneself. Simple! Well, mostly. There's actually two parts to this, and the second one is the hidden gotcha that took me quite a while to grasp, and I'm still working on actually applying that knowledge to what I write.

Read More

Tags: dry general


Text Editor Dating

March 09, 2018

I've been reading The Pragmatic Programmer: From Journeyman to Master lately. While this book was published in 2000, the overall content is still relevant, even if some of the details are less applicable almost 20 years later (e.g. joining Usenets). Plus, as someone who is the proud owner of a small collection of computer books written before I was born, 2000 is nothing.

One section stood out to me though. "Text Manipulation" - the one on being the master of one (and only one) really good text editor and using it for everything. Initially I dismissed this as good advice, but advice that goes without saying these days. But then I realized I wasn't really following it.

Read More

Tags: text-editors


In Praise of MIT AI Fall 2010 and Patrick Winston

March 09, 2018

There are so many posts out there on minimax and tic-tac-toe. So many posts and youtube videos and they all have their strengths and weaknesses. Mostly, they focus on the implementation of the algorithm, which is super important, but I found an excellent MIT lecture on the whys behind minimax and I want to share it.

Read More

Tags: minimax resources


00100001

March 09, 2018

I've slowly been making my way through Geek Sublime: The Beauty of Code, the Code of Beauty in my free time and one of the first thing the book tackles is how people work in the tech industry and don't know how computers work. As someone who entered tech with a bootcamp background, this rings true to me. Though we spent a good deal of time immersed in learning how to code, and managed to get some of the basics of web protocol, we certainly didn't touch on logic gates or binary. To be honest, I can't tell if Chandra believes that people who work in tech need to understand how computers work on a fundamental scale, but he does help demystify some of it.

I'm kind of lucky, due mostly to an interest in the subject and the vague idea that I might get a CS minor (I never did), I managed to take a few classes in college that set me up with some of this basic knowledge. I also held onto the notebook that was my trusty companion through these classes.

Read More

Tags: binary fundamentals old-school


Ruby Heredocs

March 02, 2018

I’ve had a minute to spend more time in Ruby this week and I’m always floored by the wild stuff that this language lets me do. Here’s some of the fancy stuff I learned about HEREDOCs.

Read More

Tags: ruby heredocs