Happy anniversary! I got you... sunburn!

Ouch.  Rented a boat on Lake Murray with my Other Being (or whatever hippies call number one dames nowadays).  I need to stress to you all (all three readers) that you need to make sure to actually get the suntan spray on all parts of your body when planning to spend all day on the water.  Apparently I not only skimped on my shoulders, but completely forgot my face. 

I can feel my beard growing.

Its been fourteen hours since the last exposure and I'm not too bad off, so I'm hoping this is as bad as it gets.  I wiki'd and checked with Mayo Online (which claims to have nothing to do with Hellmans') and apparently I need some Tylenol/Advil and some hydrocortisone cream.  Wiki claimed that aloe was a good choice; anyone who has actually used it on sunburn knows that aloe, once dry, forms a grease-like coating that takes off the outer six layers of skin and muscle when removed.  Or at least it feels like that when you're washing it off.  Fuck aloe.  Fuck aloe in his corney hole, the bastard.  I'm sticking to A&D or whatever ointment I can pick up today.


WTF Ace?

Has Ace looked messed up for you guys lately?

Just sayin'.  Kinda messed up in the header department. 

Seems to me like he needs to ditch the pajamas ad from the banner block and stick it as the first entry of the posts div.


Creating types with lots of events

Matt Burseth recently posted about his discovering the System.ComponentModel.EventHandlerList class while disassembling the Control class.

So, what's the point of this class?  If you think about events, you normally think "awesome."  Something in your object happens, you inform other objects about what just happened, and they do stuff with this information.  Its a sweet wrapper around delegate swapping.  But there are some things you have to take into consideration with events.  First, they require code.  Code you never see.  When your event is compiled into IL, it is transformed into a private delegate field, and a property containing add_eventname and remove_eventname methods. 

That means that objects that have lots of events, such as System.Windows.Forms.Control and its 69 public events, most of which are never used, waste lots of memory.  And since just about everything in the UI of a Windows Form is a Control, you're potentially talking about lots of wasted memory that puts unneeded pressure on the GC. 

The EventHandlerList is a way to get around wasting this memory.  Event delegates are not created until someone registers interest in them.  That's what the EventHandlerList does--it keeps track of event delegates, adding new registrants to existing delegates and creating new ones when needed.  But there are two things you must understand about this class.

First, it is implemented as a linked list.  So event access is, in a worst case situation O(n), where n is the number of events already registered.  If you have a thousand events and expect registrations to come in very quickly, that could show up as a performance hit.  Will that ever happen?  No.  Pretty much no.  But why waste time with a slow-ass linked list when the collection could be managed with a hashtable and get O(1) access times?

Second thing to consider, and probably the most important one, is that the EventHandlerList is not thread safe.  At all.  If you use it, you are responsible for managing how two or more threads access this object at the same time.  Sucks to be you.

Jeffrey Richter supposedly has an "EventSet" object that addresses these two issues, however it (and him) are AWOL on the subject.  You can go buzz around his blog and website to see if its there.

Anyhow, that's the dope on the EventHandlerList object.  Gotta go to another friggen meeting.  Bye for now...

 

Programming Post by: McGurk at 01:07 PM | Reply
Kick this post:

I'm okay

Hey, don't worry guise.  It wasn't me.  I heard the buzz about some people had fallen off a building, causing a couple blocks to get closed off this morning, on the local talk radio station when driving into work.  The word then was one dead, one alive.  There was definitely no mention of nudity. 

Points for ingenuity, but pls keep your suicide off me. 


Don't play my game

Oh lawd. You probably think you know what this is from the pic, but its much, much more. Play it for about one minute. Its better than Oz to Floyd.

Update! Fuck the shit!


Coincidentally

Hai, guize.  What's going on?  Yeah.  Oh, me?  Just working on a real important presentation.  You know, direction of the company, stuff like that.

Anyhow, thought you might be interested in reading about 32 ways to keep your blarg from sucking.  I'm gonna get right on a couple of thems.  Bye for now...


Where do you research?

Eileen Rumwell (who needs to turn comments on at her blog) recently asked the question, "Where do you get your .NET information?"  Its an interesting question; one that applies across just about every profession but is of significant importance for developers.  Information changes so quickly that relying on printed material is a liability.  So where do good developers go to find the answers to their questions?  For me, there's three primary places.  Blogs, books and Google.

I consider regularly reading programming blogs to be a class I attend daily.  This "class" primarily consists of reading posts from about 50 different feeds that are relevant to my interests.  blogs.msdn, CodingHorror and DotNetKicks are among these.  Although not a primary resource, I do consider books to be still important in keeping abreast of things in the programming world.  Often I use books as a less frequently used resource for research.  Often this consists solely of reading books related to work.  For example, the last book I read was the Mythical Man-Month; I'll be reading a book on implementing Agile with VSTS next.  My third source of information is primarily for quick searches.  Often this consists of taking five minutes to search for information on a specific, well defined topic, related to a task I'm currently programming or a subject I'm posting about.  These searches take place in three places:  VS help, Google web search and Google groups search.  Which I do in what order depends on the task and where I am.  In VS, the help gets my first attention.  When that fails (as it often does), I go to google groups.  Almost always someone has had the same question that I have and has posted it on Usenet.  Google Groups is the best place to search Usenet to get clues as to possible answers, if not the answer itself.  Once I have a better understanding of the problem and its possible solutions, I can refine this knowledge by continuing to search the web.  There's a higher percentage of crap in a web search, but I often can refine it by specifying a site (i.e., site:msdn.microsoft.com) or -negating -specific -words -that -indicate -useless -websites. 

Anyhow, that's a quick overview of what I do.  I'm always open to finding more useful sources of information.  Post yours here!

Programming Post by: McGurk at 01:50 PM | 3  Replies | Reply
Kick this post:

Image.NET 1.1 released

It hasn't been long since I put up 1.0, but I've made some important changes that make the dang thing worth your while.  If you run Windows, check it out.  If you have Mono, see a doctor, then check it out.

The current release adds an installer, fixes some minor bugs, enforces a single program instance, includes folder browsing (selecting one image essentially selects all in the folder).

 

Programming Post by: McGurk at 04:31 AM | Reply
Kick this post:

Sour shoes pics!

If you don't know who Sour Shoes is, or have never heard his act, I feel for you. The guy is a friggen scream. If he wasn't such a loser he'd be out of his parent's house and on national radio, if not on national TV.

Pics of the guy are rarer than hen's teeth (ugh, that's a corny metaphor). Now, thanks to some douchebag radio show, I've got three pics of the guy. Here they are:


Omega!

Actually, this post is more like: Programming | Political | Bullshit.  Today I just learned something about myself.  I'm an Omega Geek.  Which is definitely cool.  And not just because we aren't virgins, like Alpha Geeks.  Its because when you think "Omega Geek", you think...  Chuck Heston.  The original Omega Geek.

Programming Post by: McGurk at 01:02 PM | Reply
Kick this post:

<< Page 6 of 16 >>