31 December 2010

Year in Review: 2010

Ten Tech Moments
  1. 3D invades CES
  2. iPad arrives
  3. iPhone 4 prototype leaked by Gizmodo
  4. Kin One, Kin Two, Kin…BOOM
  5. iPhone 4 Antennagate
  6. Android takes off
  7. PS3 gets hacked
  8. Internet TV becomes relevant
  9. Windows Phone 7 is launched
  10. Motion gaming takes off with Kinect
Ten Twelve BCA Moments


Ten Automobile Moments
  1. Toyota recalls <insert model here>
  2. Toyota recalls <insert model here>
  3. Toyota recalls <insert model here>
  4. Toyota recalls <insert model here>
  5. Toyota recalls <insert model here>
  6. Toyota recalls <insert model here>
  7. Toyota recalls <insert model here>
  8. Toyota recalls <insert model here>
  9. Toyota recalls <insert model here>
  10. Chevy Volt and Nissan Leaf hit dealers

The year of fail is [almost] over!

27 December 2010

RIP Dr. Ostfeld

"You were a great man and one of the pillars of the Academies. Thanks for everything you've done, and above all else, thanks for allowing me (not yet a resident of Bergen County during the time of admissions) to attend the Academies." --me

Well, that was one great bang to close the year, after a dramatic opening with Holbrook's passing. BCA will never be the same again.

===[edit]===

So finally the [useless and horrifically designed] bergen.org website has a note from Russ Davis, the principal:

Dear Colleagues,

It is with great sadness that I share with you the news of Dave Ostfeld's passing. According to his family, Dave went to see a performance of the Nutcracker last night with his sister and daughter and died of a sudden heart attack this morning.

Words cannot express the impact that Dave has had on the Academy community since it's inception and I am certain that the news of his death will be difficult for our entire staff as well as current and former students.

I will forward information regarding funeral services as soon as I receive them from his family.

Sincerely,

Russ


===[edit x2]===

Here is the official obituary:

[David L. Ostfeld Jr.] passed away suddenly on December 27, 2010 at the age of 68 years. He was born on September 17, 1942 in Chicago, Illinois of David L. and Mildred (nee Harrison) Ostfeld, who both pre-deceased him.

Surviving are his children Kurt D. and his wife Alethia, Dana C., and Mara C. Ostfeld; grandchildren Selah and Elise; siblings Craig H., Lynne R., Adrienne and her husband Donald, Bohnenkamp; numerous loving nieces, nephews and cousins.

Dave taught chemistry, served as Admissions Chair and coached the chess team at Bergen County Academies. He received his B.S. from the University of Illinois in Champaign, his PhD from Cornell University, and did post doctoral work at Texas A&M. He had become an avid genealogist and was developing an interest in agriculture and farming. He was the best dad ever.

Funeral service on Friday, December 31, 2010 at 11:00 a.m. at the Vander Plaat Memorial Home, S-113 Farview Ave., Paramus. Private Cremation. Interment Dickison Cemetery, Dunlap, Illinois sometime this spring. Family will receive friends Thursday, December 30, 2010 from 2-4, 7-9 p.m.

In lieu of flowers donations may be made in his memory to the Dr. David L. Ostfeld Memorial Scholarship Fund, Bergen County Academies, 200 Hackensack Ave., Hackensack, NJ 07601.

26 December 2010

Oh, how I miss Dr. Galitskiy (and Physics C)

"It should be called 'Mass Watchers'!"

25 December 2010

Visiting the Academies

As a good crvft (MIT speak for alumnus), I visited BCA this past Tuesday and Thursday =D Tuesday was for general lols and Thursday was for the Alum breakfast.

Since I don't live in Bergen County anymore, I had to take the NJ Transit bus to school, while everyone else could take the school bus or drive. This sucked because I paid $3 each way for a long and uncomfortable ride, while the same $3 could pay for a gallon of premium gas and the trivial wear and tear on a car. An easy 10-minute trip turned into a 40-minute bus ride + 0.8 mile hike along Hackensack Ave was not fun.

