Tuesday, June 30, 2009


Rotating cube
I finally got around to learning OpenGL in earnest. My two resources are The Red Book (old online version) and NeHe's OpenGL Tutorials. I started looking at OpenGL stuff several months ago but got caught up in school and things.

If you take a look at NeHe's guide, don't be scared away by the first tutorial, which is more of a Windows lesson than an OpenGL lesson. The subsequent lessons are shorter and more pertinent to OpenGL.

I'm reading through The Red Book right now. Since it seems more organized than NeHe, I want to use it to get the concepts down before doing NeHe's tutorials. I'm on chapter 3, dealing with the modelview and projection matrices. I decided to take a diversion halfway through the chapter and write some small functions involving changing the view based on polar coordinates. It took awhile to get it right, despite the book itself being written well enough to grasp the concepts fairly quickly. Here I remind myself of the first rule of a CS degree: Never stop coding. And going through these tutorials I recognize the importance of thinking on my own and writing code aside from what's given in the tutorial. Otherwise a lot of time would be wasted later, when I'd have to go back and reread things more closely.

Probably what made me go back to learning OpenGL was knowing that I could do some OpenGL stuff on Android. Android uses a special version of the OpenGL API called OpenGL ES, catered toward embedded systems. I also know that the Wii and Nintendo DS homebrew libraries have OpenGL-like graphics APIs. In fact tons of platforms use similar APIs, so it's definitely worth learning.

Saturday, June 27, 2009

Internet Addiction

When I take a step back from all my distractions, the effects of computer addiction become clear.
I think that sometimes, simply knowing that I'm plugged into the Internet is enough to distract me from what I'm doing. That ethernet cable gives me the feeling that I'm missing something going on in the world, even without any little notifications reminding me so. It's much worse when I install programs and Firefox extensions designed to alert me with every little update -- things like Gmail Notifier, TwitterFox, and such make the problem several times worse. Of course, when I first installed those programs, I thought they were really cool and would help me keep on top of things, but I've gradually come to the realization that they just pull me further into a lifestyle that I don't want.

Which brings me to the problems of being distracted all the time. Is there anything inherently wrong with multitasking all the time? Some psychologists think so. They say that the idea of multitasking is an illusion, since the brain expends cycles "context switching" (to borrow a computer science term) between one topic and another. It's very taxing on your brain to do this sort of thing. However, having gone to school with many brilliant minds for a few years, I know that some people are very gifted and can handle this multitasking apparently very gracefully.

I'm not that gifted. Sure, I can handle doing several easy things at once, like browsing the internet, reading and responding to emails, coding a little, watching videos, whatever. It's the standard these days for people to always have at least a dozen tabs open. When collecting information, this is pretty effective. So I feel that the "news blogger" personality is very suited to this form of multitasking which involves a large volume of information retrieval, organization, and dissemination in a new and hopefully more digestible form for others.

But say I don't want to do that. I've done enough information regurgitation the past 17 years of school. When I want to be creative, I need to focus. Well, maybe not focus to the degree of zoning in on what I'm working on and completely blocking everything else out, but I need some space for my mind to work. It may just be my personality type, though. I'll admit that when in large groups of people where everyone's talking about their own thing, I have trouble keeping up and participating in conversations. I like to keep it to fewer threads, so talking to a few people or having organized discussions isn't a problem. I have a feeling this issue is very common among engineers. Anyway, in order to design something, including more thoughtful writing, I need space. Maybe move to a new locations. Right now as I write this, I'm disconnected and sitting over on my comfy couch away from my usual computer spot. I feel so calm!

A big problem nowadays seems to be kids substituting computer time for social time and outside time. Of course, when the weather's nice (which seems rarer these days, but that's a different story) the outdoors is more inviting. But there's so much to do on the Internet, and it requires absolutely no effort, so lazy kids with busy or lazy parents flock to it. On the Internet, the ratio of people needing to provide content versus people who consume it is very, very low. The Internet makes it mind-bogglingly easy for the same piece of information to be reused over and over (information being videos, articles, jokes, what have you). Laziness never lived in a better era.

