Herein find out how to survive a nuclear war.

Picture taken of the atomic bombing of Nagasak...
Image via Wikipedia

Michael Anissimov talks about the book, Nuclear War Survival Skills by Cresson Kearny.  Some interesting stuff in there…

Kearny points out that many casualties in a nuclear attack might be due to people running to windows in major cities, looking at the sky lit up by SLBMs, only to be killed by blades of glass when otherwise-survivable ICBMs explode.

Different kinds of sci-fi. Or, why Star Trek barely qualifies for the category.

Science fiction encompasses a huge range of different types of stories.  More than it probably should, really.

Hard science fiction is considered by many purists to be the only true scifi.  In this type of story, all the rules of science are followed, or extrapolated from what is already known.  Sometimes these stories will have a scientific element that doesn’t seem possible, but, in the end, real science drives the narrative.

Some try to draw a difference between scifi novels that feature “softer” sciences like the various social sciences, and the novels that focus on the one true science: physics.  Personally, I’d put both into the same “hard scifi” category, as they’re both based on known science.

Something you’ll come to realize after pondering the above is that the majority of people have never seen a real scifi movie or read a real scifi book.

Take, for example, the new Star Trek movie.  While the general public would classify it as a scifi movie, it has more in common with fantasy stories than science.  Off the top of my head about the only thing in it that is based on real science is the scenes where it goes to dead silence in space (and it isn’t even consistent in that regard).  Most of the rest of the technology is pure fantasy.  This holds true for almost every major scifi-categorized movie.  They’re really just action-fantasy movies.  Not that there’s anything wrong with that, but I think it does give the public a wrong idea of what much of science fiction is about.

One of my favorite hard scifi novels of all time, Rendevous with Rama, may become a movie.  With David Fincher and Morgan Freeman, it would have a good chance of being a credit to the book.  Unfortunately, there are rumors that this project may not happen.

Advice on punishing your kids.

As we have a little girl on the way, I find myself doing a lot of research into parenting methods.  While I’m sure we’re all aware of many of the failures of the “parenting advice industry”, this doesn’t mean that we should just discount all available advice.

What I like about this Slate piece is how it addresses the needs that a parent feels when their child makes them angry.

It’s difficult to work out a satisfying response to flagrant disrespect because you’re typically in the grip of at least four distinct, only partially overlapping, and often conflicting motives: an emotional urge to do something with the anger surging up inside you, a moralistic impulse to dispense justice in proportion to the offense, a social obligation to show yourself and your child and any others who might be watching that you don’t tolerate such behavior, and a practical intent to get rid of the problem so you don’t have to put up with such hassles in the future.

Something I’ve learned in my quest to learn the state-of-the-art in parenting skills is that children are different from each other.  For example:

Khamsa (Fatima's hand) used as a pendant {{es|...
Image via Wikipedia

The Evil Eye: Stare down your child with a dire expression and say nothing.

Immediate: The stare-down is likely to escalate and continue the child’s behavior, and the struggle goes on.

Personally, I can recall immediately falling in line when given the evil eye.  However, a key realization to anyone wanting to learn about … well, anything, really … is not to discount a source because one nugget of information doesn’t jive with your experience.  In this example, perhaps I was an abnormality.  Maybe the vast majority of children don’t respond to the evil eye.  Of course, that is the reason I prefer more scholarly pieces then this one from Slate.  A scholarly journal is likely to contain cites to studies that say, for example, that 77% of children don’t respond to stern looks from their caregivers.

Anyway, enough rambling.  Go read the article, parents.

I don’t get Facebook.

Facebook, Inc.
Image via Wikipedia

What is the point of having a the feed when you click the “Home” link being a different thing from the feed in your Profile?

Why do I have to click multiple places to see all these different messages? How am I supposed to know when a friend posts something new to their profile feed? Why don’t their new posts in that area appear in my feed on my Home page?

Basically, Facebook is confusingly inconsistent. Especially for new uers.

On a side note, I want an application that posts my Twitter updates to the feed on my Facebook Home page. Or I want someone to tell me why that’s a dumb idea.

A hotkey to switch between headphones and speakers. Soundswitch.

I use USB headphones. I also use regular speakers connected to my sound card. Windows makes it a multi-step process to switch from headphones to speakers.

I tired of this, so I wrote a program to rectify the situation and I called it Soundswitch because I’m a wordsmith. You can find this program here:

Available here.

[paypal-donation]

Basic Use and Installation

Unzip it to the directory of your choice.

Look in the Sound applet in control panel to see which two sound devices you want to switch between. In the following image, the two I switch between are labeled 1 and 4. Thus, in the ini file, I used 1 for Source1 and 4 for Source2.  Update:  Note that the number of items will vary based upon whether you have “Show Disabled Devices” and “Show Disconnected Devices” checked (Right click anywhere in the list to see these).  For the purposes of Sound Switch make sure both options are checked before counting the items. The screenshot below doesn’t reflect this.

sound_panel

The ini by default has the switch key assigned to Ctrl-Alt-F12. Edit this as you like.

Tested on Win7 x64 and Vista x32.   Update:  XP no longer works with the latest updates.  Use this older version for XP compatibility:  soundswitch

Any comments on this are welcome and I’ll try to fix any bugs reported.

Version 2 Notes

I’ve added a good number of features in the latest version. All accessible through the .ini file.

  • “Scroll” through each enabled item in your Sound panel.
  • Hide the tray icon
  • Switch between two speaker configurations for your current active playback device
  • Switch/scroll just the default comm device, default playback device, or both
  • Hotkey to terminate the program

[paypal-donation]

How to increase your son’s intelligence.

Fifteen-year-old males who ate fish at least once a week displayed higher cognitive skills at the age of 18 than those who it ate it less frequently, according to a study of nearly 4,000 teenagers published in the March issue of Acta Paediatrica.

Eating fish once a week was enough to increase combined, verbal and visuospatial intelligence scores by an average of six per cent, while eating fish more than once a week increased them by just under 11 per cent.

So reports Science Blog on the results of a Swedish study.

I normally just kind of glaze over on studies such as this, but really … 11 percent is quite significant!

JSON feed for Source servers

I’m kind of a statistics whore.

To further my pursuit of more statistics, I’ve developed a Python CGI which provides a JSON feed of all sorts of information about servers based on Valve’s Source engine.

This script has three dependencies outside of what is in the standard Python library:

Once you have those installed (worst-case scenario just drop them in the same directory as sourcejson.py), you need to edit sourcejson.ini.  This file just has three options: rcon_pass, ip, and port.  If you don’t have the rcon password for the server you wish to monitor just leave it blank.

To access the JSON feed just use the url to sourcejson.py.  Something like this:

http://YOUR_DOMAIN/sourcejson.py

To access the extended information that having an rcon password allows use:

http://YOUR_DOMAIN/sourcejson.py?info=extended

If you use the extended format, but haven’t provided an rcon password in sourcejson.ini, it will just default to the basic feed.

Included in the zip is a .htaccess to prevent directory listings, which will help protect the contents of sourcejson.ini.

Download sourcejson here!

Using Python 2.6 + MySQL on Windows is nearly impossible

Update:  I made progress on this issue.  See my newer post here.

If you’re interested in writing Python scripts on Windows which access MySQL databases, be sure you avoid Python 2.6.

The standard way to interact with a MySQL database via Python is to install the mysql-python package The problems arise because of several things.

  1. mysql-python still doesn’t have compiled binaries for 2.6
  2. Windows doesn’t ship with a C compiler.
  3. It’s a SOB to use any of the free C compilers to compile from source.

A couple of kind souls have provided their own compiled versions in this forum thread, but neither of the provided versions works on the two Windows machines I’ve tried them on.

I tried following the official directions to compile on windows using the “setup.py build”-method, but MinGW spits out several bajillion lines indicating the following(bolded part indicates error found over and over again):

C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt/mysqlclient.lib(./mysqlcli
ent.dir/relwithdebinfo/inftrees.obj):(.text[_inflate_table]+0x4e3): undefined re
ference to `@__security_check_cookie@4′
collect2: ld returned 1 exit status
error: command ‘gcc’ failed with exit status 1

There’s very little useful information to be found from a google search on this, so as it stands, I’m pretty much unable to use Python 2.6 + MySQL.

I really wonder why MySQL support isn’t packaged with Python.  It’s not like accessing MySQL is an unheard of operation…

You’re not in control.

And by “you’re”, I mean your conscious mind.  Robin Hanson points to the latest Nature:

Our conscious minds control less than we think.  From the latest Nature:

A person’s responses can often be explained by non-linguistic behaviours of other people and simple instincts for social display and response, without any recourse to conscious cognition. This `second channel’ of human communication acts in parallel with that based on rational thinking and verbal communication, and it is much more important in human affairs than most people like to think. …

Every day I see more evidence that points towards a simple conclusion: It requires rigorous self-examination to determine our own motives and the correct, rational response to any given problem. This rigorous self-examination is beyond what the vast majority of people are either capable of or are willing to do.

I’ll take 300 cents, please. Or, people’s brains are broken.

The New York Times points to research demonstrating the effect of big numbers on people’s ability to reason.

You would probably never sell out your friend for $5. But 500 cents? Now you’re talking!