Of School and iPods

May 15th, 2009 Posted in School | 1 Comment »

Henry David ThoreauAs an avid follower of civil disobedience, like all teenagers, I disregard my school’s electronics policy when it makes no sense. For example, in between classes and during lunch, there is no reason why students shouldn’t be able to use their cell phones and PMPs. Of course, using cell phones and other devices in class is quite disruptive, and is grounds for some disciplinary action. Here’s the full text of the Sickles High School electronics policy:

Cell Phones/Electronic Devices/Personal Property:

The cell phone/electronics policy is stated that a a student with a cell phone or electronic device out, the device may be confiscated and a parent must pick up the confiscated item when it is available for pick up, which is only on Thursdays from 2:00pm till 3:30pm. Personal electronic devices, i.e., beepers, CD players, radios, electronic games or any unnecessary devices deemed potentially disruptive shall not be allowed at school.

Cell phones shall not be activated or used during school hours or on school buses. The school shall not accept responsibility for cell phones, personal electronic devices or personal property of any kind including money. Failure to comply with these procedures may result in confiscation of cell phones, electronic devices or personal property and students will be subject to disciplinary action for repeated offenses.

Wait, let’s back up there. A parent can pick up their child’s electronics “only on Thursdays from 2:00pm till 3:30pm.” What parent can make it to the school at that time? Most parents have work or job interviews to be at. And cell phones are not only a means for social interaction — they are necessary for communication between family and in emergency situations. What happens when a student’s phone is taken away on a Thursday? They can’t call their parents to come get it. It’ll be a week before they might be able to have their phone again.

Anyways, this post is not about the flaws in their policy. It’s about the flaws in following their policy.

In March, I was walking down the hall to lunch listening to my iPod. A Mr. Medvin pulled me aside, took my iPod, headphones, and my name (he didn’t write it down). For two Thursdays afterward, I went to the main office to get the iPod back. The first time I visited, I found out about the electronics policy. I’d hoped a simple phone call to my dad would allow them to relinquish my beautiful, shiny sound maker. However, that turned out not to be the case, as neither the man guarding the electronics (Luis Rodriguez) nor the principal would accept a phone call on the spot.

I then asked my dad to call in ahead of time, so the school could give my dad the whole spiel about how I’m a horrible kid and I should never bring my iPod into school, and they would finally hand it back to me. Instead, the administrator on the phone told him he needed to come into the main office between 2:30PM and 3:30PM on Thursday with photo ID. “Screw that,” my dad and I thought. I lived without music for a couple of months, which really sucked, but I made it through somehow. It probably forced me to interact a bit more socially, but that’s the only good consequence.

Finally, my dad was able to drive in — this was yesterday, Thursday, May 14, 2009. He met Mr. Luis Rodriguez in the main office and presented his photo ID. There was no talk about the school’s electronic policy. They just wanted to punish the parent for the student’s mistake by hassling the parent until it becomes such a bother that they make sure their kid doesn’t screw up again. Of course, this doesn’t work at all. It just breeds hatred and noncooperation between the parents and the school.

Mr. Rodriguez searched through the basket of assorted iPods, Sidekicks, and Zunes enclosed in brown clasp envelopes. Searching, searching, searching…”Nope. No iPod here registered to your son.”
My dad: “Alright, what happens now?”
Rodriguez: “Well, you can check in Student Affairs or talk to an administr–”
My dad: “No, no. I followed your policies and instructions exactly as I was told. Where is my son’s iPod?”
Rodriguez: “I just don’t know.”
My dad: “Is there something I can sign to prove I was here to pick it up?”
Rodriguez: “No, there’s only a log to be signed when I hand something back.”

iPod NanoThat’s my secondary vision of the exchange that occurred from details provided by my dad. This happened roughly around 2:45PM. When the final bell rang at 3:00PM, I walked to the front office to make sure my dad received my iPod, completely unaware of my dad’s interaction with Mr. Rodriguez. I was in for a surprise when Mr. Rodriguez told me he couldn’t find it. This time, however, he redirected me to the Principal’s Secretary, a Ms. Beverly Keeter.

Ms. Keeter took down some of my contact information, including my name, student number, description of the iPod, and an estimated cost. She assured me that if the school was unable to locate my iPod, they would replace it. She asked me to print out the product from Best Buy to get an actual price.

