Software Is Hardwork

ISimplicityAffinative: The endless pursuit of anti-complexity.
The technology-centric blog of D. P. Bullington.

Email D. P. Bullington View D. P. Bullington\ Get Software Is Hardwork code on CodePlex

Blog Post(s)

Office 2007 SP2 Update Fails on Windows Server 2008
Thursday, April 30, 2009

In the logs, it shows the following error:

An error occurred during the installation of assembly component {626422C7-6435-4BDE-A16D-3904F02AC23D}. HRESULT: 0x80131047. assembly interface: IAssemblyCacheItem, function: Commit, assembly name: Microsoft.Vbe.Interop,fileVersion="12.0.6425.1000",version="12.0.0.0000000",culture="neutral",publicKeyToken="71E9BCE111E9429C"

I have no clue. Microsoft, you are dropping the ball on this update.

If anyone has any ideas...I have tried:

  • Downloading again, from MSDN and MS Downloads
  • Copying to system drive
  • Killing the existing assembly from the GAC
  • Screaming "why me!"...

Windows 2008 Enterprise MSDN/IE 8.0/All Windows Updates

Eh.

EDIT: Fix can be had at: Update for the 2007 Microsoft Office System (KB967642)

Marker Interfaces Are Just Metadata
Monday, April 27, 2009

Wikipedia puts it quite succinctly: "The marker interface pattern is a design pattern in computer science, used with languages that provide run-time type information about objects. It provides a means to associate metadata with a class where the language does not have explicit support for such metadata."

The .NET Framework supports metadata as a first class citizen; without it many things would be impossible. I still come across .NET code written which uses the marker interface pattern and I shrug. A custom attribute not only feels right, but it also allows for the addition of additional context data to be associated with the metadata attribute (e.g. [DataContract(Name ="")] ...) where DataContractAttribbute is the "marker interface" replacement and the Name property is the context data. So moral of the story: use custom attributes in .NET code instead of the marker interface; they are conceptually equivalent.

Presenting at NoVa Code Camp
Wednesday, April 22, 2009

I am honored to be presenting at NoVa Code Camp in May.

Presentation Topic:

Proxy-less: Runtime WCF Client Proxy Factory.

Presentation Abstract:

An introduction to the SoftwareIsHardwork.ServiceModelClient API which allows for the creation of client-side service proxies via a factory pattern, with AOP semantics to handle the lifetime and correct disposal of underlying channels. No need to use ClientBase`1, svcutil.exe, or ChannelFactory`1...just ask for a proxy for a service contract and endpoint configuration name; its just works!

Hope to see you Saturday, May 23rd, 2009...More Details

A Build Script Can Reveal Faulty Assembly References
Sunday, April 19, 2009

In a previous post, I warn against improper assembly reference methods. The image below shows an example of a faulty reference due to mismatches between a development machine and build box. It was only discovered after a well crafted build (automation) script was executed against the code base.

(Click images for a larger view.)

Presenting at Richmond Code Camp 2009.1
Thursday, April 16, 2009

I will be presenting "From Software Programmer to Software Engineer: Concepts to Span the Divide" on Saturday, April 25th 2009 at 3:30 - 4:45pm in Room 226. Hope to see you there!

Abstract:

A Software Programmer is one who can merely slap together some code to just get things working. A Software Engineer is one who knows more than just a language and and an API; rather they know the hows AND the whys of constructing quality and scalable software. Topics covered include: well engineered software principles, software quality, development automation, developer productivity, and more.

See http://richmondcodecamp.org/ for more information.

Even in .NET, Public API Interfaces Are Immutable Once Released

Consider the following code for a v1.0 release.

public interface ITalk
{
    void Talk();
}
public class Loud : ITalk
{
    public void Talk()
    {
        System.Console.WriteLine("!!!");
    }
}
class program
{
    public static void Main(System.String[] args)
    {
        ITalk t;
		
        t = new Loud();
		
        t.Talk();
    }
}

The output of running hellow.exe is: !!!

Consider the following code for a v2.0 release. The changed assembly is only shipped and overwrites the v1.0 assembly.

public interface ITalk
{
    void Talk();
    void Whisper();
}

So the question becomes: what will happen when hellow.exe is run with the new assembly?

The output of running hellow.exe is: Unhandled Exception: System.TypeLoadException: Method 'Whisper' in type 'Loud' from assembly 'loud, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' doesnot have an implementation.   at program.Main(String[] args)

This makes sense; the v1.0 concrete type does not implement all of v2.0 interface's members.

Why is this important? There are many scenarios when you see Microsoft use classes instead of interfaces and say why? This scenario is the reason. Interfaces in public APIs are considered closed for modification (immutable) (see the open-closed principle). The COM technology relied on this concept; this is why you would see COM interfaces for example IWebBrowser, IWebBrowser2, et. al. Binary compatibility must be maintained in shared components.

Using classes, you can extend a type for v2, while still allowing for binary compatibility. Consider the revised following code.

public abstract class Talk
{
    public abstract void Talk();
}
public class Loud : Talk
{
    public override void Talk()
    {
        System.Console.WriteLine("!!!");
    }
}
class program
{
    public static void Main(System.String[] args)
    {
        Talk t;
		
        t = new Loud();
		
        t.Talk();
    }
}

The output of running hellow.exe is: !!!

Consider the following code for a revised v2.0 release. Again, the changed assembly is only shipped and overwrites the v1.0 assembly.

