Windows Support Number

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 18 November 2009

Continents move faster than the software industry!

Posted on 03:39 by Unknown
Read this last week and it shows how dynamic and fast moving the software industry really is!

Awkward Coder
Read More
Posted in Coding, Developement, OO | No comments

Removing friction from the process

Posted on 03:35 by Unknown
Oren has a great blog post about friction in the delivery of software and how it should be evaluated and removed ASAP.


Awkward Coder
Read More
Posted in Coding, Development, Process | No comments

Wednesday, 11 November 2009

build for test != build for release

Posted on 02:17 by Unknown
This might seem obvious to a lot of people - the people who actually do testing, but to everyone who doesn't or just waves a derogatory hand in the general direction it isn't...

The differences manifests it's self in how the codebase is structured in your source control system. A codebase setup for test will have all the dependencies in the correct structure so when you pull the codebase, build the code and execute the tests you don't have to know what or how it's installed when the application is released - seems obvious right!

I've just attempted to do this and low and behold a missing dependency, I don't know the application and I don't particularly want to right now but I'm going to have to spend sometime just to get the code to build - I suspect I need to install some application on the system before I can build let alone test - WRONG, WRONG, WRONG!

Shite developers and there are a few, seem to think this job is about friction - friction pulling the code, friction building the code, no testing and friction deploying the code. These are the default parts of the job - we all have to do this so it should be automated and frictionless.
Read More
Posted in Coding Building CI Testing | No comments

Friday, 6 November 2009

When I'm a new team member

Posted on 09:06 by Unknown
Jsut had a meeting about how to improve the build process for the team - the current structure of the code in the source control system means I can't just get the code out and build it - this to me is the sign of a failing project\team!

I believe every project should be structured so that the following use cases are valid for any new developers coming onto a team, there's nothing more demoralising to new team members when you have to some kinda of voodoo to get a project to build;


As a developer I want to install the IDE So that I can compile source code.

As a developer I want to install the source control client So that I can extract code for compiling.

As a developer I want to compile the code So that I can verify the code compiles sucessfully.

As a developer I want to install a unit test framework So that I can execute unit tests for the code.

As a developer I want to execute the unit tests for the code So that I can verify the tests execute successfully.


Now this is not about being able to the run the application in a local debug build this about being able to confirm I'm standing on firm ground and I'm ready to start making changes to code base with confidence. (because the unit tests are all successful). For me one of the reasons for unit testing is to give team members & new starters the confidence to change code I've written without requiring my hand-holding.

There's nothing worse than being a new team member and not being productive ASAP.



Awkward Coder
Read More
Posted in Coding Building CI Testing | No comments

How to reduce url length in C#

Posted on 04:20 by Unknown
I needed the other day to reduce the length of a URL - so I decided to use a URL reducing service like tinyurl.com And I thought I would share the C# .Net code - nothing new I'm sure and there are plenty of examples out there.

public sealed class TinyUrlReducer : IReduceUrls
{
private readonly string _tinyUrl;
private readonly string _proxyUrl;

public TinyUrlReducer(string tinyUrl) : this(tinyUrl, null)
{
}

public TinyUrlReducer(string tinyUrl, string proxyUrl)
{
_tinyUrl = tinyUrl;
_proxyUrl = proxyUrl;
}

public string Reduce(string url)
{
if (string.IsNullOrEmpty(url))
throw new ArgumentException("Can reduce a null or empty url!", "url");

var reducedUrl = "";
try
{
Trace.WriteLine(string.Format("Reduce: Url - '{0}'.", url));

var requestUrl = string.Format("{0}?url={1}", _tinyUrl, url);
var request = (HttpWebRequest)WebRequest.Create(requestUrl);
request.KeepAlive = false;
request.UseDefaultCredentials = true;
request.AllowAutoRedirect = true;
request.UseDefaultCredentials = true;

if (!string.IsNullOrEmpty(_proxyUrl))
request.Proxy = new WebProxy(_proxyUrl, true, null, CredentialCache.DefaultCredentials);

var response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode != HttpStatusCode.OK)
throw new WebException(string.Format("Failed to call url - '{0}'!", requestUrl));

using (var stream = new StreamReader(response.GetResponseStream()))
{
reducedUrl = stream.ReadLine();
}

if (string.IsNullOrEmpty(reducedUrl))
throw new Exception("Reduced url is null or empty!");
}
catch (Exception exn)
{
Trace.WriteLine(string.Format("Reduce: Failed to reduce url, message - '{0}'.", exn.Message));
reducedUrl = url;
}
finally
{
Trace.WriteLine(string.Format("Reduce: Reduced Url - '{0}'.", reducedUrl));
}

return reducedUrl;
}
}

