Alex Collins – Blog

Things I'm learning; lessons or otherwise…

Category Archives: Hacking

Docker Desktop for JEE /Grails Development

by atc on May 11, 2014, no comments

With all the hype surrounding Docker I thought it only prudent to investigate and give it a try. Holy cow it’s awesome; here’s an example of why. I routinely want to get a decent Grails development environment up and running, and VMs seem one way of doing so. Having a clean, fresh install can be […]

Bitcoin Mining with Amazon EC2

by atc on April 7, 2013, 38 comments

My curiosity got the better of me and I decided to start playing with Bitcoins, which inevitably led to mining and then using Amazon’s High Performance Computing EC2 instances to do the brunt of the work. It’s actually very easy to get up and running. Once you’ve found a mining pool — e.g. Slush’s or […]

Automatically lock your Linux machine via bluetooth

by atc on April 2, 2013, 7 comments

I had a requirement to lock my laptop at work automatically without having to touch it. The way devised by a friend was to enable the screensaver and its locking mechanism every time my phone’s bluetooth was out of range i.e. could not be seen via hcitool scan. It works *really well*! Now my laptop […]

Holiday Hack: reading Java class files

by atc on March 24, 2013, 2 comments

I spent a week by the pool in Egypt with my girlfriend, relaxing and…hacking. The lack of WiFi meant I had to rely on instinct and intellect to get me through my pet project and it proved a worthy exercise in problem solving and perseverance… I had the crazy idea of practicing my C programing […]

Hacking with JDK8 Lambda

by atc on March 15, 2013, no comments

So being a functional programming fan I ventured into the JDK 8 binaries and started playing with the myriad of changes relating to the introduction of Lambdas in JDK 8. All my code’s now on github and it’s work in progress, but take a look and contribute/comment if you care to.

Hackers sit down too much

by atc on August 21, 2012, 2 comments

Being a hacker means one tends to sit down too much. The hunch-backed hacker image complete with screen glow isn’t too far from the truth for some of us. I hate this! We sit so much! So I’ve devised a simple plan for reducing the amount I sit on a daily basis. I picked one […]

Server Backup with Spider Oak

by atc on August 12, 2012, one comment

I’m a SpiderOak fan. It’s secure, easy and well documented. Some really good traits. Their support is fantastic too. After using it on my Laptop, I thought I’d start using it for my Debian server’s backup. It makes sense to use something that bundles encryption and zero-knowledge to satisfy offsite backup. The same client you […]

Clojure’s Concurrency: easy atoms

by atc on August 5, 2012, no comments

Clojure’s atoms let one transactionally and atomically store values. When one uses an atom, Clojure manages the mutation of the value and guarantees atomicity. Such a feature is very useful in a highly concurrent application. Much like Java’s Atomic* classes, but somewhat more powerful. This is a brief introduction. Atomic Values To define an atom, […]

Clojure’s Concurrency: Futures and Agents in Harmony

by atc on July 29, 2012, no comments

I’ve previously written on the wonders of Clojure’s agents, giving the programmer a wonderfully easy way of writing asynchronous code with very little effort. Here’s a slightly more complex example for those wanting more context. Combining Futures and Agents We’ll use this (deliberately poor) inefficient find-primes in a (future) to allow for asynchronous processing in […]

00 (agent) – Clojure’s Concurrent Agents in action

by atc on July 29, 2012, 2 comments

or Clojure’s concurrency agents – a simple example Clojure has some fantastic concurrency idioms. Agents are but one example of what’s available to the JVM lisper — alongside refs, atoms and vars — that make concurrent programming very easy. I thought I’d articulate my understanding to help embed the knowledge but to also provide a […]