Upgrade 08

I have spent yesterday and today working on upgrading my home PC. It is a five yearly ritual that I observe.

These are the components:

  • CPU: Intel Core 2 Duo 3.0 GHZ (E8400)
  • Memory: Kinsgton HyperX DDR2 1066MHZ 2GB kit
  • Motherboard: ASUS P5Q-Pro
  • VIdeo Card: ASUS PCI-E 512MB 9400GT
  • PSU: Widetech 550W
  • Mouse: Evoluent Right Hand

Total cost: 814.63

I bought Evoluent mouse as I feel that my right hand is stiff at times, I think the Microsoft Optical Mouse that I use might have something to do with it. I hope it can spare me from RSI.

15112008250 16112008271

The one on the left is the new PC. The pic on the right is the old PC that is going to be my sister in law’s PC and Jet was working on it :)

Posted by felixt on November 16th, 2008

Filed under misc, rsi | No Comments »

Deselecting options from a select element in jQuery

Oh boy, yet another IE7 gotcha.

I wrote this piece of jQuery to code to deselect selected option(s) from a select element:

$("[ name = 'selectFieldName' ] option:selected ").attr( 'selected', '' );

Which works fine in Firefox, but then when the QA tested it, it doesn’t work for him and of course he tested in IE7 (which is a good thing).

So googled around a bit, find out this article on jQuery Google Group:

http://groups.google.com/group/jquery-en/browse_thread/thread/af73f2b57473ffb6

So I tweak the code to:

$("[ name = 'selectFieldName' ]").attr('selectedIndex', '-1');

And it works for both FF and IE7.

Posted by felixt on November 12th, 2008

Filed under jQuery | No Comments »

Reviewing usability of computer online shops

I am in the process of building a new system to replace my 5 years old system.

I was originally planning to get all the parts from MSY, they do live up the reputation of being the cheapest in town. But one of their problems is that they don’t have a consistent level of stock, so I got my mobo and video card from MSY Ultimo today but they didn’t have CPU and RAM that I’m looking for.

I then tried my luck by going to Capitol Square, asked for a quote in one of the shop, the price was $40 more than MSY, I concluded the price in other shops would be similar so I left.

At home with the help of Staticice I went shop around in different sites.

The sites vary greatly in terms of usability and design. And I will try to give some quick review of the sites that I visited on those 2 criterias.

Shopping Square and Sky Comp are simply the best from the rest. They both have a really straight forward checkout system (I think my old company might have something to do with Shopping Square so I might be a little bit biased). And the best thing about these 2 sites is they provide shipping cost (estimate) early which I found to be extremely useful. The worst of these sites, requires me to complete the online order and then the store representative will contact me to confirm the shipping cost and finalize the purchase, way too complicated to my liking (an example of such site is IJK).

Austin Computers is not bad in terms of design, but the menu and layout are a bit confusing, navigation on top, left and right which is just too many in my opinion.

In terms of web design, these sites are just .. oh well just have a look yourselves:

Worst:

  • MSY. Those glaring giant fonts in varying colours really hurt my eyes. I understand that they are not selling their stuffs from the website and the website mainly serves to provide price list, but surely a little expense on design wouldn’t hurt.
  • Fluidtek. Same as above but with additional graphics unnecessarily slapped here and there, very long page had to scroll a lot. Again selling things online is not the main purpose of the site, but the brochure ware approach is just so.. dodgy!

 Bad:

  • IJK. Plain and boring. Feels like 1990 all over again!
  • CCPU. Again feels like 1990 design but a reasonable 1990 design.

In terms of usability, the weirdest and un-intuitive site is The PC Pro. It uses 3 panels, the main panel is the list view, when clicked it will update the detail panel on the bottom, if click add item to shopping cart, then the right panel is updated. See screenshot:

pcpro

I tried to submit an order today, but I got an error, so I contacted the customer service. I was told that my credit card has already been charged as well as notifying me that the price of the item that I purchased was actually wrong (it should be higher because of the fall in AUD recently). He kindly offered to refund my purchase due to the pricing difference (which I gladly took). So at least good customer service there.

I ended up purchasing from IT Estate as it has the best price combination for CPU and RAM (and delivery cost) that I am looking for. This site usability is ok, design can be made better but not too terrible either.

I really wish some of these companies put a little more effort on their online front. I believe even if you are not the cheapest around if you provide a good shopping experience people will buy from you or at least people will keep you as the first place to look for when they are shopping for something.

Posted by felixt on November 7th, 2008

Filed under web design | No Comments »

Blog updates

