Author Archive for Kev

New pictures up

I just put up pictures on the Photos page for Leslie’s and I’s biking stint in Chicago and my roommates’ and I’s adventure to Stanford University.

Check them out!

Officially a nerd: I edited Wikipedia

Though many of you would claim that I’ve been a nerd for a long time, of which claim I will not dispute, I think yesterday I officially inducted myself into nerd-dom. I was reading the Saturn V rocket manual, and I wanted to know a little bit more about the use of retrorockets (small rockets used for slowing down a space vehicle). The Wikipedia article on them claimed that for the Apollo missions, they were not used. So I was like, “hold on, I just read that they were used for backing off the S-IC and S-II stages after booster shutdown.” Consequently, I edited and corrected the page.

Yeah, I’m a nerd. Score.

I’m going to build it

I’ve always been a space nerd, and I’ve always been a computer nerd. Well, now I am going to combine both. I have recently just become completely overcome by my passion for space, and so starting a few days ago, I began planning to build a real-life Apollo spacecraft and mission simulator.

Now this process is going to be a long road, and I have a feeling it may be years before it’s completed. But that never stopped anyone from doing something they were passionate about, right? The project will take three distinct stages:

  1. Research: Building a simulator requires that you ’simulate’ an actual working object. In this case, I have to simulate how the Command Module of the Saturn V rocket series will travel from land to space, around space, and then back. This is going to require a pretty extensive knowledge of the spacecraft, including most of its systems and procedures. One of my goals for the simulator is that every button in my simulator will affect the state of the simulator. Now this phase not only will include researching the spacecraft, but researching and understanding the physics and dynamics of space flight, definitely on a simple level. I will have to have a grasp of such topics as energy conservation, equations of motion, power, time derivation of kinetic energy systems, and the Tsiolokovsky rocket equation, just to name a few. A lot to learn, so I better get started!
  2. Software: After getting a good grasp on the mathematics and technicality surrounding the Apollo missions, I need to actually write the software that will simulate all of the variables and systems. In terms of time, this will probably be the longest stage. Most likely, I will have to write a ton of software to get the simulator using concepts of distributed computing, since I don’t think my MacBook Pro alone will be able to compute all the necessary pieces hundreds of times a second needed to achieve a realistic simulator. So if you’ve got any old Macs you want to send me, I would totally appreciate it!
  3. Hardware: The last stage of the simulator building process is building a physical simulator that will interface with my software in order to make gauges show values and to access and mutate the simulation model. I have a sickening feeling this will be an extremely expensive part of the process (since both stages up to this point are free), and also one requiring a divine expertise in electrical engineering. If you know anyone who wants to help, please send their name along.

Here are some of my goals for the simulator and process I will be going through to build it:

  • First and foremost, learn and have fun. This is a project spawned not from need (obviously), but from shear passion for the subject material. There is so much I want to learn, and though this project is definitely ambitious, it will help me really learn the basics (and maybe the basic advanceness) of astronautics, spacecraft systems, simulation design, distributed computing, electrical engineering, and a whole plethora of other subjects.
  • Obtain a mastery knowledge of the Saturn V rocket.
  • Get a really good grasp of rocket dynamics, from both a conceptual and mathematical standpoint.
  • Write simulation software that is well organized and efficient, but also that is extendible to be moved and molded to simulate other spacecraft like the Delta IV rocket or maybe even the space shuttle.
  • Build a real-life cockpit where every button, dial, and switch represents real simulation model data and can change the way the spacecraft is flying.
  • Find a good name, ideas?
  • Overall, design a realistic simulator that will not only teach me a ton, but will help others enjoy flying to the moon in the Command Module used by the first man to walk on the moon.

I encourage all of you to keep me accountable to working on this. I don’t want to flake out, I want to do this through. So please kick me in the butt if I am lazing off on my Apollo simulation project.

Alright ambitious project, bring it on.

Back in the Bay

Last Sunday, I arrived back in Cupertino, CA, for another summer internship at Apple. Since arriving, it has been quite the whirlwind of activity (hence the fact that I have been unable to put up a blog post).

This summer, I am working on the same team at Apple, Interface Builder, which is a specific team of about 6 people in the Development Technologies group. I love what I am doing, and am really excited to be back again with the same people and such. I am living in some apartments across the street from the Apple campus (not the same place as last year) with my roommates Justin, Mike, and Elliot.

I will certainly try to get posts up as much as I can, but no promises given the insane amount of work to be done for some releases coming up.

Facebook outages.

A strange thing happened today when I went to check Facebook. I got this nice friendly screen everytime I tried to open it:
Facebook went down

Basically it means that Facebook is “down”. This is most likely attributed to total server overload due to all of the middle school munchkins coming home from school and checking their Facebook. However, at the same time, it is mildly interesting to me that the 41 most trafficked site in the world would allow server overloads to occur.

Maybe it’s just me.

I survived an earthquake!

