Friday, October 23, 2009

Syntax highlighting fever

Well, just stopped by to share a tip on how you can avoid hurting your eyes while working on Visual Studio 2008. If you're coding for long hours in front of a widescreen LCD with full brightness you might be suffering some headaches like me. Check out Winterdom's nice color schemes; http://winterdom.com/2007/11/vs2008colorschemes

The only change I've made to these settings files has been decreasing the font sizes. I'd like to see more lines as it becomes harder to keep track of lengthy code files by scrolling up and down frequently. If you don't like the font sizes just open the settings file in a good editor and change the FontSize attributes as you fancy. You can import the settings file from the Tools->Import and Export Settings... (pretty easy eh? :) ). Do not forget to backup your current VS settings by exporting them to another file in case anything goes wrong.

This is the modified DesertNights settings file I use for your convenience along with a screenshot ;)

http://ifile.it/v8c2ozd




See you then !

Thursday, October 22, 2009

Locked & Loaded


Hi there ! :)

I'm in a really cheerful mood while writing this entry as you may have noticed thanks to this piece of paradise you see to the right where I've spent my summer vacation. I've been quite since July but as usual that's because of my procrastination about writing :) . Things are going great to say the least. Projects are fun, schedules are tight, coffee is hot and knowledge is growing fast. I've been teaching myself so many things for the last few months. I've already started to develop a simple 3D engine on XNA and will write more frequently after mid-term exams (I promise :) ).

Upcoming entries will be about the experiences I gain while applying generic programming and template meta-programming techniques in C++ and C#. Generic programming is my sole focus nowadays really... I'm quite satisfied with my classical programming skills in C and "C++ as a better C". But I strongly feel that I need to improve my style in terms of "designing the code". As I've become quite conversant with STL, I want to take a step forward and taste the infamous Boost library which will also be a part of the language in its next iteration, namely the C++0x.

A few updates on my game development adventures :)

Well.. :) Still haven't produced something to show. But ! I've continued my researches and experiments as usual (but with greater patience :) ). I really got a good grip of 3D graphics programming in general. Developing a 3D engine is a rewarding process in terms of knowledge and experience but it's also sad to be aware of the fact that you can't beat CryTek as a "one man army" :) . My only purpose is to develop a simple framework which I can use to create a few simple games with. The real gain from this work will be some experience on meta-programming and knowledge about the clockwork of a 3D engine in general to suffice.

Well... That's all that comes to my mind for the moment. I feel an effusive urge to hit the "Publish" button as I am out of words and feel the need to break the silence in this space ASAP :) So,

See you soon ! :)

Friday, July 24, 2009

Life, coding, summer

Wow scary ! July already ?! (well end of July). I've done quite a few things during this time but I can't decide where to start. Random thoughts are torturing my brain right at the moment. Anyways, let's pick one thing at a time in the hope of not making a mess of this peaceful space of mine :)

So, I've bought a new computer !

It's an Intel Core2Quad blah blah which has 2Gb DDR3 RAM, an ATI 4830 512MB Shader 4.0 graphics card, an amazing 22" widescreen Philips monitor. It's a mid-range gaming PC and I just love it to say the least :) Been gaming like hell ! Far Cry 2, Mirror's Edge, Fallout 3, you name it... A small reward of my "outsourced" skills :) As I've bragged about in my past posts, I've been working for some people based in Silicon Valley. We are developing a "stereoscopic vision" software. The prototype phase has been quite a nice adventure. I have obtained some test equipment like 3D glasses and had so much fun :) Well what's stereoscopic vision ? Ever seen a 3D movie like the latest Ice Age 3 ? That's stereoscopic vision. You get the same scene from 2 different perspectives respectively for your left and right eye and your brain handles the rest :) Quite exciting. There are many different flavors of hardware for stereoscopic 3d imagery. There are LCS shutter glasses which alternates between the left and right eyes by darkening one eye at a time. And there are special 3D displays which requires no glasses at all. But the idea is the same: "Show the same scene from two different perspective to the left and right eye respectively". I've been quite familiar with the DirectX pipeline during the project phase. Also played with OpenGL and Ogre3d engine too in my spare time. Nowadays I'm just researching, gaming and chilling out. Hopefully I'll be able to do a lot more with the knowledge I gained once I get rid of this procrastination :)

