Log <-

Archive for the ‘fun’ Category

RSS   RSS feed for this category

Humor in Python

Most people know about this one:

>>> from this import *
"""
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
"""

But most don't know this:

>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance
</stdin>

Change blindness

This is pretty cool. Try to see if you can spot the change that occurs during the flicker (after about 1.5 seconds) in this image:

Kayak

Now try it in the same image without the flicker:

Kayak

More information in this paper

Productivity tip of the day: A Not-To-Do List

Via GeekPress

Today is the day you start your project.
Wake up. Make your coffee. Sit down. Get to work.
Now, it should be that simple. Wake up and get to work.
But there are many distractions. Mental and otherwise.
So this is NOT a to-do list. This is a not-to-do list. You don't need to check anything off, because these are things YOU ARE NOT SUPPOSED TO DO.

  • Do not check your email.
  • Do not go to nytimes.com.
  • Do not decide to organize your cd rack.
  • Do not turn on the television.
  • Do not clip your nails.
  • Do not stare at your bald spot in the mirror and begin to calculate how much time your hair has left.
  • Do not start catching up on the DVDs that have arrived from Netflix.
  • Do not update your Netflix queue.
  • Do not Google all your Exes.
  • Do not Google yourself.
  • Do not dust the house.
  • Do not sweep the floors.
  • Do not take out the trash.
  • Do not get sucked into the argument when your significant other starts screaming about the fact that you drank the last of the milk and even though you said you would get more you didn't. Just apologize, apologize, and then apologize again. (But don't be tempted to apologize "for being such a horrible person" — that is a sign that you are getting drawn into a bigger dust-up. Stay on target with your apology, explain that you have serious work to do, and get back to your project.)
  • Do not decide to make yourself an elaborate lunch.
  • Do not take a nap.
  • Do not change the cat litter.
  • Do not decide to figure out the calorie count of your recent meals.
  • Do not pay your bills.
  • Do not balance your checkbook.
  • Do not freak out that you have no money.
  • Do not go into the bathroom and give your Academy Award acceptance speech.
  • Do not put on Prince and party like it's 1999. (Well, okay, maybe ONCE, just to get you fired up about your project.)
  • Do not start going through your closet.
  • Do not decide to floss.
  • Do not organize your spice rack.
  • Do not update your address book.
  • Do not make a list of things to do.
  • Do not watch Oprah.
  • Do not listen to NPR.
  • Do not start to think you don't have what it takes to actually do your project.
  • Do not read any further on this post — caught you! Stop reading now and get to work on your project.
  • Do not check what time the movie is playing later.
  • Do not decide to send an angry email to that annoying friend who recently pissed you off.
  • Do not play with the cats.
  • Do not clip your nose hairs.
  • Do not start trying to organize a dinner party.
  • Do not start wondering if that mole that seems a little bigger than the last time you checked it might be skin cancer.
  • Do not start going through all the papers on your desk.
  • Do not make a list of all the things you have to get done at work.
  • Do not start thinking you are never going to finish.
  • Do not make a quick run to the grocery store.
  • Do not search for gray hairs.
  • Do not start fantasizing about sex.
  • Do not decide to make a call to your significant other to tell him or her that you don't think you've been getting any, and that you better damn well get some tonight (you know, because that one works every time).
  • Do not go to IMDB to see who that actor was in that movie you saw the other night. Or what that girl from that show from way back when is doing now.
  • Do not start perusing your own bookshelves.
  • Do not organize your computer files.
  • Do not clean out your inbox.
  • Do not click into the online gossip sites.
  • Do not pick your nose.
  • Do not start reading old letters from old flames.
  • Do not crack open a beer.
  • Do not pluck your eyebrows.
  • Do not to give yourself a facial.
  • Do not start going through your photos.
  • Do not return your phone calls.
  • Do not start reading your old journal entries.
  • Do not start thinking about how your project is lame.
  • Do not scrub the tub.
  • Do not clean the toilet.
  • Do not open a bottle of wine.
  • Do not start wading through all the magazines you subscribe to but never read.
  • Do not decide to start a screenplay (unless, of course, that is your project).
  • Do not post to your blog.
  • Do not pull the ATM receipts out of your wallet and start entering withdrawals into your checkbook.
  • Do not get up and keep getting yourself a glass of water.
  • Do not refill the ice trays.
  • Do not do the dishes.
  • Do not start picking off the wax on your candle holders.
  • Do not start worrying about all the time you've already wasted.

There are a million more things that could be on this list, but remember, it's not a to-do list, so it doesn't matter if something is missing — you are NOT supposed to be doing these things. Just get to work on your project.
I'm gonna go back to work on my project now. See ya.

Yarrrr!

Laddies! It be talk-like-a-pirate-day today! Arrrr! Shiver me timbers.

The King and the toaster

The King and the Toaster

Once upon a time, in a kingdom not far from here, the king summoned two of his advisors for a test. He showed them both a shiny metal box with two slots in the top, a control knob, and a lever. "What do you think this is?" he asked. One advisor, an engineer, answered first. "It is a toaster," he said. The king asked, "How would you design an embedded computer for it?"

