all things web and not web

allskonar

Here is an excellent case of a big problem … with a incredible simple solution. I upgraded my slicehost ubunto vpn from dapper to hardy. A risky business with nothing real in jeopardy except for the pride of a 380 days up time on the server. I shut down everything running on the server and upgrade to hardy. All is fine except that I realize that when I am starting all the services that small things tab completion doesn’t work among other annoyances and doing work on a server without that is practically unbearable. So I figured I would make some time to fix it… the best place to go on these issues is slicehost … THE ROCK. Tony on the slicehost campfire chat immediately identified the problem and it was fixed within 5 minutes.

*Tony | try just running “bash”

And as he said that I was like shit and ran echo $SHELL only to realize that I was in “sh” but now everything is fixed and dandy and I have my tab completion back along with other normal bashy things … thank god. Did I mention that slicehost rocks!

Javascript Event Handling evolved

February 21st, 2008

Just this week, motionbox the company I work for released it’s first open source code the Motionbox EventHandler spearheaded by Topping Bowers with contributions from the rest of us in the group. The javascript library implements event delegation techniques and is built on the prototype library. There are other such libraries for yui which this was in part inspired by.

One of the kewlest thing about the library is the ability to subscribe dom elements to events before they even show up in the dom. Don’t take my word for it it was written up in ajaxian. There you have it: Topper, me and my colleges are almost famous now. If you are using prototype go and get the source and try it out it’s totally brilliant.

I have written about event handling before: The evolution of body onload Unobtrusive Javascript which might give some context on the topic of event handling in javascript.

Helma, server-side Javascript

November 8th, 2007

When you’re on a Ruby on Rails binge, it’s healthy to sober up every once in a while and checkout other things. Not necessarily because you want to re-saddle somewhere else rather to get a chance to learn new tricks and get fresh ideas. I’ve been been playing with Helma the javascript server-side project that was featured in the November issue of Linux Magazine.

The Helma server is build on the rhino javascript interpreter and the java based jetty server. Which means that it’s possible to use java libraries by placing .jar files into the lib/ext directory on the server, and it will automatically get added to the classpath. For example if you need a JDBC driver for MySQL you just get the jar file for Connector/J which is the official JDBC driver for MySQL, and place it in the lib/ext and configure it.

File: db.properties


myDataSource.url      = jdbc:mysql://localhost/blog
myDataSource.driver   = org.gjt.mm.mysql.Driver
myDataSource.user     = user
myDataSource.password = password

There is an obvious benefit by having the client-side code in a interpretive language like javascript, Ruby or any of the others out there, it gives the developer the flexibility of writing code rapidly. There is also a benefit of having it sit on java especially if you need to boost performance or accomplish something that javascript cannot handle. Using javascript on the server-side, presents an interesting opportunity in sharing code base both on the client-side and the server-side, which could, if done right, prove to be a powerful concept.

Using the same language on both the server-side and client-side should help with keeping the applications code base dry. It’s easy to imagine being able to slip a javascript functions or modules through a xhr request at runtime similarly to how ruby on rails delivers the output of rjs templates or simply host the javascript modules you want shared in a place where both the server and client can reference them.

There is a downside as well, you can’t perform all tasks you might want on the server with javascript. Which means any utility scripting such as those that either needs access to the filesystem or for any other things that javascript is unable to do requires using Java or dynamic language such as Perl, Ruby, Python or bash scripts. But if there is a real possibility to sensibly share code on the server and client-side, that seems trivial.

I have been cobbled together some helma code in preparation for an actual tutorial. Where the objective is to develop a little application and explore how sharing of javascript between server and client can be accomplished. To do this I have written a very simple blog post engine where one can enter a posts, comment on posts anonymously. If you practice vigorously you can probably pretend you can code the blog application in a 15 minutes

Keep in mind that this is just a rough draft.

Now here is the geeks view of my recent trip to Italy. Later I will ad a version of all the less important stuff such as food and wine.

The In-Flight Entertainment System

It’s not often that I get so excited that I clap my hands together like a giddy school child, but when I do so it’s always slightly embarrassing. My most recent incident of such occurred when I boarded eurofly plane on my way to Italy. This happened when I realized that the in-flight entertainment system was run on Linux which was unfortunately only evident because it was displaying an error screen which had Tux, the little penguin which is the linux mascot, sitting in the top left corner.

Here is a more up close view of Tux, isn’t he cute?.

