Twitter Weekly Updates for 2010-01-17

Working with funny JSON variable names

I was working on an User Interface (UI) that played with some JSON data sitting on the page. One of the variables had a dash (-) in the name which would obviously put a syntax error on the page.   After a bit of playing, I came up with the solution. I hope it helps someone. Obviously this naming convention is through whenever working with any Javascript object.

Snippet

var user = { "name": "Jamie Chung", "has-avatar": false };
alert ( user.name ); // Jamie Chung

Broken Code

alert( user.has-avatar ); // Error on page because has-avatar is invalid

Working Code

alert ( user["has-avatar] ); // true

I finally gave my old blog the boot!

It’s been a while since I’ve last posted and with due reason. First semester was seriously hectic. Meeting new people, doing new things and no one can ever forget those fun engineering classes.

I’ve had another blog up running for such a long time ( Not Another Portfolio ) and I finally did the 301 redirect on that website to redirect to my new online presence ( jamiechung.me )

I don’t know if anyone was using any of my tools or resources on the old blog but if you need me to restore them, just drop me a line. My email can be found at the top right of this site.

I hope to return to the blogging scene posting more frequent updates. It’s just that facebook makes it so much easier! Until next time. Happy New Years!

– Jamie


VT Orientation and More!

Virginia Tech

Wow. This week has been an awesome experience. It was only my second time visiting the Virginia Tech campus in Blacksburg, VA and I must admit, it is a pretty awesome place to be. (The first being back in April for Hokie Focus). The buildings are mostly surfaced with the traditional Hokie Stone and are complimented with the cool weather and dynamic landscape. I guess that’s only one thing that Virginia has over Florida: the mountains; literally. The orientation leaders (OLs for short) were all energetic and rocking out the VT Burnt Orange and Chicago Maroon. The vibe was different, the vibe I felt was right and I’m pretty confident that becoming a Hokie was the right thing to do.

Continue reading