November 2003 - Posts

30 November 2003
email wrapper
here is a class i wrote wrapping up the System.Web.Mail class...simplifies emailing from .NET applications. as it is a helper class, it reads in the email server name from the calling assembly's .config file...there is an overloaded constructor that will accept the name of an email server if you want to explicitely supply it. yes it's overkill...but well worth it in my opinion :-) using System; using System.Reflection; using System.Web; using System.Web.Mail; namespace Zerotrilogy.ApplicationBlocks.Framework { /// <summary> /// Class to build and send an email message. /// </summary> /// <remarks> /// Inherits from System.Web.Mail.MailMessage for simplicity /// </remarks> public class EmailConfig : MailMessage { Type myType = Type.GetType( typeof (EmailConfig).ToString()); // obect var ClassConfig configuration = new ClassConfig(); // exception message constants const string RECIPIENT_NOT_VALID = "You must provide a valid recipient for the email message. " ; const... Read More...
30 November 2003
age old debate
i wanted to touch on the age old debate between Java and .NET (and just Microsoft in general). java was originally devoloped as an applet language for the web, and for small compact devices that needed to run small applications in a minimal footprint (such as cable boxes, cell phones, etc). this was back around '95 when your only other options were either C++ or VB, perl, python, and other similar languages. what has happened to java along the way is probably the most severe example of code bloat that the industry has ever seen. Over the past 8 years, at least a dozen layers have been bolted on to java to make it do things such as CORBA, native method invocation (JNI), dynamic web page rendering (JSP), database communication (JDBC)...and the list goes on and on and on. Microsoft isn't exempt from attempting similar things w/ their database programming centric language, VB. who doesn't want to try and forget about ActiveX Documents, and the dreaded Declare statement for native DLL invocation... Read More...
26 November 2003
cup of cobol anyone?
lmfao so, here we are at the end of the year...for financial institutions that means tax time. the company i work for has a parent company...apparently a large company by the name of "Regions Bank"...their tax system is written in COBOL (Can Only Be an Obsolete Language?)...it's based on a *very* fixed field file. 2071 bytes wide, it is my task to translate this to a .NET string parsing app...let the games begin! gonna be a whole lot of messy string concats, stringbuilder is my friend! more to come Read More...
20 November 2003
Common .Net Interview Questions
Here is a list of some common questions I ask potential candidates when screening for interviews (and no, I don't expect answers as in depth as I've listed here): What are some of the objects exposed by the .NET framework that lend themselves to asynchronous method invocation, and what are a few ways architecturally to use these objects? What is the name of the interface used primarily as a way to check on an asynchronous method call? The simplest way to execute a method asynchronously is to start it with BeginInvoke, do some work on the main thread, and then call EndInvoke. EndInvoke does not return until the asynchronous call completes. This is a good technique to use with file or network operations, but because it blocks on EndInvoke, you should not use it from threads that service the user interface. Waiting on a WaitHandle is a common thread synchronization technique. You can obtain a WaitHandle using the AsyncWaitHandle property of the IAsyncResult returned by BeginInvoke. The WaitHandle... Read More...
18 November 2003
First thoughts on C# Generics...
as i'm sure everyone has seen, the next version of C# will include compile time support for super late binding...also known in the OO world as Generics. since even the early VB days, in order to achieve this type of functionality (albeit at run-time), we would use variant types, or in the .NET world, object types...then just supply several overloaded methods based on the actual type of object passed in. not only does this lead to severely repetitious coding, there is a severe performance penalty involved w/ casting, and in a lot of cases, boxing/unboxing. there is a really cool tool dev'd by MS at this link : this will show you just where the perf penalties are. in most cases, next to casting from object types, string concat's are 2nd in the performance hit category (see my earlier post on the StringBuilder object). this tool is basically a query analyzer type tool, but for managed code. anyway, on to generics. it's quite the buzz in the managed world of .NET right now, and for good reason... Read More...
17 November 2003
longhorn pt 2...
I managed to dig up an old HDD, wiped it clean, and got longhorn installed on it. at an idle after a clean boot, it sits at over 600 mb of RAM (though i am sure there is plenty of debug code in this release). first impressions are pretty good, though i can't seem to find the option of having an address bar displayed in windows explorer, which is definitely NOT a good thing as i cut and paste path names on a very regular basis, especially when trying to use MSBuild. i successfully wrote and built my first XAML app (an obiquitous "Hello World" application), and then built it using MSBuild. at this point, one of the advantages i see to using MSBuild and external build configuration files is that it moves the AssemblyInfo class out of code and into a common XML format. other than that, it's just one more file i have to keep track of, though i am sure some more benefits will reveal themselves to me. i am not a huge fan of command line building, so i will hold off on more coding until i can get... Read More...
17 November 2003
longhorn...
So i've been attempting to get the pre-alpha longhorn installed to no avail. don't attempt to install it on virtual PC, it doesn't pick up any of the host's hardware. more to come... j Read More...
10 November 2003
Late night ramblings...
Been gone for a bit, very busy building some prototypes, mockups, etc. and trying to learn everything i can about longhorn. it's pretty amazing that this many people are this hyped up about technology that won't even be available for at least 2 years. a friend of mine is getting a pre-beta of longhorn, whidbey, and yukon. i cannot freakin' wait to take it for a test drive! apparently the push from the boys in seattle is going to be one markup language for any front end GUI...which sounds great and all, but i hate GUI stuff so i don't really know how much that will impact me. they call it XAML and it looks quite impressive. what is grabbing my attention more than that is WinFS and Indigo. more on that later... one of the things i have noticed in ASP.NET apps is a severe lack of intrinsic ability to provide users a look at what's going on for long running processes...status notifications, etc. given of course that anything over 30 seconds running shouldn't be GUI based, however the need will... Read More...