Saturday, 27 February 2010

Where are the real programmers?

In the past, everybody using a computer was subjected into learning how to program. Most notably in 8bit home micros which came along with a basic compiler. Of course you weren't subjected into professional programming, especially low level (except from those who decide to move from basic to assembly in the 8bits) or object oriented programming but this was a start and I believe it's a skill developed at an early age. You know, programming sometimes look to me like a savant ability, something that it gets hardwired in you brain in an early age because you like to play with computers instead of doing sports or going after girls. If you sometimes wake up and think of algorithms or dreaming of code and hobbyist programming projects you want to do while waiting for the metro then it has become a part of your life and you have become too efficient in this.

So, real programming doesn't mean to me having a degree or having read the textbooks. It means that you breath this stuff everyday. A friend who has a degree in computer science told me about his first interview which was truly terrifying, when they gave him a piece of paper and asked him a simple question. To write some code in his favorite language that calculates the area of a circle. He was stunned and couldn't think of anything for minutes till he wrote something that was probably wrong. He told me that when a white piece of paper is given to him and he is asked to write a program from scratch, he just can't. He would prefer to have the solution in front of him so that he can study and understand. Needless to say, seconds after he told me the question I already had structured the whole thing in my mind but that's a very easy problem anyways.. (I spent more time in doubt to figure out whether the area of a circle is 2*pi*r or pi*r^2 (I always confuse these two for some reason :P))

I understand him. I have the same problem with maths and I have a degree in maths. I admire or tend to be puzzled by some people who have the talent to be given a mathematical quiz or even a question to prove a theorem we haven't done in the book yet and while I am stunned and can't think of anything for minutes, they have already come with the right way to solve these out of the numerous wrong paths you could follow and end up in a dead end. I don't speak about straight mathematical calculation problems or obvious things but things that few people can solve in almost an instant even without having read the solution before and the more common mortals may take half an hour and still need to scrap everything (this cost me a lot during exams, I had to either memorize hundreds of solutions of various problems in my mind or have that talent, neither which happened :P).

I have noticed the same situation when I was doing private lessons in programming to a computer science student. He was curious many times how I could be given a problem that they were just handed in class and tiny moments after looking at it I would already have an overview of which functions, classes, variables and methods I need to write and use. I had a talent and I didn't even noticed, one that non-experienced computer science students had to make me notice (one's ability is another's disability and vice versa). But it's the same kind of talent that puzzles me when I am unable to solve mathematics in a small frame of time while others have the cryptic answers in their mind already.

Of course, I can understand mathematics and use them for practical applications, so it's not a big deal for my job that I am not good at solving problems fast (you would be wondering how did I got a math degree while not being good at it), while a computer scientist not being good at writing code is a different thing. Of course, it's not that my friend (and many other people) is incapable of solving very simple programming problems. Given time even in front of a piece of paper they would be doing something. In the same manner, I would be able to solve any mathematical problem if I was interested enough and I didn't have to do it in a limited timeframe (like exams). We are not incapable, just not talented.

So, what is the think that makes someone a real programmer (or talented mathematician)? It has to be your life. I tell you, first of all since my eighteen or even before (that must be 1996-1998) I got that obsession about being good at one thing that most people see it like magic. It just happened. I just got the virus in my mind and started thinking about programming. It was the same time I met the demoscene and found my focus there. You know, demoscene had that thing (apart from fun or creativity or friendship), the feeling that you were a part of a unique community and you would be honored deeply if once you could make a great demo to inspire next generations of coders. It was the driving force that kept us working hard in endless nights of coding for nothing. One friend told me this particular phrase that I like: "Fame. It's the money of the internet!" (of course demoscene was existing before internet was introduced, but you know the draft). Imagine now how focused I was into this for ten years with what enthusiasm and that I woke up every day and thought of algorithms and code.

If I was so obsessed with mathematics, if I woke up and thought about challenging problems for endless years, then I wouldn't be so bad with it. But those where just studies, something I had to work with just to get my degree, not a passion, not a hobby or a way to gain self-esteem. Remember how many people may have chosen to start a computer science degree because they think it's the future, or they wanted to create computer games or become a hacker, without following a similar route like mine in the past. Of course, even if someone hasn't been self-educated in his youth, I still believe there is a hope for them if the focus to the new goal is huge. But how many of them were so much focused like I was that they ignore common life and become hermits? Most of them end up failing the courses and wondering what they are doing here.

