Monday, June 23, 2008

AutoHotKey


AutoHotkey unleashes the full potential of your keyboard, joystick, and mouse. For example, in addition to the typical Control, Alt, and Shift modifiers, you can use the Windows key and the Capslock key as modifiers. In fact, you can make any key or mouse button act as a modifier.


JP's Take

Friday, June 20, 2008

Tools

Microsoft SoftGrid Application Virtualization
Microsoft Application Virtualization platform allows applications to be deployed in real-time to any client from a virtual application server. It removes the need for local installation of the applications. Instead, only the SoftGrid runtime needs to be installed on the client machines. All application data is permanently stored on the virtual application server. Whichever software is needed is streamed from the application server on demand and run locally. The SoftGrid stack sandboxes the execution environment so that the application does not make changes to the client itself. SoftGrid applications are also sandboxed from each other, so that different versions of the same application can be run under SoftGrid concurrently. This approach enables any application to be streamed without making any changes to its code.



Gallio The Gallio Automation Platform is an open, extensible, and neutral system for .NET that provides a common object model, runtime services and tools (such as test runners) that may be leveraged by any number of test framewo



Pex

Pex (Program EXploration) is an intelligent assistant to the programmer. From a parameterized unit test, it automatically produces a traditional unit test suite with high code coverage. In addition, it suggests to the programmer how to fix the bugs.

Thursday, May 15, 2008

Agile Q&A

with Dave Laribee

No direct access to the customer or How do we work with indirect customers? (15)

·Bring them in

·This is one of the highest risk type of client

·You need a continuous presence / continuous access

·You don't want any barriers to communication

·You need to have a good working relationship with the client. You really can't do this unless you have actaully met the person.

·Move us to them

·Customer proxy can fill in a pinch.

    • Needs customer level authority / responsibility

Agile in a waterfall org? (13)

·Focus on the agile principles and not on Agile itself

·Don't call it agile and let your results sell your process

·Start with things that'll make the customer happy

    • A CI server so the customer can see the build and you'll seem more trustworthy and transperent
    • The customer has to be aware of what they're seeing

·Have success and show your success and be aware that others will push back

·A whole bunch of short iterations can fit inside a CMMI cycle

    • You will have points of synchronization

·How do you eat an elephant? One bite at a time.

·Solve pain

How do we not get mired in the details of the process? (10)

· Ensure the goal does not become Agile, it should always be the product

· Get a Champion

· Build up rules of etiquette

· Learn from your peers and resources

· Don't let estimation session turn into design sessions

How to start with Agile? (9)

Can we use Agile engineering practices without the management practice? If so, which ones yield the best results. (9)

· Yes

· CI and automated build are an easy start

· Focus on frequent releases

How do we involve customers and stakeholders? (9)

Agile as a one-man-band or small shop? (8)

Where's the Agile NorthWind? (8)

How to maintain velocity near the End of a release? (7)

How to we sell Agile to Suits? How to we sell Agile to our technical leaders? (6)

How do we foster an environment of continues improvement when "Agile" adoption is surface of mediocre? (6)

Distributed Teams (6)

Books and Articles

· Scott Ambler article on blocking

Notes

· Self organizing teams are very risky as they do have clear authority and reasonability

· With estimation the SD will average out over time

§ You want stories around the same time so you can keep the same velocity

§ Break tasks up into the same point stories so all your work is a similar size

§ You just want to know if something is so big it need to be broken down

§ We are good at determining relative size, but not exact size

· Agile in not just Scrum, Scrum is not the only Agile

OR/M +=2: More than just Data to Objects

with Oren Eini

Oren is so far above the normal programmer it’s like he’s talking about a programming language I’ve never even heard of. So, there’s not much detail here.

Definitions

·Combinatorial Explosion

Data Access

·Is just too difficult

·However, Persistence is a solved problem

·Once we have the solution in place however we still have problems in scalability

Adaptive Domain Models

·A domain model that can change after it's been compiled

·Use in

    • Composite applications
    • Counded contexts
    • Pluggable components

Multi Tenancy

·Multiple tenets using the database so you need to virtually partition the data

·Or same code with different domain objects

·Each customer gets a model that matches their needs and a database that inherit that same structure

·Each customer can get the behaviors that matches their needs

·Have a standard model and just customize the different little bits

    • Don't use IF statements!

Full Text Searching over the entire database

·Apparently it's possible with NHibernateContrib, just don't ask me how

