Navigation

Search

Categories

 

On this page

[DDD6] Testing Your Applications With MbUnit with Ben Hall
[DDD6] Dynamic Languages on .NET with Michael Foord
[DDD6] Grok Talks
[DDD6] Microsoft Codename "Astoria" with Guy Smith Ferrier
[DDD6] Introduction to Silverlight 1.1 with Chris Hay
[DDD6] Why IronRuby? with Dave Verwer
Comments working now
[Build Knowledge] Versioning
Where's all the posts?
Google Reader Minimalistic

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 7
This Year: 1
This Month: 0
This Week: 0
Comments: 6

Sign In
Pick a theme:

 Sunday, November 25, 2007
Sunday, November 25, 2007 2:28:06 AM (GMT Standard Time, UTC+00:00) ( )

Ben Hall

Gallio Test Platform allows for multiple test frameworks to run thru the one platform
NUnit is a subset of MBUnit so you can just replace NUnit with MBUnit and not have to change code
Indentity Increments happen even after rollbacks
DBCC CHECKIDENT (Orders,RESEED,0)
IOC thru a property and not just in the constructor
[ExpectedArgumentNullException] passes only if there was a NullException

ForEachTest,DataFixture,ResourceXmlDataProvider
loads in a XML file with the test data
DataType = typeof(Data) in the foreach will give you intellisense (I blinked on the first example and didn't see that it didn't have it in the first place)
CustomAssertions
Watin is just like NUnitASP is actually maintained
good examples of open source projects running MBUnit are subsonic,castle, dasblog

Thanks for the TShirt Ben, I’m going to have to go thru your blog to find the new features in v3, I know theres mutliple Assertion Failures at least.

Comments [0] | | # 
Sunday, November 25, 2007 2:15:45 AM (GMT Standard Time, UTC+00:00) ( DDD6 )

Michael Foord
Resolver a financial tool written in IronPython
IronPython supports "from namespace import *" like java does
Magic Methods are dynamically interpretted like __init
dynamic typing and duck typing
Easy to Test because of monkey patching,mocking, no compile
late binding
variables are just references to actual memory

x = 1  so x = 1
y = x  so x = 1, y = 1
x = 2  so x = 2, y = 1

"import clr" brings in type methods
python used in youtube, google
stackless python for Eve online
byte code compiled like c#
_name means you shouldn't mess with it but its not protected
self equivalent to this
DLR Languages include VbX,Vista Smalltalk, managed JS, IronLUA, IronLisp,IronRuby,IronPython 
DLR Console (uses silverlight 1.1 alpha)
can use python code mixed with other DLR languages and have access to the same variables
Web IDE
Multiline strings are enclosed with triple quotes """
*args, **keywargs  - dictionary??

Comments [0] | | # 
Sunday, November 25, 2007 1:58:09 AM (GMT Standard Time, UTC+00:00) ( )

Gordon Mackie – releasable Web Controls

Make your properties appear cleanly in the Properties panel
Description Attribute on Properties
Use a Category Attribute or the Property will end up in the Misc Category
Browsable(false) Attribute keeps the Property from showing in the Property Panel
ToolboxBitmap Attribute lets you have an icon for your control
*add the bitmaps in a subfolder and set them to embedded resourse files
*add an empty code file to force compilation in visual studio
DefaultValue Attribute lets you use Reset in the context menu for the control in designer
Setup a method to reset to get around literal Default values
bool ShouldSerializeMyPropertyName //where MyPropertyName is your property
void ResetMyPropertyName
Default Event is the double click in designer
ToolboxItemFilter Attribute lets you show under contexts
Bindable Attribute avoid unneccissary binding, bind on change
Refresh Properties All - recalcalutes all dependant properties
generate documentation with sandcastle
SDK tools to register and install tools
TypeConverters,TypeEditors

Abid Quereshi - Story Based Estimating

Stacey Diagram showing predictability
velocities are good for hard to predict scenarios
must indicate Return on Investment per story
Each story has a Priority, Time Cost in Units, Client Value
Scooby Doo Respose to estimating "I don't know"

Guy Smith Ferrier - Why Extension Methods will rule the world

(this RegionInfo regioninfo)
Extension methods are public, static, have the Extension Attribute (or a this)
could inherit Extension in 2.0 but it won't compile in 2.0, but it will run if you compile it on the 3.5 compiler targetted at the 2.0 runtime
web sites compile at runtime so you need 3.5 for extension methods
They get around sealed classes, the work of the devil
Great if you don't own all the source code your using.

Alex Mackey - Development in Dubai

issues with unicode,date format, date display, db collation, text flow
Don't assume anything
Names are difficult to format there's more than just first and last names
working hours change during holy week and there's different holidays
icons and images mean different things
racial information won't be volunteered
photos don't help much when women were head coverring
server hosting is problematic due to climate
export restrictions
you can be barred from leaving Saudi Arabia if you have a local disagreement outstanding
health and safety issues in the workplace
equipment will always get delayed in customs
Dell in the UAE are slow
printers have different catridges there
fax is preferrable because the post is slow
staffing problems with people going native and getting frustrated with being away
skype.com is blocked but not the actual service

Ben - Powershell

lists are actually objects and are querible
you can pipe on top of pipes
export-csv,import-csv,format-table

Peter Ibbotson - Reflection

Store ProperyInfo and reference instead of looking it up each time
Setup a delegate of GetGetMethod() and reference that for a large speed up
if its a field you need to use dynamic methods
Comments [0] | | # 
Sunday, November 25, 2007 1:21:22 AM (GMT Standard Time, UTC+00:00) ( )

Guy Smith Ferrier

Astoria is a web service provider that lets you serialize your entities out to the client as JSON or XML

client side data
Popfly is microsoft mash up engine
his .net internationalization book
astoria.mslivelabs.com
astoria was the first RESTful web service
May 2007 CTP, Dec 2007 CTP, Beta 1 Q108, RTM mid 2008
doesn't work with the RTM... back to Beta 2
there was a slide with the requirements for an install
its a protocol and an extensible WCF service
builds on top of HTTP for tunneling, URI Protocol
security is coming in the future but theres no cross domain support right now and you can use forms/windows authentication
works well with the Entity Framework
Northwind.svc/Customers!key
has a query language in the url that supports where,order by, paged results
Dec 2007 CTP will turn of security by default to prevent database dumps thru Astoria
theres a WSDL like page on the root node using $sys_getedmdata in the Sept CTP and $metadata in Dec CTP
JSON supported on all versions (can eval easily in js)
can use HTTP,Remoting,COM because its part of the WCF
could use remoting in silverlight via partial trust in 3.5
ADO.Net Entity Model is a .Net version of DDL
supports accees to Stored Procedures
"it" is equivalent to this in the Entity Framework
can add custom methods to the URI
can access astoria straight from a web request so that we can support mixed enviroments
Astoria client library handles querying and mapping
WebDataContext,WebDataQuery
WebDataDen.exe will generate the proxy classes for us
runs the IQueriable interface so it can deal with anything thru LINQ
support for scalar returns and better concurrency coming in the future

Thanks Guy

Comments [0] | | # 
Sunday, November 25, 2007 12:58:49 AM (GMT Standard Time, UTC+00:00) ( )

Chris Hay

Interactions (using c# behind XAML) are new to 1.1
windows mobile will be supported in the future (here's hoping android too)
Silverlight 1.1 will hopefully ship in summer 2008
1.1 doesn't work with Visual Studio 2008 RTM so use Beta2 until the upcoming Silverlight 1.1 CTP refresh
"Add Silverlight Link" on a web site doesn't copy silverlight.js into your project
you can't edit and continue with a silverlight project you have to recompile
There's no Global styling yet
lots of XAML demos
TransformGroup allows you to do multiple transforms
can't group shapes like WPF so you have to stick your shapes in a canvas instead
no content support like WPF yet
blend 1.0 is for WPF only so use the blend beta instead
Silverlight Pad
there's no 3D acceleration with silverlight so you can work with multiple platforms (why not use an OpenGL wrapper on *nix)
all 3D is run off CPU power
Demos sounds (I was just telling a friend how embedded midi was going to make a come back)

Thanks Chris I didn’t have many notes on this one since there were a lot of XAML demos, too bad I missed the second session.

Comments [0] | | # 
Sunday, November 25, 2007 12:39:59 AM (GMT Standard Time, UTC+00:00) ( )

Dave Verwer

Ruby had the first beta in 1995

Iron Ruby is branched from 1.8.x branch of ruby modulo
DLR is just a layer on top of the CLR, still compules to IL
IronRuby is a blind implementation for clean IP
ruby bridge by john lam was an early use of the CLR in Ruby
the DLR came out of IronPython work
IronRuby has two developers working on it at microsoft
rubyforge subversion repository is a mirror of  the internal microsoft codebase
you can run regular ruby code in IronRuby

Optional Punctuation
semi colons, returns, braces, etc.
you can determine which puntuation you need to make your code readable
immutable string declarations are done like :init which is the string "init"
immutable strings are never disposed

Syntactic sugar
Optional Punctuation makes Domain Specific Languages more forgiving for syntax and easier to write
Sigils prefixing variable names to add description
Sigils include local, $global, @instance, @@class, Constant
sigils determine scope and are optional
ruby strongly typed but can redeclare vars
shorthand Range.new(1,100) 0..100
%w(words in an array) will create an array that is seperated by spaces
using an immutable string as a hashtable key can cause collisions
puts var unless x.nil?  this will handle null cases
strings can be single or double quotes and nest the other type without using escape characters (when its mixed you need them though)
theres no character type natively but you can use the .Net Char type
big numbers can be assigned dynamically you don't need to worry about exceeding the maximum value
no native decimal type support but you can use the .net decimal type
can alias methods on a class level so you don't have to program in american
blocks in ruby are lambda methods,anonymous delegates in c# and closures in js
core language contruct - heavy use of delegates
there are no for loops you just use the times block

a for loop
10.times do {print "Hello"}   this print Hello 10 times

a foreach loop
["a","b"].each do |letter|
  puts letter
end

file.each_line do |line|
  line =~ /regex/
end

a try catch
begin
  ...
ensure
  ...
end

yield keyword exists like c#
=== is the match operator and compares as well as it can

mixed matching in case statements
case i
  when MyClass
    ...
  when 1..100
    ...
  when /^[a-z]*$/
    ...
end

Mixins
like c# extension methods
String.module_eval do

you can redefine a class to override or add a mixin

  class String
    def capitalize_all
   ...
 end
  end
 
  class String
    undef length
  end
  
Linguistics library in ruby (blew my mind, not hard to do just nice to have done for you already)
 
individually extend instances of objects

in.extend(JPEGMethods)  

class ReverseString
  def method_missing(method_name)
    ...
  end
end

method_missing is used to do dynamic querying of database based on what the current class is and that its trying to do a find
 
customer.find_by_email_or_name

this makes intellisense a hard problem
naming is underscore seperated and lowercase
name mangling allows the CLR namespaces to be available with Ruby naming conventions

Thanks Dave

Comments [0] | | # 
 Sunday, November 18, 2007
Sunday, November 18, 2007 10:14:47 AM (GMT Standard Time, UTC+00:00) ( )
I just realized comments weren't working, but they are now so go for it.

Technorati Profile
Comments [0] | | # 
 Saturday, November 17, 2007
Saturday, November 17, 2007 7:13:28 PM (GMT Standard Time, UTC+00:00) ( )

Today I’ll show you how to use NAnt and Cruise Control.Net to Version your application.

What you’ll need

  1. NAnt A .Net Build tool. We’re going to use this to compile our Hello World Application and set the version number.
  2. Cruise Control.Net A Continious Integration Server that lets us start NAnt and makes our version number.

Our Application

Theres nothing much to our application it just shows the Assembly Version at command line.

using System;
using System.Reflection;

namespace BuildKnowledge.CmdLine
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.Out.WriteLine("Hello World v" + Assembly.GetExecutingAssembly().GetName(false).Version);
    }
  }
}

NAnt Build file

Lets look at the build file

<?xml version="1.0" encoding="utf-8"?>
<project name="BuildKnowledge" default="compile"

  <target name="init">
    <delete dir="build"
/>
    <
mkdir dir="build"
/>
  </
target
>

  <target name="asminfo">
   
<if test="${property::exists('CCNetLabel') == false}">
     
<
property name="CCNetLabel" value="1.0.0.1" />
   
</
if>
   
<
asminfo output="build\AssemblyInfo.cs" language="CSharp">
     
<
imports>
       
<
import namespace="System" />
        <
import namespace="System.Reflection" />
        <
import namespace="System.EnterpriseServices" />
        <
import namespace="System.Runtime.InteropServices" />
      </
imports>
      <attributes>
        <attribute type="AssemblyVersionAttribute" value="${CCNetLabel}" />
        <
attribute type="AssemblyTitleAttribute" value="Build knowledge - Hello World" />
        <
attribute type="ApplicationNameAttribute" value="BuildKnowledge" />
      </
attributes>
      <
references>
        <
include name="System.EnterpriseServices.dll" />
      </
references>
    </
asminfo>
  </
target>

  <target name="compile" depends="init,asminfo">
    <
csc output="build\${project::get-name()}.exe" target="exe" debug="false">
      <
sources basedir="src">
        <
include name="**/*.cs" />
        <
include name="../build/AssemblyInfo.cs" />
        <
exclude name="**/AssemblyInfo.cs" />
      </
sources>
    </
csc>
  </
target>

</project>

This is the BuildKnowledge.build file that will run our build. Here’s the steps we’re taking

  • [init] Create a directory called build
  • [asminfo] Generate the AssemblyInfo.cs
  • [compile] Compile BuildKnowledge.exe

The important thing to see is CCNetLabel which is a property that CCNet is going to send down to the NAnt task. This is called an Integration Property and there are additional properties for things like the build time just check the list.

Cruise Control .Net Configuration

Once you’ve installed cruise control you’ll want to update ccnet.config to add this project. You’ll need to update the nant task with the correct paths to where your files are located. In an actual setting we’d actually have a sourcecontrol block that automatically triggers the build and updates the working copy on the build server. For now we’ll just trigger the build manually which isn’t truely Continious Integration but it’ll work for this example. The Labeller Block is where we come up with the version number for the assembly and it will show up on Cruise Control.Net and it will be sent down to NAnt.

<cruisecontrol>
  <
project name="BuildKnowledge Current">
    <
tasks>
      <
nant>
        <
executable>C:\nant\bin\NAnt.exe</executable>
        <
baseDirectory>C:\code\BuildKnowledge</baseDirectory>
        <
nologo>false</nologo>
        <
buildFile>buildknowledge.build</buildFile>
        <
targetList>
          <
target>compile</target>
        </
targetList>
        <
buildTimeoutSeconds>1200</buildTimeoutSeconds>
      </
nant>
    </
tasks>
    <
labeller type="iterationlabeller">
      <
prefix>1.0</prefix>
      <
duration>2</duration>
      <
releaseStartDate>2007/11/24</releaseStartDate>
      <
separator>.</separator>
    </
labeller>
  </
project>
</
cruisecontrol>

The End Result

Once you have everything setup you’ll need to

  1. Start up server\ccnet.exe to start CCNet in where you installed CCNet (or you can start the service).
  2. Install cctray\cctray.exe and add the BuildKnowledge Current project from your localhost.
  3. Force Build the project
  4. Run our BuildKnowledge.exe in the build folder

Build version

Thats all you have to do to add version numbers I hope you’ve gotten something out of this, we’ll be coverring more advanced topics next time.

Download the code: BuildKnowledge01.zip (4 KB)

Comments [1] | | # 
 Wednesday, November 14, 2007
Wednesday, November 14, 2007 5:00:18 PM (GMT Standard Time, UTC+00:00) ( )
So I finally moved over to actually blogging software but you might be wonderring where all the posts went to. Don't worry they're still around and I'm still posting in there.

Go checkout Sleepoverrated Stream via [Tumblr]

You can currently see it in the right hand nav but its not that obvious so I'll fix that in the upcoming site design.

Comments [0] | | # 
 Tuesday, November 13, 2007
Tuesday, November 13, 2007 9:56:27 PM (GMT Standard Time, UTC+00:00) ( )

Here’s a greasmonkey script I created to let you use google reader in full screen that has since been featured Greasemonkey script at LifeHacker.

In order to get access to the settings and search you can toggle back to the normal layout by pressing W.

If you have anything you’d like added please add a comment, I’ve heard it works well with Better GMail when displaying Google Reader on the same page.

Download at User Scripts

Install Greasemonkey

Keyboard shortcuts that come in handy are

w - toggle fullscreen (shows search bar again)

g t - go to tag
g u - go to subscription
g s - go to starred items

j - next item
k - prev item
s - star item

u - toggle left sidebar

Comments [4] | | #