Unfortunately, when I stepped in the building, the deskworker recognized me, so I couldn't slip by without an ID tag. I then went to the former math team room and talked with Nevard, Abramson, Pinyan, and Ben Yang for an hour and also met the new interim math team coach, Jeff Worcjak. After an hour, I went to troll Mr. Sam and saw Alex Lam along the way. Mr. Sam insisted that our poor performance at MIT caused all the early applicants to get deferred/rejected. Then I had lunch at Boston Market, which is now really darn classy for a fast food restaurant.

The afternoon was when all the fun began. When we were done eating lunch, I realized that we were half an hour late for Data Structures, so we rushed there. We then barged in the class, to everyone's amusement, and then I settled down and beta-tested pongmegrenades (still vanilla pong at this point). Topics was right after Data Structures, but we had to leave not long after to prepare for the troll.

What is this troll, you ask? If you recall from last year, the section of AP Physics C that I was in gave Galitskiy hell. Nightmares. Migraines. So as the kind people we are, we decided to replicate that experience by sneaking into his class and taking our usual seats. So at 14:00, about eighteen crvft (people from my section, people not from my section, people who didn't take AP Physics C, and older alum) gathered in the second floor hallway to prepare to invade his class. Luckily for us, Galitskiy didn't have class this hour so we wouldn't disrupt anything important, but he was in his classroom prepping. When he left for lunch at around 14:15, we snuck in the classroom.

Galitskiy then returned and was shocked that he had a full class before class started. Treating the situation as a regular class, he rolled his n-die, which landed on 18, so Scott Lee (who never took AP Physics C) had to present. Luckily for Scott, Fahmid took the stage and started explaining us the dolphin, which we established last year that it could not do physics. A bit before 14:25, the real AP Physics class came in and was shocked that all the chairs had been occupied, so they just took the lab tables as Galitskiy shooed us out. Never have we heard him eagerly say "Guys, get out, it is two twenty-five and I have to teach a class!"

The last item in my agenda was computer team. It was great seeing familiar faces and new faces in the club :3 I decided to give a guest lecture about practical advice (totally not computer science related) as a gift. Unfortunately, setting up the presentation took a bit of work because Keynote complained that my DisplayLink USB to VGA adapter had "not enough VRAM". I tried rebooting the computer with the adapter attached (the internet indicated that this could work), but to my dismay, it didn't. During the reboot process, one of the csteamers asked, "How long will the reboot take?" and I said, "Oh, probably 5 seconds." He began to count out loud, and when he reached "THREE," the Mac OS X desktop loaded. Everyone was blown away.

===

Thursday was the Alumni Breakfast, so I didn't expect to have much trolling time. Nothing much was going on before the breakfast, so I said hi to some teachers again and hung out with crvft and some seniors. During the breakfast I saw some crvft (Julia-san and George Hotz, in particular) I didn't get to see earlier during the day or on Tuesday. George still seemed the same pwnage person he always was (unfortunately I forgot to ask him about USACO). Apparently I'm the first MIT-er that he talked to at the breakfast, after asking approx 10 other people if they "were at MIT." I also talked to Eric Zhang (AAST '00 and MIT '04), one of the freshman biology teachers. He was surprised that I took 6.172 ("the new 6.170") as a frosh xD After about an hour of jabbering, I left to go home.

20 December 2010

Bad Coding Habits -- Don't try this at home!

The first semester of college has concluded, which means that I have time to indulge in my hobbies, specifically photography! I was fortunate enough to have went to B&H, one of the largest pro creative shops, this past weekend and brought home a nice tripod, which I have been using extensively these past days mainly for low-light photography. The shots, one of which was posted yesterday, came out great; now I need a place to upload them.

Ah, what better place to upload than my own server.

That's right; a bit over a year ago, I wrote a nice little AJAX photo gallery, which could definitely use some work. So rather than exporting said photographs for the web, I got distracted by the dysfunction of the gallery and cracked open the code. I scroll down and see the following javascript:

function showAlbum(a) {
    path = a;
    var xmlhttp;
    if(window.XMLHttpRequest) xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState == 4) {
            document.getElementById('ulfilmstrip').innerHTML = xmlhttp.responseText;
            var aaa = document.images;
            img_array = new Array();
            for(var bb = 0; bb < aaa.length; bb++) {
                if(aaa[bb].src.indexOf("cover") < 0) {
                    var cc = aaa[bb].src.split("/");
                    cc = cc[cc.length-1].split("_thmb");
                    img_array.push(cc[0]+cc[1]);
                }
            }
            showImage(img_array[1]);
            document.getElementById('filmHeader').innerHTML = a;

            toggle();

            resizeGal();
            window.onresize = resizeGal;
        }
    }
    xmlhttp.open("GET", "fetch.php?dir="+a, true);
    xmlhttp.send(null);

    return;
}

