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!

UFO rants are fun.

Three people enjoy the summer sky over the Del...
Image via Wikipedia

Since I enjoy rants against those holding beliefs with no basis in reality, I enjoyed this little post on Skeptic Blog.

I had to laugh when I read fellow Skeptologist Brian Dunning’s article about the UFO True Believerâ„¢ Stan Friedman hating him. What an elite club! Friedman is no fan of me, either. A few years ago I wrote an article for Sky and Telescope magazine about UFOs, basically making the same claim I made here last week: if all these UFO sightings we hear about were real, the majority of them would be seen by amateur astronomers.

Friedman took exception to that (shocker, I know). In his internet newsletter (subscription required), he said: “Plait among other gems says about Amateur [sic] astronomers [sic] ‘Logically, they should be reporting most of the UFOs’. This is logic?”

Um, yeah, Mr. Friedman, it is. Maybe you should acquaint yourself with it. Note that this is all he said, just dismissing my point without actually saying anything about it. I know, it’s hard to believe that someone with such stature in the UFO community would make a claim with no evidence, and dismiss a claim that does have evidence!

Be sure to click on over and read it all.

HFCS and your health

New data: High-fructose corn syrup no worse than sugar – USATODAY.com

Now, the tide of research, if not public opinion, has shifted. This week, five papers published in

Mexican Coke.  Made with real cane sugar inste...
Image by slworking2 via Flickr

a supplement to Clinical Nutrition find no special link between consumption of high-fructose corn syrup and obesity. One paper was written by Barry Popkin, a co-author on the original 2004 paper.

I’m sure this won’t convince many on the anti-HFCS bandwagon, but some of us prefer to live in the world of evidence. The evidence points to no ill-effects. Sorry, Charley.

Of course, we all consume too much sweetener. Period.