Monday, 25 June 2007

Microsoft Surface - surface of the future?

When was the last time you watched an anime and saw generals and commanders pin-pointing "holographic" images and interacting with them their hands and gestures, and you wished you could have something like that?

While Microsoft Surface doesn't produce holographic images, it comes close to letting you interact with your high-tech gizmos through touching the surface of a "table". I remember reading about this technology sometime back in 2002 about Hitachi having invented a similar one, so I am not sure how Microsoft came to be the pioneer in surface-touch technologies. Whatever it is, I can only sum this in one word : AWE

Microsoft Surface is not for the weak-hearted financially. According to a podcaster, it comes at a whopping USD 20,000!!!!! I don't see myself affording one anytime soon....However, the application of it in businesses is tremendous. Below is an example :-

Imagine you walk into a restaurant (assuming the price would have been streamlined to be affordable in the future, like all tech gizmos) and you can basically scroll through menus of food using your hand through a beautifully designed interface, and when you like the food, you just push the "button" ORDER. The food order gets sent to the kitchen (assuming the kitchen is hooked up to some IT system, which they do in some restaurants in downunder) and the chef will deliver the food. Assuming the future is so advance that every restaurant owners is open to the idea of doing business with online transactions, you can split bills using your credit/debit cards and then the amount automatically gets allocated to each cards, after which online transaction will occur to communicate with the banks. There are some advantages to this :-

  1. Merchants no longer keeps cash in the shop. All are done online. Bad luck for you robbers. Try robbing the soy sauce instead.
  2. You can still split bills in restaurant, but this time over the table through beautiful interfaces, not the shuffling of cash everywhere. This also gives you decimal point accuracies in the amount splitted.
  3. Less hiring of waiters to take orders. All they do is deliver. This increases order throughput and increases sales turnover. Sales management is entirely managed by the customers.
  4. Customers can enter comments on the food seamlssly on the table and management can use it as a feedback to their business.

The future is definitely here!!! Ohhh...what an exciting time to live!!!!!

Thursday, 21 June 2007

Google Gears, Google Earth, Googlings (not earthlings)?

