I very much like C# and the .NET runtime (the CLR).
One thing I think is important in programming is using tools and languages that do stuff for you, so you don't spend time on tasks that aren't directly related to the work you're trying to accomplish.
I was working on a little program to build a searchable database of the TWAIN mailing list archive and I needed to create a config file that would tell the program what to do. I thought about a few ways of doing it - of course XML seemed like the way to go.
Without even really thinking about it I used IntelliSense in the Visual Studio.NET editor to find the classes and methods I need and came up with the following code: System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); doc.Load("ConfigFileName.xml"); string ArchivePath = doc.SelectSingleNode("//ArchivePath").InnerText;
Three lines of code to read a string from an XML file (plus exception handling), and the part I think is most significant: I managed to figure them out without looking at the documentation. I know a bit about XML so I know you can do an XPath search for a node by name using "//" at the start of it..
I'm really looking forward to DirectX 9 and the CLR bindings for it - if it lets me write 3D code without worrying so much about the details of setting up the display and whatnot (by providing reasonable defaults and letting me change them if I don't like them) then it could make 3D programming a whole lot more fun.
11:18:13 AM
|