The next day, I returned with a print out of the Best Buy page for iPod Nano of equal value to my iPod ($199, according to Apple’s original press release: http://www.apple.com/pr/library/2006/sep/12nano.html). When school ended that day, I went to check the progress of Operation iPod Locate with Ms. Keeter. She informed me that Mr. Medvin never turned in my iPod, nor does he recall taking it away. She also said it was now up to the principal, Jake Russell, to decide what happens next.

I’m hoping they don’t ignore me. That’s why I’m writing this post. They can’t ignore it. I believe they have my stapler iPod.

Edit 05/18/2009: They found my iPod. It was filed under the wrong kid’s name.
Eureka! They've found it!

April 7th, 2009 Posted in Funny, Games | No Comments »

Gaben’s fat.

Almost there!

Almost there!

PS3 Rock Band Drums

February 11th, 2009 Posted in Programming | 7 Comments »

I got Rock Band 1 for the PS3 this Christmas, and I’ve been loving it. The drums are my favorite, and I’m getting a lot better at them — I can play pretty much every song on hard, except for Foreplay/Long Time (DAMN YOU LOUD PART 1!). Unlike the guitar, when you play the drums on Rock Band or Guitar Hero, one actually gains experience they can use to play real drums. Realizing this, I wanted to create my own beats and write my own songs. Naturally, I wanted to use them on the computer instead of the Freestyle Mode provided by the game.

I did a bit of research on programs for Linux that allowed the drums to be played. I didn’t find anything that looked too promising, but this post opened my eye to a very useful detail: the Rock Band 1 drums are recognized as a joystick. That post goes on to display a C example of a drum sounds simulator using SDL. I don’t like C, because of all the problems it tends to effect (linking errors, the verbosity it requires, etc), so I went about writing my own drum program in snakes Python.

Using pygame, a Python SDL wrapper, I wrote a simple test program that associated drum pad hits with audio samples. When a pad or the pedal was hit, it would play a sound — quite basic. I Googled for drum sounds and discovered this page to my good fortune. With the drum samples found there, Yak’s Rock Band PS3 Drums was born. (I couldn’t think of a better name.)

Since writing that simple script, I have added the ability to record and replay beats and a rough GUI designed in Glade.

For the script and a screenshot, CLICK THE DAMN LINK!
Read the rest of this entry »

Bread Clips

January 28th, 2009 Posted in Uncategorized | 1 Comment »

Bread Clip

Bread clips are the bane of my fridge-going experience. Most of the time our bags are sealed with twist ties, but occasionally these rotten crapples pop in to send salutations and a slap in the face.

When the bag has a twist tie, the usage is as simple as untwisting, retrieving the contents of the container, and retwisting. Not for bread clips, though. Oh, no, they can’t be that easy. Trying to take them off yields ripped plastic and broken seals. One would be lucky to get the bag open enough to pull anything out. But if one is successful, failure is a sure shot when attempting to reapply the little buggers. However, if one somehow defies the Laws of the Kitchen and applies the clip, it’s already bent three ways to hell.

Basically, bread clipping is akin to waterboarding. Some may construe it as legal, but it hurts everyone in the end (possibly dead, too).

Fuck bread clips.

Bash Script Expo #2

January 18th, 2009 Posted in Programming | 2 Comments »
Bash Script Expo #2 Screenshot

This little bit here prints out the process ID and process name of the process with the specified open port.

#!/bin/bash
ps -p `netstat -pantu | awk "\\$4 ~ /$1$/ { split(\\$NF,pid,\"/\"); print pid[1]; }"` -o comm= -o pid= 2> /dev/null

`netstat -pantu` prints the open ports using the UDP or TCP protocol and the process IDs of the processes that opened the ports. The awk line parses netstat so that it prints only the process ID. Then the ps line prints out the process name and PID. The ending 2> /dev/null stops ps from printing out its help text when there is no process with the specified open port.

The warning that appears above explains that one must `sudo` to see all the processes.

However, if you’d like to just know the PID of the process with the open port, remove the ps, like so:

#!/bin/bash
netstat -pantu | awk "\\$4 ~ /$1$/ { split(\\$NF,pid,\"/\"); print pid[1]; }"

Then you could do this:

Bash Script Expo #2 Screenshot 2

Which will kill the process that opened the port. (When I ran that command, I ended up crashing Steam…)

Python’s max(arg1, arg2, …, key=func)

January 10th, 2009 Posted in Programming | No Comments »

I stumbled across a somewhat undocumented feature of Python’s max() function. I was trying to find the largest absolute item in a list, and just as I was about to create a generator list composition for it,

[abs(x) for x in mylist]

I looked at the documentation for max() in ipython, and found an argument not in the online Python documentation: key. ‘key’ is a keyword parameter accepting a function with one argument. This function does whatever the hell it wants to every number passed to max() and then returns it. This simplified what I needed to do:

max(arg1, arg2, …, key=func)