The excitement faded quickly and turned into disappointment because the system wasn’t really that great, which ofcourse has nothing to do with the underlying OS.

The worst part was the interaction design. When I stumbled on the chess game I got pretty excited about the “play with another passenger” feature and I remember thinking to myself “oh my … they are so far ahead of their time having a social feature on a in-flight system, thats so brilliant!” So I decided to see if one of the 300 other passengers where waiting to play chess with me. After a long wait I gave up and decided to try again later when the swarm of passengers had settled. I had no luck in finding anyone to play, even towards the end of the flight, when I figured everyone becoming so bored that they would have found it. It was only then when I realized that the feature “play with another passenger” didn’t mean what I though it meant. As it turns out it basically meant you could play with someone you could hand the controller to … essentially either of the passengers next to you. Now English is not my first language and my expectations might be blinded by the fact that I work on social software so perhaps that affected my anticipation by seeing “play with another passenger” on a computer console, but I was dissapointed and embarreshed a little.

iPhone in Europe

After I had gotten over the whole “no one wants to play chess with me” fiasco and the plane had landed and the airplanes doors had been open it was time to turn off the airplane mode on my iPhone and see how Edgy europe was? and they sure where … I was roaming on the internet so fast I forgot all about that chess thingy. The untold story here is that I haven’t yet seen the bill, which I imagine is pretty steep since I never did read the phone print to discover how much one would have to pay for data transfers roaming in another country, if it ends up being a real shocker I will update this post and display the cost. I am especially worried because the last two days my connection suddenly died so either I exceeded some kind of limit or they realiced that the iPhone shouldn’t be working in Europe.

Where to Get Internet in Rome when iPhone was Shut Down

When the iPhone is no longer a reliable source of internet I started looking for wifi signs around the city and as it turns out they still have more hifi signs than wifi so my second best option was the laundry mats that also come equipped with internet machines … which in my opinion is quite brilliant and essentially how I do laundry here in the states except for that fact I go next door to the coffee shop with wifi.

Computer Books as Window Display in Book Stores

To wrap up my geek/tech impression of Italy check out this window display in a Rome book store, above! These skills are also in high demand in US but I still always have to go to the far dark corner of any book store to find my computer book titles, in Italy I don’t even have to be looking to find them.

I lose sleep if I am doing something that I suspect is wrong. There was a time when my virtual toolbox was filled with pirated software such as Photoshop, Dreamweaver, Illustrator and Word, and I always had serious angst about using them. I was comforted by the fact that at least I was using them legally at work (assuming that the companies I worked for had their licensing in order). At home in my spare time, however, it was a different story. I was making a few extra bucks on freelance work, but not enough bucks to afford the tools I was using. And I was losing sleep over it.

But for 2 years now I have been using software that is freely distributed. I use Linux (ubuntu) as my operating system, Open Office for what I used to use Microsoft Office for, Inkscape for Illustrator, Scribus for InDesign/Quark, Gimp for Photoshop, Blender for 3d rendering software, Quanta instead of Dreamweaver, GnuCash replaces Quicken-the list goes on and on.

It would be foolish to claim that all of these applications are an exact replacement for their proprietary counterparts, but there is no harm in trying; especially if the alternative is stealing! Some open source applications are better than others. Personally, I miss Illustrator and InDesign the most. If development on Inkscape and Scribus continues, though, it’s not inconceivable that they’ll mature to become viable alternatives to Illustrator or InDesign.

I almost never user illegal copies of software anymore, but my conscience is wondering: can this be? Is this really free? And if so, how? How does this community thrive, and who is paying for it? What is driving it? Am I a part of this community as a user of this free stuff, and what are my responsibilities? And it hits me… I am not doing as much as I should to give back to the community. There it comes: now I feel bad about myself again. But this time I know I can do something about it, and this is how:
  • Evangelize to my friends about the benefits of open source software.
  • Try to get the company I work for to embrace the concept of open source-not only by using it, which they are beginning to understand, but also by contributing back to the community. Take google as an example google is definitely the industry leader there, supporting several open source projects.
  • Helping others when they have problems I have experienced. There are a lot of people documenting their experiences, and almost all known issues are well documented, alongside with a solution to them. My personal favorite is this wiki which lists just about anything you may want to do with ubuntu.
  • Write banal posts such as this one until I reach a skill-level where I can contribute code, which to me is the ultimate goal.
 
allskonar Powered by Mephisto