Linux Is Dumb

I want to know what stupid fucker decided that the standard tab width for linux kernel code would be 8 spaces. I can understand the 80 character limit, the spacing for *, the braces style, and all the other crap required to conform to their style. Seriously, does Linus Torvald program with 8 width tabs? Once you’ve indented a few times for functions or nested ifs, it’s literally impossible to write a line of code without breaking it into multiple lines, making it twice as hard to read.

This pisses me off so much.

Renoki: Making An Android Game (part 1)

I finally decided that I will man up and port Renoki to Android. For those who don’t know, Renoki is the iphone game that Mark and I released that failed phenomenally. You can see it here:

The iphone version is free now and may or may not still be available on the app store. Despite the fact that it didn’t sell at all and had some pretty large stability issues, I want to port it to Android. My hopes is it will be a side project to do in our spare time, as well as allow me to fix some of the shortcomings I found in the iPhone version that Mark never fixed. Once it’s complete I’ll probably buy an Android license and release it for free.

I started exploring some different Tutorials for Android. I first took a look at cocos2d, a graphics library that Mark used to program Renoki. Some developers are in the process of porting over cocos2d to android, and there is a basic version available. I looked it over and I don’t really want to commit to using it while it’s still in development. I’d rather go through the headache of controlling all my animations with the Android native graphics library. Also, considering Renoki is very simple in terms of animation, I think I can handle the load.

Right now I’m taking a look at the LunarLander sample game available on the Android Dev site. It seems to have pretty good documentation, so we’ll see where we get.

Making My Own Android Clock AppWidget

So I am super OCD about the clock on my home screen. The Android lock screen is basically unchangeable outside of modifying your system files. Sure you can buy Widgetlocker or Lockbot off the market but I dislike the fact that all they really do is cover up your actual lock screen with another activity. I couldn’t say the actual battery drain this puts on my phone, but regardless I dislike it.

I actually like the default clock widget that appears on the lock screen. I think the font is good and the information it shows terse and clean. What I don’t like is how seemingly nobody on the android market has created a replica of this clock. I found one with the right font but no date. I found one with the same style but the size wasn’t right. I want a clock app widget that is identical, down to the pixel, to the lock screen default clock. The ideal behavior is for me to slide and unlock the phone, and for me to see no change other than the slider disappearing, the bottom icons to appear, and the screen brightens.

Android programming is annoying because so much stuff is confusing. Every thing has it’s own name (contexts, activites, intents, widgets, etc) and all the documentation is heavily saturated with this terminology. The problem is that reading the documentation is difficult, when you aren’t totally familiar with what each thing is. I honestly still don’t fully know what a context is. I also don’t understand why their memory management/garbage collection is so confusing. Apparently it is super easy to leak a context if you accidentally leave a reference to it somewhere in your background services. Every time you open and close applications and such, it destroys the old one and creates a new one from scratch. Thus, contrary to what I’ve learned the past 5 years of programming, it’s almost better to declare things temporarily and allow them to be destroyed. You want to avoid long running things because sooner or later, you will lose track and it will lead to a memory leak. This just boggles my mind, because I’ve always learned to try and reuse things in order to reduce the overhead of creation. I guess this is the pain of switching from C to Java.

I spent maybe 3 nights trying to get my clock widget set up. The thing that boggles my mind about app widgets (the things you drag onto your homescreen in android) is the onUpdate() method. Apparently onUpdate() can be called periodically, but it is also where they tell you to initialize everything about your app widget. This means that if you initialize a new variable, and then the update happens again, you’ll have to instances of that variable running. What’s worse is if you place multiple instances of your app widget on the home screen and then delete one, the variables you created don’t also get deleted. They seem to persist until you completely restart the phone or force kill it.

Anyway, here is my final clock. It’s about as lightweight as you can get. It updates whenever there is a time change signal, which occurs every minute. Unlocking the phone is practically seamless. The problem is that because they dim the lock screen, whenever you unlock the screen gets super bright and it makes it seem like everything changed. Nothing I can really do about that. Secondly, I’m about 99% sure that the wallpaper on the lock screen is 1 or 2 pixels shifted right. Maybe I’m just going insane.

Now I need to let it run for a while to make sure it doesn’t crash.

One Night in Beijing 2011

I finally have time to sit down and write about ONiB… it was AWESOME this year :)  It was basically my entire life this semester, and I’m really glad it worked out, because confession: This is the first event I have ever been in charge of organizing.   I never volunteered to organize anything in ARCC before, and I only did ONiB because Jack nominated me.

It was pretty stressful, but because I followed what Jack did last year pretty closely, it really wasn’t as bad as everyone thinks it was.   I set everyone’s deadlines really early so that when things fell behind we were still okay, and I think I avoided anybody pulling all-nighters.  I did have to pick up some other people’s jobs that weren’t done on time, but luckily I had a light semester so I did not have to pull any all-nighters myself.

I’m really proud of myself, because as I said, this is the first thing I’ve ever organized, and it was such a HUGE first responsibility.  I remember during my election speech last year I was asked if I would be able to do it because I was so quiet and soft-spoken – but I’m sure everyone I yelled at this year knows I’m the opposite when I need to be!  I still remember during my Microsoft interview, they decided that I was “pretty social” so they switched my developer interviews to program manager interviews.  They asked me: If someone wasn’t doing their job, would you be able to remove them?  I couldn’t answer with a definite answer at the time, but now I know that I am definitely capable of running a group and getting things done if other people don’t.  Although I would rather be a developer than a program manager, I wish I could redo the interview now, as I’m sure they would love all the experience I had running ONiB.

Jack will try to take credit for this year’s success, what with all the extra rooms he booked and his “ONiB doc”, but to be honest, I only looked at the doc once at the beginning of fall semester :P

Here are some highlights :)

As an MC: modern-day (fobby) Chinese mom

Modern-day mom: Aiyah!  Ni zenme hui shi??? *smack*

Now as a Tang dynasty mom

Fusion scarf dance

Up high… hehe

Umbrella dance as part of fashion show!

Fashion show in my awesome contemporary qipao

Funny expressions #1: Running around giving flowers / chocolates / personalized cards to all choreographers, singers, and MCs

Funny expressions #2: Jack gave me Medium Panda!  I look like I’m crying but I wasn’t…

Everyone :)

They signed a card for me <3

Part of the ONiB decorations

They also signed it for me… aww <3  I love everyone in ONiB this year

Thunderbolt

I’ve had my Thunderbolt for a week now. Android is fine, except when it comes to a few minor irritations, such as forcing you to align all icons to their grid, and making the unlock screen unchangeable natively by the OS. I flashed Tesla Coil custom ROM in order to wipe out most of the junk. Grabbed LauncherPro for a more appealing and convenient home screen.

I also spent an unbearably long amount of time trying to find a clock widget that exactly matches the lockscreen clock widget in style and position. That way, when I unlock my phone it appears as if nothing changes except the bottom icons appear. Interestingly enough, there isn’t a pre-existing app that fits perfectly, so I was forced to customize a widget. Unfortunately, the only way I could get the time and AM/PM thing to line up is by making them separate objects. Unfortunately, when you go from a single digit hour to a double digit hour, it shifts everything out of whack. So I had to convert the time to military time which makes the AM/PM disappear. I’m thinking about actually coding up a clock widget to match it, but we’ll see about that. Maybe tomorrow…

Now onto wallpaper. I guess one payoff of my recent endeavor to convert all my movies/anime to HD is that I can capture frames from the video itself and the resolution is high enough to make a wallpaper out of it. I’ve always wanted some specific scenes/camera angles which I thought were neat. My goal is to have 0 icons on the default home screen. It will probably piss me off later on when I want easy access to applications, but for now, it looks cooler.



Ironically, I went through this same phase when I bought my new computer. I spent all this time browsing wallpaper websites and deviantart to find things to put up. Then I eventually got tired of it all and just switched my desktop background to plain black. Easy on the eyes and takes less processing power to render. Two for one.

Living on the Edge

I bought a HTC Thunderbolt because I get $150 off a phone from work and the offer was expiring soon. This is a pretty big step for me, considering I’ve been using a LG VX8300 flip phone from 2005.

And so being that I just love adb shell, I decided to root my phone the moment I booted and connected to Verizon. The process is a long series of adb commands. There is a potential to brick your phone, and if not that, mess it up into a state that would require a lot of troubleshooting to recover from. I realize now that I probably should not have started this process 5 hours before I have to drive to the airport to fly back to Pittsburgh.

Luckily for me, everything went correctly and I now have a rooted Thunderbolt. First agenda of business, removing BitBop. What the hell is BitBop? Get that shit out of my technique.

Summer Wars

I downloaded and watched Summer Wars because it’s very highly rated on the Anime News Network’s Top Anime. It’s from director Mamoru Hosoda, who also did another highly rated Anime movie, The Girl Who Leapt Through Time. Frankly, I’ve watched both movies and they’re both boring as hell to me.



This one involves a geeky math guy who get’s invited by the popular girl to go visit her grandmother. Then she pretends he’s her fiance so the grandma will be happy. Oh yeah, there’s some virtual world called Oz where basically everyone conducts business and some virus is released. Math guy has to solve some advanced math equations (because all math geniuses can solve advanced cryptographic problems in their heads) and saves the world from annihilation.



