Thursday, July 21, 2005
blogging my way to pdc
  • PDC still offering early bird registration

Click on the logo to the left to find out how to beg and plead like I am or click below to see how to register.
http://www.developerpowered.com/ 

can i go to the microsoft pdc, huh, can i?

I recently started discussions with my employer, HPCi, about changing from a contract employee to a real, actual, honest-to-god employee of the company.  Several years ago, I was an employee and left to pursue higher purpose.  Shortly thereafter, I met my wife, had a kid, blah-blah-blah (found higher purpose) and came back on a project/contract basis.  Several years later, well, you get the picture....

Several years back, the year 2000, HPCi sent me to the PDC.  This year, they are sending a few developers.  There are several people who want to go as well.  Even if there was budget for more developers, it would be unfair to send me a second time before others got to go once.  However, depite the unfairness, I would really be the best person to go...  why?

  • I want it the most
  • I fit in best in LA,  I have the most piercings.
  • I am responsible for the companies enterprise builds - ie: I need Team Systems knowledge
  • I have repor with the CLR guys, they visited Atlanta, we had dinner, hung out, made fun of the other developers
  • I'm the younger then the other developers (going to PDC).  Their memories are becomming unreliable. 

Now, from outside the company, it makes much more sense.  If Microsoft decides to sponsor my way to the PDC, I'll do one or more of the following:

  • Present general and specific PDC materials to the Atlanta C Sharp User group
  • Volunteer at a Microsoft or Ineta function
  • Dye my hair Microsoft blue
  • Teach my two year old to write XAML

OK, I've wasted enough time blogging this evening.  Have agood one.  If you are going to the PDC... curse you.

 

.Net | C# | Microsoft
7/21/2005 8:14:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [3]  |  Trackback

The last post about namespaces was just the warm up.  After I identified the situation and removed our references to the "SupportClass", I continued having issues with the build.  The error was "such_and_such referenced class in 'this_and_that.dll' inherits from baseclass 'so_and_so' that is defined in another assembly that is not referenced.  You must add a reference to ''this_and_that, version 1.0.0, culture: nuetral'

The baseclass is indeed defined in the same class as the derived class.  (Confirmed thanks to Lutz Roeder's reflector)

Why couldn't it find a ref to itself? 

As it turns out, nAnt will alphabetize your assembly references.  Execute NAnt using the -verbose flag to see such details during execution.  When looking for baseclasses, references, etc, csc.exe will inspect in the order of reference declarations.  Therefore, my namespaceless collision of {global} "SupportClass" bit me again.  What to do?

If NAnt is going to alphabetize, why not rename the offending class.  Fortunately, only one class library, Novell.Directory.Ldap.dll makes is dependent and self-referencing on its "SupportClass".  Therefore, I could rename the other dll to appear later in the alphabet.

<copy file=".${bin.dir}\Awrecka.Navigation.dll" tofile="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" />

-- compile My.Enterprise.dll -->
<csc target="library" output="${bu ... />

-- copy the Awreckadll back to its proper name and get rid of zendeca -->

<copy file="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" tofile="${build.dir}${bin.dir}\Awrecka.Navigation.dll" />

<delete file="${build.dir}${bin.dir}\ZAwrecka.Navigation.dll" />

Anyone ever heard of a  H A C K ?

 

.Net | C# | Microsoft | NAnt
7/21/2005 7:40:26 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Namespaces are neat but they are also important. Every class, struct, etc you write should have one. Don't be stingy, give 'em a namespace
.Net | C# | Microsoft
7/21/2005 6:25:38 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]  |  Trackback
Wednesday, July 20, 2005

Be sure to visit all the options undfer "Configuration" in the Admin Menu Bar above. There are 16 themes to choose from, and you can also create your own.

 

7/20/2005 7:00:00 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Wednesday, July 13, 2005
A simple utility that you are free to use and share to encode and decode text using HTMLENcoding and UrlEncoding. Written as a windows forms executable using .net
.Net | C# | Web | Xml
7/13/2005 7:20:08 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]  |  Trackback Utility.HTMLEncoder.zip (17.16 KB)
Monday, July 11, 2005

In a previous post, and one that gets googled alot, I talked about trapping the enter key on an entire form.  When I endeavored to use my own code, I wondered why I did it the way I did.  I don't actually remember why I used a one second buffer to store the enter key press and cancel the form-post.  Basically, that approach is something you can add to a webform and forget about it. 

I was about to use it on a page I'm authoring and lo-and-behold, the developer ahead of me has abstrated out the web form class and removed my access to the form itself.  I have niether access to the html portion of the <form> tag nor access to the form element (or control) from the code behind.  So I modified the fuction to provide the following capability:

    • trap the enter key from the onKeyPress event of an element and return false when it was the enter key
    • provide the id of an alternate element to click() if the enter key was pressed

