Watch all of it
Fun
My favorite TED talk
Decorating Python’s sys.stdout
Try this:
class stdoutflip: def __init__(self, sys): self.stdout = sys.stdout sys.stdout = self def write(self, txt): txt = list(txt) txt.reverse() self.stdout.write(''.join(txt)) class stdoutupper: def __init__(self, sys): self.stdout = sys.stdout sys.stdout = self def write(self, txt): self.stdout.write(txt.upper())
To test it do this:
out = stdoutupper(stdoutflip(sys))
Now try printing stuff:
print "Hello Python!"
Happy Halloween
Happy Halloween, I still have to go get some treats
I have so much work too but I decided to work on Saturday too, it’s great to be a freelancer!
A PHP Competition
OK, here is the competition:
Write the shortest piece of PHP code to convert:
Lorem_ipsum_dolor_sit amet,_consectetur_adipisicing_elit
Into this:
Lorem_Ipsum_Dolor_Sit amet,_Consectetur_Adipisicing_Elit
There is no prize other than I will write a post about you ![]()
Leave a comment.
Update:
Chris wrote a perfectly working line of code for the first string I posted, but you will have to write one that will still work if there is a space in one of the words. I fixed the example.
Comparing Programming Languages
I just found this great tool and I thought I’d share it, it compares performance and memory usage in any two programming languages, it has a good list of languages too.
For example, this is the comparison between PHP and C:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=php
PHP vs Python:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=python&lang2=php
Python vs Ruby:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=python&lang2=ruby
C vs Java:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=java
And finally C vs C++:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gcc&lang2=gpp
Bill Gates in Doom
I know many of you probably know about this but here is the video for those who don’t:
http://en.wikipedia.org/wiki/Doom_(video_game)#Release_and_later_history


I'm a programmer at 