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.

Creating Event Handlers in C# The Definitive Guide

Posted by Keith Elder | Posted in .Net, Visual Studio | Posted on 07-07-2008

Ok Chris Love, this one’s for you.  Here is how you create an event handler in C# using Visual Studio.

Here is a form I built in a matter of seconds.  I know, we’ll discuss my mad design skills later.

image

Let’s pretend I was in the code behind and wanted to create a Form Load event.  In the code behind within the constructor start typing until you find the event you want to create as shown here:

image

Once located press <Enter> to auto complete the name.  Here is the step that a lot of people miss.  Type the operator += and watch what happens.

image

Visual Studio will give you a notification to press TAB to insert the EventHandler.

Pressing TAB will then give you this:

image

It is at this point if you press TAB again, the callback method will be generated.  Thus when you do += press TAB TAB (2 tabs).

image

How many key strokes was that?  Let’s see.  I had to type in my form the characters:  this.Lo <enter> += TAB TAB.  Easy quick and simple.

Deep Fried Bytes Episode 5: Developing .NET Software on a Mac

Posted by Keith Elder | Posted in Podcast | Posted on 07-07-2008

Episode 5 of Deep Fried Bytes is out!  This episode is a real cross pollination of technologies whereby we are talking about doing .Net development using a Mac. 

My Show Notes

About five or six years ago I purchased a Mac.  As a long time Unix user I loved it and spent countless hours preaching it’s never ending hotness.  Then I got a job whereby using the right tool for the job was .Net.  My Powerbook wasn’t fast enough to virtualize development of any sort since it only had a G4 processor running at 867MHz.  I did have a virtual machine setup for Windows XP on it but it was so slow it was impossible to even boot up let alone do development with it.  Thus I’ve had to use use a PC for .Net development. 

Fast forward several years later and Apple’s Intel Mac Book Pro line up has the same horse power needed to do what I wanted to do years ago.  Keep my Mac but write .Net code.  Today the game has changed whereby it is possible with virtualization to own a Mac and write .Net software.  Over the past six months I’ve seen more and more .Net developers purchasing Macs.  Even today, Scott Reynolds who was a guest in Episode 3 about Twitter, just got his Mac Book Pro today.  Other developers are natively booting Windows using Boot Camp but purchase the Mac because of the hardware. 

Is this setup for everyone?  No, I don’t think it is.  If you aren’t comfortable using virtualization to develop software then owning a Mac may not be for you.  But if you like developing for .Net and being able to write software for three major platforms using one machine (Windows, OSX, Linux) then this may be something you might want to consider.  At least until OSX can run on standard PC hardware (which isn’t on the radar anytime soon).

This is another one of those “not so typical” shows whereby we are really trying to go deep and find the true pulse of what is going on technology.  I hope you enjoy it.

Ways To Listen To The Show

There are several ways to listen to Deep Fried Bytes.

1. Directly From The Web Site

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!

Guitar Hero – The New Drum Kit

Posted by Keith Elder | Posted in XBOX 360 | Posted on 02-07-2008

News has been floating around that EA/Harmonix/MTV is going to release a new version of their hit Guitar Hero this year entitled……(drum roll)……. (pun intended)…….. Guitar Hero World Tour! (cymbal crash!).  One of the changes is they are adding a drum kit.  Being an avid Rock Band drummer I was happy to hear they are adding crash cymbals to it as shown here.

image

So what’s not to like?  Personally, and this is just me, I think it is missing an extra tom tom to the right of the green pad.  If they really wanted to provide a real feel to the drum set there should be another tom next to the green pad.  Of course that would give 7 total inputs but still manageable.  Actually thinking about it I’m not even sure why I’m asking for more pads to be placed onto it, I can’t play a lot of songs on expert now as it is!

I just hope they make the bass pedal more resilient so it doesn’t break like Rock Band’s.  I hope to be standing in line to pickup the latest version when it hits the shelves.

I Was Harassed and Verbally Abused By A First Grader On AOL Instant Messenger

Posted by Keith Elder | Posted in Funny Stuff | Posted on 01-07-2008

Yesterday I was working at the computer and I got this random message from someone I didn’t recognize.  I publish my instant message and email on the Internet freely for the very reason so people can find me and contact me.  It is not unusual to have someone ping me asking for help or a friend trying to get back in touch.  I politely said hello and do I know you.  They said no they just wanted to chat.  I politely explained if we didn’t know each other I didn’t have an interest.  They said good bye and we went our separate ways.  Tonight, as a matter of fact a few minutes ago I was about to head to bed.  This same person pinged me via AIM (AOL instant messenger)  again tonight.  But this time they started throwing around four letter words and being extremely hostile.  I have no idea how old this person is but I deduced deducted by their lack of typing and spelling skills they were a first grader.  I captured the entire conversation in a screen shot.  I grayed out the first graders explicit words as to not offend anyone. Lord knows I’ve been offended enough tonight.

Here’s the conversation.  For the record my handle is in red.  The words grayed out rhyme with duck but have various spellings and combinations of duk, ducu, and duku.

image

I don’t even know what to say at this point except this person is an idiot and his/her parents should ground them for life.  It is ridiculous that someone feels they can hide behind a keyboard and say anything they want.  It just shows how ruthless and careless the human race can be and how far they will go if there are no boundaries in place. 

Speaking in Florida At Gulf Coast .Net Users Group July 17th

Posted by Keith Elder | Posted in Presentations, Speaking | Posted on 30-06-2008

image It has been about a year or more since Kevin asked me to come speak at the Gulf Coast .Net Users Group and I am happy to report that I will be there with bells on Thursday July 17th!  It took us a while to get things in order but I’m looking forward to traveling down.  The drive isn’t that far and let’s face it, who doesn’t love a peaceful drive down the coast looking at sandy beaches and ocean water!?

That Thursday night I’ll be speaking on Windows Communication Foundation entitled “Demystifying Windows Communication Foundation”.  I may throw in a little Workflow Foundation love if time permits to show how WCF and WF are friends now within .Net 3.5. 

After the talk on Thursday, Kevin has promised to take me and Mrs. Dr. Elder deep sea fishing.  It is going to be a fun trip and I look forward to speaking in a new location and meeting some new people.  It has been too long since I’ve been to the Destin, FL area.  The last time I was in the area we went to the jazz festival in Pensacola.  I got so sun burned I spent 2 days sick in my dorm room after getting back.