Technical Ramblings, page 3

Rants about programming and software in general.

For my more recent blog posts, please head over to my company blog.


Web Templates with Stencil

🗓 29 Mar 2016

Mustache is a flexible way of making web templates. There are implementations in a plethora of different languages, including Clojure. Clojure has a few implementations, Clostache and Stencil being the more notable of them. Considering they both implement the same thing, they are very, very similar. Nearly identical. So close...

Contributing to a Minor Clojure Project

🗓 29 Mar 2016
In: 📁 Clojure

I was bored the other day so I decided to work on improving this little Clojure plugin called ‘ns-dep-graph.’ It is what created those Clojure dependency graphs. It was an intriguing piece of work, but there were some problems with it and some features to be added to really flesh...

Testing Problems with Tic Tac Toe

🗓 28 Mar 2016

When I was TDD’ing my web Tic Tac Toe game made using Compojure, Stencil, and Ring, I ran into a major hang-up that severely limited how much I could test the app. That hang-up was being unable to stub the lib-noir/ring session that handled conserving input and settings throughout a...

Faux OOD in Clojure with Protocols

🗓 22 Mar 2016
In: 📁 Clojure

Protocols are another way of tailoring method behavior in Clojure, like multimethods, which I had been using to implement the variety of different data storage methods (like JSON or Postgres). Protocols are kind of like an abstract class, really. They are a collection of methods and functions that are implemented...

Thread Macros for Improving Readability

🗓 21 Mar 2016

No, thread macros do not have anything to do with threading or parallel computing. They are just a Clojure form for ‘threading’ a expression through other expressions in essentially reverse order so nested structures can become more readable. I went through my tic tac toe Clojure code and found a...

A Graphical Representation of Dependency

🗓 21 Mar 2016

Above is a dependency graph generated by the ns-dep-graph lein plugin for my Clojure Tic Tac Toe game. The colors are to show what constituted a dependency and has the wonderful legend that describes what each of the hues mean. Based on this graph, I can’t say whether it fully...

Discovering the Secrets of Consulting

🗓 17 Mar 2016
In: 📁 books

So I read The Secrets of Consulting by Gerald M. Weinberg. I’m not sure if they were secrets, per say, but rather a plethora of wisdom that extends far beyond consulting, but hey, that doesn’t make for nearly as much of a good title as the current title does. Marketing....

The Five Solid SOLID Principles

🗓 15 Mar 2016

Just a collection of some wisdom/thoughts on each of the SOLID principles put forth by Uncle Bob. SOLID = Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion. Together they are the power team that help make clean code happen. S - Single Responsibility: A class or method should...

Minimax Redux

🗓 14 Mar 2016

Minimax is one of those things that is always going to haunt me. I’ve done it multiple times and when I think I got it I realize I messed up and it isn’t as good as it needs to be–it fails in some edge case that I did not think...

The Checklist Manifesto

🗓 14 Mar 2016
In: 📁 books

The other day, meaning last Tuesday, I read the book titled The Checklist Manifesto by Atul Gawande. No, it wasn’t a manifesto composed of a large checklist, but a book detailing how checklists can improve a variety of different industries and even save lives. The premise intrigued me, so that...

Saving Data to a File in Clojure

🗓 08 Mar 2016
In: 📁 Clojure

Another feature to be done with my Tic Tac Toe Clojure project was to have the win/loss/draw tallies persist between application runs and for the given player’s scores to be displayed as a cumulative total count rather than each match up’s total. This was a sticky problem, because I had...

Pretty Colors with ANSI

🗓 07 Mar 2016
In: 📁 Clojure

So with my Clojure tic tac toe game there is, of course, a board. 3x3 or 4x4, in my game’s case. On the command line it will display the board in a very simple fashion to show the current state. It looks kind of boring, though. Just plain white on...

Tic Tac Toe Menu Refactoring

🗓 07 Mar 2016
In: 📁 Clojure

I was at a junction with the Tic Tac Toe project where I needed to add a menu option at the start to ask the user if they’d like to see previous game scores or play the game. I added the option easily enough with a simple input/output query and...

Clojure is Cruise Control for Cool

🗓 02 Mar 2016
In: 📁 Clojure

The title was originally Clojure RECURSION is Cruise Control for Cool, but I switched it to just Clojure because of the unbroken alliteration. Slightly surprising to me was how easy Tic Tac Toe became to set up and create with Clojure. Not Clojure, not really, but recursion and functional programming....

Assimilating with Clojure

🗓 29 Feb 2016
In: 📁 Clojure

I’ll start off this post by not talking about programming, but my personal programming history. My first language was Python, then I learned Java and Common LISP concurrently. Recently, I took a C++ class and, of course, have been doing Ruby. So, with learning Clojure now, I’m taken back to...

Acquiring a Mild Command Over Command Patterns

🗓 25 Feb 2016

Instead of having a menu for an app be a set of if/else or case statements, one can make it using a variety objects. This style is known as the ‘Command Pattern.’ Basically, the menu turns into a group of classes that each have the particular command or execution method...

Domain Driven Design Conclusions

🗓 23 Feb 2016

I read Domain Driven Design by Eric Evans. It was a pretty intense book. By intense, I mean in sheer density of ‘take away’ bolded blocks and diagrams. I’d wager 20% of the page space was diagrams and pictures. Which makes sense, given that the core nuggets of wisdom of...

Four Rules of Simple Design

🗓 18 Feb 2016

I just finished reading Understanding the Four Rules of Simple Design by Corey Haines. It was only like 90 pages, so I knocked it out in less than a day. It was an easy read asides from the length, and it was to the point with what it was talking...

Saving Data in Ruby

🗓 16 Feb 2016

For my new Ruby project, I am basically creating a app for employees to log their time worked for a particular project type and client. The main component of this app is making so the data is persistent—that it is saved to a file so it can be accessed across...

A Trip Down Serialization Lane

🗓 12 Feb 2016

With Datamapper, one can store objects and arrays simply by specifying the property type as an Object. What Datamapper does with the particular information is it Marshal’s the data into a string when it is dumped in and de-Marshal’s it when it is loaded out. Marshal’ing is a Ruby way...