Daniel H.

2 Followers
10 Blog Followers
Following:
Following Blogs: 0

Latest Activity

I'd Be a Terrible Contractor

Daniel H. posted an article on - Feb 1, 2012, 12:00 pm
Instead of doing the standard 9-5 salary based job, it’s popular in the software development world to work as a contractor, or freelancer.1 Right now, I do the 9-5 thing. I’m learning it’s because of one major fact. I’d be terrible at it It comes down to the fact that as a...
Comment - Like

Proc, Block, and Two Smoking Lambdas

Daniel H. posted an article on - Sep 20, 2011, 12:00 pm
Ruby 1.9 has 4 different ways to deal with closures. Cue music Proc Procs are the weird ones of the bunch. Technically, all of these things I’m going to describe are Procs. By that I mean, if you check the class, it’s a Proc. A Proc is made by using Proc.new and ...
Comment - Like

Rubygems Beyond The Thunderdome

Daniel H. posted an article on - Sep 14, 2011, 11:00 am
Stop me if you’ve heard this one before. You get into some new tech over the weekend. With enough excitement to kill a horse, you whip up a ruby gem and put it on Github. You get a few hits, some people using it over the next little while. A few bugs get reported, and you fix ...
Comment - Like

IE7 Eats Babies

Daniel H. posted an article on - Jul 25, 2011, 10:00 am
But you already knew that, right? These days, in fancy AJAX applications, you frequently want a link on a page to just do asynchronous things. You don’t actually want the link to go anywhere. Let’s just ignore the fact that this goes against progressive enhancement okay? Can ...
Comment - Like

Things You Need To Start Caring About Now

Daniel H. posted an article on - Jul 20, 2011, 10:00 am
You need to start caring about a few things. Now. Code style Looking through code, you see all sorts of things. Some of them are good. Some of them are downright amazing pieces of code. Some of them are horrible. Some of them are so bad you feel your grip tensing around the...
Comment - Like

Worst URL Shortener Ever

Daniel H. posted an article on - Jun 26, 2011, 12:00 pm
I was bored last night, so I hacked this up. My original thought was since riak has an HTTP interface, I could just proxy GET requests to it when a short URL was used, but either I was doing it wrong or you can’t set the Location header when you POST documents. Oh well. Anyway, this uses ri...
Comment - Like

Worst URL Shortener Ever

Daniel H. posted an article on - Jun 26, 2011, 12:00 pm
I was bored last night, so I hacked this up. My original thought was since riak has an HTTP interface, I could just proxy GET requests to it when a short URL was used, but either I was doing it wrong or you can’t set the Location header when you POST documents. Oh well. Anyway, this uses ri...
Comment - Like

Idiomatic Go Channel Timeout

Daniel H. posted an article on - Jun 18, 2011, 12:00 pm
I’ve been doing a lot of Go programming lately, and it’s good stuff. Go is a fairly new programming language coming out of Google from the minds of some really smart people, like Rob Pike and Russ Cox (among others). It’s a C family language, so it has curly braces, has simple yet advan...
Comment - Like

Idiomatic Go Channel Timeout

Daniel H. posted an article on - Jun 18, 2011, 12:00 pm
I’ve been doing a lot of Go programming lately, and it’s good stuff. Go is a fairly new programming language coming out of Google from the minds of some really smart people, like Rob Pike and Russ Cox (among others). It’s a C family language, so it has curly braces, has simple yet advan...
Comment - Like

Simple Ruby Pipes

Daniel H. posted an article on - May 6, 2011, 10:00 am
Here’s something I cooked up this evening. Nothing too epic, but it’s a neat illustration of metaprogramming with ruby. Ruby allows you to reopen classes and add methods to them. You can also make a Module and include that in a class to add methods. I’ve added four methods to the Symbol ...
Comment - Like

Simple Ruby Pipes

Daniel H. posted an article on - May 6, 2011, 10:00 am
Here’s something I cooked up this evening. Nothing too epic, but it’s a neat illustration of metaprogramming with ruby. Ruby allows you to reopen classes and add methods to them. You can also make a @ and @ that in a class to add methods. I’ve added four methods to the @ class and overri...
Comment - Like

Rubber Duck Debugging

Daniel H. posted an article on - Mar 28, 2011, 10:00 am
Your software has bugs. Deal with it. To fix these bugs, I prefer the rubber duck debugging technique. Well, maybe prefer is too strong a word, but it’s definitely the first stop. Rubber duck debugging is when you have a bug, and can’t yet see what the problem is. You...
Comment - Like