I'm not writing to say the Internet is necessarily inherently bad. It has enabled more positive events than I can believe. It helps people build relationships, believe it or not; it helps connect people looking for specific skills and interests; it helps promote many worthwhile causes; it helps keep people informed of things like large political movements (Iran), scams and corrupt practices in our own country (certain "religious groups", big banks--Goldman's name has been brought up a lot recently, and of course, too many government officials).

But let's get real. There is way too much distracting material out there. Too much fun. Too many videos of cute animals, which I won't link to. So many horror stories of people who don't leave their rooms, who don't shower, who die in front of their computers. On the other hand, most of my current coworkers, all of whom are more experienced programmers, are great reminders that it is possible to achieve balance in your life. They show me that it's possible to evade this mental black hole. Maybe living around Massachusetts or New Hampshire makes it easier.

I need to interject here, though. Something that I am unsure about but have been suspecting for a long time, is that people's inclinations will automatically change with age. That is, for instance, as they get older, individuals will necessarily desire an outlet for self-expression, and hence a need to get away from distractions like the Internet, without anyone having to tell them that they should feel this way. So, many of the things we like as kids may naturally change, because we're programmed that way. We want and likely need some distractions when we're young, when we're still forming our opinions and knowledge of the world around us. Will adults regulate their own behavior when they see something's wrong? Will they identify the source of the problem as being the Internet? I very much believe that kids should be disciplined enough so they don't become fatties by sitting in front of the computer all day, but beyond that, is there that much wrong with the Internet in its current form? If humans are naturally able to help themselves--and find the valuable examples that other Internet addicts post on the Internet--then maybe we're OK. We just need to ensure that people actually have something besides the Internet in their lives.

Hmm, but then again, look at how many drug addicts know they are addicts and still cannot be helped. Welp, there goes that theory. (Nah, I actually believe that most people are able to pull themselves out of a rut when necessary. Unfortunately among certain groups, the prevailing attitude seems to dictate otherwise.)

Sunday, June 21, 2009

GraphicsGale, Awesome free sprite editor

The Internet has once again shown me a cool free software product. GraphicsGale is a really nice piece of software to let you edit pixels easily, very useful for DS homebrew, Android, etc.

It's got all the basics: a palette editor, a pen tool for drawing individual pixels, a bucket fill, selections, cut/paste, rectangles and ellipses, and text input. It also has layers, frames, and such for making more involved images. Animated gifs and icon files are only available for the paid version (1995 yen = about $21). But the free version has all the features I need at least. It's much quicker and simpler than using GIMP or Photoshop for such tasks.

I still gotta get used to using layers for everything though. Since I've been an MS Paint user for a long time, remembering to use layers takes some getting used to.

Sunday, June 14, 2009

Personal site versus fun site

Right now I'm waiting for my hosting with hostmonster to expire. I'm sharing an account with my friend Dokyun (leedokyun.com). I want a separate plan for cocosoco.com to make things a bit more convenient. Hostmonster is a pretty good host, I haven't had trouble with them and their rates are pretty good, so I'll most likely stick with them.

Anyway, I decided to register andrewshu.com and put it on Google Sites for now. I somehow feel I don't even need anything beyond that for my personal site. Google Sites is really fast for just making pages, having a decent default look-and-feel, and linking pages together with a consistent template. And this blog is also hosted on blogger and accessible via blog.andrewshu.com.

Maybe once I get more content I can worry about where to host everything. For now my plan is to have the more boring personal info and rambling type of blog associated with andrewshu.com, and to put the fun stuff on cocosoco.com. Fun stuff includes programs, stories and shared content from other authors, and whatever else. Yeah... best to come up with content before spending too much time deciding how to split the content up between a personal site and a fun site.

In the end, I'm thinking that from the visitor's perspective, a site called "cocosoco" is simply catchier than a personal site named after its owner. That's one thing that becomes obvious to web users, that when content has your real name all over it, it's got to be sober and digestible so real life acquaintances won't be scared shitless and whatnot.