presenting mfTabata

Some posts ago i wrote about my experience with Android development and the result of my learnings, I took the time to fix some minor bugs and make the application running. It wasn’t too hard, even though there might be some more bugs to it of course.

It’s called “mfTabata” (naming things is the hardest part :-)) and runs on all Android devices running version 2.2.3 or more (that’s all I’ve tested).

I’ll publish it to the market soon, but for now you can find it on the blog





Hej Vänner!

För några dagar sedan hade jag och några vänner en diskussion kring kosttillskott och “misstagsdoping”. Finns misstagsdoping egentligen? Behöver man kosttillskott? Frågorna var många och vi hade väl ungefär lika många svar. Men samtidigt som jag var mitt uppe i diskussionen pågick där parallellt en härlig problemlösning i bakhuvudet som bara kommer fram vid programmeringstillfälle. Hur skulle det vara ifall man hade en databas som hade koll på vilka produkter som var stämplade som dopingklassade?Med innehållsförteckning, länkar mot nyheter osv osv?

Av att döma utav Riksidrottsförbundets lista på medel som inte är tillåtna blir man lätt blind, och ger upp. Där finns helt enkelt inget bra sätt att se ifall ett kosttillskott är dopingklassat eller inte.

Samma dag som diskussionen satte igång var jag fullt igång med att göra något av det. Tekniskt intresserad som jag är lade jag nog mest tyngd på vilka komponenter jag skulle använda. Valen blev följande:

DooPHP blev valt av den anledningen att det är väldigt komplett, men ändå förvånansvärt snabbt och enkelt att använda.
jQuery för enkelheten med JavaScript och dynamiska webbsidor.
mySQL var lika enkelt att välja, jag behöver bara en enkel tabell med korsreferenser. sqlite hade säkert funkat, men DooPHP har grymt stöd för CRUD och tabellrelationer, som inte verkade vara helt stött med sqlite.

Så, jag satte mig ner och började skrida till verket. Efter några timmar har jag en sida uppe som ligger på

Dopingkollen är en kollaborativ sida där alla kan söka, ändra och lägga till produkter. Det som behövs är produktens titel samt dess innehållsförteckning. När produkten finns i databasen jämförs den direkt med RF’s lista och ger information ifall produkten gick igenom eller inte.

Enkelt och smidigt, men designen behöver jobbas på, och det gör jag :).

Förutom sidan i sigsjälv är där ett API, se, gjort i REST + JSON, för enkel och bandbreddssparande implementering.

Så, nästa steg är att gå igång sidan i sin enklaste form, vara nöjd med designen. Därefter blir det ett nytt spännande projekt som jag tänkte låta vara Open Source, en Android app som implementerar zxing, där man kan använda sin mobilkamera för att skanna en EAN-kod och därefter får resultatet direkt i luren när man står i affären och ska bestämma sig för vilket kosttillskott man funderar på att köpa.



Goals of 2011

Haha, just read my old post regarding the goals I had set in 2010. Did any of them come true? – No.

This is how it went:

#1 MonoTouch app
I did start an iPhone application with MonoTouch, but the API for the application is was developing on never got completed so it just died. Would’ve been a great app that’s for sure

#2 Payson drupal module.
Also got started, even got quite far actually, but my leaving of the drupal site I was part of ( resulted in a non-complete code. Besides, I have a shallow memory that there were some problems with drupal when it came to directly hook into POST parameters, which were needed by the Payson API. When i think about it I should’ve just made a hacky php that connected to the database with the proper result, but if I’m not mistaken mind was set to do it “the proper” way, which resulted in a no go.

#3 Community site based on Django
Ah, i really loved python back in early 2010, and I still do, but when I did some research I found tornado server of better use, as I started to more and more like to writer proper API’s, instead of views with hooks of code.

I stopped with the Django project after some time, got back to PHP, created a small framework and started developing the new community site, which also kind of died along with my interest in the Swedish Linux community (yeah, it was meant to replace linuxportalen) whom were too much interested of internal conflicts plus distro war.

But, through the year I looked up some different Web frameworks for PHP, and I found DooPHP, a wonderful and fast framework which is easy to learn and use. There’s a small project going on there, without a release date though, just something I do when I’m bored.

So to sum it up, none of my plans happened with the spare time I had part from my ordinary job, but it’s ok, none of them were too important, even though it looked like it when I think back about it.


Goals of 2011
Ha ha, right, I won’t set up any goals this year. I spend far too little time in front of the computer when I’m not working and the truth is, there are other things in life far more important to cherish and enjoy besides techie stuff. But hey, do I find something not too big and fun, I’ll probably do it :-).