Several changes:

  • Code syntax highlighter. I have been trying out a couple of WordPress and Windows LiveWriter syntax highlighter plugins, but couldn’t get any of them to work as I wanted it. Trolling some ColdFusion blogs, I saw some of them use: SyntaxHighlighter which is a pure Javascript solution (not a WordPress plugin, so you’d need to include the js package on your WordPress template).
  • I added Social Bookmarks plugin, mainly because I want to publish some of my posts to facebook.
  • I am started to use Feedburner to manage feeds subscription to my blogs.
  • I did little CSS changes on the theme of this blog to make it readable to my own eyes, as I re-read my posts quite a lot.

I am also in the early stage of contemplating to try out several other multi blogs WordPress alternatives, as I found Lyceum has been quite slow to follow WordPress updates.

Posted by felixt on November 2nd, 2008

Filed under stuffs | No Comments »

Changing javascript event attribute on the fly

This doesn’t work in IE, in fact this was one of the problems that responsible for my staying late during the production release mentioned on the previous post.

For that particular project, we have a common user interface (UI) for both adding and editing a record. I use jQuery to change the interface depending on the mode. One of the UI elements that I need to change is the save button’s behaviour. Below is the expected behaviour:

  • In add mode, the text is "Add new multi type" and the onclick value is set to something like: addEditMultiType( ‘add’, 5 ).
  • In edit mode, the text is "Save multi type" and the onclick value is set to something like: addEditMultiType( ‘edit’, 5 ).

If I haven’t really dig jQuery, I would approach this requirement by creating 2 buttons inside 2 divs with display toggled block and hidden depending on the mode. However I was interested in trying this crazy idea, all of the event triggers (onClick, onChange, onBlur etc2)  in HTML element are in fact just attributes right? So I can in fact just create one button and use the awesome jQuery to change the button’s text and its onClick depending on the mode.

Below is an example of what I did:





 

Worked fine in Firefox, but not in IE7. It took me a long time to figure out this problem. After I figured out what the problem was, I had to go back the tried and tested solution, that is creating 2 buttons with 2 divs, perhaps not as elegant but guaranteed to work all the time. Lesson learned: don’t try to be too smart, sometimes simple solution is the best.

Posted by felixt on November 1st, 2008

Filed under jQuery | No Comments »

Staying back

Last week was quite a rough week for me. As always deadline was looming (production release on Thursday) and my estimate was off the mark. I knew my estimate was already very tight, so having unforeseen requirements came up at the last moments didn’t really help. I pulled it off, but with the cost of my personal health & time, family time, time with people from bible study (missed the Friday night bible study) and to make things worse I wasn’t that confident with the quality of my work.

On Thursday the production release day, I came in at 11am and had to work on making sure everything is ok on the production environment PLUS fixing up issues from our tester (one of the issues was a very hard to detect jQuery/Ajax issue - more on this later) PLUS  implementing this feature that wasn’t identified before. I was actually quite pissed off with this unidentified feature, because first of all I missed it myself, and second of all I have asked a group of people in the company who knows how the system work to have a look at my work and let me know if anything missing weeks before the go live date. But of course no one has time until few days before the release when they do a more thorough testing, well telling me 2 days before the release wasn’t really helpful.

The whole day was really intense, it was an endless cycle of fix one thing, breaks another thing. I negotiated with the customer manager to hold off this one particular feature until later on as I really not sure with the quality of it (I was really2 tired, my brain hurts I know for sure my coding quality will surely suffer from it). Anyway finally I sort of managed to implement it, it is full of unconventional coding that people one day will look at it, and say what the heck is this guy thinking. I put a comment goes along this line "its 11:45pm, I am really tired and want to go home, so pardon me for this mess".

I ended up leaving the office at 1am Friday, I know for some IT workers this is acceptable, but boy my body certainly didn’t think so. I felt really sick coming at home, got headache and felt like vomiting, didn’t sleep well that night. I spent most of Friday sleeping, as the light headache, the feeling nauseous and tiredness were there whole day. I guess that’s probably how hangover must feels like (never got drunk in my life, so wouldn’t know how it feels :) wondering why people would want to put themselves in such condition). I only recovered on Saturday.

The only good thing about this is, this should be the last of projects with tight deadlines for me (can’t help thinking about my teammates..). At least that’s what being promised to me. My manager offered me to be part of the solution so that projects can be more manage-able and developers are happier (I really have high respect for my manager, he’s a good manager, he has put up a lot for the team), so I guess I just have to wait and see whether things can be improved or not.

Posted by felixt on October 19th, 2008

Filed under work | Comments Off

Changing XP theme + ObjectDock

Have started following LifeHacker recently. One of the recent posts was on the 6 slick Windows themes to dress up your desktop.