Anyways, I force myself to start developing a worthy side-project solely with my own initiative but no luck :) I just can't concentrate well enough or ideas just don't feel good. I haven't been trying to come up with cool (or stupid :D ) ideas for such a long time :) Well maybe this is the problem. I'm just forcing myself to crunch the keyboard, maybe I should change my ways a little. The cure for my procrastination might be the sweet ignition of an exciting idea :) But I just can't keep it cool nowadays. Just quick bursts of motivation and boom all the concentration is gone... It's too damn hot and I'm home alone, that I suspect might be the problem... Always sleepy, talking to myself... But I really try hard to stay in line, reading, thinking and trying to understand new things. And it pays somehow though little compared to all the hassle...

Well after checking what I've written so far, I've come to the conclusion that I need a "real" vacation. Period.

By the way I'm officially 25 years old as of May 31st. Hooray ! :) 25... It's like "Just do something already !!" :)) Well of course I am :) Always been... Sometimes I just forget what my big plan is. And I force my memory just to realize that there has never been such thing for me. "Just enjoy !" :)

- Just enjoy !
- "Just enjoy !" What a wonderful philosophy you have !

Man, that crook from Mad Max :D

Anyways... Let me grab a cup of instant tea. Ok, instantly I'm back, with a cup of tea in my hand haha ! :)

And all of a sudden I'm gone ! :)

See you soon !

Wednesday, April 15, 2009

Sorry for the delay

Ok, it's a common phrase I use when unexpected things prevent me from making the deadline. In this case I'm employing these words to apologize for keeping the "line" "dead" for so long... Enough with word games. What did I do for the last 4 months ? Actually nothing, to tell the truth :) . But of course not !! I've been doing things, like.. Coding ?! Maybe... Yeah... I did (try to) make some improvements on past projects, got new assignments etc. Right now I'm doing some small video processing job for some Silicon Valley based company. And it's really fun though I guess I'd better not tell much about it here (till it's finished maybe).

I haven't started to work on any games nor I worked on my OpenGL base code... It really breaks my heart... But I really didn't have the time. I'm doing 2 projects at the same time for now. But I hope to work hard and get my hands off those shortly... I really earned some valuable skills about DirectShow programming. Along with some knowledge about video processing. That really makes me feel good. After all it's not a bad trade-off. I know I could actually make some real progress about game development but I gained some valuable experience working off-shore. It's exciting to say the least. And I'm lucky that my employers are really good people.

Anyways I've been downloading and watching TV Shows (yes I do illegal downloads, I use BitTorrent, my IP is 912.1411.285.0001). IT Crowd really rocks ! :) And I guess I'll watch another episode before sleeping. See you around ! Will write more frequently. Promise !!

;P

Monday, January 12, 2009

Knock Knock !

Ok, it's been a month, a silent one to say the least :). No entries, but I've been quite busy hehe :) Final exams, projects etc.. I studied a significant amount of maths, crunched many lines of code, dreamed new things, dumped some of them, developed ideas, many of which turned out to be bulls... :) Feel like I'm on the right track, the little cute muse is flying around my head. Quite nice to feel the increasing traffic that my "Projects" directory causes on the HDD LED hehe :) (I'm really obsessive about Ctrl-S). Oh and I've recently had some pleasent moments with one of my most favourite games, Pizza Tycoon (1994) ! Yeah ! :) I've reverse engineered the GFX files and I'm planning to write a modding application. But that is a side project which I do for fun. When it starts to become something usable I'll release all the source and the information in the hope of not being sued by Microprose :\ (the game is listed as abandonware on many sites but who knows... ) Anyways this post is just to break the silence :) I'm good, alive and singing loud. Stay tuned for action :P

Thursday, December 11, 2008

A word on code quality

