Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Deep Fried Bytes Episode #24: Chatting about F# with Chris Smith and Dustin Campbell

Posted by Keith Elder | Posted in Podcast | Posted on 28-01-2009

 Listen To This Episode 

http://deepfriedbytes.com/podcast/episode-24-chatting-about-f-with-chris-smith-and-dustin-campbell/

 

In this episode we sat down with Dustin Campbell and Chris Smith to discuss F#, Microsoft’s new functional programming language.  Dustin and Chris are great friends of ours and are always fun to sit down and talk to.  All you need to know about this show is… “… I want something that tastes good … “. 

How To Listen To The Show

1. Directly From The Web Site (or click the link above)

When you visit the site look for this:

Clicking the triangle will launch the Yahoo! media player and automatically start playing the show for you. As long as you leave the browser window open the player will stay open. Clicking off the page WILL stop the player!

2. Subscribe via iTunes and Zune

If you have iTunes or Zune installed on your computer you can subscribe to our show. In iTunes open the Music Store and search for “Deep Fried Bytes”. In the Zune software, go to the MarketPlace select Podcast and search for “Deep Fried Bytes” to subscribe to the show. You can also click either of the two icons below to automatically subscribe to the show if you have iTunes or Zune installed.

Subscribe via iTunes Store Subcribe via Zune Market Place

3. Subscribe to RSS Feed

To stay current and up to date with the show, subscribe to the site’s RSS Feed. If you don’t know about RSS feeds you can read more here: http://en.wikipedia.org/wiki/RSS_(file_format)

If you already have an RSS reader installed and setup, click the feed icon below to grab our news feed.

Subscribe to our podcast!

Deep Fried Bytes Episode #23: Functional Programming in C# with Oliver Sturm

Posted by Keith Elder | Posted in Podcast | Posted on 28-01-2009

 Listen To This Episode 

http://deepfriedbytes.com/podcast/episode-23-functional-programming-in-csharp-with-oliver-sturm/ 

 

In this episode we sat down with Oliver Sturm of Developer Express.  Oliver is writing a book on Functional Programming in C# and we had to get the scoop on what he was going to put in the book. Oliver blew us away in this episode.  The discussion went so deep, there is a code example that you need follow along with.  Here is the code sample.  It was a great show, enjoy.

   1: Func<int,int,int> add = (x,y) => x + y;
   2:  
   3: Func<int, Func<int,int>> addC2 =
   4:    delegate(int x) {
   5:       return delegate (int y) {
   6:           return x + y;
   7:       }
   8:    };
   9:  
  10: Func<int, Func<int,int>> addC =
  11:    x => y => x + y;
  12:  
  13: var add5 = addC(5);
  14:  
  15: add5(37);

How To Listen To The Show

1. Directly From The Web Site (or click the link above)

When you visit the site look for this:

Clicking the triangle will launch the Yahoo! media player and automatically start playing the show for you. As long as you leave the browser window open the player will stay open. Clicking off the page WILL stop the player!

2. Subscribe via iTunes and Zune

If you have iTunes or Zune installed on your computer you can subscribe to our show. In iTunes open the Music Store and search for “Deep Fried Bytes”. In the Zune software, go to the MarketPlace select Podcast and search for “Deep Fried Bytes” to subscribe to the show. You can also click either of the two icons below to automatically subscribe to the show if you have iTunes or Zune installed.

Subscribe via iTunes Store Subcribe via Zune Market Place

3. Subscribe to RSS Feed

To stay current and up to date with the show, subscribe to the site’s RSS Feed. If you don’t know about RSS feeds you can read more here: http://en.wikipedia.org/wiki/RSS_(file_format)

If you already have an RSS reader installed and setup, click the feed icon below to grab our news feed.


Subscribe to our podcast!

Back to the Basics: Montgomery Alabama Code Camp Jan 31st 2009

Posted by Keith Elder | Posted in Uncategorized | Posted on 21-01-2009

The Alabama Code Camp in Montgomery, AL will be held on January 31st, 2009.  I’ll be speaking at the code camp running a full track that is called “Back to the Basics”.  Here is the purpose of the track:

The Back to the Basics series is a primer for anyone that is starting at ground zero with .NET. Each one progressively builds on the previous. The sessions start at the beginning with what .NET is and work all the way up to programming in C# and building various applications. This track is great for Code Camps, Technical Conferences and other venues whereby attendees want to get exposure to .NET and building applications on the platform.

imageThere will be 5 sessions in the Back to the Basics track, and tentatively a discussion panel to close out the day. 

Thus, if you have been looking for a way to get started in .NET and learn about the platform, this is a perfect way to learn about the latest version of .NET along with the C# language and Visual Studio.  Best of all, it will cost you $0.00 to attend (well, not zero, gas and food, but hey, that’s easy).

Putting this together wouldn’t have been possible without the help of INETA, so I and the organizers of the Alabama Code Camp thank them for their continued support in the community. 

Code Camp Info

Directions and Other Info:  http://www.alabamacodecamp.com
Register for Event:  http://www.clicktoattend.com/?id=134437
Date:  January 31st, 2009
Where: Montgomery, AL