The engineer replied, "Using a four-bit microcontroller, I would write a simple program that reads the darkness knob and quantifies its position to one of 16 shades of darkness, from snow white to coal black. The program would use that darkness level as the index to a 16-element table of initial timer values. Then it would turn on the heating elements and start the timer with the initial value selected from the table. At the end of the time delay, it would turn off the heat and pop up the toast. Come back next week, and I'll show you a working prototype."

The second advisor, a computer scientist, immediately recognized the danger of such short-sighted thinking. He said, "Toasters don't just turn bread into toast, they are also used to warm frozen waffles. What you see before you is really a breakfast food cooker. As the subjects of your kingdom become more sophisticated, they will demand more capabilities. They will need a breakfast food cooker that can also cook sausage, fry bacon, and make scrambled eggs. A toaster that only makes toast will soon be obsolete. If we don't look to the future, we will have to completely redesign the toaster in just a few years."

"With this in mind, we can formulate a more intelligent solution to the problem. First, create a class of breakfast foods and specialize this class into subclasses: grains, pork, and poultry. The specialization process should be repeated with grains divided into toast, muffins, pancakes, and waffles; pork divided into sausage, links, and bacon; and poultry divided into scrambled eggs, hard-boiled eggs, poached eggs, fried eggs, and various omelet classes."

"The ham and cheese omelet class is worth special attention because it must inherit characteristics from the pork, dairy, and poultry classes. Thus, we see that the problem cannot be properly solved without multiple inheritance. At run time, the program must create the proper object and send a message to the object that says, Cook yourself. The semantics of this message depend, of course, on the kind of object, so they have a different meaning to a piece of toast than to scrambled eggs."

"Reviewing the process so far, we see that the analysis phase has revealed that the primary requirement is to cook any kind of breakfast food. In the design phase, we have discovered some derived requirements. Specifically, we need an object-oriented language with multiple inheritance. Of course, users don't want the eggs to get cold while the bacon is frying, so concurrent processing is required, too."

"We must not forget the user interface. The lever that lowers the food lacks versatility, and the darkness knob is confusing. Users won't buy the product unless it has a user-friendly, graphical interface. When the breakfast cooker is plugged in, users should see a cowboy boot on the screen. Users click on it, and the message Booting UNIX v. 8.3 appears on the screen. (UNIX 8.3 should be out by the time the product gets to the market.) Users can pull down a menu and click on the foods they want to cook."

"Having made the wise decision of specifying the software first in the design phase, all that remains is to pick an adequate hardware platform for the implementation phase. A Pentium-90 with 32MB of memory, a 1G hard disk, and a Super-VGA monitor should be sufficient. If you select a multitasking, object-oriented language that supports multiple inheritance and has a built-in GUI, writing the program will be a snap. (Imagine the difficulty we would have had if we had foolishly allowed a hardware-first design strategy to lock us into a four-bit microcontroller!)."

The king wisely had the computer scientist beheaded, and they all lived happily ever after.

From: this comment at this story on slashdot

Optical illusion

I'm normally not too impressed with optical illusions, but this one's pretty cool.

The cool thing here is how the magenta spots disappear when you stare focus on the cross in the center and all you see is a moving green spot. I'm not sure how it works, but it seems to me the brain is filtering out the magenta spots because it believes they are nothing more than overexposed spots on the retina. Fascinating. Who knows what kind of things our brains filter out without us knowing it?

Via J-walk blog

I'm Debugging…

The Corrupt Stack Frame picks up a +6 SegFault.
The Corrupt Stack Frame wields a +6 SegFault!
What do you want to wield? [- a or ?*]a
a - a blessed +3 debugger called GDB (weapon in hand).
You miss the Corrupt Stack Frame.
You miss the Corrupt Stack Frame.
The Corrupt Stack Frame hits! The Corrupt Stack Frame hits! --more--
The Corrupt Stack Frame hits! Your debugger seems less effective!
You miss the Corrupt Stack Frame.
You kill the Corrupt Stack Frame!

Whoot! cvs commit

But wait... --more--
The Corrupt Stack Frame's medallion begins to glow!
The Corrupt Stack Frame looks much better!  The medallion crumbles to dust!--More--
The Corrupt Stack Frame hits! The Corrupt Stack Frame hits! --more--
Your debugger seems less effective! --more--
The Corrupt Stack Frame spreads to your other code!--more--
The Corrupt Stack Frame hits!--more--
You die...--more--
Do you want your possessions identified? [ynq] (n)y

d - A repository full of broken code.

I'm debuggin ListPatron :)

IRC Idle RPG

I have joined in the online IRC Idle RPG game on #nethack-idlerpg (Freenode), in seek of fame, fortune, high levels and extraordinary ammounts of idle time. I'm kind of chatty, so this might become a problem.

The goal of the game? To be idle. Yes, that's right, idle. Do not speak a word. Do not disconnect, do not /quit, /nick, etc. You're not supposed to do anything! All is controlled by the RNG (Random Number God). Of course, people playing nethack knew al along that absolutely everything is in control of the RNG, so this is nothing new to them.

Here are my player statistics and my position on the world map.

This is the most useless thing ever! I like.

Perry Bible Fellowship

Cool online strip

Tits!

Check out these nice tits: www.nice-tits.org.

(Suitable for work, trust me. Otherwise I wouldn't post it)

Thanks for the link, Flunk!