This morning at 4:17, I woke up, sweating profusely. Our room was so hot! So as I was laying there in bed, all of the sudden I heard a low but pretty darn audible rumbling sound. My bed started shaking back and forth, not violently, but very very very noticeable. It felt as if someone was climbing up the ladder to my bed. I quickly looked over to my ladder, but no one was there. Looking across the room to my roommates, they were sound asleep. As my bed began to stop shaking, I started wondering to myself what in the heck that was. An earthquake… NO way! I was convinced that either the shaking back and forth had been a dream, I was seriously mentally handicapped, or there was someone in our room. There was no one in our room, and I was not certainly not dreaming, and last time I checked, I was still somewhat normal (though my friends and family may disagree). I dismissed the event completely and went back to bed after opening the window.

This morning when I awoke to get up, my roommate Brett told me that “we missed an earthquake.” “I didn’t!”, I shouted back. So apparently I wasn’t imagining things and my sea-rocking-bed was for real. I survived and witnessed first-hand an earthquake, and in Illinois of all places. The last earthquake I witnessed was in California a few years ago. Hands down to the awesome power of God!

A tale of two developer sites

The other day, I wanted to look at how to write applications for Windows for a class I am in. Where is the logical place to look? The manufacturer’s developer website would be a good place to start. Upon arriving at Microsoft’s Developer Network homepage, suddenly everything got really confusing.

I have a theory about developer home pages, whether they be from Microsoft, Apple, ARM, or Intel: they should be extremely simple and geared mainly towards beginners who know nothing about the technology they want to write software for. I feel that Microsoft fell far short of that. Their MSDN homepage is cluttered, hard to pinpoint where to go if you want to write Windows applications, depends on you knowing about existing Microsoft technologies, and even has ads for their developer products (making people pay for Developer tools is another whole issue).

MSDN home page

Now on the other side of this spectrum is Apple’s developer homepage, which is simple, clean, and extremely informative about where you should go next: “Are you developing for the Mac or the iPhone?”

Apple home page

Matters get worse with the Mac and Windows Dev Center. If I am developer wanting to write an application, I want something that tells me where to go, that explains things simply, and walks me through getting started. Once again, Apple gets it, and even after trying to get through Microsoft’s developer site for about a half-hour, I couldn’t figure it out. Apple’s seemed to take about 2 seconds (or maybe like a minute).

Microsoft’s Windows Dev Center:

Windows Dev Center page

Apple’s Mac Dev Center:

Apple's Dev Center page

So I guess my question is: what’s so wrong with making things simple? Is it just a personal thing?

Granted, all this said, neither of these two developer sites is perfect, in any regard. Both sites place a huge emphasis on their products, versus the actual development on said products. Secondly, anyone who wambles onto their site should be able to write a 5-minute “Hello world!” application with no hassle. Apple and Microsoft both need to simplify, swallow the fact that people do not care to see ads for their products, and then provide a handy guide for how to write applications for their platforms.

Another decorative pizza

While I was home this past weekend, Leslie and I did another decorative pizza. At Wheaton North High School where Leslie and her sister Lizzy attend, there is a program where French foreign exchange students come and spend two weeks at the homes of students at the school. This year, Leslie’s family volunteered to have someone join them. On Saturday, the day we made the pizza, Agathe arrived. So in honor of her arrival to the states and her Frenchness, we decided to make the pizza French themed.

Can you guess what we did?

Our French pizza

The cry for musings

I have to apologize, the last like 132984 posts on my blog have been technical. I hear the cries of those who just want to read musings, and so I will try my hardest to muse more.

Keep checking back!

Thread safety performance on different CPU architectures

A few weeks ago, I did a post on thread safety performance on my machine. However, that was only on one machine, a 2.16 GHz Intel Core Duo architecture.

Yesterday, Joey and I decided to run some more tests of thread safety performance implementations (no thread safety, mutexes, and semaphores) on different architectures, and the results were quite interesting. We ran tests on my machine again, on a 2.16 GHz Intel Core 2 Duo iMac, a 800 GHz PowerPC G4 iMac, and a Quad Core 2.66 GHz Intel Xeon Mac Pro. After running the same tests on each machine, we normalized the data to get rid of the clock-speed factor.

For mutexes, the machines all performed about the same, with my Core Duo doing slightly better than all of the other machines. In second place was the PPC G4, and then the Core 2 Duo machines took up last. For the semaphores, the PPC G4 smoked the Intel chips, a very interesting result.

Here is a summary of our results (the numbers listed are in cycles/5 seconds and the numbers in parenthesis are the normalized data):

Core Duo:
No thread safety: 440909468 (1)
Mutexes: 98324839 (0.223)
Semaphores: 197981 (0.00044)

Core 2 Duo:
No thread safety: 831519248 (1)
Mutexes: 135168338 (0.163)
Semaphores: 1153251 (0.00139)

PowerPC G4:
No thread safety: 119723944 (1)
Mutexes: 23709889 (0.198)
Semaphores: 1020029 (0.00852)

Quad-core Xeon:
No thread safety: 884848737 (1)
Mutexes: 140097898 (0.158)
Semaphores: 1157646 (0.00131)

Here are some charts representing this data:
All data

Mutex performance

Semaphore performance