Entries from Apr 2004 ↓
Apr 28th, 2004 | Miscellaneous
For the past week I’ve had a nasty sinus infection I couldn’t shake, so today I finally got the doctor to give me some antibiotics. Hopefully they will bring me back to life soon.
Anyway, since lack of energy kept me from posting anything interesting lately, I decided to do something easy. :) Today I decided to offer thru the end of May 2004 a FREE Xtras.Net Developer Network (XDN) Professional membership to anyone who normally blogs about .NET on a frequent basis. Xtras.Net sells XDN Professional memberships for $99/year, but what the heck, my sinus infection has me feeling a little delirious so I though “Why not give away a few?“
If you are a .NET blogger, do the following and I’ll sign you up for a free XDN Professional membership:
- Post a blog entry something like the following telling others about the offer (actually I’d prefer in your own words, but verbatim is fine of you aren’t feeling creative):
FREE XDN Professional for .NET Bloggers during May 2004
Mike Schinkel, president of Xtras.Net, made an offer on his personal blog of a free XDN Professional membership (http://www.xtras.net/xdn) during the month of May 2004 for anyone that blogs about .NET frequently. If you are a .NET blogger, see Mike’s post for how to get your free XDN membership.
- Post a comment on this page with your name, email address (you can “no-spam” encode it if you like), and a permalink to your blog entry about the offer so I can add your blog to my blog reader, and maybe my blogroll. :)
That’s it. I’ll give a free XDN Professional membership to anyone who normally blogs about .NET even a reasonable percentage of posts, and the offer’s good through end of May 2004. However, I do reserve the right to deny the offer to anyone, or to withdraw the offer for any reason (though I doubt I would. The little lawyer in my head told me to say that! :-)
P.S. Truth be told, it was actually Roy Osherove’s blog post, not just my sinus infection delerium, that inspired me to make this offer. :)
Apr 26th, 2004 | Programming
Wired reports Forgent Sues Over JPEG Patent. According to the article, Forgent acquired a 17-year-old patent when it purchased Compression Labs in 1997 that Forgent believes can be applied to JPEG. Also according to the article, Forgent has generated about $90 million in fees on the patent from 30 licensees in Europe, Asia and the United States of which Sony accounts for $16 million.
I ask, what value did Forgent add to the world for their $90 million in revenue? Absolutely nothing.
Patents are a concept that have outlived their benefit, at least in the software world. Instead of fostering innovation today, they stifle it and create huge expenses for required due diligence to ensure technology does not violate a patent.
In my opinion, patents should be drastically reformed, if not abolished.
Apr 25th, 2004 | Programming, Web
In response to my post Why runat="server" for ASP.NET?, Talbott Crowell tried of Microsoft National Services tried to comment but got an error from dasBlog. I’ve decided to post his emailed comments here:
I understand your point, but the importance of [runat="server"] is more for consistancy and extensibility. If the developer has to mark some tags some ways (ie an [<asp:] a ignore to ASP.NET tell otherwise difficult be would it tags, the of one with collision name has future agent user some if What engine. by parsed needs what and Response.Write as directly sent is simplifies this Also, confusion. more creates then runat, using cases other in prefix)
To which I replied:
I was suggesting all tags would default to [runat=server], and for those that must not run at server, then the developer would use [runat=client].
To which Talbot replied:
If [runat=client] was required for all client-side tags, the parser would need to parse all tags and strip out the [runat=client] part. Currently, if my guess is correct, the parser simply ignores all text (tags or no tags) unless it is a tag with the [runat=server] attribute or a “<%” prefix or ssi “<!– #include…
Which ends our email conversation that was forced by the error Talbot got when trying to comment on my blog. Bringing it back online I respond with:
What would be the problem with the parser having to parse all tags? Unless I misunderstand, it only parses once after every time the file is changed, and from then on runs the compiled version.
Reasons I really don’t like [runat=server] include it forces markup to be a lot more verbose than it already is requiring lots of left-right scrolling or up-down scrolling, and it trips me up with run-time errors when I forget to include it, as do semi-colons in C#. Why have something required for the normal case? Why can’t the normal case be simplier and the default? BTW, I’d be happy with a directive at the top of the page that sets the default explicitly so that the default would not be hidden in configuration somewhere.
Oh, and as for the “dubious benefit“ statement, that deserves a future full and complete blog essay…
So let the comments continue…(And thanks Talbot for your comments)
Apr 25th, 2004 | Programming, Web
In response to my post Why runat="server" for ASP.NET?, Talbott Crowell of Microsoft National Services tried to post the following comment:
I understand your point, but the importance of [runat="server"] is more for consistancy and extensibility. If the developer has to mark some tags some ways (ie an [<asp:] prefix) and in other cases using runat, then it creates more confusion. Also, this simplifies what is sent directly to the user agent as a Response.Write and what needs to be parsed by the ASP.NET engine. What if some user agent of the future has a name collision with one of the ASP.NET tags, it would be difficult otherwise to tell ASP.NET to ignore a tag.
However he got an error. After I set <customErrors mode="Off"/> he was able to provide me with the following error information:
Server Error in '/Mikes' Application.
A potentially dangerous Request.Form value was detected from the client (_ctl2:comment="…s (ie an [<asp:] prefix) and i…").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (_ctl2:comment="…s (ie an [<asp:] prefix) and i…").
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[HttpRequestValidationException (0×80004005): A potentially dangerous Request.Form value was detected from the client (_ctl2:comment="…s (ie an [<asp:] prefix) and i…").]
System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +230
System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +99
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Talbot thinks it was the "<asp:" that caused the error. I don’t have the skills yet to debug this reasonably quickly in the dasBlog code; does anyone know?
Also, I don’t mean to look a gift horse in the mouth, but isn’t this something dasBlog should handle more gracefully? (i.e. I’m not faulting a program that is free, but instead discussing what would be the ideal design.) Or not because of it being a potential security hole?
As for Talbot’s response to my original question, I’ll post a clarification next to my question next.
Apr 23rd, 2004 | Miscellaneous, Programming
Roy Osherove at ISerializable is holding a contest for the "Most Useful Add-in/Macro for Visual Studio .Net" Contest." Submissions accepted through May 31st, and there are tons of cool prizes for 1st, 2nd, and 3rd place plus a Bonus finisher.
One of the best(!) prizes is an XDN Professional Membership from Xtras.Net. :-)
Be sure to submit an entry before the contest is over!
Apr 22nd, 2004 | Opinion, Programming
Matt Davey just posted about a presentation to management types where they asked the question (among others)
“What major advantage does the C# language have over and above the Java language?“
My first thought was “attributes“ which allow developers to tag code with metadata that can be programmed against but I was sure there was more. Since I’m not a C# guru I did a quick web search and found a great essay entitled "A comparison of Microsoft’s C# Programming Language to Sun Microsystem’s Java Programming Language" by Dare Obasanjo.
Dare listed the following things C# has that Java does not:
- Deterministic Object Cleanup
- Value Types (Structs)
- Run Time Type Identification (as operator)
- foreach Statement
- Multidimensional Arrays
- Preprocessor Directives
- Runtime Code Generation
- Pointers and Unsafe Code
- Pass by Reference
- Variable Length Parameter Lists
- Verbatim Strings
- Overflow Detection
- Explicit Interface Implementation
That’s a lot! Though that list is great, it was written as a list for developers, not managers. The question then would be, which of these differences could actually translate into a benefit a manager could appreciate?
I’ll take a stab at this, but would love comments from others on how to best present C# as having values business people can appreciate. I can’t find a direct business benefit for some of these features:
- Without Deterministic Object Cleanup Java apps could create unacceptable performance bottlenecks after deployment, which could cost a lot of time and money to fix.
- Delegates allows a more flexible implementation of callbacks, which reduces the complexity of code and reduces the likelyhood of logic errors.
- Enumerations increase robustness by providing type checking and reduces “copy&paste“ errors because enumerations can be converted to their string equivalent. Java developers will need to spend more time testing and debugging.
- Properties allow more natural syntax. If Java programmers “get lazy“, write directly to fields, and later need to trigger code on a field assignment, they have to modify a lot of client code. If they get lazy in .NET, they can just change the field to a property w/o affecting client code. However it does take a recompile (I’ve always hated that about .NET)
- Attributes allow developers to embed metadata and program against that metadata. This increases the power and flexibility available to a software architect designing an application framework. .NET modules are discoverable which greatly reduces the need to distribute related information across multiple source files. This reduces potential errors and hence testing and development time as well as increases reliability and robustness. In my mind this is probably one of the strongest benefits of using C# over Java.
- Runtime Code Generation allows an application to implement its own extensions based on user imput. Most developers will never attempt this, but when it is useful there really isn’t an alternative.
- Overflow Detection increases robustness and reliabiliy because potentially critical errors that might go unnoticed in Java will be caught by the .NET runtime.
- Explicit Interface Implementation can offer significant cost savings when naming conflict occur during code integration, especially if those conflicts are in 3rd party components.
That’s my list. BTW, I think VB.NET offers all the same benefits. Do you have more?
Apr 22nd, 2004 | Miscellaneous
I just got back from the Visual Studio Connections conference in Orlando, Florida for a few days. I went down for a few meetings, and had a really great time.
I meet Robert Green who on Monday night previewed a free set of soon to be released components called the VBPowerPack. Robert and I talked about why VS 2005 may actually even be better and easier for the newbie than VB6. And I met Joe Binder the program manager for the very cool “My“ namespace feature, who sold me even more on the feature.
I had a nice long chat with one of the nicer guys in the industry, Alex Homer, author of *ton* of books on ASP, ADO, ASP.NET, ADO.NET, and more, and he told me about the three (3!) book projects on which he’s currently working. His Advanced ASP.NET sounds really interesting and I can’t wait to get a copy.
I had a chance to talk briefly with Rocky Lhotka, another one of the nicest guys in the industry and another hugely prolific ASP/.NET writer, and he did his best to get the concept of SOA thru my thick skull. But rather than give you his explanation, which was great, I’ll give him the chance to first blog about it. I finally met Markus Egger whose Code Magazine just keeps getting better and better. I also finally met Steve Smith of AspAlliance, but somehow we got our wires crossed and never got a chance to talk; sorry about that Steve. Hope to see you at the next show.
I had a nice long catch-up chat with Shirley Brothers, president and founder of the Connections Conferences. I’ve been a hermit for a lot of reasons and we hadn’t spoken in probably four years. Penton acquired her company over three years ago and it turned out to be a great acquisition. I’m really happy for her because it so often turns out to be a nightmare for the acquired. Anyway, her conferences keep getting more attendees each year, and the attendees, speakers, and vendors I spoke with were really positive. Rene Garcia, president of SoftwareFX and a leading vendor of one of Xtras.Net said he loved it. One thing’s for sure; Shirley knows how to pick the venue! The Hyatt Regency Grand Cypress resort beats the heck out most conference hotels I’ve been to over the years.
I had a really nice dinner Monday with Kathleen Dollard, MVP and author of Code Generation in Microsoft .NET, and later on Tuesday we talked about many fine philosphical points, at least a few of which did involve programming and code generation! And then there’s one of the most consistently positive people in the .NET world: Don Kiely. They ran him ragged with three sessions [UPATE: make that five sessions!] but he still kept smiling.
So much for the name dropping. :) Traveling can be a real pain, but whenever I go to Microsoft-oriented developer conferences I’m always surrounded by great people and lots of old friends. This time was no different.
Apr 17th, 2004 | Programming, Web
One of the things I don’t like about ASP.NET is [runat=”server”]. Why can’t we set [runat=”server”] to be the default for certain tags? After all, isn’t every tag that starts with “<asp:” run at the server? Why make me bloat code? Why put something there I might forget to type and then waste my time figuring out while debugging?
Apr 12th, 2004 | Personal
Apr 11th, 2004 | Programming
Every developer has a set of bias that drives their development. A developer’s bias determines how they write code and what they consider is good vs. bad code. I believe there are few if any "well rounded" developers that provide equal weighting on all areas; that’s why having a team of developers with different bias can be a good thing (or they can tear each other’s eye-balls out, depending on the mix!)
For many, absolute performance of every line of code seems to be an overriding factor. Lately, a lot of developers have (fortunately) become focused on testing. Others focus on user interfaces; some on making them beautiful and others on making them usable. Still others consider security of utmost importance. And there are many areas I don’t mention here or below (if your area of bias wasn’t mentioned, please tell me about it in the comments.)
My personal bias is strongly towards architecture. For me, an architecture that provides maintainability (small functionality updates mean small code changes) followed closely by elegance (consistent naming and orthogonal design) and enablement of "RAD-ability" (standard patterns contained in a framework.) I have further bias towards resiliency (adaptability to change), robustness (graceful handling of unexpected conditions), correctness (ensuring correct logic and interaction), and minimized yet explicit coupling (subsystems communicate in few, well-defined ways.)
When I say I have biases towards the above aspects of architecture, I mean when a tradeoff must occur, I will choose architecture over, say, performance. That doesn’t mean I don’t want performance, but I won’t sacrifice architecture unless absolutely necessary. And I am pretty sure I’ve had these biases since I first started coding. Over the years I’ve learned that several of the aspects I mention are opposing forces, such as RAD-ability and resiliency. So I’m always trying to balance goals.
Why do I blog about this? First, as a background piece for future blogs I plan to write. Second to state that development goals are often at odds with one another, though that should be obvious to any developer.
And third, to point out that most disagreements about which language to choose or how to implement something are driven by developer bias. Without knowing a developer’s bias is it is hard to appreciate their arguments and come to a resolution. But more importantly, I believe every developer should contemplate their own biases because doing so will help them become a better developer overall.
P.S. As I was finishing this piece this post from Rick Strahl ironically just popped-up on my SharpReader about how some developers avoid .NET Reflection for perceived performance reasons.