Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Why should we keep column as NOT NULL instead of NULL in MySQL?

Keep table column as NOT NULL instead of NULL except in some special cases. This statement is cited by many articles of MySQL optimization, but they don't say why we should do this. Here we discuss about this.First why are there many people using NULL when defining table? The reasons may be:NULL the the default when defining table, the rookies or people who don't want to have much troubles will keep this default settingMany people think NOT NULL will require more spaceMany people don't want to verify the data before inserting or updating, it's more convenient when writing SQL queries.There are...

4,020 0       MYSQL REASON NULL


  Basic Patterns for Everyday Programming

For most of you the patterns mentioned below should be nothing new. These are very basic stuff we slap into our code everyday and at times feels they are actually code smells than smart patterns. However, I've been doing some code reviewing lately and came across many code that lacks even these basic traits. So I thought of writing them down as a help for novice developers who would want to get a better grasp at these.These patterns are commonly applicable in most general purpose programming languages, with slight syntactical changes. I use Ruby and JavaScript for the examples in this post.Ver...

4,520 0       JAVASCRIPT CODE PATTERN FUNCTION NULL ASSIGN DEFAULT VALUE


  Check if query string variable exists ASP.NET C#/VB

One of the problems I encountered when I started programming ASP.NET websites was to do with the Request.QueryString function. The first projects I was worked on were built with VB.NET and I used the following code to check the existence of a query string variable:VB.NET Codeview plaincopy to clipboardprint?If Request.QueryString("[VARIABLE]") <> Nothing Then        'CODE HERE  End If  This code checked if the variable existed and if it was populated.Moving to C# I automatically assumed that the&nbs...

26,089 0       ASP.NET QUERY STRING REQUEST EMPTY NULL CHECK