note: I debated on whether I should return false when the enter key matched.  This allows me to say onKeyPress="return trapEnterKeyPress('someElementId');" and the call to the function is pretty straight forward.  The truth is I wanted to return true when the enter key was pressed but then the call is onKeyPress="return !trapEnterKeyPress('someElementId');".  That ! is easy to miss and other developers might wonder why it doesn't work.  Splitting hairs are we?  yes!

here is the function

         //enter key trap function - traps the enter key.  
         //
If an element id is provided, it will call click on that element if available.  
         //
returns false if the enter key was trapped as source of event

        function trapEnterKeyPress(sElementIdToClick){

          //is it the enter key?

          var bIsEnterKey = (event.keyCode.toString() == '13');

          if(bIsEnterKey){

               //is there an alternative element to click instead?

               if(sElementIdToClick.length>0){

                 //make sure it exists and is clickable

                 var oEl=document.getElementById(sElementIdToClick);

                 if(oEl) if(oEl.click) oEl.click();

               }     

          }

          //return true if all clear (see note in article)

          return !bIsEnterKey;

        }

 

here's the control declaration in asp.net

 

<input type="Text" id="Zip" name="Zip" value="<%#_sZip%>"

         onKeyPress="return trapEnterKeyPress('<%#button1.ClientId%>');">

 

which renders in regular html as:

 

<input type="Text" id="Zip" name="Zip" value="30306"

         onKeyPress="return trapEnterKeyPress('_ctl0_button1');">

 

 

 

if an alternate element id is not specified or is not a clickable element, the enter key is just trapped, forcing some other method of submission
C# | Web
7/11/2005 8:48:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  |  Trackback

For four years I have been handling the website for Open Mic Madness
Its an amazing showcase of local talent and probably, hands-down, the best way to find out who is doing what musically in Atlanta. Yeah, there are lots of bands you won't see here, but those are either the band you know about already... or the ones you don't need to bother about because they are on their way out. OK, that's a little too polar but the idea is that, yes, go! And here sone amazing performances.



The show goes on for 6 nights. I highly recommend coming to several nights. Defintely, and I mean absolutely and without question, go to the last day. The artists light on fire that night. Imagine progressing through 120 bands in a single elimination tournament and winning your way, to the last day, the final showdown. I am not a fan of competition in music. Its subjective, after all. However, this competition does some amazing things to the artists who arrive on top. They have consistently all went on to make huge names for themselves, check out the open mic website to find out just what they've done.

I compete each year as well. Last year, I went in - both: cocky and unprepared. I hadn't written anything new yet still I thought my old songs were good enough for at least a few rounds. I was out, dead, done ...round one. Frankly, I still think I played better then my competetion that day. I did not, however, play my best. I hadn't practiced and I was nervous. I missed notes. She was country (and I really don't like country) and simple but "on". As a matter of fact, I would have made the same vote. I would have told the artist (me) that they should have prepared better. After a long night of judging, I probably would have forgotten to mention it.

This year I have a band. We will very likely be ready to perform by this October. I will run it by the dudes and see if they want to do it. I'll bet they will. If not, perhaps I'll do it solo again. This year, however, two changes: I'll practice and I'll go to as many nights as I can!

7/11/2005 5:28:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback

My sister was among the crowd attacked by wayward rockets.  She was spared.  She'd come to see us over the weeked.  It was a fabulous visit other than the a-fore-mentioned burning. 

It was good to see her.  Being with family reminds us about who we are, where we came from, where we are going, and what is really important.  I reminded her that some things change but some things remain the same (her brother can be a retard).

It also had some good surprises.  I found out she had the same dental complications I've had: gums that are trying to escape their teeth.  Hers, however, has gotten better.  Now I can go to the dentist again.  Its been well over ten years.

I also spoke with her about other personal family matters and discovered some of the events that led to where things are today.  I wish she hadn't waited so long to tell me but we've all had to come such a very long way to get to where we are today, I am not surprised she didn't. 

It was great to see my sister and watch my son squeel with delight as he introduced her to his world. 

 

7/11/2005 5:02:16 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
That horrific title, unfortunately, is exactly what happened.
7/11/2005 4:51:21 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Friday, July 08, 2005

Rick emailed me about excluding resources after finding my nAnt resources Post.  I wasn't sure about this so I googled it.  I know that nAnt will automatically compile resx files as resources.  Actually, I am not entirely sure it this is nAnt or csc.exe but, nonetheless, they will be included by default.

Excuding is available to the developer, however. 

<resources basedir="." dynamicprefix="true" />
   <include name="**\*.resx" />
   <exclude name="somefile\loginform.resx" />
</resources>

This post by punk coder has more detail and things to consider

7/8/2005 1:45:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: