Microsoft download page

I have been reading Steve Krug’s Don’t Make Think - Common Sense Approach Usability and I can’t help to be a little bit critical on websites that I encountered (including the ones that I’ve built).

When I was attempting to download IE8 today, I’ve got into the download page and it took me few seconds to work out what to do, what button to click to start the download – maybe it’s just me, but I really think the download button is not that obvious.

Few factors that can improve user experience on this page:

  • Put the download button on the bottom of the mid section – that’s where I expect download button to be (as with most sites)
  • Obviously make the download font bigger, more stand out – even change the button look and feel, don’t use the plain vanilla HTML button.

msdownload

Posted by felixt on July 3rd, 2009

Filed under web design | No Comments »

Experimenting with YQL – jobs aggregator

As I have blogged previously, during webDU conference Yahoo!’s YQL really caught my attention. I really think it is really cool how you can leverage your SQL and XPath knowledge to easily query any websites that you want. Read the rest of this entry »

Posted by felixt on July 1st, 2009

Filed under coldfusion | No Comments »

Re-using server side logic for client side validation

I have posted a while back the possibility of re-using your server side validation for client side validation. Few days ago, when it wasn’t so busy at the office, I was able to put this concept to test. In this post, I will explain on how to do this.

Read the rest of this entry »

Posted by felixt on June 12th, 2009

Filed under coldfusion, jQuery | No Comments »

Acer Laptop Woe

I have a 3 year old Acer Travelmate 4061 laptop which has been working fine until few months ago. Whenever I booted to Windows XP - the keyboard just wasn’t responding and I noticed on the task manager, the CPU usage is always almost 100% and I can’t work out which processes that causes the CPU usage spike.
Strangely enough, I didn’t have this problem when I booted to Linux (Ubuntu).

I could’ve just use Linux and not bothered with this problem however I was preparing for my SCJP certification and the 2 exam preparation softwares that I use don’t run on Linux (a little bit ironic if you think about it, Java is supposed to be cross platform yet these exam softwares were created using M$ technologies which only run on Window$). Yes, I have played around with WINE, however not having too much success with it.

I have taken some drastic measures and wasted lots of hours in trying to figure this out and ranging from killing processes, attaching/re-attaching USB devices to the obligatory a couple rounds of XP re-install.

Luckily the certification softwares most of the time only require mouse clicks (my USB mouse works fine) and when I really have to use some keyboard input, I had to resort to Windows On-Screen Keyboard.. Uhm you don’t know what an On-Screen Keyboard is? Go to Accessories > Accessibility > On-Screen Keyboard, not the fastest for keyboard input but it works in this case.

Trolling through Google search results wasn’t pointing me to the right direction. Some of the result suggested that harddisk might be the cause of this problem. And I actually did believe that, although I can’t work out if this was the case then why Linux is running fine.

Battery is the source of all evil

After having to live through this experience for a few weeks - I had some sort of divine AHA moment. I ran the laptop on power supply and remove the battery and lo and behold the CPU usage drops to normal!!

Googled around using battery as one of the keywords led me to search results that confirmed the problem. This particular post is particularly useful: http://www.tim.id.au/blog/2009/03/11/solved-100-cpu-usage-on-acer-aspire-1640z/

In the link above, Tim described in details steps he had taken to figure the problem out (more sophisticated then my endless trial and error). I also later found out that by disabling the battery management from device manager also fixes the problem. I can’t remember exactly what it is since I am not on my laptop at the moment.

Update: As per Tim’s request, you can fix the problem without unplugging the battery by going to Control Panel > System > Hardware > Device Manager. There should be a node called Batteries - expand that, you’ll see Microsoft ACPI - Compliant Control Method Battery. Right click on it and disable it. Screen shot below:

disabling battery management in Acer Travelmate 4061

disabling battery management in Acer Travelmate 4061

My confidence in Acer laptops has been tarnished now. But on the other hand I haven’t had much experience with laptops - perhaps this is common problem.

Posted by felixt on June 10th, 2009

Filed under general | 3 Comments »

The Passionate Programmer

Yay! The book - The Passionate Programmer: Creating a Remarkable Career in Software Development finally arrived yesterday from Book Depository (thanks to Booko and ozBargain).

This book is the new edition of My Job Went to India: 52 Ways to Save Your Job which I’ve been wanting to read for awhile, to get a taste on what the book is all about Sammy Larbi has dedicated a section of his blog on the principles from the book. I think it’s going to be an excellent read.

Just a point to ponder (taken from www.pragmaticprogrammer.com):

What should the career path of a programmer be? How do you know what you’re aiming for? What defines success?

Many of us started out assuming the answers to these questions included slowly climbing a corporate promotion structure, ultimately becoming a people or project manager and no longer a programmer.

But we didn’t get into software development so we could fill out spreadsheets and attend status meetings. We got into software development because we were excited about it. We wanted to be creative and to build great things.

