MarbleMice.com

Hacking the trees of knowledge.

Archive for the ‘General’ Category

Monkey Testing and Exceptions

without comments

Boy have I been learning my lesson about not updating UI components in different thread. This is of course with reference to android programming.

I sorted out running the monkey UI Tester on Days Until and it found a whole series of exceptions being thrown because I was updating UI components on different threads. For the most part it just works but in some instance it can cause problems. The Random monkey tester, whom I think I will name Freddy, seems very good at finding them.

The solution is to use the handler class and post messages to the main UI thread telling it to updates itself.

I suspect anyone with any UI design/programming experience would say Duh of course you idiot that sort of thing is dangerous. As someone who has limited UI programming experience it has been a bit of a tough learning experience. Not a lesson I am going to forget in a hurry.

Written by birdle

March 9th, 2010 at 9:30 pm

Posted in General

No News

without comments

A good while ago I gave up watching/ reading general news sites and for some reason tonight I feel compelled to make a few observations about it.

I used to be a total new fiend, often reading the bbc news over lunch and then watching the news in the evening. As many have mention news is often just noise and you don’t get down to the important issue surround the news. It is a stream of facts and opinion but does not encourage understanding of issues. I do still read arstechinca although I make a rule of being very selective as often the headline is enough take away information about the topic. I admit it was hard to give up at first as are all habits

What have been the benefits? Well it certainly freed up some time. Particularly around lunch time. While I don’t always use that time productively I do get though more technical articles and books. That is I do more stuff that I love to do.

People often talk about the news so does not reading or listening the news affect that? Not that I have noticed, People have started to tell me the news and I get to ask more interesting questions because I am slightly outside  of the world of news. So I think it makes talking about current affairs more interesting. Friends telling you the news act like a filter so you only get the more interesting stuff. As current affairs is mainly discussed at work if something happens over the weekend I only learn about it on Monday. As news does not directly effect my life on a time scale of two days this is not big deal.

It is also amazing how long stories can go on for. When I was reading the news every day I never really used to notice this.

In summary I have found giving up on tracking current affair on a day to day basis has been a good thing.

Brought to you by the slightly random post collective for not reason at all! :)

Written by birdle

March 6th, 2010 at 11:04 pm

Posted in General

Orientation Bug Found

without comments

As expected the moment I left a computer I figured out what the bug was. Within 10 minutes of getting onto my computer I had solved it.

Inside the xml layout files I created a display. Parts of this display were replaced during the on onResume. android did not like this. What I should have been doing was not creating the custom parts in the xml file and then adding them during onResume.

Simple fix, wishing it had not taken me hours to get to it. And wow it is boring hitting the 7 key on the numeric pad to rotate the android emulator orientation hundreds of times to see there are other problems.

Written by birdle

March 6th, 2010 at 9:56 pm

Posted in General

Early March Ramblings

without comments

It is funny how small things seem to stump you. Well me anyway.

Here I am getting ready to do another update to one of my android apps and I decide to rotate the screen orientation and bang it throw and exception.

I have a reasonable understanding of the life cycle of activities and how they are re-created when there is an orientation change. It was rock solid previous release. 4hrs of debugging and chopping up code and I have an slight idea that is does not like me changing the contents of views in some way, but no solution.

I know it will be an easy fix when I find it and hopefully I will be able to update my mental model to not make this mistake again.

Anyway funny how these small little things trip me up and slow down progress.

In other news my house hold have gone sock monkey made and seem to be creating them left right and centre. Well to be honest it is not my sort of thing so I am not that involved other than to say “yep that looks great” It did however remind me I need to use the random monkey to test my apps more often. Past couple of releases I have not run it, tut tut.

Anyone releasing a new application for android should run the random monkey for an hour to help ensure your app is rock solid. This is particularly important if like me you are not that experienced with android programming. The Random Monkey finding problems is much better than your users finding them.

Admob adverts ecPM is gradually increasing. Hopefully we will be able to buy a cookie with the coffee that we buy at Starbucks with this months earning :)

Written by birdle

March 5th, 2010 at 10:12 pm

Posted in General

Javascript or GWT?

without comments

I have a few ideas for apps that I would like to produce that are suited for web applications. With this in mind I am gradually working my way through a Javascript book but my instinct is drawing me towards GWT.

GWT makes a big deal about their code working on all browsers but I suspect that getting a good Javscript library will provide similar abilities.

Language wise, I quite like the look of JavaScript and the fact you can easily program in a functional way. Java is Java and not really an exciting language.

Where GWT seem to be a winner is the tooling. Go to the GWT site and they say download the eclipse plugin and you are away, unit tests, refactoring, profiling all not a problem. Javascript is a little more free in the sense you can use what you want in terms of tooling. Which if great except I am left wondering what is best to use. I tried an eclipse plugin which is quite cool but the tooling for GWT seems to outshine it.

I get the feeling that if I use a “get things done” mindset it would be sensible for me to use GWT with all that lovely tooling and my familiarity with the Java language rather than go through the learning cost of JavaScript, not the language more the learning of the tool set.

A little while before I decide which one to go with.

Written by birdle

February 16th, 2010 at 10:38 pm

Posted in General