IceDozer Review

I posted this to Amazon, it might be up soon.

I worked with a company who did work for the Innovation Factory, I guess it's been around 11 years ago now.  Anyway, they paid the company I worked for in a box full of IceDozers.  I snagged one before I could be denied.  I've been using it every winter since then until this year, when stuck in an uphill parking spot, with a car behind me, I was not able to get out of my spot due to ice. In a frantic I took out my IceDozer and attempted to use it like a shovel, desperately trying to claw any bit of traction into the ice. The ice finally got the best of my IceDozer, and after 11 or so years, I had to retire it from its main purpose.  My daughter now uses it to clean up her puzzles.

Over the long years, I've become addicted to how the IceDozer is capable of taking the abuse I give it. I'm able to start my car, take out the IceDozer and clear off the ice in a minute or two, before the car has even warmed up enough for the defrost to start kicking in. I have saved loads of time. I ordered my new one the next day, and I was surprised to find them online so readily available. I look forward to the next many years of the same reliability I have come to expect from the IceDozer

Waste of Ink

Reading through Buzzfeed... (not even going to link it)
 
yeah those articles are a waste of ink
and they don't even use ink

Preempt

me -- shut up

bb -- did you just tell yourself to shut up?

me -- i was preemptively telling you to shut up about asking if i told myself to shut up

Technology Inventory for Fantasy Golf

Linux - http://en.wikipedia.org/wiki/Linux
Linux was a project for a young college student, Linus Torvalds, back in the early 90s. It is the kernel for an operating system, combined with tools written by GNU, it makes up the GNU/Linux Operating System. The particular flavor of Linux that I use is CentOS 6.3.

Git - http://en.wikipedia.org/wiki/Git_(software)
Git was another project by Linus Torvalds. It is a version control system. Basically I can go back in time if I have to, to see versions of the code, or see where a bug might have been introduced. I can access my code “repository” from anywhere, and make updates to it from anywhere.

HTML5 - http://en.wikipedia.org/wiki/HTML5
Html Version 5 is the markup to display the content in a semantic way.

CSS - http://en.wikipedia.org/wiki/Cascading_Style_Sheets
Combined with HTML, Cascading Style Sheets are what make the site look pretty

Javascript - http://en.wikipedia.org/wiki/JavaScript
Javascript is a programming language that, in this instance, runs in the browser. It enables things like loading the data without having to refresh the page, and showing or hiding parts of the page. It was developed by Netscape back in the mid 90s.

Bootstrap - http://en.wikipedia.org/wiki/Bootstrap_(front-end_framework)
Developed by Twitter, Bootstrap is a front end framework, combining css and javascript. It makes the site look nice without a whole lot of design effort from my end. Programmers don’t do design or make things pretty, but Bootstrap makes it easy for a non-designer to make a professional looking site with minimal effort.

AngularJS - http://en.wikipedia.org/wiki/AngularJS
AngularJS is a Javascript framework written by Google. It doesn’t necessarily add anything that you can’t do with Javascript, it just makes it a whole lot easier to do everything.

MongoDB - http://en.wikipedia.org/wiki/MongoDB
MongoDB is where the Team data is stored. It is a database system which is different from standard “RDBMS” (relational database management systems) in that there’s no schema, and you don’t write SQL to access it. You actually write Javascript in native Mongo, but I am able to access it through Go.


Go (golang) - http://en.wikipedia.org/wiki/Go_(programming_language)
Go is a programming language written by Google. Go is what runs the server. When I ask for the scores from AngularJS, the code written in Go will fetch the data from pgatour.com, grab the data from MongoDB, and compile the data together, calculate, tabulate, sort, etc, and send the data back to the browser. Go was designed by one of the creators of Unix, Ken Thompson, hired by Google to do smart things like this. The syntax of Go is very easy to learn and it makes programming fun and new.

Golang Rewrite of Fantasy Golf Tracker

Go is fucking fun #golang

— Jason Connell (@jasontconnell) December 19, 2014

Favorited by Google's own @bradfitz. Watch the videos people! Particularly about Go's http2 server. Guess who wrote it? Brad Fitzpatrick.

Anyway, now tha tthat is over. Last year I was tasked with doing the group's Fantasy Golf tournament tallying for a weekend. It was prevoiusly done through Excel. I got it for one weekend and found out that the pgatour.com site offers all of the data for free. So I was determined to see if I could write an app that keeps track of the scores and the season scoreboard, the tournament scorecard, etc. I could, apparently. Read about the node.js implementation.

So that was last year. This year I'm playing with Golang, and I'm catching on with it quite quickly. It's fun. It makes programming fun and new. It's interesting. I'm learning new concepts, and new ways of doing things.  So I started writing the site in Go last week at some time, and I finished it up today. The main cause of speed was that the database structure was already figured out, and all of the AngularJS code I wrote only need very minor tweaks, to be updated to some new ways I did things to streamline some processes, and how data is ushered between the client and server.

Here is example code to get the current tournament in node.js. The current tournament was either the last one, or if there's one starting in the next 4 days. Pretty simple.

this.getCurrentTournament = function(db, callback){
    var upcoming = new Date().addDays(4);
    var past = new Date();

    dbhelp.find(db, "tournaments", { "$or": 
            [ 
                { "startDate": { "$lt": upcoming } },
                { "inProgress": true }
            ]     
        }, null, { startDate: -1 }, function(tournaments){
        if (tournaments != null && tournaments.length > 0){ return callback(tournaments[0]); }
        else return callback(null);
    });
}

And here's Go code:

func (repo *FantasyGolfRepository) GetCurrentTournament() Tournament {
    upcoming := time.Now().Add(time.Hour * 96) // 4 days
    list := []Tournament{}
    var tournament Tournament

    query := bson.M {
        "$or": []interface{}{
            bson.M{ "startDate": bson.M{ "$lt": upcoming } },
            bson.M{ "inProgress": true },
        },
    }

    repo.OpenCollection(Tournaments).Find(query).Sort("-startDate").All(&list)

    if len(list) > 0 { 
        tournament = list[0] 
    }
    return tournament
}

The thing I like most about Go is that it feels safe. It's all typed, you're not accidentally stuffing a string inside a date field, or passing integer ID to the bson.ObjectId field. The main thing I like is that I feel safe putting this code out there in production, and when I go back to it in a year, it will make sense, it will work, it will compile. My database won't be in shambles by some mistyped keystroke.

I have written two web applications in Go, and they're pretty solid. And I've written a bunch of little utility programs. They vary. One program read xml and used the `xml:"element > subelement"` property attribute syntax. Some deal with JSON, others deal with making thousands of web calls.

Shit, I had a lot more written but I accidentally hit the wrong button in the browser and it's all gone now... 

You can view the site at fantasygolf.jasontconnell.com

Work Frustrations and Booze

they have to enumerate changes that i have to make to the html
they can't just commit the whole thing, and be like, we updated html, please comply
because i don't know that i'll get everything
it's very manual, like that bar game where you compare dirty pictures to see what is the difference
and i am only good at that game after 4-6 beers
do they want me to drink?!
i can...