Log in

Previous 10

Dec. 18th, 2010

Book Review: Closure - The Definitive Guide

 Google Closure is a set of libraries and tools for developing large Javascript applications with minimal errors. This book provides a comprehensive guide to the features available in the Closure products.
Chapter 2 of the book details the annotations that can be used to assist the Closure Compiler with verifying correctness of the applications.

Chapters 3 thru 9 explain the details of the Closure Libraries in detail. The Closure Libraries have extensive support of the common problems developers face while developing applications in JavaScript. The book details not only what is available in the libraries, but also why Google decided to develop the library the way they did and the problem their approach tries to solve.

The rest of the book does a deep dive into the tools provided by the Closure suite for developing applications. For example, It describes how debugging is supported with the Closure tools and using the Closure Inspector to debug Closure Compiler generated code with Firebug.

Overall, the book does an excellent job of explaining the functionality in the Closure tools and why it is necessary for developing high quality web applications. It's evident that the author is familiar with the ins and outs of both Closure and the problems it set out to solve. The book is chock full of examples to demonstrate where Closure is useful to JavaScript developers. It pointed out a surprising number of problems with naive use of Javscript constructs that are remedied with use of Closure. As such, readers of this book would benefit from a good Javascript book like JavaScript:The Definitive Guide to use as reference for the JavaScript nuances pointed out by this book.

Apr. 27th, 2006

Django and SCGI

Recently, I had a Django based app that needed to be executed under Apache. I found several problems getting it to run under mod_python (mainly because of segfaults due to library mismatch between python and other installed Apache modules). After struggling with fastcgi for a bit, I installed it with scgi.

  1. Install scgi: I'm running Apache 2 on CentOS, so I installed the apache2 module from the tarball

  2. Install flup: Flup provides a bridge between some web server protocols like fastcgi, scgi, ajp, and wsgi. Django ships with a WSGI connector.

  3. Create a script to execute the scgi listener for my app. In my case, it was as simple as
    #!/usr/bin/env python
    if __name__ == '__main__':
            from flup.server.scgi import WSGIServer
            from django.core.handlers.wsgi import WSGIHandler

  4. Execute the app with the scgi listener. I am using runit to execute services. In this case, I run the following script
    export DJANGO_SETTINGS_MODULE=myapp.settings_modpython
    exec chpst -u apache:apache python /home/fawad/code/python/flup/django_scgi.py

  5. Configure apache vhost to use this app
    <IfModule !scgi_module>
            LoadModule scgi_module modules/mod_scgi.so
    <VirtualHost *:80>
            ServerName myapp.fawad.net
            ErrorLog /tmp/myapp_errors.log
            DocumentRoot /var/empty
            SCGIMount /

And that's it. Restart the apache server and the app should be up and running.

Feb. 3rd, 2006

Free VMWare Server

According to Mike Gundeloy, VMWare Server (Renamed from VMWare ESX Server) will be free as of this Monday. Can't wait.

Jan. 23rd, 2006

ipodified software

Chris Stone (formerly the Opensource voice at Novell) has posted an op-ed piece on SDTimes about writing software for the users. We in the software industry tend to lose sight of what the end goal of our efforts should be: delivering quality products to the end user. Chris hits the nail right on the head. We tend to get too emotionally involved with the nitty gritty of the tools: Java vs. .NET, RMI vs. Web Services. Think of what impact these things have on the end user. The user doesn't really care what you do behind the scene as long as the delivered app works to spec.

Here's hoping that we can start worrying more about the end itself more than the means we use to get there.

Jan. 16th, 2006

History of BASIC and C

Billy Hollis has posted a pair of insightful articles on the histories of the BASIC and C family of languages.

1982 – It is discovered that 97% of all C routine calls are subject to buffer overrun exploits. C programmers begin to realize that initializing a variable to whatever happens to be lying around in memory is not necessarily a good idea. However, since enforcing sensible variable initialization would break 97% of all C programs in existence, nothing is done about it.

Dec. 7th, 2005

Hooking to technorati

Ignore this post. It's just fodder for technorati.

Technorati Profile

Oct. 25th, 2005

PDC '05 Contents online

Microsoft has been kind enough to post the PDC '05 presentations (videos, powerpoints, etc.). They are free for online access for six months. I know how I'm spending my afternoons for the next couple of weeks. Go and watch the presentations, tell your friends, neighbours and significant others. The site doesn't seem to work on firefox, though.

Oct. 10th, 2005

Earthquake in Pakistan. Help needed

From Sajjad's blog

It has been just over 32 hours since the earthquake struck and the death toll is still rising. The last count was over 19,000 dead and over 42,000 injured. Aftershocks had stopped after the early morning ones, but they have returned in groups of 3 or 4, separated only by minutes. There were quite a few very long ones this afternoon.

Though most of the images on TV show the single apartment block in Islamabad, virtually all the damage was done in the mountainous region north of here. There are reports of mudslides there and there isn't much aid getting through due to blocked roads and bad terrain. Last night's thunderstorm and rain didn't help either. All this would make it very difficult to get accurate casualty and death figures.

The people in the devastated areas desparately need help. Links to places where people can donate are below.
President fund, accepts paypal(credit cards)

https://remit.ublny.com/ can be used to send donations
to Mir Khalil UR
Rehman Foundation - MKRF using the following

MKRF - Pakistan Earthquake Relief Fund
A/C: 0102598-5
Branch Code: 1234
Branch Name: Al Rehman Branch
Address: I.I Chundrigar Rd.

ICNA relief can be also used to send donations.
Tax exempt id is available if donated through ICNA

Ummah Welfare Trust UK (Credit Cards)

Hidaya is also a trusted way to donate. Tax-exempt
donations can be made online.

Muslim Aid (credit cards)

Muslim Hands (Credit cards)

Jul. 15th, 2005

django framework

Last night's ChiPy meeting had a presentation by Adrian Holovaty on the django web applications framework. All I can say is: Rails ain't got nothin on django. I can't wait to start playing with it.

Jul. 12th, 2005

Link: The Game is Afoot

Link: The Game is Afoot

Commentary on marketing software projects. for geeks.

Previous 10