16 May 2013

Powerlifting!

It's like overclocking but better: every chip [human] has a different limit! Also makes for a great stress reliever.

I'm also seriously considering joining MIT's powerlifting team, because according to stats on MIT's powerlifting team (I dream of steel), I'm pretty close to benching competitively (but seriously need to work on squatting and deadlifting), I've never joined a legitimate sports team (math team doesn't count), and…#yolo.

In somewhat related news, I started using Fitocracy to track my progress! It's a cute webapp that I've been trying to replicate for the past ~half year or so, but never got around to implementing it.

08 May 2013

Climbing up the ladder

Near the end of my freshman summer, when I was still a cute and impressionable froshling, a wise man told me a story:

You get into something, say cars. You make friends who are also into cars. You start out with something small, like a [BMW] 3-series, then go to a [Porsche] 911, then a [Lamborghini] Gallardo, and so on. Then the friends get into something else, say watches. Again, you start with something small, say a Rolex, then move up to a Seiko, and so on, and while doing so, you meet a bunch of people who are into watches who happen to be into planes. Then from watches you move to planes, beach houses, and yachts, and so on. But at the end of the day, if things were to be taken away from me, I'd keep films, books, and music. Especially the books and music. --GJF

02 May 2013

The Birth of Homemade Electrostatic Headphones

Starring Tyler Christensen and MIT's Electronics Research Society!




















These photographs were taken for my HASS class, 21W.749 Documentary Photography and Photojournalism.

13 April 2013

Google Code Jam!

Trying my hand at this competitive programming thing again. Google Code Jam is this weekend again, so what is there for a rookie to lose? Even better, no rounds overlap with my birthday!

My high-level approach was the following: I'll look one problem at a time, and I'll do it then and there if I can come up with a solution in 10s. If not, I'll revisit it. I like this approach better than looking at all of the problems first since I can have just one thing on my mind at any time.

The first problem is essentially pattern matching. You're given a 4x4 board and you want to see if any rows, columns, and major/minor diagonal matches some string. I was feeling lazy, so I hardcoded the patterns and did a brute force search. Not too bad.

I couldn't think of a brain-dead solution for the second problem, so I skipped it for now.

The third problem required finding palindromes that are squares of palindromes. Given that this is in a programming contest, of course there will be some cleverness involved. I then looked at the input sizes. There were not just two, but THREE (a first!) inputs, the first one with a bound of 1000 (trivial), the next with a bound of 10^14 (decent, I can just do it with 64-bit integers, or so I thought), and the third had a bound of 10^100 (excuse me?). I first pooped some code for the small case, which happily ran in time. I then realized that I can adapt this for the large case, but was unconfident about constant factors, which may or may not destroy me.

I decided to port the code to C++ to play it safe, or so I thought. "Clearly C++ is much faster than Python, so that should save me, right?" said naïve me. I coded it up, generated some random input data, tested the code using that, and found that it ran in time. "Sweet." I then downloaded the large-1 test case, computed the results, and uploaded my answers.

I wasn't too sure what to do for the largest test case. I thought computing the palindromic palindrome-squares indefinitely was a good idea to figure out a general pattern, since I noticed only ~1% of numbers less than 1000 satisfied the condition and some very small fraction of numbers less than 10^14 satisfied the condition. From the ongoing run, I noticed that there were some more numbers less than 10^14 that my C++ program failed to find. "This is weird," I thought. After a while, I noticed that one of my helper functions took an int instead of an uint64_t. I changed it, reran my code, and verified that I found my error: one of my function arguments was an int, instead of an unsigned long long. Good game.
I couldn't think of any way to solve the 10^100 case, so I moved onto the next problem.

The fourth problem at first looked like a search problem. Upon glancing at the input sizes, I figured there had to be some dynamic programming involved. I was feeling pretty tired at this point, so I shut my laptop and fell asleep.

Since the contest happened during a subset of MIT's Campus Preview Weekend (which I happily attended three years ago; more on this year's CPW in another post), I didn't work on Code Jam until about T-30min. I felt somewhat annoyed about not having solved problem 2, since all of my other friends solved it (bad logic, I know). Apparently I understood the concept of the solution, from talking afterwards to a person who solved it, but I struggled to put 1 and 1 together to make 2. Thus, I pooped something that would solve the [overconstrained] small test at T-8min, which happily passed.

