Collaborate is the latest OS X software from TheSpicyChicken. This real-time collaborative document editor lets you
share and edit documents with your friends over any Jabber server. Just sign in with your Google Talk or Jabber
username and start editing.
A friend of mine, and neuroscience graduate student at Case Western Reserve University are conducting a study into the genetic basis of hearing the following sound:
NPR recently did a story that teenagers have been using the above sound as a ring tone to evade the prying eyes ears of adults.
So we started a little investigation of our own, and we need your help! Just click on that sound file, play it, and respond in the comments with your age, gender, and if you can hear it or not.
(SPOILER ALERT, don’t read if you haven’t seen the new movie)
My Trekkie heart has melted! I am in love and I won’t deny it. I am ready to stand up on the roof tops and proclaim my love for the series that, up until last night, I believed was forever destined for re-run nostalgia. Too much?
Too bad! I am thrilled with the new movie. I am head over heals for the young, sexy, talented new cast and am delighted that the writers tackled the new/old story line with a splash of nostalgia and a heap of creativity.
It’s a whole new game now, we can again visualize a Star Trek story line that isn’t confined to the plot devices that were relevant 10, 20, 30, or even 40 years ago. I love that I don’t have to worry about how what happened in this story might affect my beloved Picard (le sigh Jean Luc). I don’t have to worry about plot lines that no longer make sense (with the major exception of Spock Prime living out his life in a parallel universe as opposed to the universe we all know and love). In all honesty, this is a huge relief.
Besides, this new cast brought the “sex” back to the series. Never had I thought to think of what a restrained yet sensual kiss from a Vulcan might be like. Thank you Zachary Quinto for making it abundantly clear that T’Pol was not the only sexy Vulcan in existence. I am doing my best not to sound like an obsessed fan-girl, but I don’t think I am succeeding. Forgive me men if you do not share my good opinion in the lusciousness of the Spock-Uhura kiss.
More to that point, as a woman, I always had a hard time relating to Kirk. In TOS he was the John Wayne of the Federation. No rules, lots of sex, and your mans-man! But after Chris Pine’s performance, I feel like I understand Kirk better. All of the above still holds true, but it just makes sense now. Don’t bash me for not “getting it” sooner, I am just a little late to arrive on the Captain Kirk bandwagon. Oh, I almost forgot to mention, the young Kirk is super sexy too.
I know that I am a minority in the Trek Universe (being young and female), so perhaps my male counter-parts won’t share the same passion that I do for this new/old series. I know there are things to complain about when a favorite story attempts to expand in a new direction (don’t get me started on the Harry Potter movie franchise), but I think that this deserves an “A” for effort! Keep ‘em comin’ boys.
In the Biomedical Informatics department here at Stanford we do a lot of coding and scripting. Since our emphasis is on usefulness and implementation speed we rely heavily on high level programming languages.
The “old-school” informaticists have relied on Perl (yes, Perl) to develop these scripts. But in the modern ages where languages like Python and Ruby are available to us, we don’t need to be knee deep in archaic idioms and clunky syntax. I have been relying on Python for years now. My implementation speed has increased substationally, I have less headaches, and life is generally better.
It turns out, however, that many of my colleagues and peers have a great appreciation for Ruby, which seems to be gaining a lot of traction lately. As a self-named agile software developer I feel it would hypocratic if I didn’t pick up Ruby. Afterall I need to have as many tools in my box as possible and learning Ruby will only make me a better informaticist.
My first impressions for Ruby have been very positive. It is a truly object oriented language in ways that Python falls short. Also I just love the dual implementation of most of the methods for when you want to modify the instance or you would rather return it. For example, say we have a list:
list = [2,1,3]
newlist = list.sort
list.sort!
The method call with the exclamation point at the end mutates the instance ‘list’ while without it, it will return a new list. This is one of my biggest griefs with Python. It causes code that should only take one like, take three. (Not to mention just trying to remember which way the method works)
Python
a = [2,3,1,5]
a.sort()
a.reverse()
Ruby
a = [2,3,1,5].sort.reverse
You just can’t argue with that. Also I found this great resource for Ruby. If you are an experienced programmer (especially if you are familiar with high level languages) this page basically teaches you everything you need to know about Ruby to get started.
As you all may or may not know, I am plotting to take over the world. While up until now I have had about as much success as a cheese sandwich, I think this latest attempt is sure to succeed.
You see, what better way to take over the world than to make all peoples feel self-important and over-confident. My latest iPhone toy, LaughTrack, allows you to carry around a studio audience in your pocket. All your jokes will be laughted at. All your snide comments, joyfully giggled at. All your great accomplishments will be cheered and applauded. This makes you and everyone else feel like a star and as such you want others (namely me) to do your bidding. This will make all of you hand over enormous amounts of control over your lives to me. With this new control I will spread LaughTrack even deeper into all societies and …. I think you see where this is going.
You may think that it is foolish for me to divulge this fiendish plot to the very people from which I will extract their freedom, but I know it’s okay, because I’m getting loads of applause and cheering from the audience.
As an iPhone developer I have been able to the play around with the new 3.0 firmware. Overall I have to say that I am very pleased. I think my favorite new feature so far is the search. It pretty much looks and behaves just like QuickGold, if you have a jailbroken phone and have used that before. Very handy.
What I have found most dissapointing is the interface for Copy and Paste. I loaded up the CNN front page and tried to copy a few phrases. It didn’t go so well. It keeps trying to copy the entire text. Then it displays little crop buttons, but don’t even think of trying to use them. If you drag toward the edge of the screen (like when you’d want to scroll down) they switch modes and become completely unusable.
Perhaps with some more time I would be able to figure out how to use it nicely, but this is way outside of “it just works” right now. Hopefully the Apple designers will be improving this feature before 3.0 is released to the public. Otherwise there are going to be a lot of very frustrated people out there.
Oh, and not having to enter my username/password every time I need to log into a website. Priceless.
While learning how to use the microphone on the iPhone to record I thought a quick and fun iPhone Game which leverages the microphone on the phone.
There’s lots of apps out there that take advantage of the accelerometers, but not too many that use the microphone as a control device. In PopBalloons you control a laser that floats around the screen (using the accelerometers, of course :), but to fire the laser you need to make a sound. A snap, a click, sing a song, whatever. The intensity of the laser is directly proportional to the intensity of the sound that the iPhone hears. You can even slightly tap the microphone with your finger, if you really need to be quiet.
As an added bonus, I cartooned up some LOL cats, and instead of popping balloons with your sound-laser, you can pop LOL-CATS! I know, it’s brilliant. More information on PopBalloons, and all of my future mobile phone apps can be found at the website of my new company, Mophilia, Inc.
Demonstration Videos
The real point to this post is to demonstrate how to make a crude demonstration video of a live-action game. My first thought was to take screenshots using the screen shot function and then string them into a video.
However, the process of getting the screen shot and saving it takes way to long and eats up too much memory to be run at full speed. So it occurred to me, that since the game is being triggered by timers which are on the order of 30fps then I could slow the game down and take screenshots between the frames. For example, if I slowed the entire gameplay down to 10fps then I could take screenshots at that rate and not run into memory issues. So in my PopBalloons_Prefix.pch file I have this:
// This is the master Timer update frequency. Normal speed is 30.
#define PopBalloonsMasterFrequency 10
All of the rest of the frequencies are based on this one. So if I have a timer that normally runs at 20fps I would simply redefine the frequency like this:
// Nomal update frequency is 20 Hz
#define kUpdateFrequency ((2./3.)*PopBalloonsMasterFrequency)
Now I can arbitrarily slow down my entire game so that I can do CPU and memory taxing procedures. In case you are interested I save the images to file using:
NSData *imgData = UIImagePNGRepresentation(viewImage);
if (![imgData writeToFile:filePath atomically:NO]) {
NSLog(@”Failed to write the image data to file.”);
}
Where filePath is an NSString object that contains the full path to the destination file and viewImage is a UIImage object from the code above.
Encoding the PNG files into a Video
Now that I have a whole bunch of images I need to encode them into a movie. I use mencoder to do this. Mencoder comes with MPlayer which can be installed using Darwin Ports.
#port install MPlayer
Note you need to have /opt/local/bin set in your PATH file.
I wanted the video to include an image of the phone, so it the game looks like it is being played. To do so I just used Grab to take a screenshot of the simulator and saved that file as PhoneImage.png in the same directory as my screenshot files. Now I can use some a handy python script to combine the images and generate what will be the frame for my video.
import os
from PIL import Image
phone_image_name = ‘PhoneImage.png’
file_names = [f for f in os.listdir('.') if not os.isdir(f) and not f.split('_')[-1] == ‘done.png’ and not f.split(’.')[-1] == ‘py’ and not f in [phone_image_name] and not f[0] == ‘.’]
for file_name in file_names:
phone_image = Image.open(phone_image_name)
im = Image.open(file_name)
phone_image.paste(im, (63,160))
phone_image.save(file_name.split(’.')[0] + ‘_done.png’)
After the images are converted I just delete all the old files and then string them together to make a video using mencoder:
As you can see it’s far from perfect. It’s a little shaky and you can see the flicker of the text prompt in the Text Field, but as a first pass it will do.
I have received some really good feedback about my first ‘official’ iphone application, The Pulse. Users have really liked the app, but it seem to lack some basic features. In version 1.1 the ability to pause the onslaught of incoming news articles as well as in-app web viewing has been added.