I will tell you something else now: I am currently going through an MSc that involves both my hobby of programming and computer graphics and it's true that my performance is far below than what I thought (but I am surviving and sometimes doing good at courseworks). For various reasons I am much worse when I have to study these stuff than when I am doing it for a hobby. Also, most students I know (not from this master but mostly undergrads) doesn't seem to be the dedicated people or burned out with programming in the past as me but rather the lay off lazy people who aren't truly interested in the subject outside their job. How the hell are these people going to have real experience with the subject when they finish a master of one year if myself with ten years of experience and true love on the subject isn't focused enough (I am a lay off lazy person too and I am feeling guilty about it :P) when studying this stuff? A computer science undergrad who has finished his studies with the same "love" I have taken the math degree, could he possibly considered experienced in the field after getting a master in graphics in one year? (And don't tell me that not failing in the master will prove that he knows his stuff. There are various "alternative" ways to achieve "success" and you know it..)

Real programming is a way of life. You don't just learn it in universities in one or four years. Look at me! I have a math degree. I suck at solving math problems (in time). Usually I am too slow at reading the mathematical language. I can just apply them and make calculations. I have not a degree related to computer science yet but I can be more fluent in programming than most of the students coming out of computer science departments. A question is of course, how do you make someone becoming self-interested in the subject? Most probably you don't. It just happens to some when they decide for any reason to follow this path instead of doing what the rest of the people do. Another question is, how do you create the ground today for trying this in a world where there are plenty of multimedia, movies, games, social sites and other time wasters and the programming world looks so boring in comparison to these marvels (unlike how glamorous it is portrayed in movies). Of course there is a hidden creative magic in programming in the same way there must be in maths. Maybe schools or universities rarely manage to open the view of students towards the good non-boring side of these subjects. But then there must be a true focus from the individual, which would resemble more something like a true life dream rather than just the essentials for a job. But what about this uberinformation and glamorous world of computing today? Too many users but very few real programmers.

p.s. Part of the randomly scattered thoughts written here came after reading this post on Coding Horror (a lot of interesting stuff in this blog btw). It discusses stories of lead developers interviewing hundreds of computer science graduates and finding out that they can't solve even the simplest problems. Just read the post by yourself to find out.

Friday, 26 February 2010

Best racing ever?

I am in total love with Test Drive Unlimited, so much that I have bought the original from a computer store (the pirated still loads faster and doesn't need the CD-Rom or ISO :). It's a hidden gem, obscured by the regular boring brand titles, mainly Need for Speed and others too. I can't play anything else now in the category of racing games (except for good old Lotus 3 on Dosbox of course (Don't ask me if I have played the Amiga version :)). I don't know anything about the previous Test Drive titles after Test Drive 3 in DOS (too fast and clumsy to play but I used to like on my 386 (or maybe 286 iirc)). But this is definitely the best from the test drive series (also according to the grading in mobygames and other sites).

