Regular expressions (or regex) are incredibly helpful tools to have at your disposal as a software developer, but they’re often dangerous tools. In this post, I’m going to focus on the times where you shouldn’t use regex, and then I’ll go over some strategies and features to use when you do write regular expressions. Lastly, […]
Well-named variables are one of the most useful tools for building a maintainable and predictable codebase. Poor variable names can confuse users, but good ones make code seem effortless. As Ward Cunningham put it: You know you are working on clean code when each routine turns out to be pretty much what you expected. Naming […]
I’ve been using Vim as as my primary text editor for a little over a year now, and I’d like to share some of my favorite commands that I’ve discovered during that time. I’ll focus on sharing commands over configuration, so they can be used in any Vim environment.
Writing a game-playing AI is a fun process, but checking for wins or valid moves can be one of the boring aspects of the project. More often than not, it ends up being a sizable chunk of your computation time as well.