All this Bass is Gonna Break My Ears

Posted on 18th April 2011 in Something Daily

Good day. I just spent about three hours on an assignment for my Data Structures class that involved creating a Huffman code based on a text file, then applying that code to compress the file, and decompressing it to make sure you did it correctly. Turns out I did, but this was one of the harder assignments in the class. My algorithm works, but it’s incredibly slow, as a result of the codes not being sorted in size order. It takes ten seconds to encode and decode the constitution, and it takes more than ten minutes to do ten constitutions (a lot more than ten minutes). So I understand how to fix this, but having it be efficient isn’t part of the assignment…I know. This is me being a terrible programmer. But right now, in this context, I’m ok with that. Because I have other things to be doing right now. Like designing wonderleaguewill.com, and playing Portal and Half Life 2 Episode 2 before bed, in anticipation of the awesomeness that will be waiting on my computer when I wake up tomorrow morning (and I don’t have class until 11! So much awesome!).

Yes, Portal 2 is going to be sweet. That’s really all I have to say about it right now. Let me just see here….I’ve been listening to a lot of Odd Future, and I feel like it might be messing with my head. At least the metal I listen to has mostly unintelligible lyrics, so if they’re singing about something awful you’re probably not going to hear it. But Odd Future, though…most of their songs are sort of..I don’t really know how to say this…”about rape”, I guess would be a good way of saying it. Tyler has an incredibly evil sounding voice, and the beats are really awesome. So I’m into it. But I do occasionally wonder what it does to my psyche to listen to so much violent music. I’m not too worried, if it really is damaging me, I’m probably already too far gone from the months of Wu-Tang.

Learning New Languages

Posted on 23rd February 2011 in Something Daily

Wednesdays often end up being my busiest days in a given week. For every semester that I’ve been at NYU, they’ve always been the one day of the week that goes from start to finish without a break (I define a true “break” as one where I go back to my dorm and chill out). I’ve got a late class tonight (Electronic Music Performance), and then a friend’s birthday dinner – the combination of which is compelling me to write in the small break between the halves of my Recording Tech class. It’s been a busy two-day week so far – I’m becoming more and more addicted to the MIT OpenCourseWare Computer Science lectures, which take up a decent amount of time and brainpower. It’s sort of an accellerated version of what I’m doing in my own classes, which means that it works as a great counterpart when it’s paired with an in-person lecture and homework assignments. I’m learning a lot. Watching those is increasing my interest in gaining experience with popular algorithms and languages (I wrote binary search in Perl last weekend); this weekend I plan to write something in Python and something in Ruby, somewhere in the realm of the basic sort algorithms (bubble, selection, and merge). They’ll be interesting, and possibly a little tougher than the Perl one was, since I’m even less familiar with Ruby and Python. C++…I’ll get to that eventually. I’m honestly a little bit intimidated. Once I’ve got a few minor projects in a decent amount of other languages under my belt, then I’ll probably face the challenge. It’s a summer thing, since I’ll be taking a class in assembly language in the fall, and C++ is just one step closer to that.

I’m getting really close to the end of Chrono Trigger; after 21 hours, it’s about time. I’m done six out of the seven sidequests, many of which were pretty tough. But it appears as though I may be close to powerful enough to finish the final boss; last time I tried it, I was completely demolished, but that was before doing any of the sidequests. It’s a fantastic game – absolutely one of the best SNES games I’ve ever played. Remind me, tomorrow or later tonight (probably tomorrow) I’m going to put together a semi-definitive “Emmett Butler’s Top 40 video games” list. That’ll be great fun. And then I’ll go see My Morning Jacket for free ninety nine.

Binary Search, Vim, and Perl

Posted on 20th February 2011 in Something Daily

I just spent a good little bit of time figuring out and writing the basic binary search algorithm in perl. It took me a bit longer than I think it maybe “should have”, but it works now. I’d heard binary search referenced in class, as well as seen it explained in the video lectures from MIT I’ve been watching. In case you don’t know, here’s a brief explanation.

