The Social Geek A never ending story of a never stopping idiot!

27Nov/090

JQueryUI Date Picker Widget IE Jerk

I was having trouble showing the JQueryUI's DatePicker widget properly in IE while working on one of the projects. I kinda got frustrated as the datepicker was not animating properly and then once we selected the date, it got a jerk once selected, which was not really liked by the client. So I got hit by the idea of HTML doctype declaration - as IE (and other browsers) affect the rendering of the elements a lot when using different doctypes. These are famously known as "browser modes", those that I recall are 'standards mode' and one called 'quirks mode' but anyways... enough theory, let's talk about the solution:

I had a doctype similar to the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

I changed it to that of the official URL of the demo:

<!DOCTYPE HTML>

And once I did that, it started rocking in IE ;) and the client was happy ;)

25Jun/092

Effective Software and Team Work

The following paragraph is a book excerpt taken from the really cool C++ in Action by Bartosz Milewski and I think I like what he says :-)

"There is a popular unflattering stereotype of a programmer as a socially challenged nerd. Somebody who would work alone at night, subsist on Twinkies, avoid direct eye contact and care very little about personal hygiene. I've known programmers like that, and I'm sure there are still some around. However most of the specimens of this old culture are becoming extinct, and for a good reason. Progress in hardware and software makes it impossible to produce any reasonably useful and reliable program while working in isolation. Teamwork is the essential part of software development."

I have to say, Milewski's book is one of the rare few books that are actually free from any marketing deep shit and feels very much like a friendly and common sense conversation between the author and the reader. Most books go through extensive editing I believe (to try and make it more sellable and pricey, which is rhetorical), but this one's not and I love it for that reason! Go read it and have a good doze of fun and knowledge! ;)

18Mar/091

phpize: not found

I was installing xdebug in Linux and I had PHP setup nicely with pear. While onto it I got this error that you see in my post's title. So I figured after a little research that php5-dev is needed (which is the devel package for php5) to go forward with my journey of installing xdebug.

So, I did this in my console:

sudo aptitude install php5-dev

of course, you need to change the above to your particular version of php. The php-dev package lets you compile dynamic extensions to PHP, in our case XDebug.

Once I was done with that, I simply asked the console to execute this command:

sudo pecl install xdebug

and wooh, it works! ;)

18Mar/090

Ubuntu boots into BusyBox instead of starting up normally

If that happened to you, don't panic. I'm using Wubi i.e. the Windows based Installer for Ubuntu 8.04

Whenever you get this kind of an error on startup, just reboot your computer (using the reboot command in busybox or) by hitting ctrl+alt+delete and boot into Windows. Once you have booted into Windows, just do a little disk check on your Ubuntu drive for errors. After making sure it's clean, just shut down Windows and then load Ubuntu and this time it should boot normally.

20Feb/0921

Zend is going the Wrong Way I think

Zend, the so called PHP Company is heading towards an unfriendly, commercial direction which I don't like. I mean, PHP was supposed to be an open source project, I see more focus from Zend on marketing and selling their commercial development tools, certifications and training kits, and less towards creating a free ecosystem that helps in making PHP a more accessible platform for everyone.

I am aware of the fact that the Zend guys have to find some way of making money, but really, you can't place a gun on an open source app and pull the trigger. Apart from that, I am pretty sure that people behind Zend are smart enough to make money off some other thing instead of claiming to be THE company for PHP - folks, PHP is an open product, Zend's offerings are NOT, which is no spirit lifter for me.

Today, I received an email from Zend telling me that they've launched this 'Zend Application Server Beta' that is another of Zend's commercial products with a limited feature Community Edition. When I read the FAQs, my conviction was re-enforced that Zend is indeed now a commercial company with marketing people who care less to do something meaningful and more on increasing the sales count of their average products.

Here is one FAQ that I'm posting for your sake of wanting to have a little laugh:

Q: How is Zend Server Community Edition (CE) different from xampp?
The most fundamental difference is that Zend Server CE was designed from the ground up to run in production, and is supported by Zend, the PHP Company.
Additionally, Zend Server CE provides an all-in-one installer that deploys a certified PHP distribution, Zend Framework, and integrates fully with Apache and IIS;  Zend Server CE also provides an integrated Web administration console.

And another one here:

Q: What are the differences between Zend Server and Zend Server Community Edition (CE)?
Zend Server Community Edition (CE) is a free, complete Web application server that is ideal for developing and running non-critical applications, while Zend Server is ideal for business-critical applications that require high levels of reliability, performance and security. Learn more about the differences between Zend Server editions.

See the contradiction? In one of the answers, they say that the community edition is just a thing for running non-critical applications and in the other FAQ, while comparing it with the excellent XAMPP, they say the Zend Server community edition 'was designed from the ground up to run in production'. I think, for any reasonable business, any application running in production is critical, Zend thinks otherwise.

The Zend Community Edition is not even open source, so you do not have the source code with you.

Zend products like the once powerful Zend Studio, is now an Eclipse-based bloat - I get the feeling they moved to Eclipse to reduce development efforts and spend more capital on marketing :D I know I'm kinda little over the top on this point, but why did they moved to the stupid and unfriendly Eclipse platform - atleast I don't like Eclipse, and I know many people who dont like it either, so just in case you are an eclipse lover, kindly ignore this point ;)

