Understanding Delete in JavaScript

Really enjoyed reading this elaborate article explaining what can / cannot be deleted in JavaScript.

http://perfectionkills.com/understanding-delete/

 

Posted in Web Related | Tagged | Leave a comment

Looking for the Purple Cow

What keeps the love alive?
Same thing that change the tides
Something called love
Something called strength
Something called love
Something called motivation

If you’ve read Seth Godin’s book “Purple Cow”, you’d appreciate and fully understand the rate of change and the stakes in survival for businesses. The skinny of it is that whatever is novel or was novel will no longer be as attractive as before due to consumer familiarity. A cow which would be a thing to appreciate for a city boy who has never seen a cow before, will not initiate the same kind of excitement after he drives pass the country side and sees hundreds of cows in the course of a few hours…. Unless there is suddenly a purple cow.

Change is not only the constant, it is also the prerequisite for attention-grabbing. Everything stagnant will draw an expiry date fast.

I think it is insane that so much money is spent on marketeers using old marketing methods without any original content. How annoying are the Harvery Norman advertisements on TV… or GoodGuys……. it is simply turning people off from the TV medium in general. I’m fucking going for the mute button or reducing volume in a frenzy once I see shoes being thrown around in a TV advert… or ‘good guys’ screaming discounts and offers at my face. It is not surprising that the now and future is already spent more online than on TV.

Just last year, 135 million viewers watched 32 billion online videos in January.
This year, internet video streaming company Netflix dominates by grabbing 30% of downstream Internet traffic during peak times in the US.

How many handsomely paid (insert-fancy-title) managers can we replace with creatives (art direction) and content producers?

Posted in Random | Tagged , , , | Leave a comment

Bagging the lot – Design, UI Development, Customised CMS

With jQuery, KnockOutJS and CMSFromScratch, web development has gotten a whole lot easier.

Looking forward to creating highly customised content managed websites from design right till finish w/o any need for back-end coding.

Uber cool!!!

Posted in Web Related | Tagged , , , | Leave a comment

Disable jump to top of page for Form submit

Short entry for UI improvement:

In really long forms, or in a page with multiple forms, I really don’t want the page scroll jumping to the top when I click on the submit button.

A quick fix for this:
< script >window.scrollTo = function () { }< /script >

For really long pages with multiple submit/update/save sections, also make sure validation summary (if being used) for each submit on the page is within the user scroll-position view after the user clicks on the submit button if the above method is used to disable scrollTo.

In addition to the decision to disable scrollTo (top of page) for really long forms after clicking the submit button (at the bottom of the page), update panels can also be used to prevent the entire page from reloading.

Posted in Web Related | Tagged , , , , | Leave a comment

LinkButton Control for Forms

I always use the LinkButton control for form submit buttons, because it renders into an anchor tags (< a />) which can be styled perfectly across browsers as opposed to the < input > tag rendered by the < asp:button > control.

There is one issue that comes about from the LinkButton. For forms, I always want a default button to be clicked when I press enter, and that is made possible by the “DefaultButton” property on the panel in which the form sits. This attribute works for IE but not for FF (blame the ASP.NET JavaScript library), detailed explanation found here.

The work around is not difficult, simple create a custom control in App_Code folder based off the LinkButton, but one that does have the right cross browser JavaScript event to handle cross browser click event.

Posted in Web Related | Tagged , , , | Leave a comment

Singaporeans time to vote

Why don’t you love me?
Tell me, baby, why don’t you love me
When I make me so damn easy to love?

Can’t help getting a bit thrilled with the buzz going on in Singapore even though I’m in Sydney, Australia. Election day is coming, that’s why! Continue reading

Posted in Random | Tagged , , | Leave a comment

What the Americans think about British accents

Posted in Random | Leave a comment

Installing SproutCore on Windows

Came across SproutCore, after seeing a tweet from Addy Osmani mentioning his in-progress work on the company’s blog design. Also read this thoughful article about SproutCore, and decided to try to learn this around other commitments.

First post on installation. Noob beginnings… baby on a teet. Not sure if all the below steps are the fastest way to install, but here is what I did. (Before this, I was not even familiar to terms “gem” or “Ruby gem”, so reading the SproutCore wiki initially felt like walking into a wall)

Installed Ruby 1.8.7, which my colleague mentioned was the most stable version.

After installing Ruby, I installed the Ruby development kit in a seperate “DevKit” folder on my main drive, by carefully following the instructions on the dev kit wiki and ensuring my existing Ruby 1.8.7 is successfully enhanced. Not having the dev kit threw an error during SproutCore Gem installation.

I also installed Gem through the zip file on rubygems.org, I could then continue with the instructions on SproutCore wiki to install SproutCore through it’s gem. (Finding out and adding the company’s proxy was an important step)

Followed the steps as per the Get Started guide to test:

- type “sc-init hello_world” in promptĀ (creating the application called hello world, this will create a hello_world folder @ your command prompt location)

- cd into the hello_world folder

- type “sc-server” to run the application in http://localhost:4020/hello_world

Done!

Update:
SproutCore vs jQuery + Backbone.js – Some interesting and substantial negative comments here, which made me re-think using SproutCore for the “inflexibility in interface design patterns” as a front-end developer. This comment posted recently in Jan 19, 2011 from the post was also of concern:

“I did 6 months developing a Sproutcore based app ending a couple months ago. I learned a lot and it definitely made me think about javascript differently. That said I’d recommend against it based on my experience. It’s an awesome idea, and hopefully one day will fully deliver, but the project isn’t sufficiently mature yet. We regularly ran up against edge cases that required us to spend time fixing Sproutcore rather than fixing our own code.”

At the end of the day, my consolation was getting past the installation and a few tutorials… and understanding to a small degree how SproutCore is meant to work. I’m still very much biased towards custom, light-weight, re-useable UI handcrafted with html/jQuery/CSS.

Posted in Web Related | Tagged , | Leave a comment

CSS Cross-browser Support Reference

Was in the mood for geeky front-end developer updates… so here is a quick reference to some CSS that may be useful / remotely useful for design as of now (IE7-9, FF, Opera, Chome, Safari). Personally don’t see a % chance of me wanting to use background scaling, or text-shadows… so I’ve left those out. Continue reading

Posted in Web Related | Tagged , , , , , , , | Leave a comment

When to Shut Up and When to Speak Up

Stop the talking baby

Or I start walking baby

Is that all there is

- Black Eye Peas, Shut Up

I had a shut-up-or-speak-up moment recently, and I foresee there will probably be more of such moments. It might be a good time to have a think and consider if there are indeed good principles or guidelines in deciding when to shut up or speak up. Continue reading

Posted in Random | Leave a comment