Take care,

Developing with Android

Sunday of text
Sunday of text

It’s been a while since I’ve had any needs of sitting by the computer and write any code. I just haven’t felt the need of doing it, or have I thought that it would’ve been fun. Idk, I guess that I’ve just lost the fun part of developing.

Anyways, some days ago I received a new phone from the company I work for. I’ve had an iPhone 3GS since it was released and it is starting to fall apart. This time I got to choose an Android phone, and the choice came down to HTC Incredible S, which is absolutely a cool phone. And Android is such a cool operating system. I really get what people mean when they say that they feel locked in with Apples iOS. Without jail breaking it, you don’t get all the nice stuff you might want, like the widgets, bit torrent client, SCP data transfer and all the media codecs. The list comes quite long if we’re suppose to write everything down what Android has and what iOS doesn’t, so lets skip it.

I still like iOS though, it’s really a great operating system as well.

So, after using the Android OS for a while I decided to look into the development environments of it. I knew it was based on Java, which I’m not too fond of, not due to it’s language, but to the performance, if it wasn’t running on Windows, it was terribly slow. But for Android, I was completely wrong, It responds fast, and it reminds a lot of C# (duh). So today I decided to do something for Android, just to see how it works. I chose to make an Tabata, or Interval sprint timer, that give you a honk on the horn when to sprint or to rest. From idea to working app in the phone was about 5 hours. I’m amazed how fast it went, for not having done too much development in the last months.

Below you can find a video of the result (P.s my writing feels like crap, it’s been a while since I expressed my mind on the keyboard 🙂 D.S):








Adding support to mu-feeder

My twitterfeed haven’t been working for  a while now. The last update was 2009-11-25, so I went out googling on “twitterfeed replacement” and found mu-feeder. A small python script that publish your blog entrys (or whatever RSS feed that you might have) to twitter. It’s very sweet but i missed the support.

But, since it’s open source, there’s nothing that you can’t do about it :). I went out hunting and i found python-bitly. A library for the API!

After some tweaking in the bitly file I got it working.

Step 1: Download mu-feeder and unpack it.
Step 2: Download the modified bitly file and put it in mu-feeder/shorteners (diff here)
Step 3:  Edit your mu-feeder set URL_SHORTENING_SERVICE to “bitly” and URL_SHORTENER_LOGIN plus URL_SHORTENER_PASSWORD to your username and the API key that you have on

That’s it. Now it should work just fine :).

Have a nice weekend.

2010 – Goals for the year

I didn’t make any new year promise to myself. Mostly because there’s nothing more broken than a promise made when welcoming the new year. So, instead of making promises, I’ve made goals that i’ll try to complete and deliver.

#1 – My first iPhone application released

A couple of months ago I beta tested MonoTouch, the .NET framework for the iPhone. It’s a great tool for all of us who doesn’t want to learn Objective-C. After some testing I started to do some actual work for an application. It still needs  more work to be functional but at least I have something to go on. I all goes well this will be done somewhat in April.

#2 – Payson Drupal Module

This one is a bit disturbing and embarrasing. For a long time I’ve wanted to make this module for Drupal where you, as a user have the possibility to sponsor sites by paying a small amount of cash using paysons money transaction system. I like Payson, and it really deserves more focus :). Hopefulle this will come handy to Drupal site administrators. Hopefully this will can be expected in fall of 2010.

#3 – Community Site based on Django

The Swedish Community has for a long time lacked a good community web site for tracking one of the finest things with open source – The great open project that makes whatever disitribution worthy of. It can be all from background search engines like beagle to music players like Listen. All small components that makes the linux experience that great! This should be expected in late 2010.

That’s the three prioritized goals that I have as it is right now. I’ll end this post now to get started :).

See you!

Getting Drupal Modules using Python

A good friend of mine wrote yesterday a small python script that allows the user to search and download Drupal modules directly via the official ftp.
This was made since it is quite boring/irritating to first browse through the module page on and then copy the link to a shell where you download the module you want on your web server.

Instead, Jonas (that’s my friends name, btw) wrote this program that directly scans through the drupal module directory on the ftp and returns the output in a shell where the user just enter the choice that he/she wants. Example:

jonas@thinkpad61:~$ ./ hello
Found 32436 files!
[0] hellomobile-5.x-1.0.tar.gz
[1] hellomobile-5.x-1.1.tar.gz
[2] hellomobile-5.x-1.x-dev.tar.gz
[3] hellotxt-6.x-1.x-dev.tar.gz
Which module do you want to download? 1
Ok, lets get hellomobile-5.x-1.1.tar.gz
jonas@thinkpad61:~$ ls -l hellomobile-5.x-1.1.tar.gz
-rw-r--r-- 1 jonas jonas 824473 2009-10-22 22:34 hellomobile-5.x-1.1.tar.gz

I believe that this is quite usefull and interesting. But, as Jonas mentions in this post. It does not contain the functions that you might need, such as: version filter and dev filter. Meaning that you don’t want to see results for drupal 5 if you are running six. Nor do you want to use developer packages when you are in a critical installation.

I had some time so I made some improvements on the original:

tomburk@linux-e9bm:~> python --help
Usage: [options]

-h, --help            show this help message and exit
-f version, --filter=version
Filter the results in version numbers.
-d, --dev             Show developer packages

This allows the user to filter between the version, of course “all” can be applied, if one wants to show all the results. Plus, It’s possible to toggle between showing the developer packages or not.

Final result:

tomburk@linux-e9bm:~> python -f 5 hello
Found a total of 32451 files!
Files containing "hello"
 Based on filter: 5
  Not showing developer packages
[0] hellomobile-5.x-1.0.tar.gz
[1] hellomobile-5.x-1.1.tar.gz
Which module do you want to download? 1
Ok, lets get hellomobile-5.x-1.1.tar.gz
tomburk@linux-e9bm:~> ls -s hellomobile-5.x-1.1.tar.gz
812 hellomobile-5.x-1.1.tar.gz

The file is available here:
Or at github:
See you!

A small update

2009-10-24 – Added support for multiple file download, Available on both github and in wp-content

Debian in Virtualbox

In the Swedish linux community, it’s quite common to experience linux by:

  1. Install ubuntu/opensuse/mint
  2. Fix the lack of mp3/mkv/h264/xvid blabla support
  3. Install virtualbox
  4. Test distributions
  5. Brag about the ones you installed (especially Debian)

It’s always good to try out different flavors, till you find the one the match your needs and requirements. It is also always good for people that’s creating the different distributions as it often generates feedback. If not directly towards the developers, then at least a comment about it on the web will be made in most cases. This means indirect feedback plus the growth of Linux overall.

When it comes to myself, I’ve never been much of a distribution tester. Sure, I’ve installed quite many over my 6 years running Linux. Such as Ubuntu, OpenSuSE, Fedora, Slackware, Arch, Crux and so on. But I have always tried them out fairly, in the meaning that none of them have been in a Virtualbox just to test the installation and the mp3 support in the chosen distribution. To me, the most importance thing is how productive I am.

Anyways, what I was going to say is that I made my first Virtualbox+Debian installation today (yay, my time to shine!!). To me Debian has always seemed to be this quite advanced installation to get it up and running, according to what Swedish users express on the web. . But today, I realized that it’s just as simple as installing it’s buddy Ubuntu. Why do people brag about this?

The true reason for why I chosed Debian, and more important installing via Virtualbox is because of the recent Appartment change me and my darling made I’ve only set up the MacMini as my working station. The PC is now standing doing nothing, and I’m too lazy to insert all the cables, hehe :). Also, it’s the recommended distribution by the company that I work for. Therefor it felt naturally to install Debian!

This entry was never to start a Flame war between distributions, they are all good. It all just depends on your needs.

And if any Virtualbox distribution tester feels pointed out or accused inappropriately, then I apologize. I never meant to sound negative, rude or wiseacre.