I’ve been working on some graphics work using SlimDx. I really like the library but the documentation is sparse in some places
IronPython and/or F#
March 11, 2008I’ve been working with a large project that has a lot of unmanaged MFC and C++ code, and new managed code using C#, C++/CLI with a many third-party libraries written in unmanaged code. Because of the complexity of the code, and sheer number of projects (>50 at the last count), I’ve been debating on using some scripting language to prototype and test code. I know Python, so I’ve started off with that. Unfortunately, Visual Studio 2005 does not have a good integration with the IronPython console. I tried getting the add-in sample to integrate with Visual Studio, but after wasting a few hours decided to use it without intellisense.
F# on the other hand has pretty good integration wit a REPL console, compiler and interpreter. Although, I know some functional programming, (doing some programming in Lisp, Haskell, and Boost.(Lambda|Bind|Spirit) in C++), F# seems to have an alien syntax. I’m pretty sure that after a few hours, I should get the hang of it. Probably, next weekend. Although its looking more and more likely that I’ll be at work this weekend again.
I do like this T-shirt though.
Brought to you via here.
sidenote:
I wish plain old C enums played nicely with CLS enums, or that I was smart enough to remember the nuances of how they differ.
Installing the Visual Studio Express Editions
February 12, 2008I’m installing the express editions right now. As much as I like the environment, I’m just not willing to fork over $200+ for the standard edition. If it works, Great!! Otherwise not so great, and I will cough up the money. That $600 rebate might have come in handy right now.
Documentation comments in C#
February 11, 2008If partial classes are commented by XML doc strings, then the C# compiler will append the text of documentation into one paragraph. So make sure you use <para/> before or after your comment string. For example,
/// <summary> /// <para/> /// Yadda Yadda Yadda /// </summary> partial class PageMarginsDialog : Window { //... Your code here }
… I did’nt know this before. Cool!
C#, Winforms Training
March 31, 2007March 28th through 30th, I went to a 3-day training workshop to learn about Winforms progamming in C#. This training came on the heels of a 5-day trainig course in C# held the previous week. (see here, here and here for more about that). I did not enjoy this training as much as I had enjoyed the last one.
My main problem about this training was that, because there enough time between the C# language training, I had not had time to internalize everything about C#, the VC# development environment and .Net framework the way I had internalized C++, MFC, and the Win32 API. I know that if a programmer is proficient in one language, then they can easily pick up other programming languages easily. C#’s syntax was’nt really the problem here but our familiarity with the API of the .Net framework.
People often confuse that the productivity gains of using .Net come from C#. I dont believe thats the case. The real productivity gains come from the Framework classes that Microsoft has published for UI, XML, multithreading, and their tight integration with Visual Studio. Infact, I believe that C# would be a lot less powerful had Microsoft not published all those .Net framework classes that come with the SDK. <Rant>The truth is that the person who sent us to this training believe in silver bullets. Having never gotten his hands dirty with the actual working of the code, this person really does’nt understand that simply putting programmers through a grindhouse of training, does not give you productivity gains</Rant>.
All the students were expecting a classroom environment, where the instructor gave a lecture, and then the students did some excercises. But this was a workshop, where lectures were minimal and there was more hands-on programming. Hands-on programming meant the students really needed to be familiar with Visual Studio 2005, C# and .Net. Infact the course material stated that trainees need to have at least 1 year of experience of coding in C# and .Net. In our case it was like a week. Simply put, we were not ready for this training.
All I personally got from the training was a higher appreciation of Visual Studio 2005. However, I have to say this about the IDE. I think the IDE is much slower than Visual Studio 2003. Its not as responsive to commands as the previous versions were.
C# training: Days 4 & 5
March 23, 2007My week-long training in C# and .Net came to an end today. Today the main topic of discussion was Interop, some form controls that might be interesting, brief coverage of topics like the use of attributes and multithreaded.
While I’m going to give high marks to the instructor, in hindsight the course material should have been selected with some care. The impression that was prevalent in the group was that the course was actually designed for people who had been programming in VB6 and had not heard of the newer technologies. This is probably the reason why the instructor went into painstaking detail about the C#’s language constructs and ridiculous amounts of details on .Net features that seemed to be trivial.
Inspite of all that, I think I gained some information that was of value. One thing that I learnt was about data visualizers. That is something that can be really useful. One way data visualizers can be used is related to debugging intermediate steps for image processing.
Next week, its Winforms training March 28th through March 30th, 2007.
C# Training: Days 2 & 3
March 21, 2007So I ‘m at the midpoint of the training. Day 2 was interesting where we learned about classes and objects, and there was some discussion of OO techniques. The one feature I really like about Visual Studio 2005 is the Object test bench. Now that is something I can really use at work.
Day 3 was about Collections, generics, Winforms, and ADO.Net. Of these the only thing that I fould interesting was generics. I actually went through the entire excercise and lab. I really like the way generics have been integrated with C# and the way the IDE is aware of them. In contrast, the Visual C++ compiler gives some of the most cryptic error messages when it comes to templates. But then templates are far more powerful than generics. I think by limiting generics for their role in collections and not expanding them to meta-programming like in C++, their use will become easier.
If I had been the one organizing this training, I would’nt have gone around doing it the way it has been done. I would have provided everyone of the developers the new Visual Studio environment, and given each of them a good C# book. I would have told them that they had exactly two weeks to learn the basics of the language. The real traing would have covered topics along the lines of
- Framework design
- UI Components/Controls design and implementation
- Interop
- Use of C++/CLI to write mix-mode applications and components. This is important because most of our code is in C++/MFC circa 1998.
I think it was pretty condescending of the organizer of the training to think that we needed help in learning how to write classes and objects, when we could have learnt about it on our own.
C# Training: Day 1
March 19, 2007Here is what I learn’t today. I’m a very mediocre programmer in C# because I dont know it very well. However, with the information I have so far, I have a feeling that most of the strength of C# comes from its extremely tight and very well-done integration with Visual Studio 2005. My question is this. How much of a role does an IDE play in a language’s popularity? I always suspected that it had a big role. Take me for an example, one of the primary reason why I’m still using windows is that I find Visual Studio so much easy to use compared to emacs, and I never really bothered to learn vi. And Visual Studio is a big reason why I’ve never moved to Linux as my primary desktop. Plus all my jobs have been in Windows-centric development shops.
Today’s lecture was mostly getting started with C# and familiarizing ourselves with the development environment and with the basic constructs of the language itself. They are mostly similar with C++ so did not have to pay too much attention. The instructor is funny and keeps a lively atmosphere in the classroom.
Posted by bybitsandbytes 
Posted by bybitsandbytes
Posted by bybitsandbytes