Back To The Basics Sessions

Back to the Basics: What is .Net?

No other name in history has confused more people on the planet than when Microsoft named their development platform .NET. For a lot of developers .NET remains a mystery and it is often confused with many things. The Back to the Basics series is a primer for anyone that is starting at ground zero with .Net. Each one progressively builds on the previous. This is the first session in the Back to the Basics series. In this session we’ll look at what .Net really is, the benefits of the platform, bust a few myths and show some sound reasons why you should consider it as a platform. At the end of the session, hopefully we’ll answer one of life’s most puzzling questions: What is .NET?

Back to the Basics: How to Use Your Hammer – Visual Studio

Imagine if you were a carpenter that didn’t know how to use a hammer, skill saw, drill, level, or nail gun. Would you be a great carpenter? Probably not! The Back to the Basics series is a primer for anyone that is learning the .NET platform. Each one progressively builds on the previous. This is the second session in the Back to the Basics series. In this session we’ll look at the biggest single tool you’ll use when building applications on the .NET platform, Visual Studio. Visual Studio is a world class IDE with full blown intellisense, debugging, source control, and much more. When the session is over you’ll know the difference between a solution and a project, how to structure your applications and tons of shortcuts to make you more productive with your new jack of all trades tool.

Back to the Basics: A Programmer’s Primer Programming in C#

The C# programming language is the flagship language available to .NET developers. It is fully supported within the toolset and is even the programming language the majority of the .NET platform is built with. The Back to the Basics series is a primer for anyone that is starting at ground zero with .NET. Each one progressively builds on the previous. This is the third session in the Back to the Basics series. In this session we’ll cover as much about the C# language as time will allow starting with the basics of the language, Object Oriented Programming principles all the way to generics, collections, and LINQ. This is a programmer’s primer, which means you should already know at least one language and have some experience programming.

Back to the Basics: The Swiss Army Knife, Part 1 (Winforms/WPF/Mobile)

.NET is a “Swiss Army Knife” because no matter which type of application you want to write (client, web, mobile) you can use one tool (.NET) to do it with. The Back to the Basics series is a primer for anyone that is starting at ground zero with .NET. Each one progressively builds on the previous. This is the fourth session in the Back to the Basics series. In this session we’ll cover how Windows Client applications are built. First we’ll look at classic Winforms and then we’ll look at the newest technology called Windows Presentation Foundation (WPF) which provides richer user experiences. Lastly we’ll look at how to write Windows Mobile applications for Smart Phones and Pocket PC.

Back to the Basics: The Swiss Army Knife, Part 2 (Web/Services/Workflow)

.NET is a “Swiss Army Knife” because no matter which type of application you want to write (client, web, mobile) you can use one tool (.NET) to do it with. The Back to the Basics series is a primer for anyone that is starting at ground zero with .NET. Each one progressively builds on the previous. This is the fifth session in the Back to the Basics series. In this session we’ll cover how web applications and web services are built. First we’ll look at WebForms. If you stayed awake in session four you’ll feel right at home with WebForms since the same programming model is applied, the only difference is we are building a web application. Then we’ll look at how to build web services to expose business logic to a multitude of clients (web, windows, mobile) using Windows Communication Foundation. Lastly we’ll touch on Workflow Foundation which helps us to easily build out the complex business logic in a declarative manner.

SqlDependency and SQL Service Broker Permissions

Posted by Keith Elder | Posted in .Net, SQL Server | Posted on 20-01-2009

Today I spent the better part of the day working with one our DBAs at work to setup SqlDependency so it would work with SQL Server.  In order to use SqlDependency it requires Service Broker.  Thus we enabled Service Broker on the database.   The rest of the day we kept getting the following error each time SqlDependency would get called on start up.

Error: Message: Cannot find the procedure ‘SqlQueryNotificationStoredProcedure-42d557f5-071f-456d-8d4c-a1bafc4cbece’, because it does not exist or you do not have permission.
Cannot find the queue ‘SqlQueryNotificationService-42d557f5-071f-456d-8d4c-a1bafc4cbece’, because it does not exist or you do not have permission.
Invalid object name ‘SqlQueryNotificationService-42d557f5-071f-456d-8d4c-a1bafc4cbece’.

After much Kung Fu searching and trial and error we finally found something.  We had to enable the following permissions to get this to work.  Thanks to Remus Rusanu for the information. 

GRANT CREATE PROCEDURE TO [SqlUser];
GRANT CREATE SERVICE TO [SqlUser];
GRANT CREATE QUEUE TO [SqlUser];
GRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO [SqlUser];
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [SqlUser];
GRANT CONTROL
ON SCHEMA::[dbo] TO [SqlUser];
GRANT IMPERSONATE ON USER::DBO TO [SqlUser];

A security red flag with these permissions is the “GRANT CONTROL ON SCHEMA::[dbo] to [SqlUser];”.  This opens up the permissions extensively on the database for that user to do all sorts of things.  I’m not a DBA, but reading the documentation on what GRANT CONTROL scared me enough to know we can’t leave this in a production environment.  Jim, the DBA at work, has an idea to tune this down. 