Okay, so a is probably the album that we want to display…wait, what is aaa?! And bb?! And cc?!

17 December 2010

MIT First Semester Notes

Today is the first day of winter break, which means that first semester is over! Here are some notes about classes, etc:

Classes

6.172: OMG THIS IS SUCH A GOOD CLASS (even though the workload is ~20hr/week). If I could, I'd love to take it again, but since I can't, hopefully I can TA the class when I'm a senior or M.Eng student. =D Strangely enough, this class did not make me hate coding, even though I encountered a bunch of bugs. The TAs were enthusiastic and responded very quickly to emails.
  • Prereqs: Know C/C++, git, make, algorithms, or else you will suffer! Also, know how to use your favorite text editor!
  • Advice: Be prepared to debug, debug, debug and invest a considerable amount of time right before finals week for the ray tracer. I spent probably 40h that week for this class.
  • Average time spent in class: 3hr/week; average time spent out of class: 20hr/week
14.02: Very unrigorous; it's as if the teacher just pulled everything out of his posterior end. At least Professor Feyrer was an enthusiastic lecturer! The TAs were hard to understand and weren't very enthusiastic.
  • Prereqs: Common sense, know how to take derivatives with a ruler
  • Advice: This is your chance to practice common sense.
  • Average time spent in class: 1.5hr/week; average time spent out of class: 2hr/week
7.012: Eric Lander is such a baller. Weinberg is good too, except he is a rather monotonous lecturer. I did not like how the (really annoying and long) problem sets relied heavily on the lectures and not the book. The flow of material was pretty good and made my lust for computational biology manifest itself a bit more.
  • Prereqs: None
  • Advice: If you want to put in minimal effort into the class, make an effort to learn biology in high school! Also, it's a good class to take on pass/no record.
  • Average time spent in class: 1hr/week; average time spent out of class: 2hr/week.
21W.732: Define a grade function $g(x)$ (where $x$ is effort) such that $g(x) = A$ when $x > 0$ and $g(x) = 0$ when $x = 0$. Yes, that's basically how easy the class was for me. Professor Barrett was enthusiastic and assigned fun projects.
  • Prereq: None
  • Advice: Good writing class. If you have an interest in digital media, this is a great class to practice your skills!
  • Average time spent in class: 3hr/week; average time spent out of class: 1hr/week. 
Life and such

MIT's been a good place; there are amazing facilities for everything!
  • Stata Loading Dock for general hardware collection
  • Reuse for hardware and exercise
  • CSAIL for high performance computing (did I mention that I have access to a 48-core box? =D)
  • Micro Center for random hardware window shopping and exercise
  • MITERS for satisfying my latent EE desire
  • Star Market for cornish hens and exercise
  • Art of Problem Solving grading sessions to supply funds for obscure hardware
I should also mention a subset of the hardware I now have as a result of crufting:
  • 15" iMac G4 (USB 2.0): used to charge my iPhone at night
  • XServe G5 cluster node (unknown): soon to be a compute node
  • Matrox Dual Head2Go: sits in a drawer until I get more displays
  • IOGear DisplayLink adapter (USB to VGA): used to get VGA out from my laptop because I don't have any miniDisplayPort adapters
  • and a bunch of keyboards, mice, and cables that actually come in handy when things break (yes, things do break)
