Wednesday, April 18, 2012

A hobby paying its own expenses.


I have 2 hobbies: programming and bicycles. I don't make money on bicycling, but programming on the other hand...

Last year I developed a simple slot-machine-game for android, simulating an old norwegian slot-machine from the 80's. The application works ok until some memory leak crashes the application. The application comes in 2 versions: 1) ad-version, user clicks the ads and I get some pennies, 2) a pay version, I get a dollar or so per application.

With the bugs and all, the application was well recieved in Norway and has had 56K downloads of the ad-version, where 97% of the downloaders are norwegian according to the google-stats. The pay-version has 91 downloads.

In total I have recieved about 500usd from ad-clicks and about 100usd from selling the ad-free version. Not enough to quit my day-job and live happily ever after, but enough to buy some gadgets for bicycling and more programming. So here are my next investments:


  • ContourROAM action cam: 300 USD
  • Arduino UNO r3 + accessories : 100USD
  • Stuff I need for building a quadrocopter based on arduino 200USD (++?)
Looking good, now I only need dx.com to deliver the parts, assembly a quadrocopter and make the arduino board-control the beast.

Tuesday, April 3, 2012

Gradle + cobertura + sonar

At my current client we use gradle for building, so i thought I should give sonar+cobertura a go. Here is my config.
subprojects {
    apply plugin: 'java'
    apply plugin: 'sonar'

    // add support for the cobertura task 
    def coberturaPluginBase = 'https://raw.github.com/valkolovos/gradle_cobertura/master/ivy'
    apply from: "${coberturaPluginBase}/gradle_cobertura/gradle_cobertura/1.0-rc4/coberturainit.gradle"

    // configure sonar to pick up the cobertura test-reports
    sonar {
        project {
            coberturaReportPath = file('build/reports/cobertura/coverage.xml')
        }
    }
}
Now you can run cobertura and sonar with the command:
 # gradle cobertura sonarAnalyze

You do need a running instance of sonar to make use of this. Download it here and configure the plugin like this.

Sources:
Sonar-plugin(1.0-m08)
http://gradle.org/docs/current/userguide/sonar_plugin.html
Cobertura-plugin(1.0-rc4)
https://github.com/valkolovos/gradle_cobertura