Hello fellow reader, and thank you for your interest in advance :). It's a nice sunny Thursday in Istanbul and I'm in the mood of chit-chatting with ya. This is about my latest project and code quality. So... I've been working on a video conferencing application for the last 25 days and successfully got my hands off the project before the deadline. The first phase was to develop the "middleware" that the application will be built on. I've developed 2 DirectShow filters to capture/push media samples on the fly. And a simple packet interchange framework along with a sample P2P video conferencing program demonstrating the usage of these.

First, a crash course on DirectShow (Go RTFM if you're serious about DirectShow :) ). In DS any media stream is divided into these packages called "media samples". And these packagas run through a graph of "filters" which itself, is called a "filter graph". I assume you know about what a "graph" is. Every filter (node) in the graph is connected to each other via it's "pins". And there are shared buffers to exchange the media samples. These buffers are accessed via the IMediaSample interface as the pin's Receive() or FillBuffer() method is called. These methods are callback methods and they are called as the stream flows through the graph. So you could write a custom DS filter and for example zero-out green and blue bits of all the pixels thus leaving only the red channel of the video sample in your implementation and call it a "OhYeahRed! Filter" :) Or you could compress these pixels and put your own typeid on the header and create your own compressor codec :) Got the idea ? And an example filter graph for the clueless reader's convenience is as follows :)

Suppose you have an application that just displays what your webcam captures. The DS filter graph would be like:

[WebCam device filter] ---> [Color Space Converter] ---> [Video Renderer]

WebCam device filter is a device filter around your webcam driver and
Color space converter filter changes the format of the picture and matches them to your screen resolution. And finally the video renderer filter shows the bits in a window it exposes (It's the ancient renderer, VMR7 or VMR9 is the way to go for a nicer application)

So a video conference application should basically do

WebCam ---> Video Compressor ---> SinkFilter ---> [App] .... Internet .... [App] ---> PushFilter --> Decompressor --> Video Renderer

SinkFilter: passes all media samples captured from the upstream filter to the app with a custom COM interface.
PushFilter: passes all media samples retrieved from the network to filter graph

This is my naive approach to the problem also.

Well I've developed a SinkFilter, a PushFilter, a very simple protocol (only 4 types of packets namely, audiotype, videotype, audiosample, videosample), a demo server app and a demo client app. The demo applications were developed in C#. And all the buffering work is done on these applications. I've avoided to do any complex job in the filters. Because DirectShow filters are COM objects and it's a very tedious job (though not so overwhelming but requires time) to develop a reliable buffering and synchronization mechanism on that level (with the added hassle of resource management with C++ and reference counting trouble of COM objects etc.) . The thing is, everything worked fine on my computer during my tests, but when my client tried to run the demo he ran into many error messages which I haven't bothered to handle :). Shame on me on that regard. You know the feeling when these kind of things happen. And yes, these things happen :). So I revised all the work I've done and noticed many places that could be flourished with proper error handling mechanisms thus expelling the feeling of uncertainty. While gazing at my 250 hours of keyboard crunching for a moment (which is 5 distinct projects), I realized that:

The most important characteristic of high quality code is

ERROR HANDLING (period)

Shame on me, shame on me... :)

Monday, November 17, 2008

These are troubled times...

Midterm exams, on-going projects and night-outs seem not to fit in 24 hours long chunks of awakeness... But I guess a little push makes the progress more significant. I'm so happy yet stressed by the amount of busy-ness I suffer nowadays. I've been hired as an outsource developer by a San Fransico based company to build a video conference application and doing quite well for the moment :). I will take the numerical analysis mid-term exam at 14:00 and woke up at 5:00am to study (yawns...). This is not the me I'm used to :). Hope it works... So anyways... I've been doing quite a wizardry (ehem ehem :) ) on the project and will try to write a nice article as I couldn't find any good references on the subject except some good yet unanswered questions on various forums. Well... As I'm sipping my cup of tea I realize that it's high time I should get into a more romantic mood with those pages of formulas :) Wish me good luck as I am always short of that... (Always complaining :P )

Edit 15:38pm:
The moment I saw Mario on the screen of the calculator banging the princess, I knew it was time to give up...