As for people, it's been a mixed bag. People generally are either theoretical or hands-on, but not both. I'm usually at one of three places:
  • 4E, my floor, for a little bit of computer hardware interests (mostly just collecting, not discussing) and some compsci stuff (mostly talking to one of the seniors =D)
  • Clam kitchen for more theoretical compsci stuff (and some gaming kibitzing)
  • 4W (Bayley and Michael Cohen) for…everything else? XD
    • From ray tracing, 
    • to lasers, 
    • to high performance computing, 
    • to CNC machines, 
    • to some really obscure [theoretical] computer science topics (Bayley's computer algebra stuff or Michael's general interest in theoretical compsci), 
    • to Apple =D, 
    • to how Erik Demaine is a beast at life, 
    • to photography (*cough* expensive optics), 
    • to the lameness of mandatory classes in EECS are, 
    • to computer architecture, 
    • to the weekly sale at Micro Center/Newegg and price levels of computer components, 
    • to how Henrik Wann Jensen is the god of photon mapping, 
    • to high-powered electronics, 
    • to how 6.172 is such an awesome class =D, 
    • to economics, 
    • to World War III,
    • to (a little bit of) cars,
    • to next semester's classes, 
    • and somehow the conversation becomes degenerate when the word ``finance'' (or even money) is uttered.
Also apparently I am a good artist even though my drawing skills have been shelved 7 years ago o_O.

