Wednesday, December 29, 2010

Behavior-Driven Development with SpecFlow and WatiN

I’ve never been a huge fan of TDD in its purest form. This is an interesting approach though to BDD that accomplishes the same thing and more.


I’m interested in your thoughts in this article.
http://msdn.microsoft.com/en-us/magazine/gg490346.aspx

Here is the code if you wanted to download it:
http://code.msdn.microsoft.com/mag201012BDD/Release/ProjectReleases.aspx?ReleaseId=5241

How to respond to a ridiculous timeline...

Mozart’s response to his father’s inquiry about an opera due to the Duke in just 3 weeks is classic:


"Everything has been composed, just not yet written down." – Letter to Leopold Mozart [1780]

Friday, December 03, 2010

How to succeed in Internet commerce by being a jerk

An interesting read that one of the engineers on my team forwarded on to me...

http://www.nytimes.com/2010/11/28/business/28borker.html?pagewanted=1&_r=1&partner=rss&emc=rss

"I have stared into the black-eyed-heart of online shopping darkness and seen a smiling Russian immigrant entrepreneur staring back at me. That's the only way to describe the feeling I had after reading David Segal's New York Times expose on how to succeed in Internet commerce by being a jerk. The story and interview with one Vitaly Borker is a must read for every online consumer and any Internet merchant who runs an online business and works hard to cultivate a Google Search result presence."

Wednesday, December 01, 2010

Our field's next generation

If you haven't read the Editor's note of the Nov. 2010 issue of MSDN magazine entitled "Proactive Eduction" and you're in the software development career field, then I would encourage you to do so.
http://msdn.microsoft.com/en-us/magazine/gg309186.aspx

The article really got me thinking about the benefit for any organization of substantive size to have an internship program.  Such a program would target high school students interested in programming and college students majoring in computer science or related field.  It could be paid, un-paid, or both.  IT groups would need to work with their HR department on the details. 

I could see such a program having the following benefits:
1) It could breed qualified candidates for junior programmer new hires upon graduation. 
2) Those professionals that are more seasoned would gain teaching and mentoring skills.
3) The cost of labor performed by interns would be low and financially advantageous to departments.
4) "Giving back" would provide good marketing and publicity for the organization.

I'm sure there are disadvantages to having such a program, but I just can't think of anything that's even worth noting.  Just my 2 cents.

Wednesday, October 20, 2010

Typical Waterfall SDLC process (paraphrased)

Process:

1. Establish contact
a. Gather high-level description
b. Identify audience (i.e. everyone, line-of-business)
c. Define process (current process or something brand new)
d. Automation of manual process? New business model?
e. Who does this benefit? Authority? Budget?
f. Support Plan? Primary technical / business contacts?

2. Project Slating - Group Discussion
a. Decision point
b. Review scope of project
c. Develop Project charter
d. Review info gathered in contact phase
e. Is it related to something in environment already?
f. Is it a go, no-go?

3. Requirements
a. Understand project scope
b. Ideation
c. Analysis
d. Technical Assessment
e. Identify and document scope document
f. Given scoped-out detail, can we take this on? If so, create SOW.

4. Project Management
a. Define project timeline
b. Weekly update meetings
c. Customer facing / Team facing

5. Development

6. Closing Activities
a. UAT, Customer sign-off
b. Go gold -- move into Production
c. Implement support plan


Tuesday, October 05, 2010

Web Application or Web Site...now that's the question

For reasons why you should care about which one is used see: http://msdn.microsoft.com/en-us/library/dd547590.aspx

Scenarios in which Web application projects are the preferred choice include the following:
• You want to be able to edit code without stopping a debugging session.
• You want to run unit tests on code that is in the class files that are associated with ASP.NET pages.
• You want to refer to the classes that are associated with pages and user controls from standalone classes.
• You want to establish project dependencies between multiple Web projects.
• You want the compiler to create a single assembly for the entire site.
• You want control over the assembly name and version number that is generated for the site.
• You want to use MSBuild or Team Build to compile the project. For example, you might want to add pre-build and post-build steps.
• You want to avoid putting source code on a production server.
• You want to use the automated deployment tools that are available in Visual Studio 2010.

Scenarios in which Web site projects are the preferred choice include the following:
• You want to include both C# and Visual Basic code in a single Web project. (By default, a Web application is compiled based on language settings in the project file. Exceptions can be made, but it is relatively difficult.)
• You want to open the production site in Visual Studio and update it in real time by using FTP.
• You do not want to have to explicitly compile the project in order to deploy it.
• If you do precompile the site, you want the compiler to create multiple assemblies for the site, which can include one assembly per page or user control, or one or more assemblies per folder.
• You want to be able to update individual files in production by just copying new versions to the production server, or by editing the files directly on the production server.
• If you precompile the site, you want to be able to update individual ASP.NET Web pages (.aspx files) without having to recompile the entire Web site.
• You like to keep your source code on the production server because it can serve as an additional backup copy.