Better Permissions

Jim, our Kung Fu DBA found an article that outlined some finer grained permissions here.  The script on that page assumes you have two different users or services.  One that creates the dependency, one that is the listener.  Jim’s script assumes you have only one account doing both functions.  This is how most setups will be more than likely.  Thus use this script instead of the one above, unless you like security holes in your database. 🙂

--Script to give user:[User] rights to use the SQLDependency functionality in .Net 2.0
CREATE ROLE [SQLDependency] AUTHORIZATION [dbo]
GO
 
CREATE SCHEMA [SQLDependency] AUTHORIZATION [SQLDependency]
GO
 
--Database level permissions
GRANT CREATE PROCEDURE to [SQLDependency];
GRANT CREATE QUEUE to [SQLDependency];
GRANT CREATE SERVICE to [SQLDependency];
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [SQLDependency];
GRANT VIEW DEFINITION TO [SQLDependency];
 
--Service Broker permissions
GRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO [SQLDependency];
GRANT RECEIVE ON QueryNotificationErrorsQueue TO [SQLDependency];
GO
 
EXEC sp_addrolemember N'SQLDependency', N'[User]'
GO
 
ALTER USER [User] WITH DEFAULT_SCHEMA=[SQLDependency]
GO

Thanks to Jim the Kung Fu DBA for finding a better solution.

Goals for 2009

Posted by Keith Elder | Posted in General | Posted on 19-01-2009

Jeff Blankenburg tagged me on his “goals for 2009” list and by some weird force of the Internets I feel compelled to write my goals for 2009 down publically.  Don’t expect anything earth shattering, let me just forewarn you. 

1.  Lose Weight

The first thing on my list is to lose weight like 97% of America.  Because of my height, most people that know me today, have no idea just how skinny I used to be.  My height is 6 feet and 2.5 inches tall.  That height isn’t a world record, but I am taller than the majority of the people I run into.

Would you believe it if I told you though, that I was the same height today that I was when I was a senior in high school, yet i weighed in at 129lbs?  That’s right, I was a walking stick.  A bean pole as they say.    The reason was I so active in my younger years.  I used to ride my bike 10-20 miles /  day, worked on the farm, etc.  I may have been skinny but I was as stout as an ox and could easily throw around 150LB sacks of feed at the barn with no problem. 

Fast forward to today and let’s face it, I’m not active.  My job requires zero physical activity, zilch, nada.  As long as my brain and fingers work, I’m good.  I have to change something, get more active and also watch what I eat.

Earlier today I put a sign on my fridge that read this, in hopes that it would serve as a reminder: 

image

What I am not going to do is set some ridiculous two digit weight loss goal only to disappoint myself.  My first goal is to lose 10lbs.  After I reach that goal, I’ll set another goal.

2.  Pay off Debt

image Every few weeks I get paid only to turn around and send it to people we owe.  As I get older it bothers me more and more that I’m not building more wealth.  At the start of the year I started reading a lot of material on debt, managing finances, retirement, etc.  The one book that really made sense to me was The Total Money Makeover: A Proven Plan for Financial Fitness by Dave Ramsey. 

I’ve listened to Dave’s radio show in passing and he always made sense to me.  Thus starting in January we put the Total Money Makeover in action.  This plan takes both people in the relationship to buy into so it isn’t something you can go out on your own and do if you are married. 

Since I started reading more about managing money lately, it is funny how many people I have talked to about money who have said, “I don’t have any debt, all we owe is our car and our house.”.  Well, guess what, YOU HAVE DEBT! 

If you owe someone anything, it doesn’t matter what it is for, you have debt.  If you didn’t pay cash for it, you have debt.  If you are in this mindset of thinking, read Dave’s book.  He can help.

It is going to take some serious life altering changes to accomplish this but I am already seeing positive results.  It is going to take time to get to $0.00 of debt but it will be worth it.  There is a famous quote in the book that really drives home the point of living debt free.

Live like no one else so later you can live like no one else.

The point is that if you live like no one else right now (cut corners, drive an old car, slash costs, etc), later you can live like no one else because you’ll have built wealth and be debt free.  Honestly, it is a small price to pay.

3.  Fix Things Around The House

As if the first two things weren’t enough for the year, my last goal is to fix things around the house.  I have a lot of projects that I want to do and I think I can make them happen this year.  I won’t bore you with the details but here are a few things on the list:  do some re-landscaping in the yard, treat the deck, stain the front door, re-do my closet. 

It is stuff that needs to get done and while I may not get all of it done due to budgets, I am sure I can get a lot of it knocked off.

Who’s Next?

If you read this far great! Now guess what?  You are officially tagged/called out to write about your goals if you meet one of the following criteria: 

  • A) you follow me on twitter
  • B) I follow you on twitter
  • C) we’ve met face to face
  • D) you listen to our podcast
  • E) you are bored and need something to blog about.

Happy 2009!