Rubber Duck Debugging

Daniel H. posted an article on - Mar 28, 2011, 10:00 am
Your software has bugs. Deal with it. To fix these bugs, I prefer the rubber duck debugging technique. Well, maybe prefer is too strong a word, but it’s definitely the first stop. Rubber duck debugging is when you have a bug, and can’t yet see what the problem is. You...
Comment - Like

Applying Service Oriented Design To Yourself: Information Stream Management

Daniel H. posted an article on - Mar 22, 2011, 10:00 am
Service Oriented Design (also known as Service Oriented Architecture) is a design technique used in software projects, both large and small. It follows the idea that you divide up a program into separate isolated pieces, or services. This sort of separation has a number of advantages. You can ...
Comment - Like

Applying Service Oriented Design To Yourself: Information Stream Management

Daniel H. posted an article on - Mar 22, 2011, 10:00 am
Service Oriented Design (also known as Service Oriented Architecture) is a design technique used in software projects, both large and small. It follows the idea that you divide up a program into separate isolated pieces, or services. This sort of separation has a number of advantages. You can ...
Comment - Like

Programming Language Style: Let The Compiler Do It

Daniel H. posted an article on - Feb 28, 2011, 10:00 am
I was using treetop to do some parsing the other day and it got me thinking. Treetop is a parsing DSL for ruby based on the idea of a parsing expression grammar. This could get dangerous. lex and yacc (flex and bison) If you open up the ruby source code, you’ll probably find a file nam...
Comment - Like

Programming Language Style: Let The Compiler Do It

Daniel H. posted an article on - Feb 28, 2011, 10:00 am
I was using treetop to do some parsing the other day and it got me thinking. Treetop is a parsing DSL for ruby based on the idea of a parsing expression grammar. This could get dangerous. lex and yacc (flex and bison) If you open up the ruby source code, you’ll probably find a file nam...
Comment - Like

The What, Why, and How Of Kindlebility

Daniel H. posted an article on - Jan 20, 2011, 10:15 pm
TL;DR Kindlebility sends articles on the web to your Kindle. It needs your Kindle email address (@free.kindle.com addresses are fine). I don’t store your Kindle address or use it for anything else. Use Kindlebility to make a bookmarklet. Add kindle@darkhelmetlive.com to...
Comment - Like

The What, Why, and How Of Kindlebility

Daniel H. posted an article on - Jan 20, 2011, 10:15 pm
TL;DR Kindlebility sends articles on the web to your Kindle. It needs your Kindle email address (@free.kindle.com addresses are fine). I don’t store your Kindle address or use it for anything else. Use Kindlebility to make a bookmarklet. Add kindle@darkhelmetlive.com to...
Comment - Like

Easy Sinatra Metal For Rails 3.x

Daniel H. posted an article on - Jan 17, 2011, 10:00 am
I was doing some optimizing the other day on a Rails 2.3.x application with a metal controller. I didn’t feel like writing a straight rack application, so I used sinatra. A pretty good explanation of how this works can be seen in Adam Wiggins’ slides, Rails Metal, Rack, and Sinatra In Rai...
Comment - Like

Import Delicious To Google Bookmarks

Daniel H. posted an article on - Dec 17, 2010, 1:00 am
You may have heard, but Delicious is getting the boot. I left Delicious long ago, because it never did anything for me. Yeah I could bookmark things, share them, whatever. I never went back to the bookmarks though. I wanted my bookmarks to work seamlessly with how I used the web. That means, ...
Comment - Like

Instant NoSQL Cluster With Chef, Cassandra, And Your Favorite Cloud Hosting Provider

Daniel H. posted an article on - Nov 5, 2010, 10:00 am
Hi everybody! Okay, so don’t worry, I’m not Dr. Nick Riviera, I’m not going to take your liver out. Well, not unless you need to sell it! I am going to tell how to get your NoSQL on with a little bit of Cassandra, a little bit of Chef, and a little bit of sensual.. NO NO NO!...
Comment - Like

Deploying Your Ruby App With Mongrel2

Daniel H. posted an article on - Oct 26, 2010, 10:00 am
If you’re in the ruby world, and specifically the web side of the ruby world (Rails, Sinatra, etc), you should probably know who Zed Shaw is. I mean, he only wrote mongrel, which you’re probably using as your application server. Well, he’s been hard at work on Mongrel2, and it’s a big...
Comment - Like

