# Tuesday, August 28, 2007
Why?  They are taking up space and not the latest editions.

How?  Just leave a comment on this blog post.  Include your email address if I don't know you :-)

The books on offer are:

Microsoft
Professional SQL Server DTS, Chaffin, Knight & Robinson
[link]
Introducing Microsoft.NET, by David Platt (famed author of Why Software Sucks)
[link] Taken!
Programming Microsoft SQL Server 2000 with XML
[link] Taken!
Microsoft SQL Server 7.0 Administrator's pocket consultant [link]
Microsft SQL Server 2000 Administration Readiness Review for MCSE Exam 70-228
[link]
Microsoft Visual Basic Design Patterns
[link]
Java
Java Servlet Programming. Hunter, Crawford.
[link]
XML, XSLT, Java, and JSP. A case study in developing a web application.
[link]
Java Enterprise in a nutshell, a desktop quick reference
[link]
Linux
Linux Routers, a primer for network administrators, Tony Mancill
[link]

Caveats: Some of these are a bit marked on the cover from normal wear and tear.  Original CDs are still in the book where applicable.  Email me if postage is required.
Tuesday, August 28, 2007 11:51:24 AM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [4]  | 
# Monday, August 27, 2007
Don’t underestimate the sly and insidious lengths Personal Firewall products in general, and Norton Internet Security 2007 in particular, will go to in fulfilling its goal of disrupting SQL Sever Management Studio.

That will be all.
:-)

Monday, August 27, 2007 4:56:39 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 15, 2007

For a limited time, members of CSharpZealot.com have access to some free Silverlight training content!  Here's how:
Easy!

Also, I'm impressed at how well the InnerWorkings bits integrate with Visual Studio during the training experience.  You should really check it out.

Now please keep in mind that Web 2.0 (and it's previous incarnation, Web 0.9) supports bi-directional time travel
  • Forward, at a pace of 1 second per second, same as daily life, really; and
  • Backwards at a rate of 20 yrs in, say, about 150 miliseconds.
That means that if you are reading this blog post some time in the future, this offer may be closed.  It's only open for a limited time, so get to it!  Don't be the last guy on the block to not know how to use the MediaElement and VideoBrush in Silverlight!

Mad props (that's what the kids say these days, don't ya know?) to Brian Madsen, btw, for keeping CSharpZealot the place to get your .NET love.

Wednesday, August 15, 2007 6:01:21 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, August 14, 2007
This is Part 2 of a series answering the question:  Where do I start as a programmer:

16/08/2007 update - Fixed links

Historically, programming languages are often introduced with their Hello World example. It is completely trivial but also quite an informative place to start.

A Hello World may look like this, for a .NET Console application:

...in C#

class Program
{
   static void Main(string[] args)
   {
      Console.WriteLine("Hello World");
      Console.ReadLine(); // press Enter to close
   }
}

...in VB.NET

Sub Main()
   Console.WriteLine("Hello world!")
   Console.ReadLine() 'press Enter to close
End Sub

I won’t go into the exact details of this sample, but I will mention that the purpose of this trivial example is to illustrate that you are scripting a conversation between the computer and a program.  Magic does not live here.  Computers are just following instructions.

The value of starting a project on a rich framework like the Microsoft.NET framework is that plenty of the elemental pieces required to construct these scripts are supplied for you and arranged in a discoverable fashion. 

An exhaustive list of the pieces that are supplied in the framework is documented in the MSDN Library that you can install with the Express Editions and also online.

Follow the white rabbit, neo…

Start with some good quality learning guidance focused on Visual Studio:
…and don’t forget the web is littered with good and not so good programming tutorials.

Read other people's source code

The problem with tutorials is that they often leave off some important details in order to keep the example simple, thus you can only go so far reading tutorials.

Reading other people's source code can be very helpful in understaning how a technology is used in practice.  Some sources:
Start a project

Lots of people (ok, me – but probably plenty of others too) need a project to really get the programming juices flowing.  I need a problem to solve; otherwise I’ll just stare at the File -> New dialogue for hours.

What does this mean for beginner programmers?  Don’t think you have to look for problems that are new to science and have never been solved before.  Download.com  probably has hundreds of “note taking” applications, and “home movie database” applications.  The benefit of  starting a project at this stage of your career is not to solve a new problem – it’s what you pick up along the way.

Be generous with the constraints of your project.  Learning works best when it’s fun.  The last thing you need when starting programming is the stress of project constraints!

Start a blog

Grab an account at Blogger or one of the other blogging platforms and record your experiences.

Even if it is just “this is what I learned today” and “this is what I don’t understand today” posts there is still value in blogging:
  1. Blogging forces you to stream your thoughts down into words.  The cathartic effect this can have on your thoughts while learning a technology can hardly be understated. 
  2. Blogging is a great way to open a conversation with other people who are doing the same thing

For blogging on the train?  Try Windows Live Writer, but I often just use Word then copy-and-paste when I get connected again.

Be aware of support:

Of course, the blogosphere has a wealth of information ;-)

Some others:
...and there are literally hunderds more sites on the web of various quality and reputation...

What Else?  I'd love to hear from anyone via comments here on this topic.  What other bits should people go and get for programming on day one.

Listening To:  DAT323 Inside T-SQL (with Itzik Ben-Gan) from Tech.Ed '07.
Tuesday, August 14, 2007 2:14:01 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [3]  | 
A friend of mine dropped me an email that asked the following:

So, I’ve been thinking more and more lately that I should make some better use of my spare brain cycles and train time by learning some coding. Do you have any recommendations for where a total coding newbie with no money and no copy of VS should start?

So I thought I would answer in a series of blog posts.  This is part 1.

The first thing is no money does not mean that you can’t have a copy of Visual Studio

The first thing to do is grab a copy of Visual Studio Express Edition.  These are supprisingly capable cut down versions of the real Visual Studio 2005.

Go for Visual Basic or C# - don’t think C++ or J# are particularly good places to start learning code.  Either is fine.  Really. 

Also, Visual Studio 2008 Express Edition is available in Beta 2 at the time of writing.  Visual Studio 2008 is awesome, but again not the best place to start imho.

Then grab Visual Web Developer Express and SQL Server Express

Also, if you think MCP Certification is on the cards, each MS Press training kit comes with a 90-day copy of Visual Studio Professional.

UPDATE:  There are some additional downloads to consider:

The second thing is no Visual Studio does not mean no .NET programming

#develop, or SharpDevelop is a free, open source development tool for C#, VB.NET and Boo.

It has a couple of limitations, but can be had for a tiny 8.2Mb download and dosen't carry some of the weight of Visual Studio while still keeping some of the look and feel.

Still have some spare bandwidth?

Grab the Windows SDK.  It's probabbly a bit above the beginner level but it represents an execllent reference to what is happening under the hood when you come to need to know.

Grab FxCop (NB: you may have grabbed this as part of the Windows SDK).  FxCop is a tool that looks at your programs and compares them to a set of rules for programming on the .NET framework.  This is a little bit of an advanced topic, but also is a really valuable learning tool for avoiding bad coding habits.

FxCop 101:  The default is to check your code against all the rules.  As a beginner you probabbly don't want this.

Source code control is an important practice.  Even for a single guy on a train.

For source code control I would recommend going with SourceGear Vault which is free for a single named concurrent user.  It's really easy to install and get going.

Unlike SourceSafe, Vault is backed with a SQL Server database for better performance and backup support, and also runs over SSL and can run over the internet.  Additionally it supports an Edit-Merge-Commit usage pattern in addition to SourceSafe’s Checkout-Change-Commit usage pattern – but that is a bit of an advanced topic so don’t get too distracted.  Just know that it’s there for later.

What Else?  I'd love to hear from anyone via comments here on this topic.  What other bits should people go and get for programming on day one.

Listening To:  DAT318 Applied ADO.NET Entities from Tech.Ed '07.

Tuesday, August 14, 2007 1:26:16 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [2]  | 
# Friday, August 10, 2007

So I was talking with Rob Farley at Tech.Ed (Rob, you’re my hero ;-)) and the topic he raised the topic of what if we did not grant *users* access to our SQL Servers, but instead only allowed groups.

Not something I had really thought about much before but This is a really good idea™.

The question that naturally arises is: How do we enforce this with something stronger than “because I said so”.

The good news is that it appears that SQL Server 2008’s Declarative Management Framework (a.k.a. “policies”) can be of assistance here.

Background on the Declarative Management Framework:
  • A Facet is a piece of data about the system that you can use in your policies. 23 Facets are included in the current Katmai CTP.
  • Each Facet can have 2 or 10 or more Properties. It is the properties that are used in your conditions. Facets are logically groupings of properties by SQL Server
  • A Condition is a logical expression about a property or set or properties
  • A Policy is a named instance of a specified Condition with a rule on how it will be enforced (on a schedule, on changes etc).
Step 1: Create a new Condition and call it GroupsExist. Choose the Login facet and the LoginType property. Set it to equal WindowsGroup.

In the case that there are user accounts like .\ASPNET or the ##MS_PolicyExecutionLogin## login that have a legitimate right to be there, list those in the expression as illustrated below.
 

Step 2: Create a new Policy based on the GroupsExist condition and cal it OnlyAllowGroupsNotUsers. Apply it to Server/Login and set it to Enforce as illustrated below.



One of the really cool things is that you can create your policies in a not enabled state, and use the built-in testing harness to get the policy right before enforcing it.

To test a policy in SQL Server Management Studio, right-click on it and choose Test… This will run the policy against the current state of the server and report the details of success or failure.

Now when the policy is disabled, the following statement will do as it is designed.

CREATE LOGIN [MYLAPTOP\SampleUserAccountAccess] FROM WINDOWS GO


However when the policy is Enabled, I am getting the following error, which I assume means I am am on the right track :-)

Msg 10314, Level 16, State 11, Procedure sp_syspolicy_execute_policy, Line 25
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE.

Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.DmfSqlClrWrapper, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.

Strong name validation failed. (Exception from HRESUL
T: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A) System.Security.SecurityException: System.IO.FileLoadException:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
The statement has been terminated.


I’ll research this message next week, as well as re-do the sameple when back home and connected to AD, and if the results differ I’ll re-post.

...Topic for future blogging: Ensuring consistent policies across several instances of SQL Server. Stay tuned.

Listening To: The dodgy motor in the fridge in my apartment.





Friday, August 10, 2007 8:14:44 AM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [1]  | 
# Tuesday, August 07, 2007



If you are attending and wanna hang out, drop me a line via this blog.

Otherwise, see you next week* :)

* by which time I will be significantly smarter... ;-)

Tuesday, August 07, 2007 12:34:22 PM (AUS Eastern Standard Time, UTC+10:00)  #    Disclaimer  |  Comments [0]  |