public abstract class Talk
{
    public abstract void Talk();
    public virtual void Whisper() { // default impl }
}

So the question becomes: what will happen when hellow.exe is run with the new assembly?

The output of running hellow.exe is: !!!

Since the revised v2 additional member has a default but virtual implementation, the type load succeeds and all is well. This ensures binary compatibility.

Development Automation Artifacts
Thursday, April 2, 2009

I hate the term “build script” because it is way too overloaded in software development circles. When someone says “build script”, what they usually tend to be referring to are the artifacts which assist in the automation of development activities such as coding, testing, packaging, deploying, etc. Thus I like the generic term “development automation artifacts”. Development automation artifacts include anything that can be used to full or semi automate tasks or processes. The following is a sample list of artifacts that fall into this category:

  • Scripts to get latest from version control at a high water mark
  • Build scripts (make, NAnt, MSBuild, etc.) in the strictest sense
  • Batch files or shell scripts
  • Continuous integration configuration
  • Manifests and descriptors such as application or deployment
  • Custom developed tools and libraries which aid in automation
  • Workflows
  • Documents
  • Code generation templates
  • Property files
  • Deployment package generation definitions (WiX, DDF, etc.)
  • … and more.

Speaking Enagements

  • 11/18/2010 | Charlottesville .NET Users Group | Charlottesville, VA | Topic TBD
  • 09/14/2010 | Hampton Roads .NET Users Group | Cheaspeake, VA | Topic TBD
  • 07/01/2010 | Richmond .NET Users Group | Richmond, VA | Topic TBD
  • (past) 12/08/2009 | Hampton Roads .NET Users Group | Cheaspeake, VA | SharePoint Antithesis - A Case Study in Pragmatic Software Architecture and Engineering Processes
  • (past) 10/04/2009 | Richmond Code Camp 2009.2 | Richmond, VA | Soothing the Pain Points: Data Access, Validation, Rules, UI, Presentation, et. al
  • (past) 07/23/2009 | Charlottesville .NET Users Group | Charlottesville, VA | Debugging on the Windows Platform
  • (past) 05/23/2008 | NoVa CodeCamp 2009.01 | Reston, VA | Going Proxy-less - The WCF Proxy Factory
  • (past) 04/25/2009 | Richmond Code Camp 2009.1 | Richmond, VA | Software Programmer to Software Engineer: Concepts to Span the Divide
  • (past) 02/05/2009 | Richmond .NET Users Group | Richmond, VA | Debugging on the Windows Platform
  • (past) 10/04/2008 | Richmond Code Camp 2008.2 | Richmond, VA | Going Proxy-less - The WCF Proxy Factory

Blog Archive

Post Labels

.NET (64) .NETv4.0 (3) ACID (1) ActiveDirectory (1) ADF (2) Affiliate (1) Agile (6) AJAX (1) Allocator (3) Analysis (1) AOP (4) ASP.NET (6) ASP.NET MVC (1) Assembly (2) BadIdeaPile (1) BagOfBolts (5) Blogger (1) Books (2) BuildMgmt (8) C# (46) ChoDNUG (1) CLR (1) CLRv4.0 (2) CMP (1) CMS (2) CodeCamp (2) COM (1) Conversation (1) Coverage (1) CUI (1) Database (2) DDD (1) DeadFxs (1) Debugging (9) Design (4) DevAuto (3) DevCfg (1) Development (118) DI (6) DiffMerge (1) Domain (1) DTfW (2) EclipseIDE (1) ECM (1) EntityFramework (1) Estimating (1) FileShare (1) Frameworks (7) GAC (2) Google (1) Hardware (2) HRNUG (1) Humor (6) IIS (4) ILDASM (1) Impersonation (2) InstallError (1) IoC (6) KingTodd (1) LinkedIn (1) LINQtoSQL (2) MarketingHype (1) MBUnit (1) Mentoring (22) Metadata (1) Microsoft (7) MOSS2007 (5) MSBuild (2) MSIL (4) MSSCCI (2) NAnt (2) NCore (2) NCover (1) NDatabase (4) NetUse (1) NHibernate (2) NoVaCodeCamp (2) NTSD/CDB (2) NUnit (1) Observation (2) Office (2) OOD (7) OOP (6) OpenSource (14) Opinion (19) Personal (3) PMP (1) Polymorphism (1) PowerPoint (1) PowerShell (2) Presentation (3) Process (4) ProjectManagement (2) PublicKeyToken (1) QA (2) RDNUG (1) Reflection (2) Registry (2) Resharper (1) Reversing (2) RichmondCodeCamp (5) SCM (11) Scrum (5) Security (2) Series (3) Server2008 (4) ServicePack (1) SES (7) SharePoint (7) Silverlight (1) SoC (3) Software (49) SoftwareIsHardwork (17) Speaking (7) SQL (2) SSO (2) StrongName (2) Suite2008 (9) Suite2010 (1) SwEng (19) TechBlunder (1) Testing (14) Thread (3) Tools (8) Troubleshooting (10) Twitter (3) Types (2) UAC (1) UIP (1) Vault (2) VB6 (1) VC (1) Vista (3) VisualStudio (15) VSIP (2) VSTS (1) WCF (4) Web (4) WebForms (1) Win32 (3) WinDBG (3) WindowsIdentity (3) WinForms (1) WIT (1) Workhorse (1) WoW64 (1) WPF (1) WSS3 (2) x64 (2) x86 (2) xUnit (1)

Disclaimer

© D. P. Bullington, all rights reserved. Everything posted on this blog is my personal opinion and does not represent the views of my employer nor serves to infringe on the sovereignty of any nation.