Posted by felixt on June 4th, 2009

Filed under books, general | Comments Off

I’m a certified java programmer now!

Wow, I really thank God that I can pass this exam (4 years since I started thinking about it). I have absolutely no confidence in entering the exam this morning due to the low scores that I got when I do the mock exams.

I got 77% (passing score is 65%), which is not too bad. As expected I performed poorest on API and then OO was my 2nd weakest point. I was expecting to perform badly on Generics and Concurrency, but I did pretty well on those two.

I use mock exams from the book SCJP Sun Certified Programmer for Java 6 Exam 310-065 and an exam prep package from Whizlabs. The actual exam is considerably easier than from the aforementioned mock exams (Whizlabs is harder than the SCJP). I want to blog about the my experience (read rant) using those two tools, they both are excellent in content but the content delivery falls short from my expectation.

I should’ve done this a long time ago. If I had done it closer after being graduated from uni perhaps I wouldn’t have to wait for years to get a programming job. I remember during at least 2 job interviews (HP and CBA) where I was asked why I didn’t get a certification given the fact that I couldn’t get a job in IT for awhile – and I couldn’t answer – at that time I thought certification was worthless especially for a new graduate without work experience. 

Anyway, I am happy and thankful, my wife and my boys puts up a lot when I studied for the exam, now I will have more time to spend with them.

Posted by felixt on May 26th, 2009

Filed under certification, java | 1 Comment »

After Webdu 2009

Well it’s over, it was good experience, personally not so mind blowing as CFCamp awhile back but I did learn quite a bit too. I’ve done it, I have come to webDU at least once in my life :)

There were 5 tracks on this conference (Team/UX, Web I, Web II, Flash/Flex, ColdFusion), I was somewhat surprised that I have chosen most of the topics from Team/User Experience stream instead of ColdFusion. I think this is due to the fact that most of the ColdFusion topics presented were related to ColdFusion 9 and I have read quite a bit about what’s in there from blog posts (especially from the other conferences).

I think Microsoft presents themselves very well in a conference that is supposedly an Adobe conference (fanboys (me included?) can be quite hostile at times – oh well, everybody loves to hate M$$$ :) ). Two things I observed: Microsoft knows marketing very well and it has a very deep pocket. Microsoft gave away prizes like XBox-es, mobile phone, t-shirts and the production manager gave me a free ticket to Remix 09 (because I said on the survey that I’d like to come to Remix but I can’t afford it :) ) !! It also holds a breakfast this morning while presenting its new Windows Mobile Platform. 

Yahoo! I think has quite amazing offerings for the developers and I agree with Geoff Bower (Daemon) that the really should get these stuffs more promoted. Yahoo! Query Language (YQL) is really sic, it’s like SELECT * FROM THE INTERNET!!. It’s really ground breaking stuff in my opinion and yet I’ve never heard of it until today – will definitely need to give it check – I can immediately think of some applications of that. Google also presents in this conference although not as visible as Microsoft. One interesting thing that I found from Google’s keynote this morning is: they haven’t solved the search problem, Google at this point in time only solves 10% of the problem.

There are few interesting key products that Adobe shown in this conference. Flash Catalyst is very interesting, it seems to enable the designers/developers to create interactive and behaviour rich mock ups that can be easily to a working thing later on (Microsoft also shorty presented similar offering.. can’t remember the name maybe its Blender?). Saw a little bit of Bolt and Flash Builder – cool stuffs – but I already know them so they are not as jaw dropping anymore. Seeing what Microsoft does at marketing – I can only hope that Adobe is able to the same especially with ColdFusion, we just need a better ColdFusion visibility in Australia.

From this conference I got to understand AIR a lot better, I was always wondering where the server side logic like saving to local database etc2 happens in an AIR app – it turns out that the server side logic is handled by Javascript calls to AIR API on an DHTML AIR app (not sure how the Flash/Flex on AIR works – but I would assume the Flex/Flash would call the same AIR API).

On the networking side of things, I would love to be able to connect to more people but being an introvert I found this quite hard – plus people seem to have their own circle of friends etc2. I did get to know few people though so it’s not that bad, I wish I played the trading card came – I didn’t know the first prize was an XBox and the top 10 got some presents too.. sigh!!

Let’s play a game “where is felix”:

Posted by felixt on May 23rd, 2009

Filed under coldfusion, conferences, flex, general, user group | Comments Off

say no to duplicating server side and client side validation

I don’t know why this never occurred to me until I read Hal Helm’s post (and no one told me about it)..  This an email that I just sent around to the team (hopefully someone will try it out).

Usually when we create a form we need to do:

  1. Client side validation
  2. Server side validation

This is an industry standard practice, however as you can see you will need to write the same validation logic in Javascript (client side) and ColdFusion (server side). And trust me this is a boring and tedious process. I’ve been thinking for some time how can we eliminate the necessity to duplicate logic but still retain the same level of functionality.