And a couple of tests...


[TestFixture]
public class TinyUrlReducerTests
{
[Test]
public void ShouldReduceUrl()
{
// Given we have url reducer...
var reducer = new TinyUrlReducer("http://tinyurl.com/api-create.php", "http://PROXY.MY.COM:8080");

// When we reduce a url..
var reducedUrl = reducer.Reduce("http://somereallylongurl/whichhasarelativelylongname/somepage.aspx");

// Then we expect the reduced url to start with...
Assert.IsTrue(reducedUrl.ToLower().StartsWith("http://tinyurl.com/"));
}

[Test, ExpectedException(typeof(ArgumentException))]
public void ShouldThrowExceptionIfUrlNull()
{
// Given we have url reducer...
var reducer = new TinyUrlReducer("http://tinyurl.com/api-create.php", "http://PROXY.MY.COM:8080");

// When we reduce a url..
var reducedUrl = reducer.Reduce(null);

// Then we expect the reduced url to start with...
Assert.IsTrue(reducedUrl.ToLower().StartsWith("http://tinyurl.com/"));
}

[Test, ExpectedException(typeof(ArgumentException))]
public void ShouldThrowExceptionIfUrlEmpty()
{
// Given we have url reducer...
var reducer = new TinyUrlReducer("http://tinyurl.com/api-create.php", "http://PROXY.MY.COM:8080");

// When we reduce a url..
var reducedUrl = reducer.Reduce(string.Empty);

// Then we expect the reduced url to start with...
Assert.IsTrue(reducedUrl.ToLower().StartsWith("http://tinyurl.com/"));
}

[Test]
public void ShouldReturnOrginalUrlWhenReducerFails()
{
// Given we have url reducer...
var reducer = new TinyUrlReducer("http://tinyurl.com/api-create.php");

// When we reduce a url and we know it will fail..
var url = "http://somereallylongurl/whichhasarelativelylongname/somepage.aspx";
var reducedUrl = reducer.Reduce(url);

// Then we expect the reduced url to the same as the original url...
Assert.AreEqual(url, reducedUrl);
}
}
Read More
Posted in Coding C# | No comments

Bad developers love 'The Daily WTF'

Posted on 03:47 by Unknown
When 'The Daily WTF' started up back in 2003/2004 it was a great laugh looking at shocking code other developers wrote, but after a bit it became repetitive and boring and a sad indictment of the industry.

Now on my contracting travels around the industry the people who continue to love and read this site definitely fall into the 'bad developer' bracket on the whole, why? Simple because they subconsciously believe this is the way the industry is and always will be and they find it comforting to their bad practices.

Example: This guy tries to ridicule TDD and the ideas behind such practices without regard for his own ability - Oh look there on his blog list 'The Daily WTF'...

Whether this story is true or not it highlights some of the issues for me - the WTF is not the air conditioning guy causing the system outage but the IT department building such a fragile system with no resilience that takes 36 hours to bring back online - if it took me that long to bring a system up I would be ashamed.



Awkward Coder
Read More
Posted in Development Coding | No comments

Monday, 2 November 2009

When will it be finished...

Posted on 02:34 by Unknown
Developing software is synonymous to writing to a book, not because it's a creative task - which I do believe it is, but because when you write a book you go through many drafts before getting to the final released version. Just because the writer completes the first draft doesn't mean the publisher thinks it's ready for publication etc...

Software development is the same unless you (the developer) is prepared to think in an iterative approach you'll never be able to break free from classical development paradigms, you have to accept the first version is never going to be complete and you'll never reach the nirvana of finished, there always something that could be improved.

Oh and just like books code has a shelf life and it's never as long as you think or want it to be, and just because the software no longer fulfills what's required doesn't mean it's wrong, it just means the world has moved on...

An example is the talk Eric Evans gave at QCon earlier this year where he expressed what he learned about DDD since writing the book. Mark Needham has a write up here.


Awkward Coder
Read More
Posted in Development Process | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Unit testing Rx methods Timeout & Retry with moq
    Earlier this week I was trying to unit test an asynchronous service (Foo) which used another asynchronous service (Bar) internally and ran i...
  • Understanding RefCount in Reactive Extensions
    A couple of weeks ago  @LordHanson  & I ran into an issue converting a stateless async service exposed as an Rx cold observable to a  co...
  • StructureMap: ILifecycle
    The other day I wanted to control the scope of a service inside a web based app with semantics which didn't fit either 'HttpContextS...
  • MVVM anti-pattern: Injecting the IoC container into a View Model
    This is another anti-pattern I've seen a lot recently, the dynamic use of the IoC container inside a view model to resolve child view mo...
  • How many pins can Bing Maps handle in a WP7 app - part 1
    part2 -  http://awkwardcoder.blogspot.com/2011/10/how-many-pins-can-bing-maps-handle-in.html part3 -  http://awkwardcoder.blogspot.com/2011/...
  • Bad developers love 'The Daily WTF'
    When 'The Daily WTF' started up back in 2003/2004 it was a great laugh looking at shocking code other developers wrote, but after a ...
  • Using CompositeDisposable in base classes
    To help make an object eligible for collection by the GC (garbage collector) one would implement the IDisposable interface. Executing the di...
  • Implementing a busy indicator using a visual overlay in MVVM
    This is a technique we use at work to lock the UI whilst some long running process is happening - preventing the user clicking on stuff whil...
  • Daily Dilbert Service - the most important service I've ever written...
    NuGet package available here ... First off a big shout to  @hamish  &  @leeoades  on this one - I'm just blogging about it. At work ...
  • Comparing performance of .Net 4.5 to .Net 4.0 for WPF
    Currently I'm working on a .Net 4.0 WPF app and we've had some discussion about moving to .Net 4.5, we don't get to make the dec...

Categories

  • .Net
  • .Net 4.5
  • Abstractions
  • Advertising
  • Agile
  • Agile Courage
  • AOP
  • Async
  • automated testing
  • Azure
  • Azure IIS RESTful development
  • BDD
  • Bing Maps
  • Bounded Context
  • C#
  • C# 5.0
  • Caching
  • Chocolatey
  • CLoud
  • CodePlex
  • Coding
  • Coding Building CI Testing
  • Coding C#
  • coding C# IoC StructureMap
  • Coding Functional-Programming
  • Coding REST Knowledge
  • Coding Services
  • Coding TDD Refactoring Agile
  • Command
  • continuous testing
  • coupling
  • CultureInfo
  • DAL
  • databases
  • DDD
  • DDD Coaching
  • DDD Domain Events Auditing nHibernate
  • DDD Entities Value Objects
  • Debugging
  • Design Patterns
  • Design Patterns Databases Auditing
  • Developement
  • Development
  • Development Coding
  • Development Process
  • Development unit testing
  • Development VS 2011
  • Diagnostics
  • Disposable
  • Exceptions
  • FINDaPAD
  • FindaPad Property Rental Windows Phone 7 Mobile Devices
  • Fun Coding Duct-Tape
  • Hotfixes
  • integration testing
  • IoC
  • jasmine
  • javascript
  • Jobs Development
  • LINQ
  • marketplace
  • Mobile Devices
  • Mocking
  • MSDN Coding
  • MSpec
  • Multilingual
  • MVC
  • MVVM
  • nCrunch
  • nHbiernate Repository Pattern Criteria
  • nHibernate Auditing Design Fluent
  • nHibnerate Entities Events Listeners
  • node.js
  • nodes.js
  • Nokia
  • NoSQL RavenDB Azure Development
  • Observations
  • OO
  • ORM
  • Performance
  • Portable Class Library
  • Portable Library
  • PostSharp
  • Process
  • Rants
  • RavenDB IIS 7.5 Development
  • Reactive
  • Reactive Extension
  • Reactive Extensions
  • ReadOnlyCollections
  • Resharper
  • REST Distributed-Systems
  • REST HTTP
  • rest web
  • RESTful
  • Rx
  • Serialization
  • Silverlight
  • Silverlight Installation
  • Task
  • TDD
  • TDD IoC DI
  • TDD Mocking
  • TDD Team Observation
  • Telerik
  • testing
  • threading
  • TPL
  • UI
  • Undo-Redo
  • unit testing
  • ViewModels
  • VS 2012
  • wcf
  • web api
  • Web Services
  • web services mobile devices data
  • WebAPI
  • Windows
  • Windows 8
  • windows phone
  • Windows Phone 7
  • WP7
  • WP7 Bing Maps Development Network HTTP
  • WP7 Bing Maps Development UK Crime
  • WP7 Bing Maps Development UK Crime Clustering
  • WP7 Bing Maps Development UK Polygons Clustering Performance
  • WP7 cryptography bouncy castle
  • WP7 Cultures C#
  • WP7 feedback development app store
  • WP7 Javascript web browser
  • WP7 MSBuild
  • WP7 ORM Databases performance
  • WP7 Serialisation
  • WP7 SilverlightSerializer C#
  • WP7 sqlite performance development
  • WP7 WP7Contrib Bing Maps Development
  • WP7 WP7Contrib Bing Maps Polygon Development
  • WP7 WP7Contrib CodePlex
  • WP7 WP7Contrib CodePlex Bing Maps Development
  • WP7 WP7Contrib CodePlex ObservableCollection
  • WP7 WP7Contrib ILMerge .Net
  • WP7 WP7Contrib Phone Maps
  • WP7 WP7Contrib SilverlightSerializer C#
  • WP7Contrib
  • WP7Contrib Bing Maps WP7
  • WP7Contrib WP7 Geo-Location development C#
  • WP7Contrib WP7 HTTP Compression
  • WP7Contrib WP7 Url Development Rx
  • WP7Dev
  • WPF
  • WPF Cultures
  • WuApi
  • XAML

Blog Archive

  • ►  2013 (16)
    • ►  November (5)
    • ►  September (3)
    • ►  August (1)
    • ►  July (1)
    • ►  June (3)
    • ►  May (2)
    • ►  January (1)
  • ►  2012 (44)
    • ►  November (2)
    • ►  October (8)
    • ►  September (5)
    • ►  August (2)
    • ►  July (4)
    • ►  June (3)
    • ►  May (1)
    • ►  April (2)
    • ►  March (13)
    • ►  February (4)
  • ►  2011 (52)
    • ►  December (3)
    • ►  November (5)
    • ►  October (7)
    • ►  September (7)
    • ►  August (11)
    • ►  July (4)
    • ►  May (2)
    • ►  April (1)
    • ►  March (5)
    • ►  February (3)
    • ►  January (4)
  • ►  2010 (1)
    • ►  August (1)
  • ▼  2009 (32)
    • ►  December (3)
    • ▼  November (7)
      • Continents move faster than the software industry!
      • Removing friction from the process
      • build for test != build for release
      • When I'm a new team member
      • How to reduce url length in C#
      • Bad developers love 'The Daily WTF'
      • When will it be finished...
    • ►  October (6)
    • ►  September (11)
    • ►  April (1)
    • ►  March (4)
Powered by Blogger.

About Me

Unknown
View my complete profile