Jamie F Olson

Problem Solver.

Problem Solver Algorithms, Programming, Math and Food http://jfolson.com/blog/feed.rss en-us Thu, 11 Apr 2013 10:36:46 -0400 Mon, 13 Oct 1970 16:45:00 +0000 1800 Haskell: Initial reactions Background I had never actually used any of the modern functional programming languages until a couple of weeks ago. However, I’ve worked quite a lot with the functional features of more multi-paradigm languages: python, R, ruby, javascript, etc. so I didn’t expect to be caught off guard by Haskell. http://jfolson.com/blog/2013/03/29/haskell-great-and-terrible/ 972ecca5-0b89-53f4-a2c3-0a50d62ad4e1 Fri, 29 Mar 2013 00:00:00 +0000 Introducing rhive Motivation This fall, I found myself writing a number of Hive SQL queries, which was fun. The problem was that I was trying to do some not entirely simple things. In particular, I was trying to implement some of the R functions for data frames, e.g. melt, aggregate, etc. I started out writing these as shell scripts, but http://jfolson.com/blog/2013/03/28/introducing-rhive/ beeba428-8c02-5c70-9b9c-efdbbb1685a8 Thu, 28 Mar 2013 00:00:00 +0000 Designing rsql: S3, S4 and expression evaluation in R S4 for rsql For a variety of reasons, some good and some bad, I wanted to use S4 classes for the table objects in rsql. Among other things, S4 gives you inheritance, prototypes, and some other neat stuff. Just as important to me, but totally superficial is the fact that the contents (ie slots) of an S4 object are http://jfolson.com/blog/2013/03/27/rsql-s3-s4/ eca7a615-29c7-5602-96eb-99a0a71debd9 Wed, 27 Mar 2013 00:00:00 +0000 Introducting rsql: programming SQL in R SQL is great, but it’s not R SQL is a powerful language for manipulating data. R is a powerful language for manipulating data. Frequently, data to be analyzed in R actually comes from a database using a SQL query. Fortunately, there are a variety of great R http://jfolson.com/blog/2013/03/26/introducing-rsql/ 59bfe5f3-31bc-5719-8a32-a70ba1a81dbd Tue, 26 Mar 2013 00:00:00 +0000 Hive, Hadoop and TypedBytes Hadoop Streaming and TypedBytes Typedbytes is a binary format for serializing data that is supported by Hadoop streaming. Several different Hadoop applications have found dramatic performance improvements by transitioning from text formats (e.g. csv) to http://jfolson.com/blog/2013/03/24/hive-typedbytes/ 59373f76-f9d6-5e86-ba73-44b52f95bb54 Sun, 24 Mar 2013 00:00:00 +0000 Rewriting commits with git is easier than you think Trying to help One of the things I’ve liked about git is how much it encourages responsible and clean commits. Personally, I’m not there yet. I commit when I think to, usually when I’m at a reasonable stopping point, which means I just end up doing git commit -a rather than adding and committing clean groups of related http://jfolson.com/blog/2013/03/21/git-rebase/ 1e4832ba-d82b-54ea-b8c2-921b7ce281f6 Thu, 21 Mar 2013 00:00:00 +0000 Javascript's Nearly Unforgiveable Sins Logic Implicit conversion with == 0=="0" But no unboxing with === 0!==new Number(0) Equality is not transitive "" == 0 0 == "0" "" != "0" parseInt is not base ten! parseInt("8"); //8 parseInt("08"); //0 http://jfolson.com/blog/2013/03/18/javascript-sins/ 458b19f8-85a8-56c5-aad0-c5939daeb593 Mon, 18 Mar 2013 00:00:00 +0000 Deploying a site with Middleman and Git Installing Middleman First things first, so install rvm and all your dependencies. \curl -L https://get.rvm.io | bash -s stable source $HOME/.rvm/scripts/rvm rvm install 1.9.3 rvm use 1.9.3 echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile http://jfolson.com/blog/2013/03/07/git-middleman-deploy/ d2e86e62-6f90-5977-a159-525c45ecc9dc Thu, 07 Mar 2013 00:00:00 +0000 Building this site: Middleman, Bootswatch and More For my first post, I thought I’d document how I built this site. Middleman Middleman is a tool for dynamically building a static website. There are a variety of advantages to building a static website. For me, I wanted a blog a http://jfolson.com/blog/2013/03/01/building-this-site/ 8fce5982-ad6a-50ae-a4c9-4c0d97dd376c Fri, 01 Mar 2013 00:00:00 +0000