Monday, September 19, 2005

Behind the times

As with blogs, I feel that I'm a bit behind the time with programming languages, too. Today, I spent some time at work learning C#. I've been programming in C++ for years, and have never had much of a reason or the time to learn C#. However, C# (along with Java) is the 'next generation' of programming languages. It really would be better if I had experience with them, rather than just an academic outline of the main points of the languages and the syntax.

At work, I'm a team lead. I try to program while managing the code design and tasks for a team of three others. At the moment, we've completed our primary development, and are just fixing the bugs that our QA and management deem important. Since I have few of these at the moment, and I will be moving to working in C# in a few months, I'm teaching myself C#.

The team I lead develops a software application written in C++, using a UI framework called wxWidgets. It's a nice UI toolkit, supporting multiple platforms, including Windows, Linux, Mac, and various others, with even some support for PDAs and embedded devices. I like cross-platform support. It's also open source, which I also like.

Unfortunately, it's not a really big open source project. The big projects get lots of support, and tend to be well-written, stable, and quick to respond to change. The main platforms I write for at work are Windows 2000/XP and MacOS X. The Mac portion of wxWidgets is somewhat lacking, as most of the open source developers use the Windows or Linux ports. It works fine for small projects, or if you are willing to accept a functional, but quirky and sometimes ugly, UI. However, for a company writing apps they want to look perfect (or so they say), it's a real pain. You write 90% of the app relatively easily, and then spend seemingly forever on the agonizing minutiae of the project.

C# doesn't solve all of these problems. At the moment, most of the problems it may solve for my company are a result of just not supporting the Mac any more (on some new products). However, Microsoft's Visual Studio does nicely support the language in a way I've not seen before. Development using that environment may speed up development a good bit. Also, the protected and guided nature of C# relative to C++ may also help developers avoid stupid mistakes. It should be especially helpful for the programmers who are not as experienced, and make mistakes with pointers all the time.

It really is very easy using Visual C# to set up projects, draw out dialogs and windows, document code, add event handlers, and many other things. Of course, just like other apps, Visual Studio has quirks that you have to work around, but it seems a lot smoother for C# so far. Now, this comes with a price, about $750 a seat (Visual Studio Pro). Not great for the entry level amateur or open source developer. However, it isn't much for a professional working for most companies.

So, at work, it seems like C# is the winner for projects which don't need to work on the Mac. In the future, Mono may support the Mac well, and then it will be a better choice for that, as well. For my own projects, it seems like a toss-up between C# and C++ (with wxWidgets). I guess it depends on whether I want things I write to work on Linux or the Mac, as well as Windows. I do own the expensive Microsoft tools (bought by my employer). If I didn't, C# might not be worth it.

Now, the people at work who insist on using plain old C, I just don't understand. All of my colleagues were given the chance to take C# classes on company time, fully paid by our company, and to get a reward once they complete a certification test. Many seemed disdainful of this offer. Why would you want to continue using a non-object-oriented language if you didn't have to do so? Object-oriented programming has been the clear way to go for 10-15 years, if not more. I feel like I'm a few years behind, but I'm usually trying to learn something new, but some people are satisfied just doing what they've been doing for more than 10 years. Human nature?

0 Comments:

Post a Comment

<< Home