So that's life at MIT for now; we're on break until January 2nd. The month of January is devoted to IAP, or independent activities period, a month of no (real) classes! Hopefully I won't be too hosed then to actually be able to work on some cool EE projects.

    04 December 2010

    So many lols

    What does this code do?

    370     __m128 row0, row1, row2, row3;
    371     __m128 tmp0, tmp1, tmp2, tmp3;
    372 
    373     
    374     row0 = _mm_load_ps( mat2[0] );
    375     row1 = _mm_load_ps( mat2[1] );
    376     row2 = _mm_load_ps( mat2[2] );
    377     row3 = _mm_load_ps( mat2[3] );
    378 
    379      
    380     
    381     tmp0 = _mm_unpacklo_ps( row0, row1 );
    382     tmp2 = _mm_unpacklo_ps( row2, row3 );
    383     tmp1 = _mm_unpackhi_ps( row0, row1 );
    384     tmp3 = _mm_unpackhi_ps( row2, row3 );
    385 
    386     
    387     row0 = _mm_movelh_ps( tmp0, tmp2 );
    388     row1 = _mm_movehl_ps( tmp2, tmp0 );
    389     row2 = _mm_movelh_ps( tmp1, tmp3 );
    390     row3 = _mm_movehl_ps( tmp3, tmp1 );
    391 
    392     
    393     _mm_store_ps( mat2[0], row0 );
    394     _mm_store_ps( mat2[1], row1 );
    395     _mm_store_ps( mat2[2], row2 );
    396     _mm_store_ps( mat2[3], row3 );
    397 
    398     
    399     
    400     ret[0][0] = mul_asm(mat1[0], mat2[0]);
    401     ret[0][1] = mul_asm(mat1[0], mat2[1]);
    402     ret[0][2] = mul_asm(mat1[0], mat2[2]);
    403     ret[0][3] = mul_asm(mat1[0], mat2[3]);
    404     ret[1][0] = mul_asm(mat1[1], mat2[0]);
    405     ret[1][1] = mul_asm(mat1[1], mat2[1]);
    406     ret[1][2] = mul_asm(mat1[1], mat2[2]);
    407     ret[1][3] = mul_asm(mat1[1], mat2[3]);
    408     ret[2][0] = mul_asm(mat1[2], mat2[0]);
    409     ret[2][1] = mul_asm(mat1[2], mat2[1]);
    410     ret[2][2] = mul_asm(mat1[2], mat2[2]);
    411     ret[2][3] = mul_asm(mat1[2], mat2[3]);
    412     ret[3][0] = mul_asm(mat1[3], mat2[0]);
    413     ret[3][1] = mul_asm(mat1[3], mat2[1]);
    414     ret[3][2] = mul_asm(mat1[3], mat2[2]);
    415     ret[3][3] = mul_asm(mat1[3], mat2[3]);
    416 
    

    Yeah, this is for a class. Guess which one? (6.172)

    24 November 2010

    Frustration

    As an early Christmas gift, I was suckered into buying two 2TB hard drives the instant I heard they were $90 apiece on Newegg (it so happens that 2TB drives are $70 apiece for Black Friday sales). They were destined to go into the first of my four Dells that I got from the Stata Loading Dock a while back for my media and archive server. My plan was to install ArchLinux on the drives, but with a twist: I wanted to install a software RAID 1; that is, to have the drives be perfectly mirrored at any instant in time. Sure, such a setup is overkill for one person, especially without any critical data, but setting one up would be good experience.

    Obviously the first step in setting up any storage array is to install the hardware. Since these Dells do not have a second SATA port, I had to either (a) use an adapter to convert SATA to IDE or (b) get a second SATA port. Step A was easier at the time I got the drives because I had already picked up two SATA->IDE adapters from a Reuse posting. Strangely the adapters did not work in the Dells, but worked perfectly fine on my quadbox. Luckily, a week later Bayley found a 4-port SATA PCI card and generously gave it to me. I installed it in the Dell, plugged in both drives, and fired up the machine. It worked! Surprisingly, the Dell reports the drives as IDE drives. Strange.

    Now it is time to install Arch. Having not a clue as to where to start, I Googled some guides. The first article that I got was an install guide on Arch's wiki and it was rather long and was not trying to do what I wanted to accomplish. However, it was a start, and I felt confident enough to work my way through it.

    On my first attempt, I followed all the instructions, only forgetting to add the "mdadm" and "lvm2" hooks before the "filesystem" hook in mkinitcpio.conf. I think everything else in the setup process went fine. Then I rebooted the machine, which seemed to be fine until the OS decided to fall back to the ramfs. Uh oh. This was my first time working in a castrated (and borked) Linux; I was shocked when "halt" and "reboot" did not work. I hit ctrl-d to logout, which proceeded to induce a kernel panic. Derp.

    Evidently the install failed somewhere. On my later takes, I tried manipulating the commands, and sooner or later I began to understand what each of them did. I also learned (more or less the hard way) that formatting a 2TB disk takes approximately five minutes. Google proved helpful in collecting further resources; some other webpages that I read included a Ubuntu mdadm RAID1 thread, Arch RAID0 thread, and mdadm stop/delete array thread. Unfortunately, none of them ended up helping me set up a working RAID1 array. Double derp.

    After two weeks of on-and-off work and trivial progress, I got rather frustrated, stressed, and upset. My self-imposed deadline of Thanksgiving crept faster and faster, which put more pressure on me to get this stupid thing working. I decided to try one last time on the eve of Thanksgiving, hoping that something would work out. It didn't. Grub decided to be annoying, and when I got Arch to partially load after copying the Grub files onto the boot partition, Arch decided to fall back to the ramfs and proceeded to kernel panic. Blah. I finally relented and installed Arch on one disk and set up the other disk as a vault for incremental backups, which took less than half an hour. *mega sigh of relief*

    Although this most definitely is not a RAID1 array, it is still a decent alternative for redundant storage. As for learning how to set up software RAIDs in Linux, I'll probably do that on another machine during IAP (another name for January, in which we have no classes), when I'm not Battlecoding, cramming for Linear Algebra or Differential Equations, or churning out PSETs for Intro to C++.

    tl;dr Setting up (uncommon) configurations on Linux + deadline in the near future = major stress. I totally do not want to do IT-related work as a career.

    UPDATE: So somehow Bayley sort of talked me into installing Ubuntu Server on the box because Ubuntu Server has a nice RAID configuration utility. Plus, Ubuntu Server is not as bloated as the regular Ubuntu. I suppose with 2TB of disk space I should not be fussing about an extra 150MB or so. Hmmm....

    23 November 2010

    Steve Jobs loves Coldplay?

    Today, in writing class, we presented our favorite music videos in class. One of them was "Life in Technicolor II" by Coldplay. The song's initial instrumental melody immediately reminded me of the Apple MacBook Pro (Unibody) promotional video.

    Life in Technicolor II:



    Apple MacBook Pro video:



    Well it is true that the one billionth song purchased on iTunes was "Speed of Sound" by Coldplay (the lucky purchaser won a 20" iMac, ten video iPods, and $10,000 in iTunes credit).