I’ve tried this method: writing server side validation in CFSCRIPT and then you can cut and paste as Javascript (still need to do minor tweak on the code), but it’s still not good as you still have the same thing repeated in 2 places.

While reading Hal’s post a couple days ago he described a technique where the validation logic only need to be written once for both server and client side. He was using CFAJAXPROXY (which I haven’t used before), his technique is quite advanced, I don’t’ fully understand how he does it. But at least in similar manner we can use Ajax to do client side validation.

2 types of of form submit:

1. Ajax submit:

Ajax handler call formProcess.cfm - if validation fails this template will return XML with the list of field IDs and error messages – javascript process this xml and display the error messages accordingly. We can create a generic function that can be reused for this purpose.

2. Normal form submit

If Javascript is disabled, the form will still submit to formProcess.cfm anyway. If formProcess.cfm called not from Ajax context, it will return a ColdFusion struct containing error fields and messages.

If we do this, we only need validation logic on formProcess.cfm we don’t need to duplicate that on Javascript.

But I haven’t tried this myself, in theory this should work right? Thoughts?

Posted by felixt on April 16th, 2009

Filed under coldfusion, javascript | Comments Off

org.apache.bcel.generic.ClassGenException Branch target offset too large for short

I just got a ColdFusion error message that I never encountered before: org.apache.bcel.generic.ClassGenException Branch target offset too large for short

As usual, Google is the place to go and found out info from easyCFM, it looks this error was thrown when a CFC is too large.

I am not 100% sure what constitutes a large CFC, but I nailed down the problem to a particular record CFC that was generated by Reactor – the CFC itself is 186k in size ( around 3000 lines of codes ) and it represents a record in this UBER table that contains 223 columns.

Anyway, just another interesting thing to find out.

Posted by felixt on April 14th, 2009

Filed under coldfusion, object oriented programming, reactor | Comments Off

Object oriented – thought process

This is what I wrote in wiki today.

I have a struggle in having confidence with the design decision that I am making because:

  1. Eventhough I know OO, I actually know little about real world OO
  2. I’m having problem finding someone or some people at work that have the skills or even the interest in embarking in this learning journey together

The wiki article and the blog post were written to combat those concerns. I want to be corrected if I am wrong and hopefully they will spark some curiosity on other developers (finger crossed).


Background

I have created a functionality that needs to be recorded in the logging table.

Normally, I would just need to create a CFQUERY on my processing template and I would probably cut and paste it from somewhere.

However there are problems with this approach:

  1. I cut and pasted the code which means I am duplicating the code across the system (a violation of DRY principle) - generally speaking this is considered as a bad practice in software engineering.
  2. What if someone added a new column to the table and to ensure consistency you want every single CFQUERY that saves to this table is updated as well. Do a system wide search (and pray your Dreamweaver doesn’t crash in the process).
  3. What if there are "some hidden logic" that govern the insertion of record on that table that I might not be aware of ? Or logic that is added after I created the template. For example, in the future perhaps, we are requiring for every Email type of logging to have the activity subject column to be prefixed with the word "EMAIL:". To enforce this rule we would have to do search and place across system.

Possible Solutions

We need to restrict UPDATE/INSERT access to the this table and we need to be disciplined about it.

A service CFC is good for this. let’s called it LoggingService.cfc and in it, we create a function called: saveLogInformation( stColumnsAndTheirValues )

This CFC and the function can also give us the flexibility on the implementation:

  • You can put any rules/logic or data validation in this function - you can 100% sure that the latest logic will be reflected on this saving function - you don’t have to do a keyword search on the whole system to work out how other pages are saving values to this table.
  • You then can write straight CFQUERY or perhaps CFSTOREPROC on the function to save to the database - however I think it is better to actually use a Data Access component to do this.
  • If you use a Data Access CFC then you can the option to:
    • Write your own CFQUERY/CFSTOREPROC to save to database - you shouldn’t put any logic in this - the logic is on the service - this component just do the saving and nothing else.
    • Use a Model framework like Reactor/Transfer to manage it for you

So you will end up creating at least 2 CFCs:

  • Service CFC
  • Data Access CFC ( DAO )
Risks and Benefits

Risk:

  • If you somehow broke the CFC, the effect will be system-wide (it will not affect your project alone). Thus a thorough testing is mandatory.
  • CFC creation are expensive in ColdFusion ( performance might decrease if lots of CFCs are created - but we are just starting so we don’t have this issue - if this do become an issue - persisting the heavily used CFCs on SESSION or APPLICATION is recommended ).

Benefit is obvious - easier to maintain system.

Conclusion

Yes, creating a CFQUERY on your process form might take 10 minutes and doing this approach might take an hour. But you are saving someone else’s time by creating something that is reusable and I believe you will improve the overall quality of the system (and hey you’ll learn new concepts along the way too).

Posted by felixt on April 14th, 2009

Filed under coldfusion, object oriented programming | Comments Off