The Future

·Self optimizing queries

o A Future

o Defers execution until a value is needed, then fetches all the deferred values

o Check out the code for the Future Object in the DevTeach materials

Power Tools

·These tools and techniques give you flexibility and power, use them

Notes

·What is a Strategy?

·ThreadStatic Attribute

DDD by Example

with JP Boodhoo

This was a very heard session, there was a lot in this that I will have to follow up on later.

Define

·SUT - System Under Test

Stories

·The who, the what, the why

·The why is very important.

·If you're not solving a problem, then you're just a programmer

Repositories

·What are they?

Aggregate roots

·Gatekeepers to sets of related items

o controls access to children

Notes

·Tests in project perhaps and use NAnt to strip them out

·Writing service layer using Specifications?

·Learn expression trees

·Leverage the extension methods

·Favor side effect free functions

·Drive from the UI down

·Inappropriate intimacy

o Let items manage their own state

o Don't expose through get/sets and let others do the work

Efficient UI Deisgn

with Markus Egger

Importance

·iPhone is almost useless as a business product, but has an amazing UI that is carrying the product

·The UI is what people see, it's what they can touch

·The only way the user can access our kick ass features

·This is the first impression of your application

Design consideration

·Familiarity

·Easy and intuitive

·Productive

    • For beginner and advanced users

·Have to help

Rules

·Know your users

    • We, as developers, tend to look at things differently than other users
    • User Types
      • Apologists versus Survivors

·User's Goals

    • User's have tasks and goals they want to achieve

·Skill Level

    • People don't stay beginners on a system for long
    • Average users aren’t targeted enough
    • Skill level is a bell curve

·Mental Model

    • People approach your application with previous knowledge about the application domain

Cognitive Friction

·It's tough to deal with things that change over time

·The result

    • Uses will sue the smallest set of features that they can get away with
      • We need to make features more discoverable
    • Users feel stupid
    • Higher maintenance and support costs
    • Makes people hate us

Learnability

·How easy is it to discover and then use features

    • You can time this

Usability

·How productive and intuitive is the UI for the average user

·Often confused with Learnability

·Usability tests tend to be large scale and over a long time

Clarity

·Don't overwhelm

Choices

·How many choices to provide

·What can / should we assume up front

·Remember the user’s answers

Metaphors

·Applying real world things to computers

·Be cautious of broken metaphors

Notes

·Don't make users look bad

·Make sure you Let users do something they couldn't do without a compute

·People don't read

Books

The Inmates are running the asylum

Load Testing ASP.Net Applications for Scalability and Performance

with Richard Campbell

Definitions

·GC - Garbage Collection

·WAST - Windows application stress tool

·RTT - Round Trip Time

Load Failure

·Looks like a bug

    • Object reference not found
    • Usually in relation to Session

·If the GC is too slow, the process will reset

What eats memory

·Session is long duration memory

·Cached objects

    • The server will destroy the cache if needed

Where to start

·Get one good script

·What is the most common usage/path

·Build scripts from WebTrends

How to test

·You can test in VM

·Run for 2 - 3 hours for more realistic data

What to look for

·Heap size

·Request caches

Performance

·Concurrent Users are different than Active users

·Pages per Second is different than Transaction Per Second

·RTT can be a killer

·ASP.Net will tend to die due to memory first

Performance versus Scaling

·Scaling is the difference in performance between the best and the worst performance

Tools

·StrangeLoop - performance enhancement hardware

·VSTS for Software Testers

o Can cluster multiple machines together

o Provides a variety of measures

·Perfmon

·YSlow for Firefox

·Apdex.org - Application Performance Index

Notes

·Every product is load tested

    • Either in a lab or with your customers

·Performance testing must be a day 1 actility

·Processors are either on or off. 80% means it's on 80% of the time

·Average web page is 250k with 60 resources

WCF for Web Developers

with Jean-Luc David

Definitions

·WCF - Windows Communication Foundation

·REST - Representation State Transfer

·RSS/ATOM - Syndication standards

·POX - Plain Old XML

Web Dev Challenges

·Pace of change

·Social networking and content syndication

·Ramp up time

·What format to use at what time

    • SOAP, RSS, REST, XML, etc.

WCF

·One communication API

·Highly customizable

·Partial trust support

·WebScriptServiceHostFactory

    • Don't need a config file

·You can use various locations for your service

    • Console, WinForm, Web, IIS, Windows Activation SErvice

