Portal 2 is Getting in the Way of the Rest of My Life

Posted on 19th April 2011 in Something Daily

Uh, so much is happening yesterday and today that I really don’t know what’s going on. I side note: why is it that schoolwork always feels like the least important thing I have to do? No matter what, there’s always something I’d rather be doing, even if it’s fun work. I think the fact that people are telling me that I have to do it is actually a demotivating factor for me. ANYWAY…..

Oh man…well I spent three hours writing the code to Huffman encode text files for my Data Structures class yesterday, which was fun. I’m a little disappointed that my bad algorithm takes ten seconds to encode and decode the US constitution, but it’ll get me the homework credit I need. Also I really dug into Javascript for the first time, working through a few different tutorials in parallel in order to build an audio player for the Wonderleague website. That took a bit of experimentation, and I was, for some reason, beyond tired last night, which made the whole “thinking” thing a bit difficult.

Another factor making it hard for me to concentrate was the ride that Valve was taking everyone on regarding the imminent release of Portal 2 last night. I kept checking hasportal2launchedyet.com to see, and the second I refreshed the page and it said “YES”, I was bolting back to my MacBook Pro and launching it. As you may be able to guess, I stayed up until about 3 AM playing it until I couldn’t think anymore. This, in combination with the fatigue I was already experiencing, is causing me to not have a very fun day today.

I woke up at 8:30 and immediately started playing Portal 2 until 10, when I was forced to clean up and go to class. But you can rest assured that, if I have access to my MBP, I will not be doing much of anything else until that game is finished. That’s why I’m taking advantage of this time right now, while I’m out at the Courant lounge, to do important stuff like blogging and implementing an entire CMS for Wonderleague….how did I agree to this….?

OH AND ALSO, GUYS…I reactivated my Facebook account today. I know I probably look like a hypocrite now, but I will always maintain that there was never a time when I claimed to dislike Facebook – there was just a time where it wasn’t for me. It still might not really be for me, but for some reason I’m in the mood today to reactivate it. I don’t know how much I’ll use it. Seeing my profile page again is bringing back all of these weird memories about what it used to be like to use Facebook. So strange – that will probably happen for any other social network that I eventually stop using and start at again someday.

And I have midterms and projects to be doing, and finals to study for….what the heck, man? All I really want to do is make and use portals and portal accessories. If you need me, I’ll be at my desk. Not much different from an average day. But really, it is.

Let it be known: I will eat my shoe

Posted on 14th February 2011 in Something Daily

I just got a package in the mail, and when I was going to get it I was so convinced that it was going to be my Tropicana gear, but it ended up being Valentine’s Day cookies from my mom. I was really excited for the Tropicana stuff, but cookies are very awesome too. Thanks mom. I’m expecting the gear tomorrow then, or (hopefully not) the day after that. It just needs to get here already. Along with letters from my friends and the confirmation of my double major declaration. I’m waiting for a bunch of stuff in the mail. And as I do so, I’m getting pumped up by I Get Wet. I honestly used to hate that album, but it’s growing on me rather quickly. I feel the same way about it as I do about Blink-182, in a sense – I acknowledge the fact that it’s simple and kind of idiosyncratic, and then stop worrying about it and jam out.

I finally finished getting all the star coins in New Super Mario Bros. Wii, which took an ungodly long time, even with our whole suite playing in a shared account. I decided that I’d just go ahead and do it today, but level 9-7 is so unbelievably annoyingly difficult. I don’t want to talk about it. I have bad memories attached to that level. The second star coin is stupid if you don’t have the propeller hat – which I never did – and I ended up trying it about forty times. I did succeed though. This was about an hour ago.

I was playing Mario instead of doing something productive partially due to the fact that I chose today to once again reconfigure my MacBook Pro – I deleted the Ubuntu partition (decided I have enough Ubuntu on my old MacBook, and Portal 2 is coming out for Mac) and reinstalled Snow Leopard, crossing my fingers very hard that my automated backup scheme had been working correctly. Turns out it had been. It’s gone through a lot of revisions over the last few months, but it works awesomely now. I am, once again, proud of myself. Also because of that piece I wrote in LSDJ over the weekend; I still think that sounds rockin. I rerecorded the guitar since it was a little bit out of tune, it’s way more rockin now. Check it out.

And I finally preordered Portal 2 on Steam today. It comes out on a Monday, and let it now be known that I will not stop playing on that Monday until it’s finished. If I can’t, I will eat my own shoe.

MacBook Pro Backlit Keyboard in Ubuntu Maverick

Posted on 4th January 2011 in Tutorials

I was browsing around a little while ago and it occurred to me that the keyboard backlight on my MacBook Pro 5,4 wasn’t working under Ubuntu 10.10 Maverick Meerkat. I found a few resources online to help with the problem, and it ended up teaching me a lot. I wrote a script that changes the numeric string stored in /sys/class/leds/smc::kbd_backlight/brightness, then set the script to be run every time the keylight increment/decrement buttons on the keyboard are pressed. Here are the steps I took, in case you want to try this for yourself.

