Monday, June 10, 2013

Reveal.js: Elegant presentations in the browser

This is chock full of really good stuff for browser based presentations: http://lab.hakim.se/reveal-js/#/

Companion site for editing really cool browser based presentations: http://slid.es/

The creator of these things: http://hakim.se/

Friday, March 29, 2013

Sandy Metz on Design

This is excellent: http://vimeo.com/26330100

Sandy talks about OO design and brings us through the thought process of how to get to loosely coupled, independent objects.  Highly recommended.

Thursday, March 28, 2013

Forecast: A great Web App

Check out this site: Forecast

That's some impressive web app for getting local, regional and global forecasts

Thursday, January 10, 2013

Code Smells & Solutions in Rails Applications

I came across an interesting presentation by Brandon Keepers at GitHub that he gave in June of 2012.  I didn't make it through the 35 minute video of the presentation, but there is also the slide deck. Scanning the rest of the presentation in the slide deck, I was delighted to see Brandon promoting appropriate separation of concerns with respect to the use of Rails and its components.

It's time to move away from Fat Models and get Domainy.  Use ActiveRecord to be the encapsulator of things specifically related to working with the database.  Build your domain model on top of that.

Gary Bernhardt of Destroy All Software fame promotes the same.

I liked Brandon's identification that test cases can illustrate where the code smells when the tests are too complex.  Spot on.

Friday, December 21, 2012

Dev Tools for Quick Mockups

Just so that I don't forget about it now:


  1. JSBin makes it easy to mockup some real HTML with some real JS and see the real result, then iterate through it with versioning.
  2. BL.OCKS.org will take your Github gist and render it for viewing.  Here's the blurb:  "This is a simple viewer for code examples hosted on GitHub Gist. Code up an example using Gist, and then point people here to view the example and the source code, live!"

Friday, December 07, 2012

Color & Git Branch in your BASH Prompt

This one will be easy.  Place this into your .bash_profile:



This defines a function called "parse_git_branch", which reads the symbolic reference for the HEAD pointer (sending errors to /dev/null) and assigning the value to the "ref" variable.  Then, it echos the value of the variable, but filters out "refs/heads/" from the answer (See example 10.10 here at tldp.org)

After setting the value for some colors, it sets the first level prompt to print the current working directory in green and the git branch in yellow.

Voila

Test your webpages from outside of your domain

I love tools like Firebug and Chrome's Developer Tools.  But a tool originally developed at AOL and the open source has captured my attention:  Web Page Test does a great job of displaying all the nitty gritty details that are otherwise hard to get, such as DNS lookup time.  There are even developer tools with a RESTful API.

Highly Recommend

Thursday, December 06, 2012

Scrum Planning Poker for the Distributed Team

I've taken on the role of Scrum Master for our team and wanted to get everyone participating in issue scoping with independent votes.  So I searched for a Planning Poker scoping tool for distributed teams. The one I like the best is Pointing Poker.

It's free, requires no login, is very easy to use and effective.

One person logs in and starts a new session.  That person then distributes the URL with the session identifier to the rest of the team (we use Skype).  Everyone else then visits the site and enters their name.  No user account, no registration, no nothing.  From there it is easy to clear the last vote, have everyone vote and see the results. Want to change your vote?  Simply click on a different value.

Kudos for an effective tool.  Hey Matt Ruwe, if you were to put a donate button so I could donate a few bucks, I would.

Monday, November 19, 2012

Introducing the Mamo

A while back, I was considering the infinite.  I had some time on my hands, what can I say?

Infinity, as the saw goes, is really, really big.  You think you know big?  You don't know anything.  Aunt Bertha's behind? Insignificant. The Earth?  Pish.  C'mon: the Milky Way galaxy is the smallest starting point with some 200 to 400 billion stars.

OK, now we're starting with something: a Billion.  A 1 with 9 zeros: 1,000,000,000.  We have 200 to 400 of these Billions when we count the stars in the Milky Way. And there may be some 100 Billion galaxies.  That's 100,000,000,000 galaxies times 300,000,000,000 stars per galaxy!  That's a lot of stars, but we can think of even bigger things!

OK, let's get sexy.  From 2010, in the Huffington Post, Scientists believe there may be up to 300 Sextillion stars -- that's 1 with 21 zeros: 1,000,000,000,000,000,000,000.  You know, typing that is quickly going to get boring.  We're switching to scientific notation: 1021.  But that's stars, not galaxies, so let's keep our units straight.  If each galaxy had about 300 billion stars, then it would be 1021 divided by 109, so we subtract exponents and get 1012.  Back to a Trillion.  Boring.

Wikipedia talks about large numbers, and we get up to funky numbers like Vigintillion (1063) and Centillion (10303).  Of course, there's also the Googol (10100) and the Googolplex (10googol).

But this really doesn't do it when one considers the infinite. Let's go back to the Billion; we can grasp that.  Try this on for size, you may have heard it: if you spent $0.25 every 15 minutes playing video games, then you, and everyone else in your 100 person company could play non-stop for nearly 7,000 years.  That's freaking big.  Or, you could buy 1/3 of a nuclear powered submarine.

Or, you could build 3 schools.  And hire 200 teachers and administrators. And build a police department and buy cruisers and all the nifty equipment. And a fire department with trucks.  And hire 60 police officers and 30 fire fighters. And build a hospital.  And staff it with 40 doctors and 80 nurses. And hire 50 engineers.  And build houses for all of them.  And pay their salaries.  For over 14 years..

Or buy one B2 Stealth Bomber.

OK, that's helped me tremendously with one Billion.  One.  Just one.

We think there are a Trillion (that's 1,000 Billion) galaxies.  Each galaxy with 200 - 400 Billion stars.  And that doesn't even do the infinite justice.

No, we need another number.  That Googol doesn't help us either.  Psh, it has only 100 zeros in the exponent.  No we need something really massive.

So, I invented a new number:  The Mamo.  The Mamo is 101,000,000,000.  Yep, 10 raised to the Billion.  Now that's a number.  Now we can think about a Mamo sub-atomic particles in the conceivable universe and really expand our concept of wicked big.

But for the infinite, we need even more: We need the SuperMamo.  That is MamoMamo.  Yes, a Mamo raised to the Mamo.

Phew.  I need to rest.

Tuesday, October 16, 2012

ActiveRecord, JSON & hashes

While testing a new script for some data loading, I found myself on our testing platform and stymied because the foundation things I needed were not part of that database.  I needed certain license records and Forge records.  While the staging system has a more or less complete copy of our production system, the testing system has a much more constrained data set.  This is a one of my bugaboos: making sure there is sufficient data for testing. And, once again, I questioned the decision to NOT use TDD for the script development.  That way, I could have mocked all the scenarios I needed and probably would have completed the script in less time to a greater level of quality.  But I digress.

I was in the console of the testing environment (not the "test" environment) and needed to have a particular license as part of the testing dataset.  I wanted to use the tools I had, not have to write a migration, start up PSQL, or any of those pathways.  I wanted to be lazy and get the record from the staging environment and copy it into the testing environment.

So, I found the license in the staging environment and converted it to json with license.to_json. That was wicked easy.  The next step was to parse the JSON, which will convert it to a hash, then extract the license value. That looks like this:

license_hash = JSON.parse(json)['license']

The result was a pretty little hash with all the necessary data that could be copied from one console to the next and then pasted into place.  In no time at all, I had the needed record in the testing database.