Joseph Renda's blog

Visual C++ 2005 lessons

Its been a while since my last post, but I wanted to kickoff this blog column, of codesnippers, with a project, around C/C++ ... To begin, I'd like to introduce the tools I'll be using, Visual C++ 2005, and leave it up to the readers for a possible project. I have an idea, I'd like to attack at the end of the post.

My last blog was about reviewing my favourite cross-platform C++ UI, wxWidgets. Reading up on my peers on this site, I don't see too much C++ talk. So I figured, I'd start with an intoroduction on Visual Studio 2005 (aka Visual C++ 8.0).

Despite it being an evil Microsoft Empire product, its really not all that bad. If anyone is serious about being a software engineer, C++ knowledge is essential! And great C++ knowledge can take years to master. To start in this journy, I'd like to begin with an introduction:

Cross-Platform GUI Programming with wxWidgets (book review)

If you spend time writing applications targeting several platforms like Windows/Unix/Mac or even embedded platforms like Pocket PC (WinCE) then, no doubt you have come across a open source widget system called wxWigets.

Book : Cross-Platform GUI Programming with wxWidgets
By : Julian Smart, Kevin Hock, Stefan Csomor

Cross-Platform GUI Programmg with wxWidgets, was published recently, on July 25, 2005, and is a must for any cross platform UI developer. The goal of wxWidgets is not to replace UIs such as MFC or Motif even or GTK+, but to work above them. For a cross platform developer, this is a saving grace. I could now build advanced cross platform applications that have a native look and feel on the target platforms.

Perhaps like many, if you are unaware of wxWidgets ,also referred as simply wx, you may think its just another GUI, and the problem with that, is having people to relearn GUIs, which can lead to fustration. Even Joel Spolsky cautions about user fustrations with UI design, from his classic User Interface Design book. Lets face it, mostly everyone has experienced Micrsoft's Windows UI. So we have come to accept and expect certain Microsoft UI formalities. Like expanding a window by moving the mouse to a window edge. For most other UIs like motif, that would just move the window and cause user fustration. So the last thing we need is to re-learn another UI. Wx resolves this by using the native underlining UI on that platform, such as MFC if it were a Windows application, so the end result is an application that really is using MFC but was programmed with wx.

Some problems with new UI is often, that it is incomplete, compared to some UI like MFC. Most UI, don't include networking functions, memory management, database functions, or advance graphic engines. Wx is very complete, with ODBC functions, and OpenGL routines. KICAD is an open source CAD software using wx, how amazing is that!

Overall, this book is a simple read, it is geared towards C/C++ programmers, and if you have any experience with other GUIs as MFC, OWL you will quickly excel in its application. You can also use a variety of other languages such as Python, Perl, Basic, Lua, Eiffel, Java, JavaScript, Ruby, Haskell and C#.

I don't really have too many cons against the book. Other than, its really a beginner to intermediate introduction to wx. If you're a wx expert, you can still benefit from the book, I expecially liked its multithreaded section.

Also what is not covered in the book, is macros in wx which contain really nice features that allow for dynamic classes to be defined on runtime and imported via dynamic libraries and make for some cool plugin technology, for those whom don't wish to make thier application open sourced, and yet, want users to extend the UI of their application, via plugins.

About Joseph

So let me start this introductory, I'm a software engineer, perhaps a drone, trying to break out of this existence! That statement always reminds me of Apple's 1984 commercial that borrowed its clever plot line from Orwell's 1984 title. And like the drones of software engineers, I don't live in Silicon Valley, I don't work for Microsoft, nor do I have any contacts like Bill Gates, Steve Jobs or even Linus Torvalds for that matter. Much to my dismay, no capital venturist has been knocking on my door to fund me with the capital for this venture.

I have been programming all my life, as early as the age of 12 in basic, under MS-DOS, and I later 'graduated' to coding in debug! If you guessed 80x86 assembler, you're right! By my teens, I was as dangerous as a teen with a supersoaker gun, armed with idle time, phrack magazines, 2600 booklets, I spend alot of time trying everything I could from phreaking to penetration.

This was all before we knew what the Internet was, back then, Datapac and Tymnet was all we had for connecting at 1200/2400 baud modems to around the world. PBXes were too poor to use back then, that was until the USRobotics 14.4k HST modem, this was the Ferrari of modems, and then, all hell broke loose and that's perhaps the quintessence of my curiousity.

Today, I spend alot of time on securing code, and put alot of time in its asset management. I also like to put alot of time in refactoring code, and better design, with cross platform widgets.