When I switched from the dynamically typed language of JavaScript to the statically typed language of Kotlin, I realized that I had to familiarize myself...more.
Over the last week, cybersecurity experts and developers around the world have scrambled to understand and mitigate a frightening zero-day vulnerability in a popular Java...more.
Ports and Adapters is an architecture pattern that aims to decouple your application from the details. By details here, I mean things like: Your web framework...more.
Most of my software experience has been in developing web applications that use various front-end frameworks. By now I've come to expect these frameworks to...more.
I’ve thought for years in terms of two kinds of software quality: “internal” and “external” quality. The idea is that “internal” is essentially the stuff...more.
One of my favorite aspects of working in different languages on various client projects is seeing how concepts learned in one paradigm bleed into others....more.
Often, as well-meaning programming language enthusiasts, we might find ourselves encouraging newcomers with simplified descriptions of language features. There’s sometimes a tricky balance between explaining...more.
Using CDN to prevent performance issues of content management systems Craft CMS is a content management system that allows a team to organise and edit...more.
Thread Basics Let's start from the beginning—what is a thread? A thread stores the information necessary for your computer to execute some part of your...more.
As a new Python programmer, I ran into three common language gotchas: passing variables by reference, unbound local errors, and mutable default arguments. Hopefully this...more.
One of the earliest, most fundamental things I learned about writing code was the Don't Repeat Yourself (DRY) principle. Initially, this resonated with me. When...more.
Since the release of version 8, Java has been taking great strides to facilitate writing expressive and functional code. Unfortunately, these strides are often tripped...more.
As software developers, we're often given access to various pieces of sensitive information in order to do our job. This could be anything from database...more.
I’ve been learning more about computer networking recently, and part of that exploration has led me to learn more about domains and domain name servers....more.
This article was originally published on Medium on September 4th, 2018 One of the things about being a developer is that you’re never done learning....more.
The journey from global variables to managed dependency injection When writing object-oriented code, we inevitably end up with some objects that are either unique (we...more.
I recently created an open source plugin for Jekyll, the Ruby static site generator. Jekyll LilyPond Converter (henceforth JLC; source, RubyGems) converts specified code snippets...more.
Most modern languages that we use today provide tools and documentation for unit tests, which make it simpler to test our code. If unit testing...more.
Elm approaches JSON much differently than languages like JavaScript and Ruby. Elm's built-in functions don't offer the immediate convenience of JSON.parse. You'll find built-in Decoders...more.
The Problem Working in many different languages across multiple projects means it's often a pain to remember how to build all the different components. How...more.
Elm approaches JSON much differently than languages like JavaScript and Ruby. Elm's built-in functions don't offer the immediate convenience of JSON.parse. You'll find built-in Decoders...more.
Elm approaches JSON much differently than languages like JavaScript and Ruby. Elm's built-in functions don't offer the immediate convenience of JSON.parse. You'll find built-in Decoders...more.
In any non-trivial codebase we rely on third-party dependencies. These dependencies can be libraries or frameworks, but can also be external services that provide an...more.
To understand closures and their use in JavaScript, it is essential to understand that closures rely on the scope mechanism. So, before we jump into...more.
I've spent the last few months implementing a compiler that targets the Erlang Virtual Machine (BEAM). BEAM code itself seemed like a tricky initial target,...more.
Elixir Applications In Elixir, an application is a component implementing some specific functionality. It is a unit that can be run independently, thus started and...more.
When adding a third-party library to a project, I typically find plenty of examples of how to use the library in a dead-simple, script-like way,...more.
Developers are typically trained to look out for and guard against logical errors that have been accidentally introduced to their code. Such errors will range...more.
When I first started working in Vim, reading Bram Moolenaar's Seven Habits of Effective Text Editing was very helpful. In it, he outlines three fundamental...more.
Pipeline transformations can be a wonderful mechanism for creating self-describing code. Many languages offer a built-in pipe operator. The list includes Elixir, F#, Clojure1, Hack,...more.
In this multi-series blog post, we're going hands-on through the steps that can help transform the design of a default Rails application into one with...more.
Functional Programming nowadays is seen as kind of sexy by some sects of programmers and developers. Object Oriented Programming has for so long been a...more.
In this multi-series blog post, we're going hands-on through the steps that can help transform the design of a default Rails application into one with...more.
In this multi-series blog post, we're going hands-on through the steps that can help transform the design of a default Rails application into one with...more.
If you have ever used Docker Compose to run multi-container applications, there is a good chance that you have run into the following situation. Service...more.
You've probably heard the sales pitch for Clojure before. It's simple! It's scalable! It turns you into a genius who can machine-learn their way out...more.
I recently started a ClojureScript project, for fun not pay, which might surprise those who know me well. You see, when I had used ClojureScript...more.
I recently saw a terrific talk by Sandi Metz at the Abstractions conference where she encouraged the audience to learn to identify the concrete code...more.
Dependency injection[1] is a powerful pattern that is relatively simple to implement. However, it is often overlooked—or even misunderstood—in the development of many web applications....more.
I've recently been working in PHP and have been very impressed by the Laravel web framework. At first, having only heard horror stories of massive...more.
The words "legacy code" strike fear into the hearts of developers everywhere. Behind that fear, legacy code means it's slow to understand existing behavior, slow...more.
Docker promotes itself as "a tool for developers and sysadmins to build, ship, and run distributed applications," and there is much literature available to describe...more.
Welcome! Often times when working with Clojure newcomers I sense a bit of confusion around the relationship between functions, symbols, vars, and namespaces. Typically the...more.
When learning something new, I need to see a lot of details around the subject. I crave something explicit and tangible — and naturally, concrete...more.
The head judge of Top Chef, Tom Colicchio, has expressed a simple mnemonic for dealing with customer problems in a restaurant setting. There are three...more.
Bugs, defects, issues, glitches, hidden features—call them what you want, but inevitably we discover that something in our software system is not working as expected....more.
Often the hardest part of programming is knowing where to start. With test-driven development the right place to begin is with a test, but when...more.
In building professions, as well as software development, there is the saying “don't blame your tools.” During a recent project, my pair and I were...more.
In my last post, I cautioned against hastily reacting to the abundance of talks and blog posts describing migrations away from Rails monoliths. A preliminary...more.
I spent much of my programming youth in object-oriented land, so I grew accustomed to attaching patterns to object-oriented features. In particular, when I heard...more.
As a developer there are an infinite number of things to remember: everything from intricacies of the language you’re using to the domain knowledge of...more.
If your project is localized, it’s probably internationalized. If it isn’t, there’s a good chance it’s not. Depending on your familiarity with those terms, the...more.
8th Light's software craftsmen are bonded together by their singular pursuit of mastery. We challenge ourselves constantly to learn and grow through a combination of...more.
Ruby's low-overhead metaprogramming facilities make it easy to create elegant APIs with minimal effort. As a testament to its power, I can say with a...more.
I'm a proponent of building small, composable pieces over one large piece that does many things. The large piece usually works well, but it eliminates...more.
In a previous blog post, craftsman Dave Torre showed how optional types can alleviate common problems with null values. Bulding on that post, we are...more.
Let's play a word association game. When I say "stack overflow" what comes to mind? Is it Spolsky and Atwood's popular question and answer site?...more.
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....more.
The ability of lisp programs to manipulate themselves is beautiful. When we take into account the amount of the language that is implemeneted by manipulating...more.
In 2009, I started an internship at a Los Angeles-based audio/video post production studio. The audio engineer I was learning from was an avid musician...more.
One of my favorite tips for writing software comes from one of my favorite software role models, Sandi Metz. In her book Practical Object-Oriented Design...more.
One of the quickest ways to turn a well-factored Rails project into an old-fashioned legacy app is to use ActiveRecord where and find_by_sql calls outside...more.
Unit tests that fail intermittently, without exposing any production bugs, are the worst. Like the boy who cried wolf, they reduce our confidence that they're...more.
Varnish From the docs, Varnish is a web application accelerator, or a caching HTTP reverse proxy. At its core, Varnish is designed to reduce response...more.
When developing software, it's generally desirable to hide the details. This allows you to increase the cohesion of parts in our software, and to decouple...more.
Speed limits exist to encourage traveling at speeds that are deemed safe for a given road. Although the meaning of "safe" will vary per person,...more.
Yesterday, my pairing partner and I came across an interesting situation. The feature we were working on required receiving some data, constructing a date range...more.
This week I experienced first-hand the knowledge ramp-up that is required when joining a project of any real size and complexity. I had actually worked...more.
When immersing yourself in a new programming language, as in a new culture, it’s important to take time to understand the nuances of its common...more.
Working with web forms can be tedious and time-consuming. Many of the tools that exist today require individual setup and handling for each form element....more.
One of the most difficult aspects of learning Clojure for most programmers who have been brought up in the object oriented tradition is the Lisp...more.
Controllers are powerful and complicated objects that easily accumulate responsibilities. Even when following the classic Rails convention of "Skinny Controllers, Fat Models," controllers still have...more.
There are already several eloquent web postings available explaining the Strong Parameters feature of Rails 4. In this post I’ll provide my take on one...more.
Writing good software is hard. Fortunately, we can borrow from our everyday life experiences to make it easier. Consider the following situation: You're sitting at...more.
ClojureScript is an incredible new project that any Clojurian can appreciate. What could be better than replacing vexing JavaScript with the clean, flowing syntax of...more.
If there's anything where opinions amongst my development colleagues differ heavily, it's about the evil of context blocks inside a spec suite. Proponents of nesting...more.
There has been some recent interest in the Elixir language and with good reason, it's an exciting language! Elixir not only brings the power of...more.
The overt purpose of testing is to ensure that code does what is expected of it, but tests themselves also act as documentation. Highly readable...more.
Some Background Thoughts There is an experiment from Richard Held and Alan Hein who raised kittens in total darkness. For a short period during the...more.
The Hindley-Milner type system is very powerful: it allows you to express functions with complex type signatures in an elegant, readable way. For example, consider...more.
For over a month, I received occasional reports that an existing feature, adding secondary accounts, wasn't working. I could never reproduce the failure in any...more.
Coauthored by Kelly Steensma Wikipedia defines a kata as a detailed choreographed pattern of movement. Based on the Japanese word meaning "form", katas were originally...more.
Characters seem like an easy concept to grasp at first glance. , "Java"has a primitive type char and an object wrapper Character, and these are...more.
The process of learning Ruby has brought several surprises. Some of which are more pleasant than others. The latest I have encountered is that Array#sort...more.
A recurring theme on the 8th Light blog is decoupling your applications from the implementation of details. A detail can be anything from UI elements...more.
Keep your cookies to yourself Browser cookies are a good way to provide a stateless protocol with some memory. Unfortunately, they're also good for hijacking...more.
The Riak database provides a great MapReduce framework allowing you to execute complex queries, leveraging the parallel processing power of distibuted systems. However, I recently...more.
Here's the situation: You use RSpec. You like RSpec. But you want more confidence from your tests than you get with RSpec's dynamic mocks while...more.
I’ve been using routing constraints a lot lately. Before I learned about constraints, my controllers were littered with data typing checks and filters, some of...more.
Don’t trust outside data! SQL injection attacks were once considered the greatest threat plaguing the Internet. They continue to be the source of many large...more.
JavaScript frameworks like Backbone.js can provide the structure missing in ad hoc approaches but there are some common pitfalls. Like many developers today my first...more.
Protect your users, take password management seriously. There are too many databases in the world with completely unencrypted passwords. Even when databases have encrypted passwords,...more.
Editing text can be tedious and mechanical; you are often required repeat the same sequence of commands several times. Keyboard macros are one way in...more.
There's a special sort of satisfication I get from turning absolutely awful code into a well-tested, well-factored program. Not only have I increased the amount...more.
Dependencies are nearly unavoidable for non-trivial software projects. These can be large dependencies, such as web frameworks and databases, or smaller decisions, such as pagination...more.
“The only constant is Change.” — Heraclitus While it was doubtful that Heraclitus was addressing developers, the sentiment certainly still applies. As developers, we live...more.
The last 2 weeks of 8LU were very interesting. Steven Degutis delivered 2 great talks on programming languages, covering the pros and cons of a...more.
A Rails application has many configuration options. Learn how to test one of them. Why? Well, what are the consequences of an improperly configurated application?...more.
Primitive Obsession is bad stuff. But it's bad, not because primitives are bad, but because obsession is bad. From Merriam-Webster: ob-ses-sion, noun: a persistent disturbing...more.
Many Lisp beginners find quoting to be a foreign concept. My own confusions around quote and friends began with my first ventures into Scheme, and...more.
“polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface” -Wikipedia In most Object Oriented...more.
Many of us admire other professionals, such as musicians and athletes. We even emulate them in our own profession by practicing. What about that time...more.
TL; DR Rather than including modules and hooking into .included, write a method that adds the behaviour (even if the method just includes and extends)....more.
Putting extensive business logic in Rails controllers is bad and you should stop doing it. I suppose I should demonstrate why that's true with an...more.
Recently, I was pairing with Steven. We were wrapping up work on a feature. While reviewing our changes and running our acceptance test suite, he...more.
I'm writing this blog from the train, my head hung in shame. I'm taking a course in Game Optimization and today something exceptionally embarrassing happened....more.
Do you use validates_uniqueness_of in Rails? Do you feel confident that it works to prevent duplicate records? If you’re like most of us, you won’t...more.
If you follow me on twitter @paytonrules you’ve probably seen me griping at various times about writing a testing framework for Objective-C. I’m currently writing...more.
I have been working on migrating half a dozen 8th Light projects to our continuous integration server last week. Barring one open-source gem project, most...more.
We encountered a strange spec failure today in our continuous integration build. It’s a Rails project, we’re using RSpec, and this was the failing expectation...more.
This blog post originally appeared on a blog I maintain for my current game development class. Generally speaking my posts over there are pretty specific...more.
Last week concluded the Hangman Ruby Sparring Tournament. Unlike the previous Battleship Tournament, I put the effort in to write a competitive hangman player (of...more.
Several months ago, I hosted the Ruby Battleship Tournament. It was an all-round fun event where craftsmen sharpened their claws and pitted their skills against...more.
It’s with great pleasure that I announce the creation of chiPhone, the Chicago iPhone developer’s group, with our first meeting on July 23rd at 6:30....more.
Many of us have heard a lot of talk about functional programming and its benefits, especially when it comes to highly concurrent applications where thread...more.
Here’s the situation. You’ve spent days working on an open source project. Your sweat, blood, and tears have been poured into thousands of lines of...more.
Quick announcement, Selenium on Rails has been released, now supporting Rails 2.2 and with the latest Selenium Core. Numerous bug fixes are in this release...more.
I spent the beginning of my career working on embedded systems for some audio company. These embedded systems were my first love in programming and...more.
I’ve recorded my Langston’s Ant kata for all to see. This particular kata, with slight variations, has been in front of an audience twice before....more.
This release of limelight contains many new features and stability. Perhaps most notably, Limelight will no longer eat 95% of your CPU (ouch)! I’m proud...more.
OCP was defined in 1988 in Bertrand Meyer’s book “Object Oriented Software Construction” as follows: “Modules should be both open (for extension and adaptation) and...more.
When building a software system composed of multiple decoupled components, the need typically arises for interprocess coordination and communication. As an example, say that we...more.
Often times while writing meta programming code, I am using the eval function and doing manipulation on method/class/variable names. Today I needed to un–Rubify a...more.
Recently, I started reading Knuth’s Art of Computer Science. To spice up the exercises, I am writing them out in Ruby. Thinking about the basic...more.
Ruby files have to require other files. There’s no avoiding it. Techniques to manage require statements are numerous and varied. Having tried most of them,...more.
There’s a common pattern I’ve seen for developing DSL in Ruby. It’s used in RSpec, the Statemachine Gem, and Unclebob’s Clean Code talk at RailsConf...more.
Hello again from RailsConf. I’ve gone through five presentations. I don’t have any enormous revelations, and no good pictures yet, but I do have some...more.
Recently I had the pleasure and frustration of working the net-sftp gem for Ruby. Pleasure because it’s a well written library, with an easy to...more.
Occasionally even great developers fall into bad habits, and the rest of us do it more than occasionally. This is especially true when under deadline...more.
Often in Statemachines, duplication can arise. For example, the vending machine in our examples may need periodic repairs. It’s not certain which state the vending...more.
If your situation matches the following conditions, beware! You’re working in rails. You’re using Postgresql. You’re storing binary data in the database. This was the...more.
If you’re doing any significant amount of work with statmachines, you will most certainly encounter some conditional logic in your Statemachines. Take our vending machine....more.
I consider Statemachines to be a programming gem. An invaluable tool for the software craftsman’s toolkit. It’s not everyday that a Statemachine comes in handy,...more.
In Paul Graham’s Book, Hackers and Painters, he talks about patterns and Human Compilers. I started to think about how some traditional Object-Oriented patterns are...more.
Delegates: one of the few unique aspects of .NET. How useful are they? Here’s a delegate declaration. The syntax can take some getting used to....more.
Recently I was working on FitNesse to solve the problem of large file uploading and downloading. Previously when a file was downloaded FitNesse would happily...more.