23.11 2009

[Blog] Blogging on-the-go

I’m sitting in a car for the moment, on my way to a business trip. I’m listening to music to kill time and I suddenly got an urge to write a blog post about my ambition towards music. But what to do? I have no computer in front of me, and probably at the point when I do, I’ve lost “the right mood” to write the post. I decided to download Tumblr’s own app (Tumblr is where this blog is hosted) for my iPhone and test if it is any good for writing these post. The app seems quite nice, and writing this post hasn’t been an hassle at all. It has the ability to store drafts, so I had the possibility to take a break from the writing too. Only down-side, and this is a big one too, is that it doesn’t support the landscape keyboard. I did a lot of mistakes all the time, but the typing speed was still decent. A spell checker would have been nice too. The next phone I’ll get will probably be a ‘yet to be announced’ android phone with a physical qwerty keyboard. That’ll fix at least the former problem.

On a related note: I dropped my iPhone today for about the 20th or 30th time and this time it shattered in one corner. It however still works perfectly and I’m suprised it lasted flawlessly this long.

By the way, I already forgot all my great ideas for my music-related post, but I’ll at least be prepared the next time I get them.

Comments
23.10 2009

[Software] Allowing native Javascript in Vaadin

Two days ago, we had this long discussion on the public Vaadin skype -channel about if how you should run Javascript in an Vaadin application, which continued a little on the forum and over lunch. It turned out fast to be an discussion about if Javascript should be allowed at all to be run from an Vaadin app. It was a discussion between ideology and convention.

The side defending the idelogy had the point that allowing Javascript would break the level of abstraction. The strong point of Vaadin is that it is very easy to use as you can do great things without knowing anything about Javascript, HTML and CSS. You only need Java. By opening the abstraction you soon get some implementations that depends on the low level API, and everybody has to learn those too to use Vaadin. Usability goes down. Another reason not to, is that I guess it would be really easy to break the whole software by running custom Javascript. Just like it is easy to break the software with custom css if you don’t know what you are doing. The whole API gets bloated at the same, when you add feature after feature, so you have to be critical about what you add.

The convetional side had the arguments that every abstraction is leaky. As a reference works Joel Spolsky’s blog post ‘The Law of Leaky Abstractions’. Sometimes you just have to drop down to a lower level to get things done. This becomes apparent when your Vaadin application has to work in symbiosis with some old system, and you have to embed jsp pages somewhere. How do you communicate between the Vaadin app and the jsp pages? Some of the main issues here has been to close a window (js: window.close()) or print some jsp/hmtl page from the application (js: window.print()).

At first I was strongly on the side to not let the user use Javascript. Think of all the possibilities you open up for hackers! Think of all the possiblities you open up for the programmer to really really mess up the application. One option that came up  was that it should be a separate extension to Vaadin, not embedded into the core Vaadin library itself. It should fit well as a component into the upcoming Vaadin side product ‘Directory’, which will be a web page where you could download custom made components for Vaadin. The users can jump the extra hoop and download a component from there, if they really, really want the ability to run Javascript, at their own risk. This way with wont pop up to users that doesn’t care about Javascript. I decided to do just this, build a Vaadin widget that runs any custom JS the programmer specifies. I did it because it was trivial to do and becuase I did not really want the feature into core Vaadin. You can find the code from here, a demo of it from here, and a  forum discussion about it from here.

After thinking about this for a while I have started to lean to the opinion that js built in would not be that bad. Hackers can’t use this very much as Vaadin has a strict barrier between the server and the browser. I also haven’t found out that there is some really really bad that you can do with js. You can’t really crash the server because all javascript runs in the browser. So the risks of having it seems to diminish all the time. I also heard someone saying: When Vaadin fails, GWT saves. When GWT fails, Javscript saves. And this is the solution for all the cases where it would be just easier to to a one-liner in the low level language.

I’m for the moment on the fence if it should be included or not. I’ve heard so many arguments for both sides so I guess I have to let it sink in for a while before forming my final opinioin. Then again, it’s not at all my decision to make. :)

Comments
17.10 2009

Life as a biker

All right, the topic may be a little bit exaggerated. I just got my driver’s licence for motorcycles on Thursday, and have to get used to the idea.

I had been thinking for a while about getting the license, by the influence of my girlfriend, Katja. She has had the license as long as we’ve known each others, and has been talking every summer about getting some kind of bike. This summer I decided to get the license so that we can get a bike together for the next summer. The bike is mostly for fun, but also using it for transportation, as we do not own a car.

Kawasaki ER-6FWe’re looking for a street/sport bike of roughly 600cc. The first model I was looking at was the Suzuki GSX, but that idea got scrapped as it wasn’t really of Katja’s liking. Now I’ve been eyeing at Kawasaki er6-f, and it seems to be a good choice for us. Nothing is decided yet however, and we’re still looking at other possibilities. Requirements is about that it should be somewhat a sport model, used - 2-4 years old model, around 5000€. I am open to suggestions!

The original plan was to buy the bike this fall, but that probably won’t happen. Getting the driver’s license did not go as smooth as planned, and I lost a little interest into looking into the gear for that reason. It was really at the last possible moments that I got the license as it was already sub-zero temperature on my last exam, on Thursday. By failing it I would have probably had to wait for the next spring to continue. Now that I got through it, my interest is back up a little. I guess we’ll get the bike in the spring. I should get the other gear as soon as possible, as they should be much cheaper now on the fall. Only the clothes and gear I’ll need will cost around 1000€. Therefore it would be nice to get some warehouse emptying rebate this fall.

I should head to the stores in the coming days and see what they have to offer. Too bad that I don’t know many places in Turku to get the equipment,  but I guess I’ll come up with something.

Comments
1 of 2