Skip to main content

Benjamin Oakes

Photo of Ben Oakes

Hi, I'm Ben Oakes and this is my geek blog. Currently, I'm a Ruby/JavaScript Developer at Liaison. Previously, I was a Developer at Continuity and Hedgeye, a Research Assistant in the Early Social Cognition Lab at Yale University and a student at the University of Iowa. I also organize TechCorridor.io, ICRuby, OpenHack Iowa City, and previously organized NewHaven.rb. I have an amazing wife named Danielle Oakes.

Filtering for the Programming category. Clear

strftime cheat sheet

by Ben

strftime:
    %a – The abbreviated weekday name (``Sun’‘)
    %A – The full weekday name (``Sunday’‘)
    %b – The abbreviated month name (``Jan’‘)
    %B – The full month name (``January’‘)
    %c – The preferred local date and time representation
    %d – Day of the month (01..31)
    %H – Hour of the day, 24-hour clock (00..23)
    %I – Hour of the day, 12-hour clock (01..12)
    %j – Day of the year (001..366)
    %m – Month of the year (01..12)
    %M – Minute of the hour (00..59)
    %p – Meridian indicator (``AM’’ or ``PM’‘)
    %S – Second of the minute (00..60)
    %U – Week number of the current year,
        starting with the first Sunday as the first
        day of the first week (00..53)
    %W – Week number of the current year,
        starting with the first Monday as the first
        day of the first week (00..53)
    %w – Day of the week (Sunday is 0, 0..6)
    %x – Preferred representation for the date alone, no time
    %X – Preferred representation for the time alone, no date
    %y – Year without a century (00..99)
    %Y – Year with century
    %Z – Time zone name
    % – Literal ``’’ character

Source: the cheat gem (relevant blog post)

Cheat has mostly gone offline, but I still refer to this cheat sheet all the time, years and years later. Perhaps that means that strftime has terrible syntax, but that doesn’t stop it from being ubiquitous.

GOTO 2016 – Software, Faster – Dan North

by Ben

Some teams are orders of magnitude more effective than others. Kent Beck famously described himself as “not a great programmer, but a good programmer with great habits”. For the last few years Dan North has been working with, and observing, some very good teams with quite exceptional – and rather surprising – habits.

Are katas the best way to learn a new language? Is manual testing a waste of time? Is copy-and-paste always evil? Is the customer always right? In this talk Dan introduces the idea of delivery patterns – patterns of effective behaviour in delivery teams – and describes some of the more unusual but effective patterns he’s been collecting. These are not patterns for beginners, but then again, Dan argues that patterns aren’t for beginners anyway.

Source: GOTO 2016 – Software, Faster – Dan North

travis-watch – Stream live Travis CI test results

by Ben

Stream live travis test results of the current commit to your terminal. Exits with the proper exit code too!

Source: juliangruber/travis-watch

JWT: JSON Web Tokens

by Ben

JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.

Source: JWT.IO

If you think good architecture is expensive, try bad architecture

by Ben

Source: Daniel Bryant on Twitter

Deleting Lines that don’t Match a Pattern

by Ben

And we want to delete all lines that don’t contain calculate. We can do that with :v. Simply running:

:v/calculate/d

Source: Deleting Lines that don’t Match a Pattern

Giving Up on TDD

by Ben

Not just the tests. You have to DESIGN period. No matter what you are writing; whether a unit test, or an acceptance test, or production code, or a mock, or a stub, you have to DESIGN.

Source: Clean Coder Blog

Lua as a Python’s secret weapon

by Ben

As you can see, it was easy to embed Lua in Python and the results are outstanding! Thus, we can say that Lua is definitely of a great help when you need to speed up some critical parts of your Python code.

Source: Lua as a Python’s secret weapon.

Google mtail

by Ben

extract whitebox monitoring data from application logs for collection in a timeseries database

Source: google/mtail

Using CCMenu with Travis CI

by Ben

CCMenu is a little tool for the OS X status bar to keep track of your repositories’ latest build status from the convenience of your Mac.

CCTray is the equivalent tool for your Windows environment, BuildNotify for Linux systems. The general instructions apply to all of them.

They were originally built for use with CruiseControl, but they work just as well with Travis CI, and you can use either to poll your Travis CI repositories and have their status show in the menu bar or tray.

Source: Using CCMenu with Travis CI – Travis CI