Henry Cipolla

Tech, gaming, motorsports, and whatever else

RSS Feed for ProgrammingProgramming

How to create an EMR job with multiple inputs using the ruby client.

I’m using the ruby client to launch Hadoop jobs on Amazon’s Elastic Map Reduce framework. Things have gone very nicely until I tried scripting a job which draws input from multiple buckets. You can’t use the ‘-input’ option twice and the advice around the internet is to use –args. So, I added: –args -input,s3n://SomeOtherBucket to [...]

Read More

Added features to my free HTTP Post Dumping / Testing service.

A while ago I put together a very simple php script that dumps any HTTP Post it receives: To my great surprise, people have actually started using it! I also found myself using it more and more in my own debugging and so I have added two features which further my original mission of maximizing [...]

Read More

0-indexed numbering makes more sense in programming than 1-indexing. (Dijkstra agrees)

Let me present two lists of programming languages. List One List Two COBOL (1959) BASIC (1964) Fortran (1957) C (1973) FoxPro (?) C# (2001) Lua (1993) Java (1995) MATLAB (late 1970s) PHP (1995) PL/I (1964) Python (1991) RPG (1959) Ruby (1995) Smalltalk (1972) Complete list on Wikipedia Unfortunately SEO dictates that the title of this [...]

Read More

Let me dump your post – Free HTTP Post test server

This past week I found myself writing code that had to submit some data to a webservice via an HTTP POST request. Not a particularly difficult task but it was on a platform I didn’t have much experience with and I wasn’t sure if I had formed the packet properly. In order to validate my [...]

Read More

Creating an Array of Hashes in Ruby

I just made a simple mistake which I figure would be good share with anybody new-ish to Ruby. I wrote the following code to create an array of hashes and fill in some values. Can you guess what the output is? #!/usr/bin/env ruby testArray = Array.new(5, Hash.new) 0.upto(4) do |i| testArray[i][:value] = i end 0.upto(4) [...]

Read More

How to create infinite sessions with the Facebook Platform API

Like all things with Facebook Platform API, creating infinite sessions is really easy. However, there seems to be a lot of confusion and misinformation on the web about how this works. Part of this could be the fault of Facebook’s documentation. They provide a pretty good explanation of the authentication process but then the example [...]

Read More