Some JavaScript practices

  • It is best to declare variables in one statement, i.e. use the single var pattern.
  • Avoid eval. Use $.parseJSON().
  • Pass arguments as objects rather than individual variables
  • Take care to structure your function body properly, or else you’ll fall prey to hoisting. Declaring local variables anywhere with a function body would automatically hoist them to the top.
  • Make use of the memoization pattern to reduce re-computation. I found it very useful when working with d3.js
  • You need not use document.ready if you’re including your scripts at the bottom already.

More to come…

Go need not be a better Erlang

A lot of Go enthusiasts are saying that Go is a better Erlang, all the while only pointing out Erlang’s flaws.

They’d be better off by learning from Erlang’s Actor model and shared-nothing architecture.

In Erlang, a faulty process wouldn’t take down the entire program with it.

Erlang has already cracked the C10k challenge with aplomb.

I would say that if you’ve decided to do something in Go, better do it in Erlang.

You’ll benefit from the decades of in-the-trenches experience from Erlang’s caretakers. Erlang has a better chance of providing you with the required libraries that support your goals. OTP would be a delight to use.

Erlang is a wonderful language, and it is often labelled as the the wisest language around.

Dribbble worthy web apps

Lets face it – Dribbble makes you cry.

The luscious designs really make you think whether optimising your algorithms is the right way for better (and quicker) way to achieve UX goodness.

However, I’m yet to come across any web app that actually uses such amazing UI skins.

I leads me to believe that most of the designs are watered down by the time the app goes into production.

Have you seen any app with dribbble worthy UI ?

IntelliJ with Tomcat 7

For the easiest take off, just download Tomcat 7 from Apache’s site, and include it in IntelliJ IDEA’s config. This way you’ll get all the /bin and /conf directories for IntelliJ.

While apt-get does install Tomcat 7 very well, IntelliJ has a problem accessing the /conf directory from this type of installation.

Isobel Campbell – Amorino.m4v – YouTube

http://www.youtube.com/watch?v=92a7mTNBqJI

php – Is Symfony a good framework to learn? – Stack Overflow

http://stackoverflow.com/questions/133701/is-symfony-a-good-framework-to-learn

Life Of PI – Official Trailer 2 [HD] – YouTube

http://www.youtube.com/watch?v=ehh2opH7LwE&feature=g-all-u

A List Apart: Articles: Product Management for the Web

http://www.alistapart.com/articles/product-management-for-the-web/

How to configure Symfony 2.0 on Ubuntu Server 2011.4 | Joel Verhagen

http://www.joelverhagen.com/blog/2011/05/how-to-configure-symfony-2-0-on-ubuntu-server-2011-4/

Wikipedia sometimes enforces stupid rules

I’ve often been at the recieving end of the Wikipedia gaurdians when they apply their arcane rules.

“Advertorial content”, “non-encyclopedic tone of writing”, deleted articles protected from being revived again.. the list goes on.

Alan Kay thinks so too!

In an interview he recently had with Dr. Dobbs, he pointed out that the “internet is a piece of art, while the web is a mess”. And then he pointed to this article on the Logo programming language.

Good one.