Posts

Showing posts from 2015

Buildtype icon plugin - for Android

Image
Android and Gradle So I'm now a full time Android developer (yay) and one of the things I've had to get used to, is the Gradle build system. I'm a fan of Maven and I still don't truly understand Google's choice to embrace an immature and complex system like Gradle, although admittedly the meta-programming model has some powerful features... but I digress. Having just completed a Gradle plugin at work to solve an in-house tooling problem, I decided to have a go at another tooling aspect I have run into. Buildtype icon plugin - for Android All too often, non-release builds of an application are provided with hideous looking launcher icons or none at all. For high profile products, calling a graphics designer to have an icon made is not that great a cost, but the majority of projects I see lack sorely in this aspect. While not a huge deal, it looks unprofessional and it also super annoying not being able to tell build types apart when testing various builds on the s

Making hard choices

Image
From time to time, we all have to make some hard choices in life. Recently I went through just such a time, when I found myself with 3 different job-offers, that I had to act on relatively swiftly. Now admittedly, this situation belongs to the luxury category of problems, but none the less, it represented a serious decision making challenge to me. None of the jobs were perfect in all aspects (I don't believe such a job exist), so depending of the time of day, I would lean towards one of them, only to change my mind later on that very same day. Clearly, I was in need of a more objective and systematic way of analyzing my options. Prioritization and rating A simple pro-con list did not do much for such a complex scenario, and neither Google nor any of my "self-help literature" had any obvious tools. However, by attacking the problem in a divide-and-conquer fashion, realizing one can't compare apples to oranges, things started to look a bit more clear to me. Aspects

Rejsekortscanner APK

Ønsker du at installere Rejsekortscanner uden om Google Play, måske fordi din enhed ved en fejl er blokeret, så kan du til hver en tid hente nyeste version her. Linket vil blive (forsøgt) holdt up-to-date med seneste release. Download Rejsekortscanner 2.0

Duck typing in Java

Image
Duck typing in Java According to wikipedia , duck typing is when "an object's suitability is determined by the presence of certain methods and properties (with appropriate meaning), rather than the actual type of the object". Duck-typing thus is almost the definition of a dynamic language like Ruby, Python, Groovy etc. Unlike a hybrid like i.e. C# 4 (thanks to it's dynamic modifier ), Java's type-system does not allow duck-typing - it's an object oriented paradigm where polymorphism is meant as a static modelling mechanism of a type hierarchy. However, the dynamic proxy feature introduced with Java 1.3, does allow us to emulate duck typing. First a disclaimer though, I am far from the first to blog about the subject, even Brian Goetz (now Java's language architect) blogged about it back in 2005. Dynamic Proxy It was back in 2000 that Sun introduced the Dynamic Proxy functionality to JDK 1.3. As the name implies, it caters to the well known Proxy patt

AVR ATtiny presentation with examples

Image
Where I work, we hold bi-monthy gatherings where we present and/or debate technologies and tools. As a closet electronics engineer, I thought it could be interesting to drag my components to the office and let me colleagues, have some fun with writing programs targeted for 64 bytes of RAM - quite an anticlimax to our 8GB RAM workstations and 128GB RAM servers! I put together a Back to Basics presentation about the popular Atmel ATtiny/ATmega microcontrollers, and put the  accompanying code up on Github . These are the same family of chips being used by the popular Arduino stack, but I prefer to play with the bare metal using the GCC compiler, there's just something cool about seeing your C program being able to run 10 years on a couple of AA batteries due to the extreme effeciency! While nothing spectacular about it, protocol dictates that I mention this to be released under the Creative Commons license.