WTF

by alski 26. July 2010 11:52
Been a while since I've had one of these but here we go... public DataObject MethodX(Guid requestGuid, bool returnError) {     Thread.Sleep(1000); // <Person who has left>: Temporary Fix for this build as discussed     return MethodXList(requestGu... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Code

WTF: November 09

by alski 25. November 2009 16:50
In a “QI” format this time. Spot the problem in the following code. 1 point for the correct problem. -5 points for going for the obvious mistake. 2 points for the correct solution.   P.S. No its not my code        &nbs... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Code

Syntax for XML query in SQL

by alski 10. September 2009 13:39
Use the following SELECT Doc.value('data((/OrganisationAccountOpeningForm/KYCCustomer/EntryDate)[1])','datetime') or syntactically SELECT <XML Column Name>.value('data((/<XPATH>)[<1-based index into possible values returned>])','... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Code | SQL | Work

WPF Font Rendering

by alski 3. June 2009 22:04
One of the reasons I’ve been avoiding using WPF is for its difficulties in matching the look and feel of an application to the OS. When WPF first came out I opened up a Window, added some text and then tried to get it display in Tahoma, 8.25pt. After a couple of hours of hair pulling I reali... [More]

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Code | WinForms | WPF

WTF!

by alski 21. May 2009 12:15
I've just seen some of the worst code of my life... fortunately it was from an AutoGenerated application. Lets start with this pValue = Utility.GetParam("issue_id");Response_issue_id.Value = pValue; if(Session["UserID"]!=null) pValue = Session["... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Code | Work

LinqToSQL:Alternative to mocking the Db

by alski 30. April 2009 16:32
One of the really nice things about LinqToSQL is how simple it makes it to produce a new database. It fact it's so easy you can produce a real DB with less effort than a Mock'd one. I'm sure this has to be bad in some way, but I've no idea what that is yet. I'll need to t... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Code | LINQ

Improving my Test driven development

by alski 24. April 2009 21:22
I’ve just put a new system live, that I’ve been developing over the past few weeks. Basically its a document approval system. One set of users fill in a form, more users approve or reject it, finally one team signs it off and takes the document to the next system. Very simple. I s... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Code

Have language features changed the way we work for the better?

by alski 20. April 2009 18:32
Craig Murphy dropped a little coding challenge on his blog the other day. This prompted me to write the responses as below. I’ve tried to target each one towards using a particular technology as the framework has developed. Have a look and tell me which is your preferred answer, or propose a new o... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

DotNet3.5 | DotNet2.0 | Code

Querying LDAP with multiple domains

by alski 31. March 2009 16:48
I'm trying to query an ActiveDirectory but at my current client site, I have a problem. There's a few. The client has previously migrated their DC from XPERT to EUROPE, and now they've bought a division of another company and added that in as well. As a result the default DC only suppl... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Code

Proxy authentication with retry

by alski 4. February 2009 19:55
Need to talk through a proxy? Try this. You'll probably want to refactor in a factory method to allow the correct creation and re-creation of the WebRequest. Note that attempt one uses the default proxy with Windows authentication parameters, subsequent attempts ask for a user name and pa... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Code | DotNet2.0

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

RecentComments

Comment RSS