The single thing that makes it rule is the fact that it's an open space racing games. I miss these kinds of racing games (that's one reason I loved Carmageddon in the past, not because of the killings). The developers have modeled a whole island based on satellite images of O Ľahu in the Hawaii Islands (that's actually the place where Honolulu is, also Pearl Harbor, also Lost and many other movies and series where filmed). You are free to drive around 1500kms of roads and discover various beautiful places on your way.

Of course this alone wouldn't make it the best racing. Say something was very hard with the controls then it would be impossible to enjoy. But here things are playing great! I don't care much about realism, I am not an expert in this, I don't know how much is there or not in TDU but there is an menu option to select driving realism from something that is very aiding and feels like arcade to more hardcore modes. So, I am free to race for hours in endless places and enjoy it because the controls are good enough. Then the graphics, not always very important, but here they are beautiful enough when driving in a highway and watching the nature, the mountains, the sea from far away. Maybe someone would notice that some 3d models are funny, especially those of characters or things that are out of your reach (you can use some cheats and make your car fly to get inside an airport or above building, etc) but that's because it was not necessary to add more detail since it's beautiful enough and good for quality/performance adjustment when driving. The cars are very beautifully modeled though and the outdoor scenes look great. Now imaging driving a good looking car in the highway, having great feel of controls and a whole island for you in a truly open sense. It's the best thing ever!

But what? Only driving? No gameplay? No challenges? Of course they are here too! When you start you actually choose a character. You arrive at Hawaian airport with 200000$ and you rent a car to go to the nearest place to buy a home. Then you can choose your new car from three manufacturers. Then as an introduction you take your first racing challenge. You have a PDA that tells you your itinerary root to those stores and your first challenge. After this the real fun begins. You can drive through the whole island discovering icons that prompted to take part in various challenges like racing, best time or hiking quests or enter stores to by cars (there are a lot of famous brands from everyday people's cars to Ferrari's, Lamborghini's or some classic oldschool cars, also motorbikes. One hundred of beautiful vehicles!), clothes or a new house and quite more. There are hundreds of them placed in the island. You can either ignore them and free roam to the roads or play the game by winning these challenges and getting more money, new cars or houses with bigger garage to store all your babies. It's like a MMORG (massive multiplayer online racing game). It's funny that in the game while you drive for hours randomly, a number of other NPCs (AI players) drive around the island and sometimes one is approaching from the other side and either tries to tease you or ignores you. There is also traffic and police. The island is alive! I haven't tried the online play with real people (imaging 16 real life players driving in a big virtual world) but I bet it will be exceptional!

A sequel is being planned. I am curious how fun it will be. I am not even sure what I'd like as an improvement because I have everything in this one. Maybe pedestrians. There are no one of them in TDU and adding them would make the island feel more alive.

In a nutshell, open big free to roam environment, good and easy driving controls, beautiful cars and endless nature and roads. A dream of the racing gamer!

p.s. Photos from mobygames. Didn't have any time to make my own..


One day I have to study a bit how the math for the classic 2d water effect were derived so that I try to do the same for 3d. Well I did, but almost. It's just taking more neighbors in 3D space and changing some shifting values so that it doesn't flood as it usually happens with this effect. I found something. But it didn't worked perfectly I think. I just slow it down to 25 frames per second so that the dropping ripples can be seen. The moving ripples are much better.

There is actually a running executable if you happen to be a member in DBF forum. Here.

Tuesday, 23 February 2010

Fire 3D

Don't ask me why I try to do all my old classic effects in this 3D grid of points. I am just curious to see how they will look like. I am not releasing any source or executable at the moment but maybe I will use them in another demo or something..

Sunday, 14 February 2010

Computer movies suck!

After watching six seasons of 24, I wondered for another time, why is computer science so badly represented in movies in general? There are some so common obvious mistakes like huge sized letters in received e-mails or IPs with 10bit pairs that you'd think they would know by now how to avoid them. And then there is so much random tech jargon that in the ears of a computer or science illiterate sounds plausible but if you are into it then it can be fucking hilarious at best. Apart from the classics like "You should try to reverse the polarity!" or "Have you tried to extend the parameters?" (I don't know why but I have heard this so many times in 24), one of my most favorite I have read about (it's in transformers, I haven't seen the movie) is "The signal pattern is learning, it's EVOLVING on its own, and you need to move past Fourier transforms and start thinking quantum mechanics". I don't know if I want to laugh or to cry :P

Another thing I have noticed is the way all the user interfaces look and act like. Every little click makes a futuristic sounding blip. When someone tries to search in a database, the results appear slowly letter after letter with a continuous bleeping sound. If they have to search for a subject, hundreds of photos are displayed rapidly on the screen. Little windows of data pop up with bleeping sounds which if you pause the movie and try to read it's contents, it can be everything, from random hex or binary codes to senseless mixes of php, html, C++, Visual Basic and some random assembly code. Needless to say that the user is typing like a lunatic while all these things appear on the screen (He even types frantically while shouting "Come on! Come on!!!" at the screen as a download bar progresses, like he could push it faster or something :P).

Of course, a lot of these things might be intentional. Mostly done to add a special futuristic effect, something that I guessed correctly. As for the rest, filmmakers don't care enough since most of the viewers won't notice. But something funny I was thinking, when comparing with movies about doctors or lawyers or any other profession. Mistakes happen there too (I usually don't notice or care about, e.g. in House M.D.) but in my opinion the mistakes and senseless tech jargon concerning computers are so much worse and more obvious than for example movies with doctors, that if the same bad mistakes were happening in those kind of movies, we would hear a patient saying "Ahh,. my head hurts, I think I broke a cancerous nephelim!" while touching his foot and the doctor replying "Don't worry! Your thyrormone is in an upscale. All you need is a metastasis of tuberculosis on your blood vesel. It's all about hormones! I will give you a CT scan and you will just be fine.". Yes! That's how a doctor's movie would be like if it carried the same absurdity of mistakes and jargon as computer movies.

Is it just me or are computers badly represented in movies? Also, don't forget to check Computer movies suck for some more hilarity!!!

p.s. Oh, a friend also told me of a movie (I think it was the new Knight Rider) where KIT's memory was stolen and he said they need a supercomputer to download it and one child accidentally downloaded a portion of these data from the internet (of course, if you download files from the internet, they disappear from the server :) and it all ended up playing Halo on the X-box to acquire the missing file which appeared like a glowing orb. What The Heck? (Gotta see this movie, just for the hilarity! Or maybe not :P)

Tuesday, 2 February 2010

Plasma 3D

Just a little experiment I had after I watched a similar thing (but with much less points) in a NDS demo. I always avoided trying this because I thought it would be hard to visualize a 3d plasma since the inside would be occluded (although I thought then about alpha too) and it would be hard for the viewer to recognize and enjoy the 3d effect. But seeing that the NDS demo gave me somehow the impression that if a box of 16*16*16 non-blended thick pixels with 3d plasma coloring would work, then this experiment with more and blended would work too. Their version also reminded me of all these videos.

My next curiosity is to try out and see how the 2d water ripples version would work out in 3d. I am very curious about this. Probably like expanding spherical ripples that fade out by time. And maybe I could use the final result to also do displacement with the background? (because that's that's the standard thing I did in the old 2d effect too). How would that work? Also, I have first to add the effect of alpha per dot, because now all dots are additively blended by the same tiny percentage on the screen buffer (I also don't sort the points from back to front) and apply it on the plasma so that you can see some plasma bands appearing and some not being there, instead of a full blown box with more color in the middle. I am not sure about the result too but I will try..

p.s. Btw, my final project in my MSc will have to do with volume rendering in OpenCL and possibly fluid dynamics. I love those stuff and I hope I will have something here soon with nice teaser screenshots (and maybe youtube videos).