Restore Deleted Files In Git

Daniel H. posted an article on - Oct 19, 2010, 4:00 pm
Ever been working on a project for a while, then go work on something else, then come back after a few weeks? Sure you have. Ever come back and somebody deleted your nice nginx config file you had in there for your local dev server? Ever wonder where the hell it went? Well wonder no more! ...
Comment - Like

Rails Rumble Immediate Post Mortem

Daniel H. posted an article on - Oct 17, 2010, 8:10 pm
It’s 10 minutes past 6 on Sunday evening, and we just wrapped up our Rails Rumble 2010 project. Check it out at http://gemrage.com/. Check out our team here too. This. Shit. Was. Real. We had a rough start with lack of internet for 3 hours, had a few depressing times thinking ...
Comment - Like

A Better jQuery Script For Embedly

Daniel H. posted an article on - Sep 10, 2010, 10:00 am
Embedly is a great service for generic embedding of content. Have you seen posterous? How they can just accept any link to a video on youtube, a picture on flickr, whatever, and it gets properly embedded? I imagine they could use Embedly to accomplish that. Anyway. They have a jQuery script t...
Comment - Like

Catch Up On Twitter faster

Daniel H. posted an article on - Sep 2, 2010, 8:00 pm
So you missed Twitter for a day? Have a long list of updates along the lines of “OMG this ice cream is fantastic!” to sort through? Fear no more, for I have the solution. Well. If you’re using Chrome. I made a little Chrome extension that filters out tweets that have no actual li...
Comment - Like

Most Dangerous Programming Errors, 10-6

Daniel H. posted an article on - Aug 20, 2010, 10:00 am
It’s been a while, but we’re continuing the Top 25 Most Dangerous Software Errors with numbers 10-6. 10. Missing Encryption of Sensitive Data Have you ever signed up for some website or service, only to receive an email 30 seconds later WITH YOUR PASSWORD IN IT! Doesn’t it just fuc...
Comment - Like

Auto-scale Your Resque Workers On Heroku

Daniel H. posted an article on - Jul 30, 2010, 3:00 pm
Let’s get some background information out of the way. I’m working on a new application, and am using crazy new things that I haven’t had a chance to really use before. Rails 3, MongoDB, Redis and Resque, HTML5, etc. 1 With all these things, I figured I’ll just use EngineYard si...
Comment - Like

rack-gist - THE GISTS ARE NOW DIAMONDS!

Daniel H. posted an article on - Jul 16, 2010, 6:00 pm
Hello developers, how are you? Fantastic. Does your code look like mine? No. Could it load like mine? Yes. Should you use rack-gist to load your gists? I don’t know… Do you like not blocking your users while you page loads another Javascript file? Do you want c...
Comment - Like

sinatra-bundles 0.3.0 is out

Daniel H. posted an article on - Jul 12, 2010, 3:06 pm
Version 0.3.0 of sinatra-bundles is out and powering the blog for a week or so. It’s cold out there, so bundle up: % gem install sinatra-bundles require 'sinatra/bundles' Version 0.3.0 has a new feature and a slight API change. Custom path prefixes Yeah, I know,...
Comment - Like

Copy merge with git

Daniel H. posted an article on - Jun 25, 2010, 8:47 pm
A copy merge is basically where you take all of their changes. Say you’re in branch A and want to merge in branch B. Their might be conflicts, but you don’t care, as you want whatever is in branch B. Almost as if you are copying from B to A. Since you are in branch A, it is referred to...
Comment - Like

Most Dangerous Programming Errors, 15-11

Daniel H. posted an article on - May 31, 2010, 10:00 am
It’s been a while, but I’ve been busy pwning n00bs at Modern Warfare 2 and Bad Company 2, and buying a car, so life has been pretty busy as of late. Have no fear though! I continue the look at the Top 25 Most Dangerous Programming Errors with numbers 15 to 11. 15. Improper Check for Unusual...
Comment - Like

Find queries missing indexes in your Rails application

Daniel H. posted an article on - May 14, 2010, 12:00 pm
Rails developers aren’t exactly known for getting their indexes right (or even at all) on their databases. Granted, databases are a tough subject, and some people and companies make their living dealing with only databases, and some only with one database (like MySQL or Oracle). If you’re com...
Comment - Like

Most Dangerous Programming Errors, 20-16