Google recently announced a tool/library/module/bundle that allows web application to run "offline" during the Google Sydney Developer Day which I shamefully miss (even my company couldn't get me in through the back door despite the good and strong relationship my company has with google).

As suspected the first time I heard about it, local cache technology is used to preserve data when you are using an webapp online. You can seamlessly switched it to offline mode and still browse the data that you used to have. The package comes with a lightweight SQL database called SQLite.

The convergence of this offline browsing technology will change a lot of ways applications will run. For instance, I can imagine some hacks out there who will be trying to develop an offline GoogleMap app (I know I am) to replace the traditional thick map books that we carry around when travelling. Australia is no stranger to driving with a map book by your side. Imagine you can just carry your laptop around when you travel that lets you blog, take pictures and see your map OFFLINE when you want to. The synchronization with the data in google servers will happen once you become online. How awesome would that be? Check out the offline Google Reader demo in the developer day to see what I mean.

Traditional bookmark storage are no longer the popular trend with the introduction of online social bookmarking websites. With Google Gears, you can both have the beauty of offline and online bookmarks. The pages to the links can also be cached using Gears. Word documents/spreadsheets composed using Google office can be cached offline when you are typing it, and when you go online, it syncs with the storage servers online. That way, offline or online, you will always have your documents handy!!! So, we can probably see where Google is getting at. Think online, think Google. Think offline, think Google. The value of a business proposition with leveraging Google Gears and other Google technologies is tremendous.

With the convergence of new technologies that affect the current and future generations of users (and I am talking about technologies that will change the way we socialize) , and seeing that Google is building into every little space that we can breath on, I suggest we call ourselves Googlings, not Earthlings in the strictly digital age.

Wednesday, 20 June 2007

Technology agnostic vs Client agnostic

This question recently hit me like a .50 calibre bullet, and it really hurts when I try to figure out how to strike a balance between the two.

Being in the IT industry (and especially consulting), I have been able to be technologically agnostic. I am always ready to adapt to changes in the technology I use to solve problems, and am always willing to learn new technologies when it come around. I am even ready to use LISP (although the curly braces will leave me seeking asylum in a few weeks, but that's another story) if it means it is the most effective way to solve a problem!!!

However, I have not been able to be completely 100% (probably am 97%) client agnostic. Being a mercenary that I am, I wasn't that enthusiastic about working for my new client during the reassignment. It's probably because they have gotten a fair bit of bad publicity on the media, and may be largely due to the fact that I have been waiting for my refund of 189 dollars since 4 years ago!!!!

Whichever way, I wasn't all that interested in helping them driving their share values up in the market.

Then how could I call myself a consultant/mercenary in such a case? Well, this is getting philosophical....(not talking about life and death, or about Jesus or Buddha or Muhammad). It's about the living philosophy of being a technology consultant (client and technology agnostic) and at the same time have the courage to reject a client based on the basis of ethics.

How can a balance be strike between being client agnostic and upholding personal ethics? Is this possible at all? Maybe I need to just drop all my "ethical-hoohas" and just live with it. I have seen some colleagues who are willing to resign from the consulting firm because they are stuck with a bad client. I hope this will NEVER EVER happen to me. I love my new company too much to throw away my career just because of a nasty client.

Enterprise 2.0 suite

I have been working internally on a project for my company to promote the application of Web 2.0 behind the corporate firewall, and I must say this has been the greatest time of my life in the IT industry for having the opportunity to directly be engaged in the innovation and creation process of the software lifecycle...and hence, all my Ruby posts below.

With my new found faith in Rails, I have to say I have never find web development so engaging and interesting. The days I used to spend configuring struts and tiles (Java MVC framework) has literally been used to producing something nice and functional on the screen. Speaking of which, AJAX has never been easier on Rails with the introduction of link_to_remote and form_remote_tag functions, where you can map the action to a method in a controller directly, and hear this : MULTIPLE UPDATES OF DIVS with AN RJS TEMPLATE!!!!!!

RJS (Rails JavaScript???) template is a template where you can throw javascripts back to the views by specifying the div tags you want the content changed. How easy can this be ? The learning curve is also really low as you can practically find tons and tons of tutorials on the magic of it on the internet.

I better stop bragging about Rails before all of you run away. :) I have been seen as a fanatical fan of Rails.

I have also managed to throw my new found love of AJAX into the blog engine I wrote as part of the Enterprise 2.0 suite and the effects do throw me back. Some of the effects are a bit exaggerative and does not necessary translate to good usability, but the majority of it are really good. The blog engine is fully functional, with minor UI tweaks awaiting. Of course, unit-testing hasn't been performed but continuous integration test has been performed on it from time to time (excluding unit-test :P ).

The project has since been made open-source at http://enterprise20.rubyforge.org and I encourage any participation on it. I will continue development on it whenever I have the time (just been reassigned to a different client within the company) and should anyone be interested in contributing to the project, do let me know. The page looks pathetic now, but I will be throwing in some new content in it very soon.

Would be nice if RubyForge allows me to throw my blog engine onto it, wouldn't it?

Thursday, 14 June 2007

A change in mind about presentation *Part 2*

With all said in Part 1 below, I decided to give Presentation another fair go (as most Aussies would say), and I have to say I am have been pretty excited about it. To my personal dismay, it's actually highly addictive. The stylesheets used totally changed the appearance of my blog presentation engine, and it looks great!!! The borders, different fonts, and Rail's perfect use of ErB allows stylesheets to be conveniently placed in the display markup-code (since it is a mixbag of html and Ruby code now...so technically I think this is accurate). There's a even a plugin from Mozilla where you can use (it's called Web Developer) to "learn" from the templates all over the web.