Seriously though, I really don’t get this movie. You never get a real taste of what life in Oz is like because they never explore the world. They have a short narration explaining how it works and how everyone uses it. The only time you ever enter Oz is when they are fighting the virus, which basically makes it feel like a fighting sim instead of a virtual world where everyone does everything. It never draws you into the environment, despite it being extremely well animated and colorful. The main guy and popular girl get together at the end, but I don’t feel any attachment towards their relationship because they never develop the characters.



Basically, there is just a ton of crap happening and then all of a sudden the movie ends. This kind of reminds me of Spirited Away, where there is a sequence of totally random things happening and then all of a sudden the movie ends. But at least in Spirited Away I was so drawn into the world and characters that when it ended, it was like “What? Two hours just passed? Holy crap I didn’t even notice”.

Summer Wars is boring and I won’t be re-watching it ever again.

The Reason I Don’t Invest in the Stock Market

http://gizmodo.com/#!5791203/the-flip-camera-is-finally-deadyour-smartphones-got-blood-on-its-hands

When I first saw flipcams, I thought they were a great product. It allows you to shoot HD video, is small and convenient, and it pretty cheap. I was even considering purchasing one. Unbeknownst to me, Cisco decided that the product was pretty much dead and canceled it.

And this, ladies and gentleman, is why I don’t buy stocks.

Star Ocean: The Last Hope

Game is legit.



It’s been a long time since I’ve played a good RPG where I’ve really felt good about the story. I was playing Eternal Sonata but the gamewas so unbelievably boring I sort of put that aside. FF13 was such a huge waste of potential that I can’t see anything but that. Dragon Age, despite how much I liked the gameplay, had a voiceless main character and overly serious storyline. You can’t actually beat Demon’s Souls, you just do a little better each time. Thinking back, the last time I really enjoyed an RPG’s story was FF9 back in like 2004.

The storyline for Star Ocean is solid and well put together. There’s enough twist and turns to surprise you, and important characters actually die. I have two pet peeves when it comes to people dying. Too many people sacrificing their lives and it starts to lose meaning (I’m looking at you Gurren Lagann). Nobody dying makes it seem meaningless and trivial. Star Ocean hits that magic number where all the deaths really feel like sacrifices.

Besides that, they really have a lot of character development. There are dozens of cutscenes where party members are just dicking around or doing stupid stuff. It develops their personalities so much more and makes them all more likable. Edge sort of grew on me after I got past his ridiculous name. The Edge/Reimi relationship was very touching, because they spent so much effort developing the tiny details that go on between them. Amazingly, I found Lymie to be absolutely adorable. It’s weird, because I normally hate little girl characters in anime. But for some reason, Lymie really struck a chord with me.



Animation and effects are top notch. It’s not FF13 1080p brilliance, but the backgrounds are crisp, battle animations are flashy and elaborate, and everything just looks nice.

The battle system is well designed. The blindside mechanic is interesting and the chain combos are neatly designed and flow naturally. Star Ocean allows 4 members in your active party, and I’m convinced that 4 or greater is the ideal number of party members in an RPG. Anything less and there isn’t enough action going on at once to keep my attention. It also allows you to switch between any 4 of those members and control them, while the AI controls the other 3. Looking back, I realized it is extremely similar to Dragon Age, which may be why I enjoyed it so much.



The number one thing that pisses me off is how I can’t customize what my AI party members do. All you can choose between is “Attack with MP, attack without MP, focus fire on 1 target, or do nothing”. Where is my system of commands to customize actions based on number of enemies, health, mana, etc. Half the time, I find my AI friends wasting mana on spells like silence when the last enemy is 1 hit away from dying. Or they’ll be shooting fireballs while 3/4 of the party is dead. Seriously, any game that has AI controlled needs to implement a system where you can customize their actions. FF12 and Dragon Age got the system right. Never deviate from it.

Secondly, the actual attacking in the game is kind of counter-intuitive. You have attacks that pop enemies up into the air, similar to FF13. However, while they are in the air, none of my attacks can hit them. I’d find myself chain combing an enemy, only to have my AI friends pop him into the air so I miss my finishing move. It completely baffles me how a blatant game flaw like this slips into the final product.

Finally, they really need to cut back on the cut scenes. In order to play this game, you have to devote at minimum 2 hour chunks. 1 hour to get from save point to save point, and another hour to watch the cut scene that happens when you reach that save point. It’s just mind blowing how long some of these things are.

Overall, this game is amazing. I got around 40 hours of gameplay for just the main storyline. There are a ridiculous number of mini quests and fetch quests from dozens of NPCs in towns, as well as a few bonus dungeons/bosses to go through. I could easily get another 10-20 hours out of this game, which I may inevitably decide to do. Given that it’s only $30 now, this game is a must buy.