Looking for ways to find a specific element in a presorted ascending list, the first thing you might think of would be to step through the list sequentially. When the element of the list you were currently looking at was greater than the one you’re trying to find, you’d know that the one you’re looking for isn’t there. Another way (binary search) which is a lot faster, is to first check which half (upper or lower) the element you’re looking for is in by finding the midpoint of the list and comparing it to the searched element. If it’s in the upper half, then find the midpoint of that half and do the comparison again. Essentially, you’re dividing the set in half with every time through the loop. Eventually, the top and bottom bounds of the piece you’re looking at will converge, and then you’ve found your element.

So anyway, I wrote that in perl today, which is a language that I’m not abundantly familiar with, using vim, which (apart from crontab) i had my first experience with today. So it took a little while. But I found two great vim/unix cheat sheets that I plan on combining later tonight and making into a sweet background for my external monitor. Learning accomplished. Now time for Chrono Trigger. Most triumphant.

Learning is great, so is completing games

Posted on 19th February 2011 in Something Daily

Yesterday reddit guided me to the wonderful world of free video lectures from great schools, specifically this introductory programming course at MIT that seems to have been filmed in the last year or two. I’ve watched two of these lectures so far, and it’s crazy how much faster MIT computer science goes than NYU CS does. I’m now in Data Structures, which is the second officially required class for CS majors, third if you count NYU’s “Introduction to Computers and Programming” prerequisite. This single-semester class that I found on MIT’s website covers a lot of mathematical and algorithm-related topics that we still haven’t covered in Data Structures. I know I’m only a month into my course, but it’s at least fair to say that this MIT course is worth two (or more) that I’ve taken at NYU. Crazy. But the great part is that I can watch all the lectures for free. Which I’ve certainly been doing. I’ve found the section of the class that’s right around what we’re currently talking about in Data Structures, as well as another Basic Algorithms class that I can watch after that. Learning is a lot of fun.

That’s been a good part of my day, as has waking up and finally cleaning the kitchen again, which took upward of 90 minutes to do top to bottom. It’s nice, though, because now it looks spiffy and it’s all my fault. I also finally, after many hours, completed Super Mario Galaxy 2 (that is, got 241 stars). The single green star I spent the longest on was the first in the Boo Moon Galaxy, which as you can see from the video is kind of difficult. The last level (Grandmaster Galaxy) was far too easy, I only ended up trying it about ten times before I finished it. I know that sounds like a lot, but it’s not compared to the second-to-last level, which cost me about twenty lives. Still, what a great game. I remember quite a while back I was complaining that I had to do the “whole game over again”, and now it’ finally done. Boom goes the dynamite.

And my Andrew WK shirt is now in my possession and on my body. Again, boom goes the dynamite. Also, there have been rumors going around that the photo I posted of myself in elementary school a few days ago is not actually me. Let me assure you that this is not the case. It’s really me. I know it’s hard to believe I was actually ever that cute. Just deal with it.

The Infamous Thought Addiction

Posted on 10th February 2011 in Something Daily

I’m getting back into hacking like crazy. I think next time I start a project, it’s going to not involve coding. Like carpentry or something. I want to build my own desk with monitor stands and lots of space to spread out my stuff on. Just anything that won’t force me to obsessively try and retry the same error corrections time after time in the vain hope of making a little dinosaur shoot lasers out of his face on my computer screen. I’m getting slowly nearer to the end of my monstrous object-oriented programming self-tutorial, and I’m quickly remembering why it was that I took that big two month break in the middle of my work. I feel like my brain is going to fall out of my ear – that’s how concentratedly I’ve been thinking in attempts to fix the multilayered coding issues that appear without fail every time I think my game is going to do exactly what it shoud. I have spent the last two hours straight working on what amounted to one bug in my code – and it’s still not fixed. Every day is a new challenge with a project like this, especially if a lot of the code I’m using was written when I didn’t totally understand the power of OOP. It’s absolutely mind-numbing, but I’m totally glad I’m doing it; resolving code bugs comes with a feeling of great accomplishment (except on the rare occasion that I go to bed without having solved the problem, in which case I wake up a little pissed off).

