Monday, April 18, 2005

Isn't it all for Fun?

Microsoft has a new site called Coding 4 Fun. I would hope that if you are a software developer that you would enjoy writing code. But I guess there are some projects that we do for fun and this site seems to offer resources for game development among other "fun" projects. The kind of project we would be working on if we had the choice.

My thanks to Chris for the tip.

Microsoft Releases a Linker for .NET

It is about time. Over a year ago, Joel Spolsky of Joel on Software requested that Microsoft provide a linker for .NET. Well, one year and just over three months later, Microsoft responded with ILMerge. From Microsoft's description:

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and dlls alike. It comes with several options for controlling the processing and format of the output, see the accompanying documentation for details.

In Joel's request for a linker he defined a linker for us:

It combines the compiled version of your program with the compiled versions of all the library functions that your program uses. Then, it removes any library functions that your program does not use. Finally, it produces a single executable binary program which people can run on their computers.

So ILMerge isn't quite a linker since it is not able to remove the unused library functions from the final assembly. Which means your finished assembly will be unduly bloated, much like the operating system it runs on.

My thanks to Chris for the tip.

C# Sites

They are showing up like weeds! You would think C# was some new programming language promoted by the biggest marketing giant on the planet that has a virtual monopoly on the desktop PC platform. Oh wait, it is.

Aaron B. just sent me a few C# sites that might be interesting:

C# Station
C# Station

C# Help
C# Help

C# Corner
C# Corner

What are your favorite reference sites? Well, beyond Code Project and MSDN.

Saturday, April 16, 2005

DevCon Abstract Submission

Finished submitting 11 abstracts for DevCon 2005. They should be able to find two they are interested in my presenting from there.

  • Unit Testing Applied - Real World Unit Tests
  • Class Helpers: Beyond language and platform RTL binding
  • Sealed and Final no More
  • Aspect Oriented Programming with Class Helpers
  • Aspect Oriented Programming with Attributes
  • Hello Mr. Garbage Man -or- The Garbage Collector and You
  • Attributes in .Net
  • HTTP Inside and Out
  • Aspect Oriented Programming in .NET
  • Real Web Service Clients

I can write up and publish the ones they don't select in another venue.

Tuesday, April 12, 2005

April 2005 Meeting Wrap-up

Here is the follow-up from the April 2005 meeting of the Boise Software Developers Group.

Chris B. did his review of Delphi for .NET develoeprs guide [Buy]. The book is divided into 3 parts: Intro to Delphi, Intro to .NET and Delphi for .NET. Overall Chris rated it really high for a Delphi developer moving into .NET. It had good coverage of some important areas. [ Full Review ]

Chris also reviewed Delphi 2005. His first big beef was the load time. I told him about the Delphi configuration manager ( See link below ) which lets you create a short cut that launches just Delphi win32 or any other configuration you can imagine. Really speeds up the startup process. Overall it is a powerful package that lets you do just about anything you want to do - combining Delphi, C#, Win32 and .NET into the same IDE and debugger. Maybe he will write up a review for this too.

Links from the meeting:

Delphi Configuration Manager - Lets you create multiple Delphi short cuts, each one launching its own Delphi configuration. Each configuration is seperated once it is made. So adding a component only gets added to one, unless you used the manager to propegate the changes.

Download details- CLR Profiler (v2.0) - Randy recommeds with code profiler for .NET. It is free from Microsoft. He was able ot use it to get himself out of a jam, but recommends starting to use it before you get into a jam.

DOSBox, a x86 emulator with DOS [on SourceForge] - Emulates a x86 DOS enviroment - with speed decrease and other controls for playing old DOS games. Has other uses for legacy software.

Mabus' homepage - Home of D-Fend a DOSBox frontend - A front end to make use of DOSBox easier.

MZ-Tools - Open source Commercial ( $39.95 to $399.95 ) plugin that adds refactoring and other productivity enhancements to Visual Studio .net 2003. Recommended by Dave H. I personally prefer DevExpress's CodeRush + Refactor!

Microsoft Action Pack Subscription - A way to get a lot of Microsoft products for a really steep discount (read the fine print). Does not include MSDN or development tools.

IT Conversations - A compendium of interviews and conference talks in audio format. A must visit for any IT professional.

Internet Archive - A massive collection of content on the Internet. Includes old public service movies, public domain works, dated archive of web page revisions, etc. Truly massive.

Next Month

Scheduled for the May 5th meeting:

Steve D. is doing either Aspect Orientated Programming in .NET or a review on Infragistics.

From Design Patterns Explained 2nd Edition:

  • Chris - Object Pool
  • Mike - Singleton
  • Jim - Factory

See everyone next month!