Then there is this Zend Core and Zend Platform, which are full of marketing claims - please people, Server administrators can get those things easily with the open source PHP for free.

And I wouldn't want to miss the Zend Framework. Given the press coverage the framework has received, I think the framework could've done better. It has a sloppy quickstart, and a lot many people do not like the documentation that it has - nothing cool for someone who is just starting out with the Zend Framework. So the only reasonable way to learn the better way is to purchase Zend's training products. Plus, the Zend Framework is slow - and I really mean slow. if you don't trust me, look at what Rasmus Lerdorf, the father of PHP has to say in this DrupalCon 2008 keynote (presentation slides can be found here).

I think Zend has lost the open source spirit, which is bad for the PHP community. Zend should be looking to do good to the community instead of doing good to themselves by trying to sell their stuff, or perhaps they should find a better job or maybe rethink about themselves being 'the PHP company'.

Sorry about the rants, I like Zeev and Andy, but I just don't like the direction their company is going into.

4Aug/080

Netbeans PHP Integration – I’m impressed

We often keep hearing about some PHP integration at some level or the other in all the major open source IDEs. But frankly, none of them seemed much useful to me. I somehow never liked PDT from Eclipse (and for some reason I don't like Eclipse at all :S). Now the latest milestone release of Netbeans has a cool addition: PHP Integration that really kicks! Just to mention a few highlights: great intellisense for both the builtin library functions as well as our own, full support for class browsing and intellisense for object oriented PHP as well, integrated debugger, live error checking and much much more. Do check out if you are a PHP developer! You might no longer need the expensive Zend studio to have a smooooth PHP development experience.

4Jul/082

Rasmus Lerdorf on PHP: A note to language purists

Whenever I read Rasmus Lerdorf, I feel amazingly blessed for that particular time of the day. This man is a true gentleman. I would assume you'd be pretty amazed when I call a geek a gentleman but he truly is. Lerdorf's writings are so very different and better from all the other "php experts" in terms of pleasure that one avails when reading.

I, for one, had lately become a language purist complaining why PHP doesn't have a much more organized structure for some of the things. And in this article, Rusmus seems to have read my mind. He answers those questions beautifully and emphasizes that PHP was never meant to be the Goddes of beautiful code structure, it was just a mistress that solved the Web problem.

Here is an extract from article that would make the point clear:

"What it all boils down to is that PHP was never meant to win any beauty contests. It wasn't designed to introduce any new revolutionary programming paradigms. It was designed to solve a single problem: the Web problem. That problem can get quite ugly, and sometimes you need an ugly tool to solve your ugly problem. Although a pretty tool may, in fact, be able to solve the problem as well, chances are that an ugly PHP solution can be implemented much quicker and with many fewer resources. That generally sums up PHP's stubborn function-over-form approach throughout the years."

Here is the link to the article:

http://www.oracle.com/technology/pub/articles/php_experts/rasmus_php.html

The interesting thing to note is that he answered this very question of mine about the lack of formalized structure to some of the things in PHP quite a while ago (somewhere in 2004 to be precise). A genius isn't a genius for no reason and mashaAllah Rasmus is definitely one of them. Looking at the amount of stuff he has written, it seems to me that he is not much of a talker, which reminds me of the line I once read in the beautiful PHP Manual: Those who talk don't know and those who know don't talk!

26Jun/082

February 1976: “An open letter to hobbyists”

This was first published in the Homebrew Computer Club Newsletter in response to the actions of some within the hobbyist tech community at that time - where hobbyists distributed copies of Microsoft software free of charge in the club meetings without paying Microsoft anything. Bill Gates wrote this open letter to the community to make them realize how it is hurting software innovation. Interesting read.

2Apr/080

YUI saved the day!

Yahoo User Interface (YUI) Library is really a wonderful package to have. It's free and amazingly useful and powerful. Today was one of those days when I was stuck at something, some spooky little thing that just wasn't coming up right. Here comes YUI, I scanned through the wonderful YUI developers site and found the right component for my use.

Yahoo has some excellent people working for it and tools like YUI are, well no surprise given the amount of talent this company has inside.

Thanks Yahoo, your awesome library made me happy today :)

24Feb/082

RIB Mosaic – Just luv ya so much!

I am going through my Computer Graphics course project these days and our instructor has asked us to use Renderman as the rendering tool for our animation. I am using Blender 3d for all my work in this project. But Blender does not come with a RIB Exporter by default. I looked around the Internet for a decent RIB Export python plugin but was not able to find something that worked with the latest Blender release.

Then I (luckily) came to know about this tool called RIB Mosaic, and I was blessed with amazing convenience. It works with the standard python modules that come with Blender (that means no additional python setup required) and it's just the matter of putting the python (.py) file in the scripts folder. The only thing you need is a Renderman compliant renderer which can be Pixie or 3Delight or Aqsis or even PRMan if you got enough cash ;)

I did a few test renders of my work and I must say I am so relieved now that I've found this easy to use tool which can export stills as well as animated ribs woohoo!

As an additional candybar, I'd like to share a link that I came across today related to computer animation. All the Industry gurus (such as Catmull and others) from the animation industry talk about how it all started. Here is the link:

http://www.computerhistory.org/events/index.php?id=1114720561