I worked up a shell script that, depending on the string passed from the command line, either increments, decrements, sets to zero, or sets to 100% the value of the backlight brightness.

Go ahead and use the code, or write your own, I don’t care. You can either copy and paste from here into a file called keylight in /usr/bin, or download the file here.

Once you have /usr/bin/keylight on your system, run sudo chmod +x /usr/bin/keylight to make the script executable. You’ll know that you forgot this step if you get a “command not found” error when you try to run it.

To test the script, run sudo keylight full. The keyboard backlight should come on. To turn it off, run sudo keylight off. I use an alias to avoid the necessity of sudoing every time – that is, I added the line alias keylight='sudo keylight' to the /home/emmett/.bashrc file. Still, a password is required when running the script. Since we want this to be controlled with the keyboard, we have to override that somehow. This can be accomplished by adding the following lines to /etc/sudoers (run the command sudo visudo to edit this file).

Cmnd_Alias KEY = /usr/bin/keylight
%admin ALL = (ALL) NOPASSWD: KEY

(it’s hard to see, but there is an underscore between Cmnd and Alias – that is, Cmnd_Alias)

These lines tell the computer that, when running the keylight command, members of the admin group do not need to enter a password. With that accomplished, all that’s left is to create new keyboard shortcuts for the script. In System->Preferences->Keyboard Shortcuts, click “Add”. Fill the “Name” field with something like “Keylight up”, and enter sudo keylight up into the “Command” field. (Don’t forget the sudo!) Click OK, and change the hotkey for the command to the F6 key (XF86KbdBrightnessUp). Repeat the process for keylight down, keylight full, and keylight off. I use the F5 key for down, and add Ctrl for full and off.

Follow this process, and the backlight on your keyboard should work like it does under Mac OS X. At least, it does for me. Feel free to comment with feedback, comments, or additions you make to my code. Thanks for reading!

Munch Up

Posted on 4th January 2011 in Something Daily

Downingtown, PA – Day 11

My time at home so far has been marked by a surprising lack of downtime compared to previous winter breaks. The family trip to Canada to see family took up a lot of my on and around Christmas day, and our recent day trip to our beach house to do a bit of housework for the coming summer season interrupted what I had anticipated would be a relaxing break. I might mention here that, based on my past experiences with winter breaks in my family, this anticipation was unfounded…but I’m still allowed to dream.

Apart from these family trips (with another to Las Vegas upcoming), I’ve been seeing a lot more of my friends at home than I expected to – so much so that it’s actually taking up most of my time on any given afternoon at home. I bowled, walked dogs, and video gamed/bro chilled with three different people yesterday, and it was a bit draining, to be honest. They were all fun, but I was so tired at the end of the day (at 2 AM, go figure). Speaking of, I did something very much unlike myself this morning: I slept until ELEVEN THIRTY AM. I honestly cannot remember the last time I did that. It feels kind of bad, actually. My whole morning was gone! I mean, I’m well rested now, but my plans for the morning are in shambles.

So that’s why I’m currently eating a bagel, drinking some Florida’s Natural, and listening to My Morning Jacket while blogging at 1:30 PM. It’s the breakfast of champions. Today I may draw (more like start to draw) a new Three Stegosaurus Moon header; at the very least I’ll try to come up with some ideas for one. I’m getting tired of my poorly googled and GIMP-ed travesty, so I’m thinking about some different designs that are interesting but not too hard for me to doodle well. I think that’s a better description of what I do. I hardly consider it “drawing”, at least in the sense that I wouldn’t tell anybody that I “draw” – I feel like doodling is a much better way to describe it.

I installed Skype on my new Ubuntu MacBook Pro this morning, a process that I expected to be a huge hassle like my attempt to do the same on my white MacBook. Of course, I don’t mean the actual installation of the program itself, but the activation of the built in camera and microphone for video calls. On my white computer, this ended up being more trouble than it was worth at the time. I did manage to get both working in Ubuntu, but even after that, the response from both was still choppy and unusable for conversation. I expected the same with my newer computer, but as it turns out, the camera and mic work out of the box! I didn’t have to do any additional setup this time. In case you’re wondering, it’s Ubuntu 10.10 on a MacBook Pro 5,4. I did have to unmute the mic and use alsamixer to unmute the front speakers, but that’s it. No configuration required. Ubuntu is fantastic. I want to find some cool new software. I just got Skype, VLC, and NetBeans this morning, and I’ll do a bit more searching and configuration.

It’s been a while since I recommended music. My Morning Jacket are awesome, specifically their albums Evil Urges and Z. I’m listening to Evil Urges right now, appreciating even more the idea I have that My Morning Jacket is “big room music”, meaning that it sounds awesome when you play it on big speakers in a huge room that adds a lot of reverb to the track. Jim James’ vocal typically has a lot of reverb on it anyway, and putting it in a big space definitely adds something to it. That being said, it’s just good music – it hardly matters where you listen to it. If you ever get the chance, though, play “Mahgeetah” or “I’m Amazed” in a big auditorium. Make sure you’re in a transitional period first, or at least in the right state of mind – it’ll change your life (thanks, Natalie Portman).