Posts tagged ‘Hack’

Matrix Multiplication

Who would have thought that matrix multiplication could be beautiful ?

linear tranformation by matrix multiplication

The very short desctiption :

inspiration from an example of homogeneous coordinates in my linear algebra book and lectures about lineartransforms.

There is a jar, with sourcecode, if you want to se it “live” or twiddle with it.

tegneri

Strange Attractor Wars

Strange Attractors are quite pretty.

I made have generated quite some random attractors.

Now I need to find the most beautiful ones, and I need your help!

I have created a voting system, where 3 attractors line up and you select the best one. The votes are then accumulated and and overall top 10 is generated.

Strange Attractor wars

It is heavily inspired by kittenwars.com.

I have been hacking away on this far to long. But expect an article with more details on Strange attractors and probably more features in the “war” application. (like top 100, biggest looser, most victorious etc).

Now just go and make some votes :)

DTMF dialer

UPDATE : seeĀ  dtmf-dialer-got-new-features

I got around to hacking some code together for a simple DTMF dialer on the mobile.

Its functional and simple. Enter a number, click ok and it will play the correct sequence of tones. It’s even possible to tweak the duration and pauses.

I have only tested it on my own Nokia 6300, but as far as I can tell it should run on most java enabled mobile phones.

dtmf logo

Here are the jad and jar files. If you want to run the program download them to your mobile and have fun.

At the moment it converts + to 00 and removes +45, as this is appropriate for a danish setting.

Here is the sourcecode if you need to make changes.

DTMF sourcecode

Using Netbeans

I used netbeans 6.0.1 and it was a mixed pleasure. Creating the the flow using a drag’n’drop interface, is well nice for something small and simple as this, but I found that it soon got frustrating. There’s no API to look in, and you have to use the mouse all the time.

dtfmFlow

This is the basic flow of the midlet. It was very quick to set this up, and it were indeed a pleasure to start with. Somewhere along the way a made a mistake, which the flowdesigner and codegenerator couldn’t handle. And no matter what I tried I couldn’t get rid of it, I knew exactly what i was. I had misnamed a variable and managed to let the generated code go into a never-ending recursion. (something along the lines of: private TextField foo() { return new TextField(Foo);} ). But no matter what I tried it just wouldn’t get back to normal. In the end I just created a new project, remade the flow stuff to what you see above, and copied a few functions over.

And the flowdesigner is quick to work with, but I get a nagging suspicion that if you are going to make something a little more complicated than this it will be an annoyance. You might know exactly where and what to change in the source code, but do you remember where to point, click and edit in the designerinterface? Another critique is that even when you know what to do, your workflow gets abruptted by having to constantly shift hands between keyboard and mouse.

To Netbeans defence i must say that I am used to using Eclipse, and changing to another IDE is in it self a frustrating experience. Whats the shortcut for blah, where do I set this. And its quite possible that I just didn’t know enough about Netbeans structure and shortcuts to feel at home.

Credit goes out to : openclipart.org for the image of the phone and dialabc for the soundfiles.