Seriously, I don’t hate this work that I’m putting myself through, it’s just a task that causes a lot of mental strain, and for anything like that, you need a bit of a cooldown/decompression period after you’re done. Otherwise, your brain just continues on the same trajectory and you’re all distracted around your friends – you’re detached, spacey, and kind of annoyed that you can’t solve your bugs. That’s why you have to know when to stop. Any time that I make some definitive breakthrough, major or minor, in which I come to understand for certain something about a program’s operation that I didn’t before, that’s a good time for me to stop. That way, I can console myself in my failure to completely resolve a bug with the knowledge that I am, for certain, one step closer to doing so in the future. The problem with this is realizing when it happens and forcing myself to stop coding. It’s addictive, man. I think I have a problem. This and video games, right?

The moral of the story is, essentially, quit while you’re ahead when your brain starts taking off during hacking. Otherwise, the rest of your day may not go well (if you’re me (or if you’re you (which you probably are (I think)))).

Codename: Space Conflict from Beyond Pluto

Posted on 5th February 2011 in Something Daily

I don’t know if you remember the game that I claimed to be working on about three months ago; it’s definitely been a while. I had this idea over the summer to make a sweet and very involved Java game with my CS 101 experience – there were going to be multiple maps and physics and stuff blowing up and dinosaurs and it was going to be sweet. It was originally going to be mostly a learning experience to get me more acquainted with object oriented programming (which it absolutely has been), and it wasn’t really intended to be a project that I’d necessarily make into anything polished. After working on it for a while, though, it started to snowball and I figured “how hard could it be to make an Ikaruga clone?”. As it turns out, it’s both challenging from a programming perspective and time-consuming on the art side. I worked on it for about a month and a half with incredible persistence and then kind of fell off – I think I was intimidated by the huge amount of work I’d set out for myself. I had to program the whole game engine from scratch, draw all the sprites and backgrounds, animate them, and come up with a decent storyline. Basically I lost interest because it seemed kind of impossible. The project never totally left my mind though, I was always a moment away from working on it again. I have a mostly-complete game engine that I’ve made scalable to include more enemies, patterns, and areas, as well as a bunch of enemy sprites and two 8-bit audio tracks. Today, for some reason, I decided to pick it up again, and that I want to be done by the end of the semester. It’ll give me something to do and feel good about. I did significantly alter my initial expectations on how it would be when it was finished – my original project was just really daunting. But if all goes well I’ll have a sweet little Galaga-style arcade game by the end of May. Here are some screenshots of what I have so far (it’s all in the 8-bit visual style minus the background, which I have yet to draw correctly).

Also, Super Mario Kart is so annoyingly tough. Always has a super star regardless of where in the lap he is, and he always uses it right as you’re about to pass him. It’s not cool, and I hate Luigi. He makes it impossible to win the Flower Cup at 150 cc. Seriously, I’ve tried it probably twenty times and on the third course, he always comes from behind at the last moment and screws me. It’s not funny anymore, Luigi. Just go home. We all know you’re awesome at kart racing. Just stop, man. And Chrono Trigger is still taking a year and a day. I’m done two of the side quests and I still have five to go and probably a bunch more training before I try Lavos again…it’s a good thing that’s such a good game, because otherwise I’d probably have stopped playing by now.

Major Operation

Posted on 26th January 2011 in Something Daily

I went on an adventure last night to Zebulon off the Bedford L. I didn’t know what it was at all, but it turned out to be quite a nice little music bar. I felt bad not being old enough to order alcohol, so I left a monster tip. The music was great though, there was a jazz quartet, this crazy experimental octet, and a solo guitarist/singer, one after another. I’d never been to a show in that capacity before, and I really enjoyed it. No cover, just cool music.

My free time has quickly gone from overwhelmingly abundant to overwhelmingly absent. Yesterday was a lot fuller than my schedule of three classes would have me believe it was. Among other things, I put in motion yesterday my plan to double major in Computer Science and Music Techology, realizing that I would be selling myself completely short if I didn’t take advantage of these classes that I’m really interested in. It turns out that my ideas about how easy it would be to double major were pretty much totally wrong, but it seems that it’ll still be possible if I take some extra credits in the summer. It’s a bit of a long shot, but I would love to go from minor to major. I just really like the classes.