Delphi for .NET Developer Guide Review

Written By:
Xavier Pacheco
Copyright:
2004
Publisher:
Sams
Pages:
861
ISBN:
0672324431

Chapters (34)

Part I. Introduction to the .NET Framework

  1. Introduction to .NET
  2. Overview of the .NET Framework

Part II. Delphi for .NET Programming Language

  1. Introduction to Delphi for .NET and the New IDE
  2. Programs, Units, and Namespaces
  3. The Delphi Language

Part III. The .NET Framework Class Library Development

  1. Assemblies-Libraries and Packages
  2. GDI+ Programming-Drawing in .NET
  3. Mono-A Cross Platform .NET Project
  4. Memory Management and Garbage collection
  5. Collections
  6. Working with the String and StringBuilder Classes
  7. File and Streaming Operations
  8. Developing Custom WinForms Controls
  9. Threading in Delphi for .NET
  10. Reflection API
  11. Interoperability-COM Interop and the Platform Invocation Service

Part IV. Database Development with ADO.NET

  1. Overview of ADO.NET
  2. Using the Connection Object
  3. Using the Command and DataReader Objects
  4. DataAdapters and DataSets
  5. Working with WinForms-DataViews and DataBinding
  6. Saving data to the Data Source
  7. Working with Transactions and Strongly-Typed Datasets
  8. The Borland Data Provider

Part V. Internet Development with ASP.NET

  1. ASP.NET Fundamentals
  2. Building ASP.NET Web Pages
  3. Building Database Driven ASP.NET Applications
  4. Building Web Services
  5. .NET Remoting and Delphi
  6. .NET Remoting in Action
  7. Securing ASP.NET Applications
  8. ASP.NET Deployment and Configuration
  9. Caching and Managing State in ASP.NET Applications
  10. Developing Custom ASP.NET Server Controls.

On the CD

  • All source code from the examples developed in the Book
  • The entire text of Delphi 6 Developers Guide by Xavier Pacheco and Steve Teixeira
  • Third-Party Evaluation Software
  • .NET Framework 1.1 SDK, Web Matrix, and MSDE
  • A Free single-user licensed copy of Active! Focus 1.5 to manage software requirements, defects, change request, and more.

Review