Azure Migration Workshop

One of the engineers on my team and I recently participated in 2-day Azure (Microsoft’s cloud) Migration workshop. We successfully deployed 2 organizational applications and a SQL database and learned a lot from the exercise. While we were there I jotted down some of the lessons learned and thought that others might find them interesting...


SQL Azure Migration
• 50GB database size limit (in relational DB format)
• Oracle databases will need to be connected to on-premise
• Need to use SQL Server authentication model
• SQL queries used by SQL Azure are slightly different from the original script...code migration wizard alters them, but the tool is still not very mature
• Cross-DB dependencies and communication is not supported...neither is distributed transactions
• SQL Server migration wizard (from Codeplex) can be used to analyze and point out DB incompatibilities before conversion to SQL Azure
• Every SQL Azure DB table must have a clustered primary key

Windows Azure Migration
• Applications need to be in .Net web application (not web site) format
• Must include Cloud project within .Net solution
• Cannot use Windows authentication model without using an AD federation-like model
• AnonymousAuthentication web.config setting is not recognized
• The WSDL of web service sites gets the port 20000 injected at the point of deployment
• Observation: deployments take a LONG time (plan on going to lunch)
• SMTP capabilities are not yet available in the Azure cloud (would have to use an on-premise solution)
• Cannot use regular file-system reading/writing
• Need of URL Mapper for Staging environment...a unique URL (GUID) is generated with each deployment
• Each web.config change, no matter how small, requires a full package redeployment
• David Pallmann's Technology Blog is a good Azure resource
• The number of "instances" in the Cloud Project configuration file reference how many VM instances are to be built
• The csfg (Cloud Service configuration file) file is the singular file (custom zipped) that gets deployed
• The word "global" cannot be used within an Azure cloud URL and Service Names/Labels are unique across the entirely cloud.
• Cannot reference anything within the machine.config file...must be moved to web.config
• At this time only 3rd-party vendors are coming to the table with VM usage monitoring tools -- this space is still very immature.

Dev Fabric
• Enables developers to build, debug, test code locally as a Cloud project before deploying to the Cloud.
• Just because .NET code runs locally using the DevFabric with a Cloud project included in the solution doesn't mean that it'll run in the cloud. Code has to be tested in both environments.
• Runs on the same OS as the local test machine. Beware: Cloud VM's are x64 slightly-tweaked W2K8 server.
• Is not a good indicator of performance…very much based on local hardware specs.

Billing & Portal
• The Azure portal makes it very unclear and difficult to determine your usage statistics for the billing month.
• BEWARE: each MSDN account holder receives 750 free hours of Azure platform which goes quickly even with only a couple of small applications and a DB deployed.
• Hours billed are for platform usage, not application usage.

Other Things to Note
• To use your own domain it is necessary to setup a DNS Cname that redirects the company URL to the Cloud URL.
• The Package configuration file (cscfg) can be changed and uploaded on the fly (# of VM instances specified in this file). Changes to the Service Definition file (csdef) however require a redeployment.
• Think of Windows Azure roles as type of VM's you'd build internally (i.e. Web Server --> Web Role, Application Server --> Worker Role, etc.).

Wednesday, September 22, 2010

Defining Document Capatibility

Ok, this page is the shizzel on the ins and outs of document compatibility. It has VERY detailed information on actions that developers can take to control how web pages / sites are displayed.


http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx

Saturday, August 07, 2010

Automapper

http://automapper.codeplex.com/
AutoMapper uses a fluent configuration API to define an object-object mapping strategy. AutoMapper uses a convention-based matching algorithm to match up source to destination values. Currently, AutoMapper is geared towards model projection scenarios to flatten complex object models to DTOs and other simple objects, whose design is better suited for serialization, communication, messaging, or simply an anti-corruption layer between the domain and application layer.

Saturday, July 03, 2010

Agile Portfolio Planning

This may help communicate / coordinate efforts that span multiple development teams and stakeholders.


http://code.google.com/p/apropos/

Apropos is an open source agile planning tool focused on large team Agile Portfolio Planning. The typical use of Apropos would be an organization that:
* Uses an Agile development process like XP, Scrum, or Kanban
* Has multiple Agile teams that need to coordinate
* Makes use of an Agile Lifecycle Management (ALM) tool to track their team progress

The last point is very important. Apropos is designed to work in tandem with your existing ALM tool, not replace it. Most ALM tools do not provide the full tool set to support a Agile Project Portfolio Scheduling, which is where Apropos comes in.

Some of the benefits that you can realize from implementing an Agile Portfolio Process using Apropos as the foundation include:
* Synergies with downstream organizations such as Operations, Professional Services, and Sales
* Increased delivery value through organization-wide alignment of priorities
* Continuous improvement enabled by whole process feedback loops
* Realtime visibility into delivery status and potential blockages

Tuesday, June 29, 2010

Clonezilla

http://clonezilla.org/

You're probably familiar with the popular proprietary commercial package Norton Ghost®. The problem with these kind of software packages is that it takes a lot of time to massively clone systems to many computers. You've probably also heard of Symantec's solution to this problem, Symantec Ghost Corporate Edition® with multicasting. Well, now there is an OpenSource clone system (OCS) solution called Clonezilla with unicasting and multicasting!

Tuesday, June 01, 2010

Setting up Windows 2008 Workstation

We have found this to be a very good reference for setting up Windows 2008 as a workstation:
http://www.win2008r2workstation.com/

Wednesday, May 19, 2010

Pex and Moles...Amazing Stuff

Our engineering team has greatly benefited from this revolutionary software.

Saturday, May 01, 2010

Bulk Insert

Discovered one way to do a bulk update using XML in sql 2005, not sure if it is optimal, but it works :)




