Monday 8 August 2011

Initiation process the move from c# to c++ (Part 1)

Introduction

Its been quite a while that vie been using the Microsoft .net stack from its framework 1.1 release up till its current 4.0 release aggressively working a lot with its asp.net web framework to its WCF service technologies for about 5 years to be specific. It really brings a blessing to business when doing (RAD) rapid application development, it provides a lot of productivity even to novice programmers one can quickly feel the output of productivity when working with the framework as you hit the build command in Visual Studio however, being a inquisitive developer/individual I like expanding my knowledge in various domains and a firm believer that no one tool can service everyone`s expectations.

I started looking at some C++ code a few weeks ago mostly out of curiosity and as a result of a cold rainy weekend I found myself zooming in and out of C++ open source projects collected over the years, emule project being one of them. Not being a seasoned C++ developer I had a feeling that I didn't have a need or purpose to scratch here which was true, i didn't have need to !Bulk of my knowledge and experience resides in the managed world yet c# is similar in certain concepts everything feels so at home at times looking at code snippets and some times it felt like a complete stranger to me so why even bother learning this i mean i can spend the day playing a 3D game.. or learn something else in my domain my thoughts changed however, when decided to listen to my music play list using win-amp i found a potential case to apply my curiosity uhmm ....


The C++ Motivation

Two weeks ago I downloaded the latest win-amp and dabbled a bit with its plug-in functionality that it supports which allows amazing extensibility to the player, I was asking myself so how do i feature in the plug-in hall of fame .. Building a simple plug-in customized to my needs? And bragging to my friends how I build a hello world generic plug-in uh mm.. well I thought to myself well im willing to take up the challenge and learn the language...and silently sitting at my desk a thought creep-ed up "cant this be done in c# ?" there are probably .net managed wrappers that can support this however, it would feel like I’m cheating and probably miss all the fun not having a garbage collector clean up after me :), I took the stand at learning C++ (in my spare time) I felt it would feel more rewarding and probably improve my understanding of low level code.

I have some experience working with C++ and a *shy* amount of W32 programming mostly doing it for fun in my spare time back in the days building open GL cubes (heheh) and a "love for code with fast execution speed with agility. I now work (when time allows me) in c++ using visual studio 2010 and learning the win-amp API, vie started looking at the samples but the documentation for it is very fragmented im fighting with some basic concepts the API exposes but I’m getting the hang of it as get used to to language.


Prerequisites building a win-amp plug-in in C++:
  1. Time! and lots of it (If you not a seasoned c++/w32 developer )
  2. A suitable IDE i suggest Visual Studio express edition download
  3. Win-amp SDK5.55 download
  4. Lean important c++ concepts and the win32 API (DONT USE MFC its only a thin wrapper on top of the w32 API this only hinders the win32 learning experience even more)
  5. Reusable libraries try boost

Suggested C++ Resources and books

Read more on how to implement a functional win-amp plugin: Part 2

Enjoy happy coding !

No comments: