Fix: Visual Studio Achievements and FxCop problem

Actually there is a problem with FxCop and Visual Studio Achievements (with Visual Studio Professional): the FxCop assemblies can’t be loaded.

Here is a workaround (note: you have to install FxCop 10.0 – not FxCop 1.36):

x86: You have to copy all files from "C:\Program Files\Microsoft Fxcop 10.0" to "C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop".

x64: You have to copy all files from "C:\Program Files (x86)\Microsoft Fxcop 10.0" to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop".

LINQPad

LINQPad is a modern SQL query tool. Say goodbye to the old SQL Management Studio. LINQPad supports SQL Express, SQL 2008, SQL 2005, SQL 2000, SQLite, MySQL and Oracle.

LINQPad standard edition is free and can run without installation. The executable is 3MB and is self-updating. There is even a version that runs in Google Chrome.

Autocompletion is an optional extra. You can buy LINQPad Pro for $39.00 or LINQPad Premium for $58.00 (introductory price). The Premium Edition also unlocks LINQPad’s ability to write cross-database queries. Just control+drag additional databases from the Schema Explorer onto your query.

Here is the official LINQPad website: http://www.linqpad.net

Here is an example screenshot:

LINQPad

wget loop example

This example shows how to call wget ten times in a loop.

#!/bin/bash

for i in $(seq 10)
do
    ec=1
    while ((ec != 0))
    do
        wget_output=$(wget –retry-connrefused –output-document=/home/user/Downloads/$i.html –tries=30 http://www.test.com/?page=$i)
        if [ $? -ne 0 ]; then
            ec=1   
        else
            ec=0
        fi       
    done
done

Effective C# – summary

Actually I read a book about effective C# programming. It contains 50 tips.

Reading the first 5 items I decided to summarize most of the 50 tips and to advertise this book.

  1. Use properties instead of accessible data members
  2. Prefer readonly to const
  3. Prefer the is or as operator to casts
  4. Use conditional attributes instead of #if
  5. Always provide .ToString()
  6. Utilize using and try/finally for resource cleanup