The integration of FCKEditor (thank's to Scott Rutherford ) into Rails make everything complete for a blog engine. Now I am looking into using AJAX (haha, another AJAX convert on the rise) to improve interactivity in my blog, with the possibility of some eye-candiness help from the folks at Script.aculo.us .

The rise of Microsoft Silverlight and JavaFX will change the whole web experience with apps built with scalable vector graphics (wow...more eye-candiness). In fact, some people believe that it will actually replace AJAX itself in the not so distant future.

With all the mention of eye-candiness, it's time to go out for lunch and grab a candy-bar on the way back. Stay tuned for more posts on Presentation as I discover more.

A change in mind about presentation *Part 1*

I have finally written a blog engine, fully integrated with comments and tag cloud to my liking.
As usual, the backend stuff is all written, leaving the front end part to be fixed (mainly views in the MVC model).

Here comes the next nightmare: Presentation.

I never had any good experience when I tried to mock-up presentation htmls. In fact, I could probably count with one hand the number of times I have been involved in presentation. Back in the "glorious" university days, we had this database project where we were to write an online shopping cart using PHP. Immediately, I separated the work with my teammate such that I would concentrate on the "functionality" of the software, whereas my teammate will involve in the "facelifting" of the application. For some manic reason, I have always tried to avoid doing presentation work. It's probably the fear of html, or JSFs for the case with Java. The project turned out quite well by the way.

One of the principle in Web 2.0 mentions about Rich User Interfaces. Rich User Interfaces is about giving users the absolute user-friendly experience in an web application. In another words, eye-candiness and easy of use coupled together. Now, hardcore gamers are going to tell you that's all bull**** (me being one myself) and that all we need are good gameplays not good graphics!!!! *Nice* Let' all go back to the good ol' days of 8-bit Super Mario.

However, as time matured, I slowly discovered that eye-candiness is perceived as "everything" by most audience, whether in an app or a game. People are ditching the Nintendo Wii (the ones I know of) claiming that the graphics are second-grade while praising the XBOX 360 and PS3 (which don't offer much change in gameplay apart from eye-candy). If you look closely, not many people are actually embracing the "creative" gameplay that the Wii has to offer, but rather, the first question that pop into their mind are "Is the Wii's graphics better than the PS3/XBOX 360?" You will find that the first comment that normally come out of a game recently is "Wow, this game has awesome graphics!!!!". We'll worry about the gameplay later.....

This is when I discover that the same is applied to the everyday web app that we use. Dominoes Pizza for example has an extremely user-friendly interface that let's you order your pizzas in 5 minutes. I am a big fan of it (that also explains my weight recently). Apple has been a champ in this arena with their elegantly designed and well-thought engineering of MAC OS X.
Let's not start the good ol' Windows Vs Apple flame war here. I am clearly bias when I say this since I am a recent MAC convert :)

Monday, 11 June 2007

Rails ActiveRecord and ORM

As most of you may have already known, the ORM layer in Rails is implemented in the ActiveRecord classes. It provides mapping to database rows to application objects via the logical models that you can generate using Rail's generator. For instance, a "Food" table (physical database model) can be mapped to a "Food" logical (logical model) model. All SQLs are presumeably wrapped within the ORM layer already. The object relational mapping magic happens here...The idea seems to be getting you to concentrate more on the application design and implementation that spending half your time messing around with the database tables (for serious database non-enthusiast like me, it is a big problem).

Continuing the blog engine that I am writing from scratch, it is inevitable that I will need to fully understand and utilize ActiveRecord classes and what it takes to navigate through the objects. It takes a bit to get used to but I finally found a really good article on how it works.

Rails continue to amaze me as how you can express database integrity constraints as "attributes". For example, say the following :-

customers : orders
1 : n

To basically add new orders to the customers, all you have do is the following (pardon my Java like object naming conventions, I still like it better) :-

customerObj = customers.find(id)
orders_1 = Orders.create()
orders_2 = Orders.create()
customerObj.orders << orders_1
customerObj.orders << orders_2

Another example of quick object search is the following :-

customer = customers.find(x)
customer.orders.find(y)

The last line above translate to the following SQL:-
select * from orders where customer_id="x" and order_id="y"

In summary, I like the idea that Rails has made it database friendly by eliminating the requirement of specialist knowledge in databases for an application to be written. I am in no way downplaying the importance of having database knowledges. However, being an Web 2.0 enthusiast who just want to get something up and running (I dislike configurations..) in a "agile" way, I would say Rails have done this really well.

Sunday, 10 June 2007

My web album is up!!!!!

http://picasaweb.google.com/jymloke

Not the most interesting of all albums, but still, it's the first online album that I am taking seriously.

Friday, 8 June 2007

Referential Integrity in Rails *Part 2*

Finally, the onslaught of enforcing referential integrity is over.....I have finally succumbed to the manual way of writing bits and pieces of code to enforce it in Rails. It still hits me how the management of this could have been left out in the ORM (Object Relational Mapping) layer. Much like taking a 300 pounds pounce onto the face by Mike Tyson.....

So I finally got a customized blog engine up and running. It's very lightweight and simple, although the presentation is still not as good as blogspot. I really need to dive into the presentation layer once and for all and master all the tricks in getting my pages looking right. So far I have been concentrating on the integration layer, and also the backend database layer. It amazes me at how the presentation g33ks can come out with a lot of funky ways to make the a page slide and hide. No use in making a gun if no one knows how to use it.

What amazes me more are the mathematics behind these javascripts. Scalable Vector Graphics is where I think I will be looking to prepare for the next internet face-lift revolution.

Kudos to the guys at RedHill Consulting for providing such cool plugins. Though it didn't help that much in the application level, it does help to enforce integrity at the database level.

Thursday, 7 June 2007

Referential Integrity in Rails *Part 1*

I have started using Rails framework recently on a internal software engineering project at my workplace, prototyping an Enterprise 2.0 application that encompasses all the usual social collaborative/networking softwares that you can think of.

For the obvious reasons, it seems it will turn out a lot easier to write the software from scratch (am breaking the re-inventing the wheel commandment here) that to grab all the free open source apps and hack and integrate and put all of them into 1 place. The pain of reading PHP code is just unbearable. The thought of integrating all the databases is nightmarish. I am traditionally not a database g33k.

So once again, I turned to Ruby on Rails for a solution. Being as much a Ruby newbie as I am, I started reading tutorials online. The Ruby syntaxes are horrible, and coming from a Java background, reading the API is a pain. However, I still stick my faith in it since it is an Agile tool, and I am still obsessed with the "Build-Your-Blog-In-15-Minutes" tutorial from the site.

I finally started out like all what other engineers do, modelling the required data and defining the relationships. While it didn't take too much effort to come out with a high level data model, it certainly has taken me half my life to define and enforce referential integrity in the database....the most CRUCIAL in my opinion. Err...did I mention it takes an external plugin just to enforce referential integrity? Oh no!!!!!!!!

I wonder how the author missed out on such an important piece of functionality in Rails. Of course, some of you will undoubtly say "Create your own database using good old SQL, you slack-jaw yockel", but like I mentioned abovehand, I am trying to do this the AGILE way......

I am still trying hard to see how well this plugin will function. Apparently it lets you specify the integrities when you use migrate to "migrate/create/update" your database. I have to say I am pretty impress with migrate, but if the documentation about it is better, or if someone can create like a "Migrate 101" page, it will be really awesome. Migrate looks like a generic SQL wrapper I wrote in one of my University projects before.

Needless to say, Rails is still an awesome framework for fast prototyping. My manager wanted a complete "SQL dump" on the schemas once the whole app is done. I wonder how well it will work when the schema is ported as the relationships are only defined in the applications, but not at the database level. Will see how that goes.....