Tuesday, October 28, 2008

The Great Idea

Hi everyone,
As customary with all first posts, I will do a little intro about myself and what I do.
When Alexia and Juliana invited me to contribute to this blog, I gladly obliged, having benefited a lot from SOC, in terms of being granted incubation office space, as well as being provided with publicity opportunities. But more than just 'repaying' SOC, I wanted to contribute to the blog to share my experiences, and I hope that the blog will become some kind of 'idea' exchange, with students and bloggers contributing their thoughts and ideas on entrepreneurship.

I keep talking about "sharing experiences", basically because I'm still learning and building my business (hopefully one day it will be successful and I will be featured in the papers (: ), so I don't think I'm qualified enough to give advice. What I have done, very briefly summarized is (this will also serve as an intro about myself):
  • Graduated from SOC in July 2004, majoring in Information Systems
  • Together with my Honors Year Professor and another Prof, started DecisionWare Simulations and Games
  • Made lots of investor pitches, and none came to fruition
  • Organized a nation-wide business game competition in 2005 involving 500+ students
  • Was invited to go to Mexico (one of long-time users of our game is Universidad Panamericana) to give a talk in 2005
  • Worked with a number of government organizations on game projects including National Library Board, Asian Civilizations Museum and Ministry of Education
Intro aside, to the theme of my post, "The Great Idea". I thought it would be a good first post, since most of the time, business ventures are started on a single idea, that a budding entrepreneur and his friends discuss over tea-time or supper, which then gets drafted out as a business plan on napkins or scrap paper, then later formalized as a Word document. A simple business registration on ACRA is the next step, followed by approaching investors for funding. If that doesn't work, use the FFF method - Family, Friends or Fools to raise funds. And finally setting off with your plan to conquer the world.

I remember thinking like that while I was studying. Back then, I was already inspired by all the stories coming from Silicon Valley (1997 to 2000) about computer geeks becoming millionaires overnight. I attended talks and conferences to get ideas, and I remember this one about Technological waves (can't remember the exact name), and the speakers were talking about businesses becoming very successful because they were on the forefront of the technological trend. The one thing I remembered was at the end of the talk, a member of the audience asked, "Are you able to tell us what is the next trend?". One speaker replied, "If I knew that, I would be a very rich man!". I guess that guy asking the question wanted to get ideas for his "Great Business Idea". Well, we all know now that the dot-com bubble burst, and many companies that were built on "unique propositions" simply collapsed.

4 years on, I have come to believe that the "Great Idea" is over-rated. It is still true that you have to offer something extra, but there are many examples of successful entrepreneurs that were not the first to offer something new. From the papers recently we have Charles Wong (Charles & Keith) , Ivan Lee (Thai Express and other restaurants), and there is Google, which was not the first Internet Search Engine to be started.

The point is that it takes more than a good idea for a business to be successful. That is why I get a little irritated when people dismiss a business idea by saying "Oh, but I saw that on the Web already" or "I know another business like that". In this globalized world, nothing is truly original. So even if there is already another company doing something similar, does not mean your idea won't fly, or that your company won't eventually out perform the original company. On the flip side, you have to summon all your knowledge, expertise, connections and bring together a good team, and subsequently put in a lot of hard work into making the idea into a success.

- Kevin

Monday, October 20, 2008

Graphics - A story of convergence.

I've been quite busy with a multitude of assignments this week, and before i knew it, its the end of my guest week on this blog, so I've decided to just end off with a post on my favourite topic, graphics!

I've noticed that GPU technologies have been undergoing a rather dramatic transformation these few years. Every new generation of GPUs introduces new features and increased programmability. More and more parts of the graphics hardware now allow developers to introduce their custom code to generate some really cool effects. These pieces of custom code are called shaders by the way, and if you've played some of the latest games like Crysis, you've already seen these things in action.

But before we had all this programmability, graphics cards were monolithic, fixed function devices, much like your run of the mill calculator. It could only perform a limited range of tasks, and all of them did it the same way. So there wasn't much in terms of really cool graphics effects back in that era. But now, with programmable hardware, things have become really exciting.

Now if every new generation of graphics hardware added more programmability, there would certainly be a day when graphics hardware would become so flexible, they could be used for non-graphics applications. And in fact, that's what's happening today. Ever since programmable hardware appeared on the market, people have been programming it for non-graphics tasks. Researchers have used it for medical tomography, computer vision, molecular dynamics, financial options pricing, and the list goes on. This kind of development is termed GPGPU (General Purpose GPU) development, and it involved hacks and workarounds in shaders and graphics API (DirectX, OpenGL) to get applications to generate useful data.

The reason why developers go through all of that trouble to use graphics cards is because the hardware is incredibly good at performing a certain class of problems way way faster than a regular CPU can. This class of problems are known as stream processing problems and they have this characteristic known as data parallelism, where large datasets are broken down into smaller independent pieces that could be processed in parallel.

And real-time computer graphics is precisely a stream processing problem. Pixels were drawn onto the screen one at a time, and these pieces could be processed independently from each other. (Well, that's not quite the whole picture but just for the sake of simplifying the discussion, we'll stick to that understanding.) And so as it turns out, once we begin to think beyond the semantic confines of a pixel with programmable hardware, the GPU could be applied to stream processing problems.

In fact, if we were just to consider stream processing problems, when nVidia debuted its 8800 series GPUs, it was about 200 times faster than Intel's Core 2. Today's GPUs have hit 1 teraflops of computational performance. So the next time you're buyin a new graphics card, in a sense its like buying a compute cluster for about 500-700 bucks. And while In CPU-land, we're talking about 4-6 CPU cores, a GPU device these days can have up to 256 streaming processors. That's a lot of computing power.

And I think it is this combination of increasing programmability and stream processing capabilities that have led to the convergence that were seeing today. And this convergence has taken many different forms.

GPUs are becoming increasingly versatile beyond graphics applications. There's nVidia's CUDA (Compute Unified Device Architecture) where developers can write stream processing applications in C. Then there's nVidia's new PhysX driver that enables games to run complex physics calculations on the GPU. Also, there is currently a research explosion in shader development. And a recurring theme in many publications involves bringing traditionally non-realtime graphics techniques into the gpu, making them real-time. In fact there has been a lot of talk about real-time raytracing. So, we're seeing a lot of things that were traditionally CPU implementations being switched over to the GPU.

The distinctions between GPUs and CPUs have begun to blur out. Intel has predicted a future where GPUs will become fully programmable and it is attempting to jump ahead of the curve, with the Larrabee project, a device that's speculated to comprise of up to 32 lightweight x86 CPU cores. A well known industry figure even went as far as to speculate the death of standard graphics APIs in the future, as anyone will be able to come up with their own graphics APIs with fully programmable hardware. There are even rumors that AMD is planning on creating a fusion chip combining CPU and GPU into a single chip.

Well, between speculation and fact, its hard to tell what's really going to happen next. But I have a feeling this theme of convergence will continue to resonate in this field.

- Shijun

Friday, October 17, 2008

Software Engineering @ Electronic Arts

Before I started my time at EA, I was fully expecting to be doing simple supportive tasks, like documentation or managing build systems and so forth. Work that didn’t involve laying my hands on the actual game, because quite a few companies in the ATAP list don’t have the practice of giving interns full access to the company’s crown jewels.

And boy was I wrong. One of the first things I had to do on the job there was dive into the FIFA Online 2 source code and documentation. That’s more than 400,000 lines of C++ code with lots of proprietary subsystems to support the game, a nebulous implementation to say the least. It was a very daunting task, even till the end of my internship, I only managed a rough understanding of just the major parts of the code.

But one has to admire the technical achievement of those 400,000 lines of code. FIFA Online 2 is a networked game for up to 6 concurrent players that could run consistently at 30 frames per second. I’ve taken CS4344 (Networked and Mobile Gaming) before, and in that module you learn about many techniques for making games perform correctly in a networked environment, and it is no easy task at all. And although FIFA Online 2 shares many similarities with its console siblings, deep inside, it’s a different beast altogether because of these online constraints. Making a game like FIFA Online in a best-effort communications environment like the internet, meant that a lot of mechanisms had to go into the game to make it resilient to network delays and loss events. And it’s not just about coping with the characteristics of a network, it’s also about 400,000 lines of code running in REAL-TIME. I don’t know about you, but that’s a feat of engineering to me.

A lot of my time at EA is about absorbing all that engineering innovation that went into the product and applying them to the things I did. I worked on a couple of In-House tools, created my own custom builds of the game, designed a small code library for tool development, unified 2 different database access technologies under a single library, and I even started a Wiki server for documentation. So as you can tell, all that involved a spectrum of development skills. I’ve added a couple of videos to give you a better idea of what FIFA Online 2 is about.





That's JC, one of the producers at the Singapore Studio.

Some screenshots of the game

To further illustrate, my company has graciously given me permission to talk about one particular in-house tool I did at EA. And we call it the FIFA Asset Verification Tool. A tool for ensuring that assets were correctly integrated into the game. Assets, by the way, are game dev lingo for artwork, 3D models in this case, and the studio has a rather complicated asset pipeline that turned the Maya artwork that the artists did into resources that were loaded by the game. Often artists needed to verify their work in the game and before this tool it was a rather cumbersome process. Furthermore, they couldn’t mix and match soccer players with various team uniforms and animations.

FIFA Asset Verification Tool


The tool exposed many hidden functions in the game by loading a custom-built DLL of the game and initializing the various database, rendering and animation subsystems to generate what you see in my screenshot. From a technical perspective, this tool involved:
  • Win32 Programming
  • Software Engineering
    • Code-reuse via the concept of DLLs
    • Software design that enabled 2 separate applications to work together
    • Advanced C++ programming.
  • Working with EA proprietary subsystems for Rendering and Animation.
  • Some Computer Graphics
  • ODBC and EA Proprietary Database access.
But the really important point for talking about this tool is that about 60% of the stuff that went into the tool came from things I had to learn while on the job. That’s 60% of stuff that didn’t come from things I learnt in school. And I think that “60%” is really a defining aspect of what ATAP (Advanced Technology Attachment Programme) is all about. ATAP is a platform for students to learn beyond the classroom, but it is also a glimpse into what it takes for one to be ready for the industry. And I think that our time here in SoC can only gear you to be prepared for that “60%”, to equip you with solid fundamentals that will enable you to remain relevant throughout your career.

If I were to map those fundamentals into the modules we learnt in school, here’s what I believe geared me for my internship:
  • Software Engineering (CS2103)
  • Database Systems (CS2102)
  • Computer Networks (CS2105)
  • Operating Systems (CS2106)
  • Computer Graphics (CS3241) 
  • Game Development (CS4343)
  • Networked and Mobile Gaming (CS4344)
The thing about making games is that it is first and foremost about software engineering. And to be a good software engineer, isn’t just about being good at programming, it’s also about being able to design software that’s easily understood, it’s about working smart and working as a team with colleagues from many different backgrounds. Making games draws from many different disciplines, from Psychology & Sociology to Marketing & Creative Arts. Computer Science is just one link in that chain.

In summary, here are the key takeaways from my post about the internship.

  • Self-paced learning approach
  • Unfettered access to source code and EA technology
  • Learn and apply things not encountered in school.
    • Windows Programming
    • Software Engineering Practices in terms of code reuse and library design
    • Game Architecture and Networked Gaming design
    • Advanced C++
I’d like to end off with a comment that my mentor at EA once said over lunch. It was during my first weeks as an intern and he was asking if I participated in any open source development, or if I made any games, or embarked on any personal projects. Sadly, my answer to all of the above back then was no, and he replied firmly: “Well, get involved!”. I'm getting myself involved now, thanks to these guys at EA. With that, I'd like to thank Chris Chua, Nigel, Venky, Alex, Haibing, Megan, Kee, BK, Adrian and the rest of the EA gang. This post is dedicated to you guys.

- Shijun

Wednesday, October 15, 2008

Electronic Arts Singapore

For some reason that's beyond me, the awareness among the student body, of what Electronic Arts does in Singapore seems to be just localization. Semester after semester when the school begins a new ATAP intake hardly anyone applies for an EA internship (ATAP = CS3880 Advanced Technology Attachment Programme). And after what I've been through for 6 months, I'm nonplused! I thought everyone would be jumping at the chance to work for EA.

So, with these three posts I'd like to get everyone properly acquainted with EA’s Singapore presence. I'll be talking about some of the things that EA does, followed by my next post, where I'll mention some of the things I did as a Software Engineering Associate, and lastly I’ll end off by talking about how fun it is to work for a gaming company like EA.

EA Singapore is a hub for many of its Asian initiatives from publishing to localization, including development, adapting many major titles for Asian gaming markets and EA recently established a new Asian Development Studio this year, right here in Singapore.

Yes, that's right, EA makes games here in Singapore. It joins 25 other worldwide studios, and I was among the first batch of interns they accepted. Considering that only 3 interns were accepted, I certainly felt very lucky. After all, this is EA we're talking about, one of the world's biggest (if not the biggest) interactive entertainment companies in the world. AND THEY HAVE A DEVELOPMENT STUDIO IN SINGAPORE!!

The EA Asia Studios is a full-fledged development studio staffed with a multi-national team of game development talent. Coupled with EA's global resources the Singapore studio works on some of EA's biggest titles, among which includes FIFA Online 2.

FIFA Online 2 is EA's biggest online game franchise, currently deployed in South Korea with more than 6 million subscribers. More than 6 million!! Now tell me another internship opportunity that will let you put the name of a PUBLISHED game with more than 6 million subscribers in your résumé. I think that fact alone should be reason enough to apply for EA, because it’s hard to get a job in the gaming industry when companies out there are seeking for a couple of years of development experience and a published game under your belt.

Of course FIFA Online 2 won't just be a name in South Korea. The open beta for Singapore will be launched later this year along with Malaysia, Vietnam & Thailand, with other Asian countries in the pipeline. By then we won't just be looking at 6 million gamers. All of that excitement is taking place right here in the Singapore studios.

And as an Intern, you will get to experience all of that excitement. Interns are fully-involved in studio tasks. You will become an integral part of the development process to take corporate objectives further. You will receive complete ownership in your areas of responsibility with support from many wonderful colleagues. You will be exposed to an extremely rich learning environment with unfettered access to proprietary EA technology. Man, talking about all this makes me miss my time there.

If you do end up being lucky enough to be accepted at EA, the onus will be on you to turn your time there into a wonderful experience. There's no spoon feeding, no textbook, no lecturer or tutor to show you the ropes. EA will put everything on the table and you can do whatever you see fit, but EA will be watching what you do with what has been provided. So in a sense, it isn’t just an opportunity to learn from the best and improve your skills as an engineer, it’s probably your first job interview. Albeit one that lasts for 6 months. If you’ve proven yourself, your journey in the gaming industry would have just made its first few steps and believe me, it’s hard to get a foot in that door.

Lastly, all work and no play makes EA employees dull people. We wouldn’t be able to make good games if we don’t know the meaning of fun. So at EA, we’re a close-knit group that makes an effort to enjoy ourselves and relax. And that means lots of FIFA, lots of Rockband, Happy Hours, staff benefits, special team events, and so on. When you join EA, you’re not just getting yourself into a 9-to-6 desk job, you’re joining a new family, and like a family, we take care of one another. I continue to be a part of this family even now that I’ve left the company, and I’m more than happy to be telling everyone about the EA experience.

I hope by now I've caught your attention. If nothing else, here are the key takeaways from my post. If you're lucky enough to be an intern at EA, we'll be talking about

  • Exposure to international aspects of business issues in the gaming industry
  • An internal glimpse at how one of the best in the industry makes games
  • Working with wonderful colleagues who have an endless amount of experience and knowledge to impart to you.
  • Rich learning opportunities. There's no limit to what you can learn from the company.
  • Close-knit, fun-loving working environment, where everyone’s treated like a family member.
In my next post I'll be talking about the technical aspects of my work at EA just to provide another perspective on the internship experience.

- Shijun

Monday, October 13, 2008

Greetings...

Hi everyone, I'm Shijun, this week's guest blogger. I must say this blog is a very interesting initiative, and having read the other entries from fellow guest bloggers, I only hope my posts will be as useful.

In any case, I'm currently a 4th year in the Computer Science stream and I absolutely can't get enough about Computer Graphics and Game Development. I've done some simple shaders, and did a few things in game development, but most fortunately, I spent the first half of the year as a software engineering intern with Electronic-Arts, a company which I'm sure needs no introduction. I'll be making posts about my experience with Electronic-Arts and about Graphics and Game Development in general. Of course, I don't claim to be any kind of expert, but I do hope what I have to say will be of some value to some of you.

Oh, and do let me apologise ahead of time for any lack of finesse in my posts. As you can probably tell, I'm not a very skilled blogger.

- Shijun

Friday, October 10, 2008

On Technopreneurship

“It’s reasonable to think that because you achieve something, even very little, there is the great temptation to quit taking risks.”

I quote this line from Donald R. Keough, the former President of the Coca-cola company, in his book “The Ten Commandments for Business Failures”. It is one of my favorite books which not only taught me important lessons on entrepreneurship but also lessons in life. I found the book close to heart as it points out that for most of the time, people tend to focus on the things they can do for success more than the things they should not do to avoid failures, which may be equally important in making a difference in our lives. And the top commandment from the thought leader was to “quit taking risks”.

While risk-taking takes many forms, such as relocating to a foreign country for career, entering a different industry, etc, mine took the form of pursuing entrepreneurship after graduation. I co-founded Dream Axis Pte Ltd with a partner from the industry with a core purpose to develop virtual space as a mainstream media channel. Prior to starting my own company, I was actively gaining industrial experience in the digital marketing industry (my identified area of interests) while I was an undergraduate. I was working with international digital advertising agencies and IT solutions companies, creating and delivering business media for corporations such as Microsoft, Palm and Singapore Airlines. During this time, I had also took a year off to attend the NUS Overseas College in Shanghai, and working full-time as a Marketing Supervisor at Fractalist China Inc., a mobile media and marketing company where I was engaged in the launches of various mobile marketing campaigns for multinational clients, such as Volkswagen and Nokia. These pursuits beyond the textbooks eventually build up to important experiences and networks for my new venture.

I hope to exchange more stories and thoughts with like-minded friends on entrepreneurship, or technopreneurship, in the coming posts. I would also like to relay my special thanks to Alexia and Juliana on your invitation to be part of this blog.

- Winne

Tuesday, October 7, 2008

NOI '01 Task 1

Wheee! That reminds me of the old time. NOI '01 was the practice paper I did before going for my first NOI in '02. Anyway, Juliana wants a new quiz. So I'll take my favourite question in all NOI. Not because it's hard, it's extremely easy. But the thing you learn from this question, gosh! A lot. Especially when you're an experienced university students (a Sec 3 student like I was wouldn't learn as much, though it does teach me quite a bit of thing).

So the question is very simple, given an array of n integers, calculate the frequency of the mode of all those integers (mode is the number that occurs the most number of time in the array). You can choose to write in C, C++, C#, or Java. To make thing easier, here is the function prototype:

In C:
int find_mode_frequency(int* ints, int n);

In C++:
int FindModeFrequency(const vector<int>& ints);

In Java:
int findModeFrequency(int[] ints);

In C#: similar to Java.

Now here's the catch... you have to provide 4 different algorithms:
  • with Theta(n^2);

  • with O(n^2), Omega(n);

  • with Theta(n lg n);

  • with Theta(n).

(Those who have heard this question from me before, refrain from spoiling!!)

- Chris

P.S. The actual question can be found here (look for Task 1).

Edit: Thanks to Edwin for providing argument that the challenge is not very precise (sloppy in fact), read comments 1 to 7 below for additional information. The challenge has been changed slightly to use tighter bound. Again, apologize for being sloppy with the bounds. The spirit of the challenge remains, to find different algorithms that does the same thing with different performance characteristics.

Saturday, October 4, 2008

Guess what's printed out?

I'm not supposed to be posting anything, but I just thought of this simple puzzler (I'm sure I'm not the first one who thought of it, but it's interesting anyway).

#include <iostream>

int main() {
short a;
int b;

a = b = 65535;
std::cout << a << std::endl;
}

I thought of this problem when watching Lecture 2 webcast of Stanford's CS107. I was bored so I coded it right away and guessed the answer (correctly, fortunately; my 2's complement is not as bad as I thought it was). Watch the lecture here.

EDIT: It's too easy? I hear you. (: So here is a second, harder version of it:

#include <iostream>

int main() {
int a = 65535;
short b = *((short*)&a);
short c = *((short*)&a + 1);

std::cout << b << " " << c << std::endl;
}

Hint: If you thought you've solved it and are very confident with your answer, here's a hint; yes, this hint is only for people who has already solved it and confident with your answer. The hint is "it depends".

While these quizzes look like it's created purely to torture people (yes, that thought crossed my mind, and hear hear, I did have a good share of laugh when some suffering friends came crawling begging to be released from this torment...). No, just kidding (the laugh part), we mostly ended up having great discussions on what's happening, and you get to learn a lot from those discussions.

- Chris