What better way to learn about a new technology than to speak with a professional. In this article we will ask the tough questions that most programmers want to know about today's development tools.
Kais Dukes is a knowledgeable .NET enthusiast who is currently helping to build one of the world's largest financial systems using .NET technology. With a passion for Mathematics, Kais has always been keen to solve problems using his strong analytical skills. It was a pleasure to interview Kais, and find out exactly how he feels about today’s technologies.
Kais started out at the early age of 7 with Basic on a ZX spectrum, and has continued programming for the last 15 years. In the first of two interviews with Kais, we find out how a software professional feels about today’s technologies.
With the 2003 release of Visual Studio it’s clear that .NET is here to stay. How long have you been involved with C# and .NET?
Language development fascinates me. I’d heard that they [Microsoft] were working on a new language called COOL (Common Object Oriented Language) around 1998, mostly through unofficial Usenet posts. The speculation surrounding the incomplete C# submission to ECMA in 2000 was also interesting – it was not clear at the time whether Microsoft were planning to deliver just a pure language, or a complete set of class libraries (which they eventually did).
What is your opinion of the two technologies .NET and Java?
Java has been a success for several reasons; one being that a virtual machine enables platform-neutrality. It’s clear that Microsoft must have been at least toying with some form of virtual machine for quite a while. It’s interesting that the technology behind MSIL appears to be older than it looks – they [Microsoft] bought out Colusua, who where developing a universal virtual machine, in 1996. Look at that, combined the whole J++ push, and its clear that Microsoft have long watched Java with keen interest.
Java developers seem to see C# as a Java clone. What are the fundamental differences between the two languages?
Opinions vary. I tend to look at C# / Java comparisons on two levels, syntactically and semantically. Looking at syntax, there’s no doubt that the languages are very similar. When defining the C# language, it seems that features dropped from C++ in Java were put back in C#, a good example being enums – I still can’t figure out any benefit of not having these in Java. The mighty const keyword as in C++ also didn’t make it into C#, but there are some related keywords, like const for compile-time constants, and readonly for runtime constant values.
Looking under the surface, we see huge differences between Java and C#. The fact that C# compiles down to IL and not byte code, means that it’s possible to produce a human-readable representation of what the Virtual Machine will actually execute. Also, a C# developer can now write a class, which a VB developer can then take and use or inherit from straight away.
Being born a C++ developer, it took me a while to get my head around the C# dispose pattern – in Java you don’t get any finalizers, as I recall. Unlike Java, there are some really useful features in C# which really do help with code readability. The two the main ones I can think of offhand are the foreach keyword, and the intrinsic support for properties. I remember writing my first class in C#, as compared to C++ or Java and thinking: wow, this looks so elegant – no more get/set assessors, or complex array iteration.
When .NET was first released, there was much talk of web services. What do you think has been the single biggest change in .NET for the Microsoft developer?
Without I doubt, I would say the way in which ASP pages are built. The new ASP.NET model of programming is so much cleaner. Classic ASP was screaming out for help for quite a while. With ASP.NET, we now get compiled languages (no more scripting), true scalability, and finally proper debugging. Yes, the joys of actually debugging a web page, as opposed to hacking it to death until it works, cannot be overrated [laughs].
How efficient is C#?
We did our own testing on C# as soon as possible. When writing successful financial applications a lot of factors come into to play, development time is obviously critical, but so is performance. When taking the same code and just tinkering it to work on both the J2EE and .NET platforms, looking at the GUI side of things, Swing surprisingly came out a bit better than WinForms.
We found comparable results for business application logic, but when we actually sat down and tried to optimize for both, we reached the conclusion that optimizing in C# was less of a headache. Built in support for value types (lacking in Java) are a real help when trying to squeeze those extra few clock cycles out of your virtual machine.
In terms of speed in real time systems, would you consider C# over the classic C++ language?
If speed were the only factor, we would of course choose C++. A host of complex issues arise when deciding on the right technology to use. There is no “better language” only “better language for a given problem domain”. If we need to write fast, efficient code we go for C++. If the problem at hand is to write more readable, less complex code in a shorter amount of time, we go with C#. There’s a balance, and deciding when to use what can be make or break with a lot of these large applications.
For a real time system, you have to know where the bottlenecks are. Sometimes you’re not doing intensive calculations, but just waiting around for data to come in on a feed, in which case C# does fine. Also, for historic reasons a lot of these real time systems have a C++ core, which is hard to change, so you have to build on top. If we are starting a new project, or something separate we try to push for C# on the grounds of maintainability and reduced development costs.
How well do you feel the .NET Framework and Java Virtual Machine have handled debugging?
Looking first at Java, only with the recent 1.4 release of Java 2 has there been intrinsic support for debugging at a Virtual Machine level. In fact, they had to extend the Java language by adding the new assert keyword, although there are a few compatibility issues with older JDKs. Previously, most developers would use a custom assert class, to mimic this behavior. With the .NET framework, we get two useful classes in the System.Diagnostics namespace: Trace and Debug.
The debug class provides (among other things) assertions, while tracing allows custom messages to be dumped at runtime. Although there are many good Java debuggers available, and Visual Studio does a good job for .NET, code scales better under languages that have in-built support for debugging.
As you know PHP 5.0 is coming out with the Zend 2.0 Engine, what are your predictions on the take up of PHP 5.0 as opposed to ASP.NET?
PHP? [Laughs] I thought this was a .NET interview.
Actually, we agreed to talk about software technology – besides it’s a .NET comparison question.
Well, there’s no doubt that PHP is a very significant web technology. Rumor has it that it’s the dominant platform for dynamic online content. My experience with early PHP often put me into a more “just hack it” frame of mind, mainly due to the lack of OO features. This has got much better with recent releases. Now with the Zend 2 engine it looks like we’re getting full OO support, which is a true blessing.
My main interest in PHP 5 stems from the strong interop its offering. It looks like you will be able to plug right into COM, .NET and Java objects without any additional layering. Combining the new interop, exception handling and strong object model features of PHP 5, and it’s clear that compared to ASP.NET, PHP is now looking very attractive.
It feels that in every article or book I read is about how .NET focuses on interoperability. How do you feel .NET weighs up with other technologies that offer interoperability as well?
The nice thing about .NET is that interop was a clear design goal from the early conceptual stages of the framework, unlike with a lot of other technologies. But interoperability is a big word - you get language-based interop, allowing .NET languages to talk to each other, but then there’s also web services. As C# is a component-based language, the whole concept of interop becomes intrinsic.
When writing COM components under C++, even with ATL, it was fun being an expert, but writing simple code that everyone can understand is the key to successful software engineering. I think that we are going to see less demand for traditional cross-platform interop solutions such as CORBA, with the push for Web Services. There’s no doubt that interop is important, and this appears to be one the cornerstones of .NET
When it comes to documentation, what technology do you recommend to organize and maintain you project?
For C#, there is no doubt you should be using NDoc – it produces MSDN style help, JavaDoc and LateX files. It was nice to see that long-standing tradition of embedding documentation fragments at the source level was given first class status in C# with XML comments. You now even get intelligence when writing source-level documentation, like when you’re commenting method parameters – very useful.
The key to good documentation isn’t just about using the right tools. It’s important not to underestimate the amount of time it takes to write out at least a minimal set of working documentation; often it’s a significant percentage of total development time. This sort of planning needs to be factored in from the start.
Thanks for your time Kais – just quickly, what we can expect from the concluding part of this interview, on .NET components?
I think that the .NET component market is getting well underway, but there are lots of things which developers would find useful, but still don’t exist. Looking at Java for example, it’s clear which components are winners, and a surprisingly significant number of these don’t have .NET equivalents.
Thanks for interviewing for devarticles.com
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.