Schema for tblContractBranchCustomerLocations:

PK_ContractBranchCustomerLocationId int

,DaysOfWeek VARCHAR(50)

,RateDefinition VARCHAR(50)

,LastUpdateDate smalldatetime

,LastUpdateUser varchar(11)





DECLARE @xmlDoc XML

SET @xmlDoc = ''





UPDATE a

SET a.[DaysOfWeek] = Items.Item.value('@daysofweek','varchar(50)'),

a.[RateDefinition] = Items.Item.value('@ratedefinition','varchar(50)'),

a.[LastUpdateDate] = GETUTCDATE(),

a.[LastUpdateUser] = Items.Item.value('@audituser','varchar(11)')

FROM [tblContractBranchCustomerLocations] a

INNER JOIN @xmlDoc.nodes('/items/item') AS Items(Item) ON a.[PK_ContractBranchCustomerLocationId] = Items.Item.value('@id','int')



Saturday, April 17, 2010

Microsoft: Changing Passwords Isn't Worth the Effort

I've thought for some time that the enforcement of strict password policies, especially in the corporate world, are an overkill.  An interesting article.

http://www.pcmag.com/article2/0,2817,2362692,00.asp

Friday, March 26, 2010

Most software stinks... Know it, Learn it, Live it!

A thought provoking title and an article engineers on my team found to be a good read.

Monday, February 22, 2010

Configuring Delegation for a Site or an Application in IIS 7

http://technet.microsoft.com/en-us/library/cc770505(WS.10).aspx

"When you configure the delegation state for site or application features, you can delegate a feature as Read Only. When you delegate a feature as Read Only, users who connect to the site or application see the feature in the UI but cannot configure the feature. This is useful if you want users to know that the feature exists, such as for troubleshooting, but you do not want to allow them to configure it."

Thursday, February 18, 2010

UI Patterns Site

This site has very compelling information pertaining to UI design and user experience… something software engineers should pay more attention to.


http://quince.infragistics.com/#/Main

Tuesday, January 26, 2010

User experience is becoming a key differentiator in software

In a January report by Forrester Research, analysts advised application developers to make five key changes in 2010. On that list: "Become passionate about user experience."


http://visualstudiomagazine.com/articles/2010/01/21/infragistics-expands-ux-patterns-explorer.aspx

Wednesday, January 20, 2010

Paying Down Technical Debt

I put together this short bulleted list of things to bear in mind when working with applications that have a high amount of technical debt.

The Facts:

• Every application has some amount of technical debt…even Brink's CF systems
• Ignoring such technical debt is NOT an option
• We cannot just work on technical debt and not provide additional product enhancements

How do we address it?
• Identify the debt and how it's negatively impacting the application and organization
• Build a slam-dunk case for medium-to-large scale deficits…not "just because"
• Be creative and find a way to inject debt payment into an already desired product request
• Fix the debt. Avoid building any sort of temporary solution(s). Do it right.

Deficit Payment Tactics
• Provide constructive criticism to your peers, but don't beat each other up. Code Review.
• Consider refactoring over rewriting
• All code should have tests associated with it
• Measure before and after the change and identify improvement
• We'll work to improve collective ownership
• Review the debt backlog after each new release…ongoing refactoring is inevitable
• Learn from both yours and others mistakes
• Remind yourselves of what's helped make us successful….TEAMWORK