2009-03-23

Planning to build own cellphone based sleeptracker project

I'm using Sleeptracker, but I need something to get better data that it provides, and have more flexible work modes.
There are many interesting projects with custom devices based on micro-controllers. I used to solder small electronic devices in past, but now I'm maybe too lazy and just looking for some pragmatic device, that looks and works good. It's fun to make design of own device but there are many ready small computing platforms with suitable features.
I'm thinking about cellphone, or maybe smart-phone, with built in accelerometers and available free software development tools for developers. It needs to have accelerometers and API to get acceleration data from it.

That kind of device has nice features:
  • it's programmable so you can put any features you think about
  • compact size, good for wrist attachment (ok maybe little too big, but make some trade off)
  • built in battery with quite long operating time and possibility of charging
  • possibility to use other input devices to get data like camera to get light level, or microphone to catch noises
  • builtin gprs or wifi to send data to server
  • of course its still cellphone

The biggest problem may be lack of API to needed devices. New devices are more open than in those in past, but some vendors still don't expose access to internal services.

2009-03-20

Switched from Blogspot to new custom domain

I have switched to new custom domain:

itprolife.worona.eu

I'm still testing it so DNS problem while getting to my site are probable.

2009-03-18

Minor health problems - work is not everything

I caught a cold and get some stomatological problems. I was unable to make more complex tasks for a longer time, I just needed a rest. That focused me on myself and my health shape. Sitting in the front of computer doesn't make me fit and healthy.

My RescueTime report states efficiency score:

EFFICIENCY 1.58 for 28h 39m
AVG. USER EFFICIENCY 0.53 for 9h 27m



Maybe I have wrong RT settings, or my development and personal productivity categories kick in, as I spend a lot of time working. Maybe too much time.

2009-03-09

How to learn simple programming in a fun way

I have looked for games that incorporate programming or learning programming and I found few interesting gems. One is SCRATCH visual programming environment for kids made by MIT with sets of basic flow control and sprite sound and animation commands. I have tried some tricks with LOGO like pen drawing features using drag and drop interface and it looks intuitive and appealing enough to catch curious kids attention.

On the other hand I found less appealing low tech c-jump board game with goal of stepping through C like syntax simple arithmetic program. It is simple but still shows the concept of execution of sequenced commands with flow control.

The direction is promising for Microsoft, as they are developing KODU project, aiming at children too. The concept looks like interface for BPEL kind of language and probably in future that kind of environments will be more popular. You can find there links to more similar projects.

Blending gaming with simple programming may be a catch for working adults too.

2009-03-02

The art of exceptions catching

Exceptions in programming languages are very useful tool for propagation information about program errors and helping handling critical situations properly. But it is only tool and how it can be useful depends only on implementing programmer.

I can put it in few points what I have learned in theory and verified during practice:
  • If you don't know what to do with exceptions don't catch'em - exceptions reveal errors so fix errors - don't hide them under carpet
  • Catch exception if you can handle it, you know how to clean up used resources and how to inform developers/users about that event
  • Don't use exceptions mechanism (hacky way) in the correct flow of the program
  • In Java use unchecked exceptions (RuntimeExceptions descendants) instead of checked Exceptions - it saves "throws SomeException" litter in code forcefully reminding about catching them (it makes sense only in some kind of low level services with inevitable critical situations that can be handled by direct clients)

I think it's only basic set of rules.

Do you have another ideas for exception handling?