Downloaded some of them but couldn’t get them to work until I found an information on one of the downloads’ README file. Apparently to install a non-microsoft XP theme you need to patched a system DLL called: UxTheme.dll, for WIndows XP SP2, the patch can be found here: UXTheme Patcher Download

After applying the patch all the themes seem to work nicely. I am currently using: Razor 2 Final, it’s very pretty.

Also from LifeHacker, found out about ObjectDock, which basically provides a Mac-like Dock. Now I am not by all means a Mac fan boy, but I’m interested in trying it out, see how my work flow will be different and the ObjectDock does look very pretty anyway. Maybe I will like it and will be sold to the whole Mac thing or maybe not. So I’ve auto-hide my task bar on the left (I have put it on left since I use these widescreen monitors), my main mean to access my apps will be via ObjectDock on the bottom of my screen.

See screenshot:

medesktop

Posted by felixt on October 6th, 2008

Filed under stuffs | 2 Comments »

Star performers

I am pleasantly surprised with the vast array of books that are now available to our RA library. Never knew they own that many books.

I’ve read parts of this interesting book: 201 Ways to Turn Any Employee Into a Star Performer by Casey Fitts Hawley

Some stuffs that I get out of the book (things that I can relate to).

Casey suggested that companies should have a (long term) development plan for employees. However there are some factors (myth) why business might shy away from this

  • Once developed, the employee will leave. Casey says, the good ones will leave anyway. But if possible moves this person to another role/position IN the company.
  • Development takes a lot of time from the manager. Casey says managers will spend a lot of time in fixing the problems anyway if there’s little development taking place. It’s better to spend time in positive management tasks she argues.

Some of the problems of great employees:

  • Move out to another job opportunity faster (higher turnover rate)
  • Burn out more easily

 

Managing Great Employees’ Turnover

Spending time and attention to your great employees will have better ROI than spending time with the problematic ones. The cost of losing great employees is astronomical. It’s a highly likely that your great employees are being constantly approached by headhunters, family, friends etc for job opportunities.

Nicholas Stern says:

Create a culture of exclusivity so people will see working for a competitor as a step down.

Managing Great Employees’ Burnout

Great employees are dependable and high performing, they continue to push and push to meet the goals set for them and their own goals. But often they do this at a cost of their personal life and health.

By the end of the year, the burn out employees will look for another position since a failure (incompentence, which might occur due to their burnout) or a half hearted effort is just not good enough for them. The problem with these star performers is sometimes they can’t bring themselves to cut back or ask help from management, hence starting afresh elsewhere is more tempting proposition.

Possible remedies:

  • Ask the great employees to think balance first, make it their responsibility to achieve this balance. Ensure employees that you are committed for them to achieve this balance. Recognize them as total person not just an employee.
  • Offer self improvement opportunities, these people are usually life long learners, they will be frustrated if they are not given opportunities to learn.
  • Offer variety or even job rotation if possible.
  • Simply ask them to design their ideal job and learn from the answer. You might be surprised of the mismatch between management perceptions and employees perceptions of what constitute ideal.

To sum up:

Invest in the great employees will offer the greatest payback in productivity, innovation and contributions.

Posted by felixt on September 24th, 2008

Filed under management, work | Comments Off

Variable assignment in loop

I had to debug something quite subtle yesterday and learned something in the process.

Spent quite some time on this problem. Perhaps if my ColdFusion fundamentals were stronger, the problem should be identified easily.

The problem was this, in a cfloop query, the code was meant to overwrite the value from the query for a given condition.

Supposed you have this query below:

image


		
			
		
FieldID FieldLabel variables.FieldLabel
#FieldID# #FieldLabel# #variables.FieldLabel#

So as you can see we are looping over a query, but for one particular condition, in this case: if the fieldLabel column called job type, we want to output something different.

The result was this table:

FieldID FieldLabel variables.FieldLabel
169 Job Type this is overwritten
170 Location this is overwritten
171 Industry Sector this is overwritten
172 Job Duration this is overwritten
173 Job Start Date this is overwritten
174 Salary this is overwritten
896 Account to use this is overwritten

The bug was, our application was reffering to FieldLabel unprefixed by the scope, as you can see from the result, it will always getting the value from the qAllActiveFields (as from scoping from a view the query scope has precedence over variables scope).

Very subtle bug, but can really be so easily avoided by doing any of the folllowing:

  • Never set variable name inside a loop as one of the column name of that query
  • Prefix correctly

Posted by felixt on September 24th, 2008

Filed under coldfusion | Comments Off

How short can you code

Still on cloud number 9 with jQuery, I thought of a new slogan for it:

jQuery - how short can you code?

Posted by felixt on September 21st, 2008

Filed under quotes, jQuery | Comments Off