A re-introduction to JavaScript

Why a re-introduction? Because JavaScript has a reasonable claim to being the world’s most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features. 2005 has seen the launch of a number of high-profile JavaScript applications, showing that deeper knowledge of this technology is an important skill for any web developer.

Unlike most programming languages, the JavaScript language has no concept of input or output. It is designed to run as a scripting language in a host environment, and it is up to the host environment to provide mechanisms for communicating with the outside world. The most common host environment is the browser, but JavaScript interpreters can also be found in Adobe Acrobat, Photoshop, Yahoo!‘s Widget engine, and even server side environments.

Read more

GridView databinding error with Generic classes

If you get this error: A field or property with the name 'xyz' was not found on the selected data source

You need to declare public properties with get, set in your class for it to work because GridView uses Reflection when databinding. For example:

public class EmployeeDetails
  public string EmployeeName {get; set; }
  // etc

URL Routing problem with ASP.NET 4 on GoDaddy IIS 7

If you get 404 errors when trying to add URL Routing with ASP.NET 4 (Web Forms) on GoDaddy, simply reference the relevant modules in your web.config file:

    <modules runAllManagedModulesForAllRequests="true"> 
      <remove name="UrlRoutingModule" /> 
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, 
        Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
      <add name="UrlRoutingHandler" 
        verb="*" path="UrlRouting.axd" 
        type="System.Web.HttpForbiddenHandler, System.Web,  
        Version=, Culture=neutral,  

Add this to the system.webServer node.

I never said she stole my money

On emphasis:

I never said she stole my money.

I never said she stole my money.

I never said she stole my money.

I never said she stole my money.

I never said she stole my money.

I never said she stole my money.

I never said she stole my money.

Posted via email

A table that should exist in all projects with a database

It’s called schema_version (or migrations, or whatever suits you) and its purpose is to keep track of structural or data changes to the database.

Whether you add this table from the beginning of the project or just after you’ve deployed the first version to a staging or production server is up to you.

Whenever you need to execute an SQL script to change the database structure or perform a data migration you should be adding a row in that table as well. And do that via an insert statement at the beginning or end of that script (which is committed to the project’s code repository).

Read more

templify: making solution creation simpler

Every project starts the same way:you create a place to put solution artefacts,on one file system, on one computer.Templify helps you work smart, not hardby reducing repetition.


Dan Brown walks into a bar…

Author Dan Brown strode through the brass lobby of a bar and ordered a beer, his eyes white as something white. The bartender had eyes too.

“What’ll it be?” asked the bartender with his mouth. He raised the tone of his voice towards the end of the statement to express that he was asking a question ‘cos when someone speaks to you you can’t see question marks. “What’ll what be?” replied author Dan Brown, answering a question with a question and putting the emphasis on the what part of the reply, showing that the question he just asked is related to the question he was just asked. The bartender shifted his eyes. A little too shiftily, thought the author (Dan Brown); was it a challenge? Did he recognise me? Was he expecting me? Was I expecting this? Of course I was, I’m Dan Brown. trust no-one Dan. Disassemble him with your brains.

The bartender’s silence spoke leaflets. After what seemed like a long time, he unsilenced and spoke again. “What would you like to drink?” he said slowly, a little too slowly. Almost like it was in code. If there was one thing Dan Brown could do, besides bookery, it was being able to pull hidden codes from seemingly nowhere, at least to anyone who wasn’t he – Dan Brown. Their eyes stood locked onto each other’s eyes. It was an anagram. The author began calculating. “Lout, hoodwink a Wild Turkey,” He sounded out to the bartender, confident he’d cracked the code. The bartender folded his arms and said “I’m not sure what you’re talking about.” Dan, with his pointy sharp-like wit, replied “Well, I’m not sure what you’re listening about.”

The bar man walked away (hopping always led to questions, questions he could do without) and all of a quickly Dan “Author Man” Brown realised in his brain what was going on (not what was actually happening, just his perception of things)… it was a double-cross (like what traitors do, not a symbol of two crosses. Dan feckin loves symbols!)Straight away he called his agent “Agent, it’s me, Symbol Simon. I’ve been double-crossed.” “No you haven’t Dan. You’re not a clever master of symbols who has been drawn into a world of espionage and secrets too important for the world to know. You’re a writer. And barely that. Now leave me alone, I’m on the loo.” Dan Brown(ed off) sneered at the camera (which wasn’t there) “So, they’ve got to you too.”

He left the bar in search of a bar, with a less confus-…even greater controversial mystery hidden within inside; one where he could find answers to riddles he hadn’t made up yet, by himself in singular aloneness. Walking down the wet rained-on street he observed the night setting in, making day go dark. Street lights shone and puddles reflected, like candles and wobbly mirrors, but outdoors. An attractive, slender woman in her twenties stood on the street corner as Dan Brown strode up to her side. “Excuse me, miss,” He began, and the girl yelped. “Yelp!” she yelped. “I never noticed you behind me there, how’d you do that!?” Dan had been waiting for a situation such as this (a woman startled by his sneak-…stealth) to try his new line. “Brownian Motion baby – it’s elementary.” The girl was awestruck, but with his wit or celebrity recognition? Dan could not be sure. Both. “Point me to the most dubious, suspect-looking bar you know of, madame.”

She fingered a thumb over to Brecks Bar.

Via a comment by Darian T. Wright

Posted via email

LINQ to SQL log to debug window, file, memory or multiple writers

From here

class DebugTextWriter : System.IO.TextWriter {
   public override void Write(char[] buffer, int index, int count) {
       System.Diagnostics.Debug.Write(new String(buffer, index, count));

   public override void Write(string value) {

   public override Encoding Encoding {
       get { return System.Text.Encoding.Default; }