Software Engineering : This category relates to interesting computer related stuff that I am researching or reading about. Most of it is in the area of .NET technologies which is the focus of most of my computer related time at the moment.
Updated: 9/21/2004; 3:34:27 PM.

 








Subscribe to "Software Engineering" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

Subscribe To
Mark's Weblog

 
 

Wednesday, May 14, 2003

At least according to this article, the Google to index and search blogs separately article that I mentioned is not correct.  In fact, "there's been no consideration of removing weblogs from our index."
11:47:08 PM   []    comment []

The picture says it all:

The Ultimate PC Chair


11:26:02 PM   []    comment []

Compiler Rather than Programmer Declared Checked Exceptions
Google Search It
In the an earlier posting from today I mentioned the article "What I Hate About Your Programming Language."  Below is a quote about these exceptions from the article:

"I like the idea of checked exceptions in some situations, but forcing every method to catch all exceptions that its child calls or may call can be tedious. I'd rather be able to ignore an exception and let it propagate upwards. Sometimes, I'd rather not worry about exceptions at all."

Recently during a C# course the Java programmers expressed regret over no support for checked exceptions and yet C# intentionally decided not to support them.  His comment about sometimes having checked exceptions seems rather difficult to implement because how do I have my function support checked exceptions when the function I am calling does not have them?  In other words it seems rather difficult to implement a sometimes checked exceptions scenario.  What is expressed by the Java dislike above is that the knowledge of what exceptions could potentially would be nice to have but the work involved in being explicit at all times about what is being thrown is cumbersome.  Java favors explicit declaration over the maintenance it causes. C# goes the other way. 

Perhaps the compromise would be that the compiler adds the meta data about what exceptions could be thrown rather than the programmer?  This seems relatively achievable in all cases except when interfaces are used since interfaces have no implementation it is not possible for the compiler to know what exceptions could possible be thrown.

Speaking of exceptions and interfaces.... how does Java do this?  Do you have to declaratively state what exceptions an interface could possible throw and if not, what good are checked exceptions because when calling an interface you have no idea what exceptions are thrown?  Alternatively, if interfaces require you to declare what exceptions are thrown then what happens when my interface implementation wants to throw an exception that isn't declared in the interface?  Presumably it can't.  I prefer the latter implementation but my preferences don't really matter.  How does Java handle checked exceptions on interfaces?


11:44:48 AM   []    comment []

This article is a nice discussion of various programming languages.  I was disappointed that the dislikes of C# were not mentioned, however.  Of the dislikes listed I believe the author was quite accurate and I appreciated his thoughts. 

In the first half of the article the author discusses what to look for when evaluating a language.  As part of that he says:

"Consider what happens when someone proposes a great new language feature. There are several possibilities; the language designer may reject it outright, saying that it doesn't fit in the language.Consider what happens when someone proposes a great new language feature. There are several possibilities; the language designer may reject it outright, saying that it doesn't fit in the language."

This prompted a thought that I don't believe any mainstream languages support.  Why can't we write code that runs at compile time and changes what the compiler generates?  For example:

I would like to decorate my class with a TraceAttribute such that when the .NET compiler runs a trace message would be inserted at the beginning of the functions on the class.  To do this the .NET compiler would call into the TraceAttribute code at runtime and pass the CodeDOM of the class that was decorated with the TraceAttribute.  The code inside the TraceAttribute would then be able to iterate through the CodeDOM and insert the call to trace at the beginning of each function.  The knowledge of whether the TraceAttribute was a normal custom attribute or a compile time attribute, an attribute invoked at compile time, could be determined by whether it supported an ICompileTimeAttribute or derived from a CompileTimeAttribute.

This is a .NET implementation of such a feature but hopefully the explanation, even in its brevity, makes sense.

Below is one more quote I enjoyed:

"...a language that could prevent really, really bad programmers from doing really, really stupid things probably wouldn't be useful for much else."

 


11:11:29 AM   []    comment []

I never for a moment believed this story but I did mention it because I thought it was fun especially since it was picked up by major news sources such as the Wall Street Journal.  According to this article, however, it was indeed a hoax but, none-the-less an intentional one brought on by the British (I love the British sense of humor) MSN division.  It would'a been a nice April Fools joke.


5:48:34 AM   []    comment []

© Copyright 2004 Mark Michaelis.



 


May 2003
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Apr   Jun


Recent Posts