Vim: When find and replace isn't good enough
I was asked recently by a client whether I am more productive using Vim as opposed to a 'regular' text editor, like Sublime, Textmate, or Atom. I replied that I...
Refactoring a Regex
Regular expressions are a powerful way to search through and manipulate text. But as we know from Spiderman, with great power comes greatly reduced readability. In my current side project,...
Algorithmic Complexity and Grapefruits
What does it mean to say a program is performant? If it does what it says it does, that makes it useful, right? But if it does what it...
PGP Fundamentals: Diffie-Hellman Key Exchange
After watching @ecmendenhall’s talk about GPG tools I was inspired to learn more about encryption. The video demonstrated the Diffie-Hellman Key Exchange, in which Alice and...
Simple Git Merge Conflict: Resolved
The first time I encountered a merge conflict, I was paralyzed. Git wouldn’t let me continue developing. I didn’t even really care about the changes I had made, I...
Environment Variables
Have you ever been inside a Ruby file and seen a line that looks something like this:
ENV[‘FOO’] = bar
and wondered to yourself, what exactly is going...
Cluster: Finite State Machine
One of the latest feature requests for the “Cluster” task-tracking app involves being able to keep track of active clients, prospective clients, and clients who we once worked with...
Refactoring in Clojurescript
In this article from 1998, Martin Fowler talks about some reasons why we should refactor code. Fortunately for us, those reasons are still relevant today. His claim that...
Configuring NGINX Throttling with Boucher
Throughout the duration of the Dojo Dashboard project we have contended with a persistent bug. When hitting the URL for the app on the staging server, not all of...
Image filepaths in the Joodo Web Framework
Today we adjusted the way some images are displayed in one of the widgets on the dashboard. We had a problem though. When we turned the server on and initialized...
Continuous testing using Guard and Rspec
After working on an internal project in Clojure with continuous testing, I decided to see if there were something that could allow the same functionality in Ruby in order...
Cluster: Final Delivery
As the deadline for this project nears, I am informed of a couple extra requirements that are needed before delivery. This occurs late in the afternoon on the day...
ERROR: cannot resolve symbol clojure -- Clojure into Java with IntelliJ IDEA
The post “Invoking Clojure code from Java” demonstrates what I understand to be the “right” way to bring code from a Clojure project into a Java project, but...
Cluster: Iteration 3
Part way through this iteration I finish with all of the acceptance criteria except for the persistence story. It is at this point that I decide to check in...
Cluster: Iteration 2
If you recall the planning stages from the first post, they involved estimating point values for various stories, and the total points allocated were 4.25. The total amount of...
Cluster: Iteration 1
This is the second post in a series about my experience bringing an app from an idea to a deliverable product. You can read about the first part
My First 'Real' App
On a Monday morning, about three weeks ago, I am given the opportunity to create my first “real” app through a process known internally as the Partnership Project. Plainly...
The Burden of Technical Debt
When I started this project I knew I would be pressed for time. Two weeks to write a multi-threaded Java server isn’t very long, according to my sources. On...
Using Libraries: Java.net
In addition to the Socket class, the Java.net library also contains a particular class which I learned of about a day later than I needed to. The name of...
Building a server in Java
As part of the apprenticeship at 8th Light, all apprentices are required to build a web server that passes a suite of tests known as cob_spec via
Debugging in Erlang: Not so different from debugging in Ruby
When I start out debugging a particular problem, I usually begin by trying to print out important variables within the process I am inspecting. By testing my assumptions I...
Comparing Erlang to Ruby: Gathering Rows in Tic Tac Toe
My first implementation of TTT in Ruby was pretty naïve, particularly my inflexible approach to collecting the contents of each square within a three-in-a-row. For example, lines 60-67...
Design Patterns: Template and Strategy
Template
The Template Method Pattern allows for part of an algorithm to be varied by creating a base class with a template method inside of it that controls...
Practicing Mindfulness: Learning Erlang
Throughout the last four days I have spent my waking hours learning about the programming language Erlang. Building massively scalable soft real-time systems is what the language is most...
Let’s Get Functional: Learn You Some Erlang
I have two weeks to write an unbeatable Tic Tac Toe program in Erlang. Why Erlang? One, it sounds cool. Two, Erlang files end in .erl, which when...
A Retrospective: Apprenticeship
Last Friday I had my first retrospective. Retrospectives are an opportunity to take a step back and reflect on the experience as a whole: what is going well and...
Polymorphism
According to the Wikipedia article on polymorphism in the context of object oriented programming, “the primary usage of polymorphism is the ability of objects belonging to different types...
On Asking for Help
I started today feeling rather lost. In order for me to meet my deadline tomorrow of having a working playable game in the browser, I needed to:
-...
Experiments with Embedded Ruby
After getting the WebGame class fleshed out a bit more I was ready to try it out in the browser. The game was configured properly and an empty board...
Why is there so much logic in the route file?
After my IPM on Friday I realized that although the road on which I had been traveling last week would have eventually led me to the end goal of...
Refactoring the Game Loop
Most of today was spent trying to refactor my game loop and cleaning up code in the process. My goal is to get to the point where I can...
Game Loop: No Longer a Loop
When playing tic tac toe in the console, the app will sit and wait for input to enter through the console from the user. Waiting cannot happen in a...
Decoupling UI: From Console to Web
The past few times my mentor has looked at my code one of the things he has told me is that I need to decouple my UI from the...
RubyGems: Follow-up
Josh Cheek gave a lightning talk today at 8th Light U about load paths in Ruby, which prompted me to follow up with him afterwards about the...
Ruby Gems: What I’ve learned so far
What is a gem?
Simply put, a gem is a package that wraps a file or set of files (like an application).
Why use a gem?
...
Getting started with VIM: A significant significand
Many of the craftsmen and apprentices at 8th Light use the VIM text editor because of the efficiencies it affords them. VIM makes it easy to quickly navigate a...
Sinatra TTT: Embedded Ruby
In order to display a GAME OVER message in the browser after all squares have been filled I realized I could do so in one of two ways. I...
Update: Sinatra Tic Tac Toe
Task: Play human-human tic tac toe in a browser. Stories include:
- place marker into a square
- marker switches for opponent
- when game is over,...
Apprenticeship at 8th Light - Week 4
Task: Play tic tac toe in a browser
Last week I spent a significant amount of time chasing down a configuration bug in my .rvmrc file. I was getting...
The Internet is Configured, or How ISPs Leave Something to be Desired
I recently moved into a high rise with my girlfriend in the Gold Coast area of Chicago. Her last experience with Comcast was unpleasant enough for her to insist...
Apprenticeship at 8th Light - Week 3
Last week was a bit short due to the holiday (Chicago’s July 4th July fireworks display was pretty underwhelming) so my IPM got pushed back to today. One valuable...
Building a Stack
After talking with one of the craftsmen about the dangers of using recursion (you can blow the stack -- hence, “stack overflow”) and how that can be avoided by...
Apprenticeship at 8th Light - Week 2
Last Friday I delivered the result of my first week’s work at 8th Light. I received positive feedback from my mentor, as well as a healthy dose of constructive...
Minimax, Negamax, and Alpha-beta pruning
I recall a conversation with my dad not too long ago about staying positive while trying finding solutions to difficult programming problems. He mentioned that you should always start...
Apprenticeship at 8th Light - Week 1
Today was the start of my first full week as an apprentice at 8th Light. Every morning an apprentice standup meeting takes place when we each take a...
.dup(ed!)
For the past week I have been trying to figure out why my Tic Tac Toe game was not restarting correctly, and why it would not play at all when...
Accessing Class Attributes
After a review of some of my Tic Tac Toe code it was recommended to me that I read up on attribute accessors as used in Ruby. These include...
Expand Your Bandwidth
One of the apprenticeship patterns that stuck out to me recently is called “Expand Your Bandwidth.” The authors state that “while [expanding your bandwidth] will accelerate your learning, it...
Code and Coffee
Today was quite productive: I have made significant progress in refining my Tic Tac Toe game in order to make it more robust and increasingly scalable. The first major...
Don't Be Afraid
At my most recent code and coffee session my mentor told me, “Don’t be afraid to write some really bad code.” I had been struggling to figure out how...
Is completion in sight?
After a delightfully illuminating code and coffee session this Saturday I was able to finally surpass in Ruby what I had started in Python. That is, I was able...
New Computer
I decided that my Macbook from 2007 was no longer cutting it. It had been a long journey, and I learned a lot about hardware repair:
- RAM...
Learning Ruby: Update
Over the past two weeks I have spent much of my time concentrating on learning about big-picture aspects of programming and thinking about how I can apply those principles...
Apprenticeship Patterns
The latest addition to my programming canon includes a book titled Apprenticeship Patterns, Guidance for the Aspiring Software Craftsman. It is a collection of metacognitive tools that can be...
Learning Ruby
Ten days have passed since I started learning Ruby with the goal of writing a Tic Tac Toe game with unbeatable AI using Test Driven Development (TDD) to guide the...
Re-Routing
Two months ago I started learning to program with the goal of turning this passion into a pursuit upon which I can rely to sustain my livelihood. This past week...
Tic Tac Toe: Day 4
Now that I have a halfway decent method of putting X's and O's onto the game board, I need to make a function that will evaluate if there are three...
Tic Tac Toe: Day 3
I tried out a couple different ways to alternate back and forth between placing x's and o's, one of which was to include the place_x() and place_o() functions after an...
Tic Tac Toe: Day 2
After puzzling over all of the different components that are going to have to go into this program, I have decided to start with making a Tic Tac Toe game...
Unbeatable Tic Tac Toe
I have been given the task to write a program that allows a user to play a game of Tic Tac Toe against the computer -- but the user must...
More LPTHW Exercise 52: Working on the Game Engine
I wanted to do a little bit of work to my project for Exercise 52, just for the sake of making some progress on a daily basis. I was able...
LPTHW Exercise 52: Learning web apps with the web.py framework
Problem:
Could not get nosetests to run, kept getting NameError: global name
'START' not defined.
Resolution:
Turns out in my map_tests.py file I had put "from bin.map import Room" instead...