The qualification round ended soon enough. As expected, I got all but my problem 3 large right. Not bad, for being a few years out of practice.

17 March 2013

Pointless

What's the point of ponying up roughly $150k - 200k to go to a school such as MIT, just to get a job that pays only $100k/yr without much room to expand -- say $250k/yr max? It seems like the same could be accomplished by going to a state school on a full scholarship and saving the money for a nice car.

03 March 2013

Working in the Terminal

A couple years ago, I read an article about relying more on the terminal as a way to decrease distractions, thereby increasing efficiency. I finally took this guy's word and spent the past week moving my email and messaging routines to mutt and irssi-xmpp respectively. The programs are running in screen on a server.

In addition to being a command line hipster (ha :P), I can save a small chunk of RAM from not having Gmail as an open tab in Webkit. This is especially helpful for running Lightroom, which enjoys gobbling system memory. Sure, this workflow has limitations (attaching files to emails, for example), but it's a small move that I hope will ultimately wean me off my attachment to electronic communications.

14 February 2013

06 February 2013

KawaiiKart: Mechanical Assembly DONE!

Alright. This is the third-to-last post that ends the KawaiiKart saga! I am extremely naive, at least considering my current trajectory. Actually the aforementioned claim seems fine, since all I have left is getting the EV section to run, then the gas engine to run, and finally coordinating the two!! I will detail the assembly of most of the kart, from most of the steering assembly to mounting the engine.

MLK weekend

Remember from last time that I messed up the steering knuckles? I got a chance to re-waterjet my parts (on campus! no week-long delays!) with a nice Omax waterjet. Unfortunately, there were no 0.25" thick aluminum sheets that were large enough, so I was going to make twice the number of parts on a 0.125" thick sheet.

It's a $400,000 printer that takes sheets of aluminum!

At first I waterjetted on quality 4 (second best), but the waterjet's software said that it would take an hour as well as 50lb of abrasive. I decided to let it run for a while, but I realized that my routing did not include small tabs on the parts (to prevent the parts from falling into the waterjet tub), which the second part did. At this point, I stopped the waterjet, added tabs to my parts, and reran at quality 3. The run time and abrasive consumption were much more reasonable, clocking in at 14 minutes total and 7 lb of sand.

The new knuckles turned out to be perfect. At this point, I was supposed to have a rolling frame, but by virtue of sloppiness, I forgot to order 3/8"-24 nuts, some steering column lock collars, as well as more L joints for the tie-rod steering.

Better waterjetted steering knuckle: the nut fits!! (of course I winged it)

Vise-ing bearings into steering mounts.

The legendary T-nut.

Assembled frame!

My temporary parking space at MITERS.

Charlesg welded my unidirectional flywheel tight.

Testing the fit of the wheel axles.

Taking a break to track ChibiKart in the snow. This is the result.

Mounting the steering knuckles.

An engine and wheels appeared!

Servicing engine mount with a makeshift carjack.

Week before Techfair

This is the week when the EVERYTHING happens. Literally. It's the last week of my externship, Battlecode quals + finalists' dinner + final tournament, and KawaiiKart cram week. Basically all the time after work was dedicated to either writing code for Battlecode or working on the go-kart. During this week, I went from chassis and parts to a mostly working kart. Picture dump below:


Scraping self against a piece of aluminum or Nancy's hexapod.

Using vise as holder to insert one notch into motor mount.

Vising entire motor mount into steering knuckle.

Chibi motors!

Mounting motors onto motor mount.

The bore of the pinion gear is slightly too large, so we'll pad it with Coke can.

Too lazy to file deeper notch in motor shaft.

Adjusting pinion gear on motor shaft.

Motor on wheel!

I fail at ordering parts again.

It's a masterlink!

Cutting fluid does wonders.

The chain is on! Now to tighten it a bit more.


Steering column with tie rods!

The MITERS parking garage.

Side profile.

My hands turn black after a day's worth of hard work.

BigLathe!

Motor controller (it's a Kelly controller).

Revised steering column end mount.

That steering wheel was not intended for this vehicle.

Soldering the Hall sensors onto those boards was really annoying!!!

Last but not least

The correct way to listen to K-pop is to turn the bass all the way up, and then knock the treble down a few notches to compensate.



Up next: electronics and a working EV!