Daniel H. posted an article on - May 11, 2010, 10:00 am
I continue the look at 5 more of the Top 25 Most Dangerous Programming Errors. Here’s part 1 20. Download of Code Without Integrity Check You might not think of this at first, but it’s a doozy. If you are downloading things, like files, code, updates, whatever, they could be compromised. DNS...
Comment - Like

Most Dangerous Programming Errors, 25-21

Daniel H. posted an article on - May 3, 2010, 10:00 am
The Common Weakness Enumeration posted their Top 25 Most Dangerous Programming Errors last month. Most everything in the list is completely avoidable, but most new programmers, and especially those without real world experience (as opposed to trivial classroom projects), fall victim to at least some...
Comment - Like

Getting rid of transactions for the poor man

Daniel H. posted an article on - Apr 20, 2010, 7:41 pm
A quick post for today. Want to get rid of transactions from ActiveRecord for something? Here’s a cheap way to do it. It only works for MySQL obviously, but you can roll your own if you are on postgres. I’ll make it a bit less crappy and make it a gem or something.
Comment - Like

Please learn C

Daniel H. posted an article on - Apr 15, 2010, 10:00 am
A lot of CPU cycles were spent dealing with blog posts surrounding the whole iPhone SDK change. One by Zed Shaw was interesting because it addressed a different part of the problem. The point he makes is that there are people who claim to be coders out there when all they do is write ruby code. R...
Comment - Like

Obligatory SDK iPhone EULA change post

Daniel H. posted an article on - Apr 12, 2010, 10:00 am
If you don’t already know what this is going to be about, just skip it. If you haven’t already become aware of what’s happening, be thankful, and move on. If you really want to know, Google around for iphone sdk 3.3.1 and you can read up on the details. I’m writing this article as: A...
Comment - Like

Obligatory iPhone SDK EULA change post

Daniel H. posted an article on - Apr 12, 2010, 10:00 am
If you don’t already know what this is going to be about, just skip it. If you haven’t already become aware of what’s happening, be thankful, and move on. If you really want to know, Google around for iphone sdk 3.3.1 and you can read up on the details. I’m writing this article as: A...
Comment - Like

Tiny little fails

Daniel H. posted an article on - Apr 5, 2010, 10:00 am
There are lots of tiny little fails out there. Here are some that I’ve found. The Digg iPhone app The Digg app came out for the iPhone to much fanfare but I wasn’t originally a fan. First off, you can only really use the app if you have a regular Digg account. If you have a straight Fa...
Comment - Like

sinatra-bundles 0.2.0 is out

Daniel H. posted an article on - Apr 2, 2010, 11:05 pm
I pushed up a new version of sinatra-bundles and it’s running smoothly on my blog here, so I best tell you about it. First, get your bundle on: % gem install sinatra-bundles require 'sinatra/bundles' Version 0.2.0 has a couple fun things. The sinatra dependency is bumped up to 1...
Comment - Like

Writing User Defined Functions for pig

Daniel H. posted an article on - Mar 31, 2010, 10:00 am
If you are processing a bunch of data, grouping it, joining it, filtering it, then you should probably be using pig. So go download that, and get it all setup. You need: Java 1.6 (with JAVA_HOME setup) Hadoop (with HADOOP_HOME setup) pig (of course) Put all the relevant stuff in your...
Comment - Like

Finally, MapReduce for profit!

Daniel H. posted an article on - Mar 28, 2010, 10:00 am
This post is part 2 in the Super MongoDB MapReduce Max Out! series. Read Part 1 Now, from the last post, you might still be wondering what’s the whole point behind this MapReduce stuff? What can you really do with it? Well hold on, I’m going to tell you. But first, some back story. Hi...
Comment - Like

Super MongoDB MapReduce Max Out!

Daniel H. posted an article on - Mar 22, 2010, 10:00 am
I’ve been playing with MongoDB lately, and I must say, it’s the shit. In case you haven’t heard of MongoDB, let’s drop some buzz words: Document oriented Dynamic queries Index support Replication support Query profiling MapReduce Auto sharding There are some more things,...
Comment - Like

Where my programming power comes from

Daniel H. posted an article on - Mar 18, 2010, 10:00 am
Many people ask me a variety of questions. Some are about programming, some about mountain bikes, some about reptiles. Some are about something that’s bigger than me or any single source file or database dump. It’s about a matter that should be at the highest importance to every software deve...
Comment - Like

About Me

Software engineer

Daniel H.'s Blogs:

Daniel H.'s Followers

Daniel H. is Following

Invite Your Friends

Invite your contacts to blogged from:
gmail yahoo