Friday, December 29, 2006

A Quick Teaser

Each child in a family has at least 5 brothers and 4 sisters. What is the smallest number of children the family might have?

Delicious is hiring

Yes, that is the news.

I happened to visit the delicious blog (http://blog.del.icio.us)and while surfing came across an article with heading help wanted only to realise that they are hiring and here's what was written in that article

It's hiring season again at del.icio.us, and we're looking to bring a few more engineers on board at our cushy Santa Clara offices. If you are a PHP god, javascript hacker, a database wizard, a UI guru, or a uber C++ ninja, let us know. As the team is so small, entrepreneurial spirit and willingness to learn new things are also a requirement. Finally, enthusiasm for del.icio.us is a BIG plus, as we're a small team where everyone has a voice and the chance to affect the direction of the product.


Perks are vast and too numerous to spell out here, but include a team t-shirt, a formidable supply of stickers and bookmarks, infinite coffee, and the opportunity to learn a lot, have fun, drink infinite coffee, and change the world

refer to:
http://blog.del.icio.us/blog/2006/11/help_wanted.html
for details

Books on Entrepreneurship

Here's a list of books on Entrepreneurship compiled for your reference.

* The High-Performance Entrepreneur by Subroto Bagchi
* The Art of the Start by Guy Kawasaki
* Zero to One Million by Ryan P. M. Allis
* Zero to IPO by David Smith
* Rich Dad's Guide to Investing by Robert Kiyosaki
* New Venture Creation by Jeffrey Timmons
* Good to Great by Jim Collins
* The E-Myth by Michael Gerber
* The Young Entrepreneurs'Edge by Jennifer Kushnell
* The Young Entrepreneur's Guide to Starting and Running a Business by Steve Mariotti
* The Portable MBA in Entrepreneurship by William D. Bygrave
* Innovation and Entrepreneurship by Peter Drucker
* Good to Great by Jim Collins
* At Work with Thomas Edison by Blain McCormick
* Multiple Streams of Income by Robert G. Allen
* On Entrepreneurship by Harvard Business Review
* Entrepreneurship.com by Tim Burns
* Fire in the Belly - an exploration of the entrepreneurial spirit by Yanky Fachler
* Rich Dad Poor Dad by Robert Kiyosaki

Hope they'll do some value addition

Thursday, December 28, 2006

Wednesday, December 27, 2006

Print methods and doc strings @ Python

def info(object, spacing=10, collapse=1):
"""
Takes module, class, list, dictionary, or string."""
methodList =[method for method in dir(object) if callable(getattr(object, method))]
processFunc =collapse and (lambda s: " ".join(s.split())) or (lambda s:s)
print "\n".join(["%s=%s" % (method.ljust(spacing),processFunc(str(getattr(object, method).__doc__)))
for method in methodList])
if __name__=="__main__":
print info.__doc__

Tuesday, December 26, 2006

Sum of elements of array @ Python

array = input('Enter the array')
sum = 0
for i in array:
sum = sum + i
print "sum of elements of array is", sum

StringComparison @ Python

a = raw_input('Enter first String')
b = raw_input('Enter second String')

l1 = len(a)
l2 = len(b)

if (l1==l2):
for i in range(l1):
if (a[i]==b[i]):
l1 = l1-1
if(l1==0):
print "Same"
else:
print "Different"
break

else:
print "Different"

Monday, December 25, 2006

PHP vs ASP

Speed
PHP is faster and more stable than ASP. ASP is built on a COM-based architecture so when ever a programme tries to connect to a database or file he calls a COM object. When that COM object tries to access the file system it calls up yet another COM object. All these COM overheads add up and slows things down.

In PHP modules, everything runs in PHP's memory space. This means that PHP code will run faster because there is no overhead of communicating with different COM objects in different processes. In this case too, ASP is slower and more memory intensive than PHP's model because each ASP language compiler runs in its own process.

Price
PHP installations are far cheaper to install than ASP installations. PHP runs great on Linux which is free, on the other hand ASP runs on the IIS Server (Internet Information Server) which need's Windows N.T/2000/XP, any of which costs a lot, especially when compared to the price of PHP, nothing.

Apart from that ASP mostly uses MS-SQL Server as the back end which again is expensive, Where as PHP programmes mostly use MySQL which is FREE!


Extras

With ASP, if you need to upload files, then you need a third party component ASPuplod, if you want to send mail or encrypt passwords you need another component and so on. Each of these components has to be bought.

In PHP, if you want to FTP, encrypt passwords in MD5, or send email from a web page, you do not need any extra components as they are all built-in, which is, incidentally, another speed increase. Because everything is built-in, there is no extra layer of COM objects and access to email, for example, is faster than in ASP. Since PHP is Open-Source there are lots of plug-ins and lots of sample code.

Platform Support
PHP runs on Mac OS X, Windows, Win NT, Linux, Solaris, Unix, BSD etc.
ASP runs on Windows, under MicrosoftÕs IIS server, but there are a couple of projects that allow ASP to run on other platforms and servers but guess what, most of them cost money.