Notes

·Use sniffer to see what's being put on the wire

·With WCF you have to add the attributes to the entities

·There is a WCF performance White Paper

Day 4

This ends the last full day of sessions. Tomorrow will just be one big write up on SilverLight. Hurrah!

Wednesday, May 14, 2008

Planned Agility

Come soonish!

Using Excel, the BDC, Dashboard Web Parts, and TFS

with Joel Semeniuk

Definitions

  • BDC - Business Data Connection
  • MOSS - Microsoft Office SharePoint Server
  • OLAP Cube - a data structure that allows fast analysis of data

Team System Reports aren't always enough

  • People are using Excel to do fun Excel stuff
    • But this is using files
  • How to we move this back into TFS?

TS has a very rich data architecture

  • Stores source code and auditing information
  • Has automated build engine and keeps statistics
  • Work Item tracking (Bug, requirement, feature, etc.)
    • Can embed rules and details in work items
    • Stores change information
  • 3rd Party can add additional data stores and tehy can link to each other
    • Checkins can be associated with a bug, for example
    • Each has its own data store and is aggregated into one database
  • We can now build big picture analytics
  • MS ships a number of reports that run on the OLAP cube
    • OLAP cube can be exposed to external sources such as Excel

Excel can point to the VSTS data store

  • Can do cross project reporting. TFS doesn't have these reports
  • Excel reports aren't static
  • Can display reports without Excel
  • MOSS can handle data connections!

Getting data from Excel to SP

  • EWA - Excel Web Access
  • EWS - Excel Web Service
  • ES - Excel Services
    • Lot's of configuration options through SP
    • Fine grain security
  • You can publish your reports to SP
    • You can name everything such as graphs
  • Create a Dashboard
    • Dashboards hold webparts
    • Create a PMO dashboard to give a good perspective on your projects
    • Can expose information to the Client
  • Create Web Parts

The BDC

  • Data brought into SP in an abstracted manor
  • Allow your to search your data like a SP search
  • Not part of the base MOSS. You need to pay more for this, of course.
  • Difficult to set up
    • Don't build this by hand!
    • There are rough tools to do this
  • Can set permissions
  • You can then hook them up within a web part

Summary

  • TFS maintains a lot of data about your projects
  • You can expose that data through SP using Excel and BDC, etc.

Notes

  • Web Parts can have relationships
  • You can use BDC to import project name, etc from FTS into SP
    • You can tag files with the same tags in SP as in TFS
    • Add a new project to TFS, then you can tag the associated files in SP wit the same name

Tools

  • Worldwide telescope

Parachute into Brownfield Development

What is?

  • Not legacy but not a brand new app
    • PCL for example
  • Possibly gone stale
  • You have access to the code you are able to change it
  • Not in obsolete technology
    • RBRS would not get BF

Where to start

  • Documentation
    • Rarely up to date
  • Meetings
    • Gives you the feel of the team
  • Look at the code
    • Our natural instinct
  • Solve a defect
    • Start with a bug fix
    • might help to find your way around
    • really hard
  • Knowledge transfer
    • peer programming so get social and guidance
    • semi-productive right from the start
  • Analyse build process
    • Might not always exist
    • Shows you the release/code structure
    • PCL has a build script, but I can't get it to work
    • You learn the 3rd party reliabilities
  • Ask, why are you there.
    • What happened so bad that I'm here

First steps

  • Automate the build / deploy
  • Should I jump into the code now?
    • Probably not
  • Check on the Version Control System
    • Is it being used, is it good, can it be improved, how's the structure
  • CI
    • Make sure it Compiles
    • Make sure it Executes
    • Then orchestrate Release Management
    • You want something you can instantly see
    • Only need a Bare minimum box
  • Code
    • Pair program is the best start
    • Path trace
    • New feature creation
    • Probably just going to end up thrashing
    • Style
      • Don't worry about changing standards
        • Standards are for consistency
    • worry about code flexibility
      • SRP, SoC, Coupling, Cohesion, Contracts
    • Automated testing
      • Was it TDD?
      • How do they run? Are they good?
      • Are they real unit tests
    • Take into account your release schedule before you start ripping apart the code
    • Goals
      • Be nimble, be quick, be agile

