Tick, Tick, Tick

Be strong,

The waves vibrate

And message delivered.

Fear abandoned,

The source is I.

Posted in Personal, Random, Talking | Leave a comment

IE 7/8 PNG-24 transparency issue

We came across an error today without drop down menu system that uses a PNG-24 semi transparent drop shadow image around the border where the transparency would appear black in IE 7 and IE 8. After searching and trying all possible fixes we found the solution to the problem and it was quite simple.

Our menu system uses jQuery (doesn’t everything these days?), and had a nice fade in and fade out transition. jQuery handles the fade transitions by setting the opacity which IE does not like very much. So using the fadeTo() functions in jQuery is a no-no in IE. The solution, use hide() and show() instead. It’s not as elegant but the transparency issue was fixed on all modern browsers.

Other solutions to the problem include:

1. Using a background colour instead of transparent on the style so you would do:

.my-transparent-stuff{background: #fff url(‘image.png’) repeat-y scroll left top;}

instead of

.my-transparent-stuff{background: transparent url(‘image.png’) repeat-y scroll left top;}

2. Using PNG-8/transparent gifs (hey, it’s a solution)

3. Forcing IE8 into IE7 mode by adding the following meta tag:

<meta http-equiv=”X-UA-Compatible” content=”IE=7″ />

I still can’t understand what Microsoft is doing!

Posted in Browsers, ColdFusion, Design, Javascript, Programming | Tagged , , , , | Leave a comment

Nandos, chicken and customer service excellence

I’m a big fan of Nandos, it’s comfort food that’s a little better on your arteries than KFC, what else could you ask for? A few weeks ago my wife as accidentally charged  twice for our meal. She only discovered this after reviewing her bank statements which happened to be a week later. She promptly called up the store and asked what had happened. They responded that they would need proof and if it was possible to fax a copy of the statement so they can investigate further. So, the next day the statement was faxed and she received a call a short time after asking how she would like to receive the refund. Since we go there every so often, my wife suggested we get a voucher that we can redeem. They agreed. On our next visit we went to the restaurant, the queue had at least 30 people in it and the wait time was 30 minutes. We decided to skip the meal but pick up the voucher and use it another time. My wife was allowed in to speak to the manager and in an instant we were given a table and ordering.

I was amazed at this entire scenario. Not many fast food companies have such excellent customer service. I rate it as excellent, not because we skipped a 30 minute queue but the fact that from top to bottom everyone was helpful. The finance department was more than accommodating to my wife’s wishes (allowing her to use the voucher instead of a refund to her credit card), the manager at the restaurant was friendly, courteous and was the one who suggested we stay and eat, and the staff at the counter was just as friendly when they were presented with the voucher. Everyone was professional, friendly and made me want to write a blog post about it!

This is what every organisation should aim for in every customer service instance. There are times when you get customers who are not so easy to deal with but a little creative thinking, friendly attitude, compassion and patience can go a long way in making your business customer friendly. And, well, every business loves customers!

Posted in General | Tagged , | Leave a comment

Memory leaks with Coldfusion 8

For the past few weeks I’ve been incognito due to some memory leak issues we’ve been having with our new app. It is essentially a rewrite of our existing web application using Object Oriented techniques and embraces the Model-View-Controller paradigm. It really is a pretty little thing but unfortunately she crumbled under the weight of the world wide web. Anyone who has faced the memory leak problem will know that it is not an easy one to crack and it takes time to determine the exact issue. There are a lot of articles around that have excellent information which were all very helpful in my quest for a solution.

The system made a lot of use of the session and application scope for caching objects which was the first issue that we had to overcome. It seemed like a good idea, you’ve got loads of memory, you have a finite amount of objects that can be called for each session why not persist them. The problem is that ColdFusion 8 seems to have an issue with complex objects (i.e. CFCs) stored in the session and application scopes. The reason I say this is that we were seeing a very, very strange thing happening to the memory on our server. When load testing was run, the server was fine, the memory steadily increased until the initial sessions began expiring and then the average of memory usage plateaued, which is what you like to see. However, once the load test ended the memory steadily increased until it crashed the CF instance. Weird right? And so the search for a solution began. I came across a few helpful articles:

http://www.ghidinelli.com/2009/07/16/finding-memory-leaks-coldfusion-jvm

http://www.schierberl.com/cfblog/index.cfm/2006/10/12/ColdFusion_memoryLeak_profiler

http://www.alagad.com/blog/post.cfm/troubleshooting-coldfusion-performance-analysis-part-ii

These were tremendously helpful in assisting me in finding the solution. The last post from Alagad was the one that helped cure my issue in the end. You need to ensure that when making copies of persistent scoped variables that they are deep copied or used in a local scope within CFC functions. However, bear in mind that there are many causes for memory leaks and you should spend the time in figuring out the exact cause of your problem. I found the MAT tool supremely useful.

Here are some tips for curing memory issues:

  1. Install cumulative hotfix 4 for ColdFusion 8.0.1 (Get it here)
  2. Update the JVM to the latest provided by Sun, in my case it was JDK 1.6.0_18 (Get it here)
  3. Add the -XX:+AggressiveHeap option to the JVM configuration (Read about it here)
  4. Set your min and max heap to the same size to reduce the number of garbage collection calls
  5. Run varscoper against your code and ensure all local variables are var scoped (Get it here)
  6. Limit the use of variables scope within objects, use the THIS reference instead
  7. Limit the number of complex objects (cfcs) being stored in SESSION and APPLICATION scopes
  8. Clear the variables scope onRequestEnd (this doesn’t really work when using Application.cfc though)
  9. Run load tests! We used WCAT for Windows (Get it here)
  10. Turn off CF monitoring use FusionReactor (or something similar) (Get FusionReactor here)

Hopefully these will help someone else going forward.

UPDATE 16/05/2010: Point #6 should be, ensure you scope your variables correctly. The THIS scope has its own set of limitations. Ensure that all variables (including loop indices) have the proper scope to avoid leakage.

Posted in ColdFusion, General, Programming, Web 2.0 | Tagged , , , | Leave a comment

Apple Tablet? So what’s the end game Steve?

So, there are more than just a few rumors about the possible Apple Tablet and why wouldn’t there be a lot of buzz around the company that has a knack of delivering products that changes paradigms? I personally don’t think there will be one. Now, to be clear, I would very much like there to be one but one question keeps coming up for me. Where will the Apple Tablet fit into the company’s product line? A lot of buzz today seems to think that Amazon’s changing of the Kindle royalty fees to publishers is some indication of the iminent arrival of the iSlate. I can’t seem to connect the dots. How will Apple benefit from developing a tablet that would directly compete with the Kindle? Reading books on the iPhone or iPod touch are just as enjoyable. There is definitely a gap in the market for a tablet device, techies have been after it for years and let’s face it, who would be better to develop one than Apple? However, what is the market segment that this fit into?

Schools – Apple’s devices have never been cheap, hence I don’t see it replacing paper notebooks in the short term.

Business – Executives could walk around with their slick tablets and look ace in the boardroom but other than that, who in the organisation would benefit from a tablet? Assistants? Would the market be big enough? I may be being very short sighted here but are there any others who would benefit?

General Consumers – Why would home users choose a tablet over a laptop or a desktop? I wouldn’t, would you? Why? How will a tablet provide a better user experience?

The iPod and iPhone were part of the master plan for creating the AppStore and iTunes which are the real cash cows for Apple. Apple is happy on the desktop and laptop fronts because if they wanted to compete head to head with Microsoft or Dell they could be churning out low cost machines with the same awesome OS X. Although, they have cornered the design, music production, video production and now developer communities with their hardware. Where will the tablet fit and how will it benefit Apple?

Forget the hardware, what is Apple planning in the long run? This is the question that everyone should be asking. I guess on January 27th 2010 we’ll all find out.

Posted in Apple, Business, Thinking | Tagged , , | Leave a comment
  • Subscribe to my feed Subscriber via Email Follow Me on Twitter! Check me out on Facebook! Check me out on LinkedIn!