If you need a laugh or some flashbacks to long past saturday nights, watch Judson Laipply‘s dancing video.
And while you’re at it, watch this Treadmill Dance too.
In case you’re being troubled by comment spam bots, a negative captcha might be the solution.
I read about it last week. Today already, I might use it for a subscription form at work. My colleague complained about her mail box being littered with fake subscriptions. To the rescue!
Let me take a stand.
If two people love each other, unconditionally. If they want to express that love in promising each other, the world and maybe their God, to stay together and care for each other until death do them part.
Then let them.
Last weekend I finally read Steve Krug’s Don’t make me think (2nd edition). One of the few books I actually read entirely. And this one even within two days. Not only because it’s easy to read. Also because it is a fun book, with valuable content.
The first edition dates back to 2001. After encountering several references to this book as ‘a classic’, I figured I should read it.
If you’re in a profession related to publishing on the web – who isn’t these day? – than I can only recommend you to read mister Krug’s work. It provides you with some usability basics, without getting boringly scientific.
At the end of One Laptop per Childs Human Interface Guidelines / Design Fundamentals:
OLPC also hopes to encourage the children […] to explore the technology under the surface. […] a view source key has been added to the laptop keyboards, providing them with […] the code that enables the activities that they use from day to day.
[…] OLPC has written much of what can be in Python, a scripting language, to enable children to view the source code.
Their SVG page reads this notable development guideline:
Authors of OLPC content should try to use SVG wherever possible. Only use bitmaps such as JPEG or PNG where it is not possible to use SVG.
As a sidenote, their Python page pointed me to Movable Python. This product enables you to run Python programs from your USB memory stick, without installing software on the PC you’re using. Sounds like something I will be using.
“In fact, one of the saddest but most common conditions in elementary school computer labs […] is the children are being trained to use Word, Excel and PowerPoint. […] I consider that criminal, because children should be making things, communicating, exploring, sharing, not running office automation tools.”
— Nicholas Negroponte, chairman One laptop per child
In Novel software drives ‘$100 laptop’ – cnn.com
For just five interview questions, it surely ended up as a long read. Nevertheless worth the read:
The Five Essential Phone-Screen Questions — Steve Yegge
I just might translate some of his examples to Python:
Example 1: Write a function to reverse a string
def reverse(text): ....result = list(text) ....return ''.join(result[::-1])
def reverse(text): ....return text[::-1]
Example 2: Write function to compute Nth fibonacci number
def fib(n): ...."""Calculate fibonacci value for given n ....Doctests: ....>>> [fib(i) for i in xrange(0, 10) ....[0, 1, 1, 2, 3, 5, 8, 12, 21, 34, 55] ....""" ....if n
Example 3: Print out the grade-school multiplication table up to 12x12
def multiplication_table(n): ...."""Generate an n*n multiplication table ....>>> len(multiplication_table(10)) ....10 ....>>> len(multiplication_table(5)) ....5 ....""" ....# Create matrix ....table = [[x*y for x in xrange(1, n+1)] for y in xrange(1, n+1)] ....return table def print_matrix(matrix): ...."""Expects a list of lists """ ....for row in matrix: ....|...print "%4d" * len(row) % tuple(row) if __name__ == "__main__": ...."""Run actual program code """ ....print_matrix(multiplication_table(12))
Example 4: Write a function that sums up integers from a text file, one int per line
def sum_file(filename): ...."""TODO: catch exceptions """ ....fp = file(filename) ....try: ....|...numbers = [int(line.strip()) for line in fp] ....finally: ....|...fp.close() ....return sum(numbers)
Example 5: Write function to print the odd numbers from 1 to 99
def print_odds(): ....for i in xrange(0, 100, 2): ....|...print i
Example 6: Find the largest int value in an int array
def largest(sequence): ...."""Find the largest occurrence in a sequence ('array') ....>>> largest() ....0 ....>>> largest(range(100)) ....99 ....>>> largest([1, 0, -1]) ....1 ....""" ....return max(sequence)
Example 7: Format an RGB value (three 1-byte numbers) as a 6-digit hexadecimal string
def format_rgb(red, green, blue): ...."""Convert integer RGB to hex RGB string .... ....>>> format_rgb(0, 0, 0) ....'000000' ....>>> format_rgb(255, 0, 0) ....'FF0000' ....>>> format_rgb(0, 255, 0) ....'00FF00' ....>>> format_rgb(0, 0, 255) ....'0000FF' ....>>> format_rgb(255, 255, 255) ....'FFFFFF' ....""" ....return "%02X%02X%02X" % (red, green, blue)
def _test(): ...."""Run tests on functions in module """ ....import doctest ....doctest.testmod()
Please ignore points and pipes. WordPress can't handle code layout well. Python is white-space sensitive. This is the best I could come up with.
“Television is just like making a hole in the wall. All kinds of stuff comes in, on the screen, that we would never allow to come in through the door.”
— Albert Borgmann
“You shift time to the television. If you start watching television, there’s something else you’re not doing. Who knows what you were doing before?”
— Annie Lang
Via NY Times
(Somehow, for me, this time shifting seems to apply to the PC and Internet)
Peter Gutmann wrote a very long article concerning the impact of the Windows Vista “content protection” specifications. I spent the previous hour reading this article and comprehending its implications. Somehow I had hoped that MSFT had changed. Become more open. But little of that hope is left.
A Cost Analysis of Windows Vista Content Protection – Peter Gutmann
If Vista turns out to be as limiting – “costly” – for the PC user as stated, then maybe this pain will lead to more users switching to alternative OS’s. It might also drive users to alternative methods of acquiring entertainment, when their legal “premium content” doesn’t show properly or requires expensive hardware.