Social aspects

  • Dev team
  • Tech team
  • Testing/QA
  • BAs
  • Management
  • Clients! >:(
  • You can't force it down someones throat. They have to buy in.

Book

  • Brownfield Application Development in .NET

Notes

  • Remember the ramp up time
  • If your BAs know how brittle a piece of code is, you have a huge problem
  • If you are using DI then you have already broken your dependencies
    • Windsor on Unity
  • Enforce policies through culture
    • Sell people on the why
  • Working on code includes Unit Tests and Integration Tests
  • It's going to take you the same amount of time regardless of fixed budget / fixed time
  • Keep people apprised of where you are and if you're on time

Taming Software Dependencies with DI and IoC

with James Kovacs

Concepts

  • Dependency Inversion (IoC)
    • Higher levels should not rely on lower levels
    • Abstraction
    • Both should depend on something else (contract)
  • Dependency Injection
    • supply your dependencies to your objects
      • Through the constructor or through setters
      • Mandatory in constructor and optional in setters
  • Problem:The presenter needs too know about the dependencies below
    • Solution 1
      • Write a default constructor that sets up the dependencies
    • Solution 2
      • Use and IoC Container
        • At the core a dictionary
        • Static gateway from JP is a basic example of this
      • Windsor
        • Does dependency resolution
          • Autowiring
        • Lifetime management
        • Multiconfig options
          • Run-time config
        • Plug-ins

Dependencies

  • If you pull out a class, how many other classes do you have to copy over too

Notes

  • Don't fear the code
  • Wizards constrain you
    • MVC wizards is a good example
  • .Net Pet Has a lot of coupling
  • In DDD you use the language of the business
    • Use Submit instead of Save for example
  • Decorator Pattern
    • Add functionality on top of and existing class
      • such as logging
    • Could we have done WSDBLink as a decorator?
  • Use "`" in XML for Generics

Tools

  • MS Unity DI tool
  • Windsor - OSS DI Software
  • StructureMap
  • Spring.Net
  • Bindsor
    • Boo code to set up Windsor

AOP and IoC using Enterprise Library and Unity

with Erik Renaud and Francois Tanguay

Definitions

AOP - Aspect Oriented Programming
IoC - Inversion of Control
Enterprise Library - fills enterprise needs

IoC

  • Promotes SoC
  • Relies on external mechanism to do the injection
  • All about contracts (interfaces)
    • Between layers
  • Objects shouldn't know each other, just know about each other

AOP

  • Promotes SRP
  • Cross-cutting

Unity

  • Can do singleton with ContainerControlledLifetimeManage parameter
    • Thread safe
  • Can have multiple mappings with names instances
  • Can auto-wire construction dependencies and setter dependencies

PIAB

  • You have to be careful with the execution of attributes

EFPRS

  • Use DI for wiring
  • Use AOP for security and logging

Notes

  • Unit Tests
    • Arraign, Act, Assert
  • Ctrl+E+D - Reformat everything

Tools

  • Unity for IoC
  • PIAB for AOP

Why the next 5 years will be about languages

with Ted Neward

Definitions

  • HST - hooking sh*t together

What's the next big thing?

  • We did OO, managed languages, what next?
  • languages

Historic language split

  • Practitioners versus Academics
  • need to work together, historically don't
  • academics don't take ideas to completion
  • both have their own agendas and they differ

Lines of assembly per line of code

  • JAVA/C# about 12
  • PowerBuilder about -2
  • LISP on the other hand is in the thousands

Perfect Storm

  • Vistualization - CLR/JVM
  • Language toold
    • Antler - parser generator
    • Pheonix toolkit - back end processing tool kit
  • Linguistic Focus
    • mop - at any poitn I can change my code at run time
    • AspectJ - AOP for Java
    • Things will migrate from academics into mainstream
  • DSLs
    • Excel is a DSL

The Big Problems

  • Concurrency
    • Actors model?
  • Security
  • OO drawbacks
  • Distribution
  • Allow users to extend beyond your intent
  • Better UI design appraoch

Books and Articles

  • Structure and Ideas of CP
  • The Free lunch is over

Notes

  • Every programmer has about the same number of lines of code in them per day
  • You should know one level below where you're working (CLR for us)
  • We want tools that help us focus on the problem
  • How do we design a language that allows the business experts to "code" the business logic
  • Remember that Code is data

Day 3

Alright, 13 hours and about 400 lines of notes later, we’re over half way done. Both Mark and I attended 6 different session today so we both have a fair bit of stuff to bring back.

How to Make Scrum Really Work

Coming is the near future!

ORM in the MS World

with Benjamin Day

What is the problem?

  • There is a mismatch between objects and relational databases.
  • These must be unified.

Definitions

  • Primitive Obsession
    • Breaking things down into their smallest parts
      • Is the phone number validation really the responsibility of the Person object?
      • break phone number out as an object that knows if it is valid

How can we do this?

  • We could have one table per class perhaps?
  • Pros
  • This is simple and nice
  • We can even use typed DataSets
  • Cons
    • We have tight coupling.
    • Inheritance is difficult.
    • Where do we do validation?
  • Object DataRow hybrid
    • Has properties to control access to the columns
    • However there is a lot of stuff you need to start thinking about when you go to save these
    • This becomes more complicated
    • For example, how do you save multiple objects in one table
    • Or how do we handle nested relationships
    • Unfortunately too often we are not going to do the right thing because it is hard.

Object only model

No more DataRow

We have a clean domain model pattern

Remember, objects should map to nouns that nontechnical people talk about

They have all that lovely Computer Science stuff

Unfortunately your data access layer has to adapt data to the database hurrah!

This is a lot of code.

The adapter portion is 30-50 percent of your code

This is like the saying, you can drive with you feet, but that doesn't make it a good idea

We write this and rewrite this over and over and over again

These distract us from solving the real business problems

Remember, in the end, it's all about money.

LINQ to SQL

It is available in VS.Net 2008

LINQ provides a "better typed dataset"

Unfortunately it is SQL server only :(

LINQ generates a lot of code to help you out. It does a lot of thwe work for you.

Surprisingly, the code is actually really good

Good for RAD prototyping

However, it is closely tied to the database

It’s like a codeless CRUD

Can do polymorphism

However, is uses discriminator field.

Results in lots of null fields.

Entity Framework

Microsoft’s first ORM –

    • It’s in beta
    • To come out with VS2008 sp1

Can support non SQL Server databases

Has table-per-type support

This is the first release, be cautious

NHibernate

Uses XML for mapping

Is now supported by JBboss

Has no gui

It doesn't support LINQ.. yet

    • has hql though

Supports polymorphic queries

It does table per type

components let you push fields out into helper objects

does concurrency

    • Based on a datetime or number

You can do inheritance (joined subclass)

EFPRS

  • We need to look at how concurrency is handled in our code
  • Our database is not normalized because of our ExpiryDate field
  • We need to set up table per type structure
    • Have an agreement table, active agreement table, and an Expired Agreement table.
  • Take advantage of polymorphic queries for expired types

Notes

  • Are Stored Procedures really a best practice?
    • Performance gain from Stored Procedures are almost gone as of slqs7
    • What are you saving with a Database layer of abstraction?
    • Use Stored Procedures for crud if you have really strict security requirement
  • Sample applications at the web site
  • ORM and architecture design and VSTS
  • Go to use user groups regularly

Tuesday, May 13, 2008

Top Ten .Net Open Source Tools

With Rob PAddick

Why would you want to use an open source tools?

  • Some have many great coders contributing to the project
  • Sometimes commercial products have agendas or are not the best choice or option for a given problem
  • Often open source projects survive just because they are best of breed at that time
  • You can often extend or customize them.
  • It is easier to debug problems when you have the code
    • you can also try reflector
  • It is easier to understand usage if you can trace through the code

SharpZipLib

  • A library for compression

PDFSharp

  • A PDF creation library
    • Similar to iTextSharp which is a little more complicated

Cruise Control and Nant and Nunit

  • CI, build, and testing tools

NHibernate

  • An Object Relational Mapping tool

Subversion

  • A source control system
    • Uses optimistic source control
  • Visual subversion even has integration with Active directory!
  • Subversion has hooks so you can implement check in rules

DotNetBlodEngine

  • A blog engine
  • Written in c#
  • Has easy setup

ASP.Net AJAX control toolkit

  • AJAX controls
  • The code is available too

DotNetNuke

  • An OSS portal application
  • Has a big external ecosystem

Ghengis

  • A WinForms control library
  • Originally written by Chris Sells
    • Good example of extending controls

ConnectionStrings.com

  • Provides different type of database connections strings with different parameters

MySQL

· An Open Source full featured database

Where to find OSS

  • codeplex.com
  • thoughtworks.com
  • paint.net is a great example
  • code.msdn.com
  • Microsoft patterns and practices

Notes

  • we can get away with only writing in vb.net, but we really have to be able to read and understand C#