Speaking of, NYU administration came through again yesterday when I got to my Data Structures class and found that it was booked in the same room with another class (Basic Algorithms). There weren’t enough seats, so a lot of people (including myself) ended up standing in the back while the Algorithms teacher did half a class, then they all left and Data Structures got 20 minutes. It was pretty lame, as I was really looking forward to my first day. Still, the teacher said hi to me after class, told me I’d really be enjoying the material (after confusedly asking if I hadn’t taken it already), and honored my request for beginner CS students to tutor! I can’t wait! I think it’ll be very, very helpful for my education to teach computers as I’m learning them.

A technologist and philosopher all in one

Posted on 8th January 2011 in Something Daily

I’ve obviously been doing a lot of hanging around at home recently, and I feel just a little lazy as a result. I know that if there’s ever a time to do nothing, it’s winter break, but I can’t help the nagging feeling that I’m missing out on valuable work that could be getting done. My days on break have consisted mostly of gaming with Eric, watching movies, and browsing reddit; while this is all very enjoyable and relaxing, I did spend this time last year learning how to make cables and troubleshoot audio signal chains in tech training at school. I was there from January 3rd on for two weeks of 9 to 5 training, about half of which was spent soldering various connectors onto various types of cable, the other half filled with mock test routines on each of Steinhardt’s 8 recording rooms. That was a lot of work, and I missed the opportunity to see my friends for another two weeks, but it was so enjoyable: I got a lot of time to myself (for South Park) in the evenings, and I was learning so much!

That process of learning continued as I started working as a studio tech last spring and continued this past semester. The first semester was trial by fire, as, despite my training, I still found myself somewhat unprepared for the reality of the job. People would ask me questions all the time that I didn’t know the answer to, and I frequently found myself sheepishly asking the more senior techs for help, only to have them stroll over, assess the situation, and calmly press a single button, resolving the issue. I was acutely aware of my rookie status the first semester. That continued for a bit in my second semester as a tech, and I still notice that it happens occasionally, but I’ve put together a mental list of about eight different things I reflexively check for when I’m confronted by the most common problem of all in learning studios: “There’s no sound”.

My tendency as a beginner was to assume that something was wrong with the system when given this problem. I’d spend several minutes too many testing the cable connections, getting the multimeter, sometimes even opening the connectors to check the solder joints. After all this, I’d usually get frustrated and ask an upperclassman for help. A few weeks of that fruitless strategy, though, and I started figuring out that about 90 per cent of the time, the fault for there being “no sound” lay with the student, not the equipment. So I’ve memorized the locations of all buttons and switches that could function as “mute”, reflexively adjust gain stages and turn on power conditioners, and have learned that the Steinhardt rooms need to be specifically configured for surround sound. Essentially, I’m getting better at the job. Check it out: by the time I’m a senior, I’m going to be the man at this. It’s just a matter of building my collection of checks and gaining experience in troubleshooting when there actually is a problem.

Non sequitur: I taught my 13 year old sister how to count in binary today. I watched a video of a presentation teaching basic computer science to kids and it inspired me to try out some of the techniques on a young one at my disposal. As it turns out, she thinks it’s interesting, and managed to write the binary version of the ASCII for “No soup for you” on her own, for me to decipher. Next up is hexadecimal (which she says “sounds a lot harder”). I’m also continuing to read Harry Potter I in German, which is getting easier! My education is slowly returning! And reddit ripped on me today when I mentioned that I deleted my Facebook. I used to take reddit comments to heart, but it’s way too likely that I’ll get my feelings hurt doing that. So I troll in FFFFFFFUUUUUUUUUUUU and take my lumps with everybody else. I try to be nice for the most part.

And the point is that I still feel lazy this winter. I’m in control, don’t worry – it’s obviously not a big deal, since it’s my choice to be lazy. It’s all happening like it’s happening. That’s it.