Xavier Pacheco takes up a tall order with this book, not that his earlier books were easy, but this time he has to explain Delphi, VCL, and the .NET Framework. The target audience is both experienced Delphi developers, .NET developers who user other .NET languages (like C# -- gasp) and beginning developers.

How does he do with those three groups in mind? The first two are handled very well and this should be an excellent book for them. But the beginning developers will have to reference other sources. But for the most part, this book will work best for Delphi developers trying to move into .NET.

One note though: Borland is going out of its way to attract existing .NET developers to the new product (and Delphi.NET is a new product). It has redesigned its IDE so that it is similar to Visual Studio.NET - but not enough to confuse the two, expanded the language, and added lots of extra features and components that ship on the CD. The latest version of Delphi includes the .NET and Win32 compiler and C# Builder into one package.

For the Delphi developer I would say that this is an excellent book. It covers all of the major facets of .NET development, including ADO.NET, WinForms, WebForms (ASP.NET), WebServices, Threading, Garbage Collection, Strings, Interoperability, Remoting, and the obligatory chapter on graphics. Also, as a first for any general .NET development book I have read: a full chapter on Mono (an open source cross-platform .NET implementation). But above all, it has my favorite chapter title: "Ring the GAC", which is a reference to Dr. Seuss's book: "Red Fish, Blue Fish."

For the current .NET developer, most of this book will be review (assuming you are already familiar with the .NET Framework and capabilities), but the main meat of the book will be in Part II: Delphi for .NET Programming Language. Here Xavier does a good, through run through the Delphi language and features. Considering how many books he has written on that very topic, he should be pretty good at it by this time. The remainder of book is filled with implementation details dealing with Delphi and .NET.

Overall

So, depending on where your experience is and what you are trying to get out of this book, Delphi for .NET Developer's Guide could either be an invaluable reference, a really good one read (read through it once - ok, now time to get to work). But either way, the book will get you a long way into begin a Delphi for .NET developer.

Review by Chris Brandsma

[Book Reviews]

Friday, April 08, 2005

Borland's IDE Schizophrenia

An old friend of mine wrote this article and wanted a good sized soap box to share it from. Then he had second thoughts about taking credit for it. The article is accurate, but might induce flame wars among the zealots, so I can understand the hesitation. I present this as an accurate but anonymous post. Feel free to express your opinion.


Borland has recently taken an interesting step in that they are now going to play a leadership role in the Eclipse community and platform. I say "interesting" because the words "bold" or "surprising" aren't appropriate. Also because saying "reactionary" and "foolhardy" are probably too insulting (tho potentially more accurate).

In a recent interview, Borland's Raaj Shinde, a VP in the Together Business unit has stated that; "the Borland SDO [Software Delivery Optimization] solution is going to be built on two primary platforms. One is Eclipse, the other is Visual Studio." And he's also said that; "We will continue to add value to [JBuilder]," he stated. "We believe the framework we build on top of is really irrelevant, it’s the feature set, the functionality and the value that people want out of JBuilder, and we will continue to provide that."

Shortly after this interview, John Kaster posted a FAQ article to the Borland Developer Network that essentially backpedals over what Shinde said. John includes the question that is almost on everyone's mind; "Q: Will Borland continue to support its JBuilder IDE?" to which he fervently answers; "Absolutely!" However he doesn't answer the real question:

"Will Borland support JBuilder on it's IDE, or on the Eclipse Platform?"

Both articles share a common thread of throwing around the buzz-term ALM (Application Lifecycle Management). They both say how they're positioning themselves to be a driving force behind ALM. What they don't say is whether or not they are going to be a tools company. Borland - from an outside perspective - appears to be trying to become another Computer Associates. The last time they tried this, they took on the name Inprise. And it almost bankrupted the company. Borland needs to pick a focus - and stick with it. Borland is known as being a top-notch tools vendor. This move toward Eclipse and ALM smacks of reactionism and desperation. Apparently Wall Street agrees. On a warning of lowered income expectations Borland's stock is now down below 7.50 a share. Let's hope this isn't Borland's Swan Song.


I agree that Borland is really lacking focus. I used to work for Micron PC (now Interland or MPC) which had the same problem. They would roll out an incredible new offering, but then never really market it. They would change their marketing message every few months. They started as a top rate PC company, then started buying hosting companies and ISP's. Then they sold off the incredibly profitable SpecTek division and finally sold off the PC division (which became MPC) changing their name to Interland, which is just a run of the mill hosting company.

Interestingly, when the PC division refocused on building and selling personal computers it regained profitability. It has remained profitable ever since, even during quarters when every other PC company was loosing money. If instead of going through the identity crisis they just focused on their core competency - building good PC's - then they wouldn't have lost all that money or laid off all those employes.

I certainly hope Borland gain's its focus before they loose their way again. They should focus on what they do that works. If the industry recognizes them as a leader in development tools, which they do, then that is what they should focus on. They have good tools, now if only they would market them.

Thursday, April 07, 2005

Standards and Practices

We are looking to adopt some coding standards and best practices. Here are some good resources we found:

The DotNetSpider and MSDN articles both specifically say not to use Hungarian notation. I whole-heartedly agree with that.

April 7th, 2005 Meeting

On deck for the April 7th, 2005 Meeting:

In Design Pattern's Explained:

  • Mike on Chapter 19 - The Template Method
  • Jim on Chapter 20 - Lessons Learned
  • Doug on 21 - Singleton

For our obscure programming language of the month:

  • Steve D. will do a programming language beginning with X
  • Steve R. will share a language beginning with U.

Chris B. also recently finished Delphi for .NET Developer's Guide and will have a few words to say about that and his experiences with Delphi 2005.

I have a box full of nifty swag that INETA sent me in the mail. I be sure to bring it to share.

See you at the Washington Group building at 7 PM.

Rube Goldberg Software Devices

Jeff Atwood over at Coding Horror has an interesting post about Rube Goldberg Software Devices. Check out the video too, sounds like a lot of design sessions I have been sit in on before, although it was usually streamlined out before they were done.

Steve, a co-worker of mine, will often refer to overly complex systems as the Rube Goldberg approach. When I first started working with him we went to see how a system worked that had been put together by someone outside of IT and who was retiring. It involved about 10 steps that the operator was required to run, and relied on no longer supported, proprietary scripting systems. Since the system worked no one was going to mess with it, but if the process ever changes then I imagine it will be rewritten from the ground up.

Wednesday, April 06, 2005

Aspect Orientated Programming in .NET

I was just chatting with David Orriss and he recommended the Spring Framework for doing Aspect Orientated Programming (AOP) in .Net. They also have a Java version. Where AspectJ is a precompiler, Spring uses an AOP proxy objects to direct pointcuts to the aspect classes via XML descriptors. I think this is the same way that RemObjects' Taco works.

AOP looks promising and may be the next software development evolutionary step after Objects. David has been doing a lot with it on the Java side and speaks highly of it. I am glad to see AOP tools showing up for .NET now too.

Update: More links on AOP in .NET

  • Aspect# is an AOP ( Aspect Oriented Programming ) framework for the CLI (.Net and Mono). Open Source ( Apache License v2 ) on SourceForge.net.
  • The LOOM .NET project aims to investigate and promote the usage of AOP in the context of the Microsoft .NET framework. It offers two different weavers.
  • aosd.net is home to the annual Aspect-Oriented Software Development conference and community.
  • A MSDN paper on Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse covers both COM and .NET. Seems like I read this a while ago. For .NET they were advocating using attributes, which is an interesting idea, but requires modifying the original code to add the aspect.

Simpler Main in .NET

Wintellect has an interesting article advocating a simpler main block in your applications. Their main point is that you do not want an unhandled exception to be raised in your main block because you will have no other place to catch it. Basically your main should only have an try / catch block with a call to another method from the same class and a call to an exception handler in the same class. The importance of having them in the same class is it doesn't require loading other types / assemblies. They have some interesting points, but as usual with any proposed best practices there are as many arguments against as for it.

Ridiculously Big Visio File Size

I am guessing this is a bug in Microsoft Visio 2002. I am making these large (34" x 44" on a plotter) diagrams that show the relationships of various screen shots in an application. The file was passing 15 Megabytes in size with 6 pages in the project. The save time was a few (10 or 15 maybe) seconds, and I had more pages to go.

In order make the files smaller and decrease the save times I decided to split each page into its own file. The new file was 30 Megabytes. Twice the size for only one page! At first I thought it was undo data or something along those lines. I went through a few permutations to try and make it smaller, including manually copying and pasting the page into a new instance of Visio. Still no luck.

Visio Properties dialog While looking through the options I was looking at the Summary tab under File / Properties. It was set to draft quality and a preview of the first page. My first thought was that a single preview image couldn't make that big of a difference, but I decided to remove it and see what happened (since I tried everything else). The new file size was under 2 Megabytes.Visio Properties dialog

Hard to imagine that the low resolution preview image could be 28 Megabytes in size. I figure there is some bogus data that got cleared out when I disabled the image. To test my theory I closed and reopened Visio and put the enabled the First Page Preview again. New file size? 30 Megabytes. Changing the Quality (of the preview) from Draft to Detailed made little difference in file size.

I disabled the First Page Preview on the original 15 Megabyte file and it dropped the size to 12 Megabytes.

Out of curiosity I added a blank page as the first page and turned first page preview back on. That made no impact in file size, it was still 2 Megabytes. I looked back at my original 15 Megabyte (now 12 Megabyte) file, and the first page in there was very sparce of screen shots, which would explain why disabling the first page preview made less of a difference.

Moral of the story: Disable Page Preview in Microsoft Visio 2002, especially if you have screen shots and/or are using large paper sizes!

Monday, April 04, 2005

New Tool For Writing Code

From Slashdot:

A group of researchers, led by Carnegie Mellon researchers, have developed a new set of software tools that may revolutionize the way computer code is written. They said they have created a new breed of software called "SPIRAL" that automatically generates code for signal-processing applications - applications that help make computers run faster and cheaper. "What SPIRAL does is permit users to develop high quality code for new and old applications automatically, say in 10 minutes or less, saving time, money and aggravation for end users"

Whenever a new technology relating to software development comes out we see similar claims. Remember OOP, UML, MDA and Windows programming? A lot of programmers run for the hills to find new vocations since they will be put out of work.

The real result is the level of complexity expected in application development just increases by an order of magnitude.

Sunday, April 03, 2005

Delphi Code Profilers

Michael P. on TDAG mailing list was looking for a Delphi code profiler to identify dead code. This is a useful too to have. Used to be I used Turbo Power's suite (which I forget the name of now). With them closing shop I wasn't able to come up with a good answer for him.

Lucky for us all Stephen Q. provided the following list:

Looks like some good choices!

Nick Hodges chimed in later to point out that he is a reseller for AQTime. It is all part of his strategy to corner the market on Delphi tools.

Web Cam Street Shot

My thanks to Rich for the link to the Ada County Highway District's Advanced Traffic Information System with strategic street cams. I decided to take a camera that is placed near where I work and shows part of my view out the window for a web cam image on the side bar. I always assumed that in Boise, Idaho we were fairly immune to having our image captured by camera's without our knowledge. Guess I was wrong!

Friday, April 01, 2005

The Code Commentator

The Commentator uses revolutionary real-time language processing to actually grok your code and add the necessary comments on the fly. No more doco to slow you down. Just install The Commentator and watch as your coding elegance is eloquently decorated with insightful, nuanced commentary ...as you type. What's more, The Commentator's powerful Personality Controls allow you to tweak it's output so completely that it's as if The Commentator is speaking for you. In your voice. Explaining to those that need it, so that you can get on and get busy.