Geeks With Blogs
Boy Meets 'Hello World' Blogging the journey from College Grad to .NET Developer June 2008 Entries
Selectable Labels in WPF to allow Copy and Paste
I've been working on a WPF program (which once again, as expected, justified my belief that I will never find enjoyment in programming any UI)... Luckily, my program is just one-way... it is used for reporting, no input needed here besides just moving around. So, I implemented most of it in labels. Later I realized, however, that some of these labels have contents that a user of the program might want to copy and paste in another program. By default, you cannot highlight text on WPF labels, and I ......

Posted On Wednesday, June 25, 2008 5:31 PM

That whole, crazy var thing...
Jonathan Starr joined in the "to var or not to var" discussion that occurred recently with his post "Code Redundancy Is NOT Necessarily Bad". No, I'm not jumping into the ring with this whole var thing. Not much anyway. Ok, maybe a bit at the end, it's all Jon's fault, the text box on his comment section is too small, so I made a post instead, and that lead to me thinking harder about the subject, and things kinda' just took off from there :P In his first post, which I've linked to, he declared: ......

Posted On Monday, June 23, 2008 11:38 PM

ThreadStatic! Of course!
Ok, I admit, I didn't know what ThreadStatic was before today. I'm going to chalk it up to the fact that I don't deal (or, at least, hadn't dealt up until recently) with multi-threaded situations. This all came when, partially by the fact that I am not liking the conclusions I drew on this post, I have started to look more at a static method. While revisiting Udi & Ayende's examples, I took a deeper look and noticed that there might be problems with how their code might work in multi-threaded ......

Posted On Friday, June 20, 2008 6:05 AM

On Testing Builder Objects
One of the common scenarios I find myself in is needing to be be able to mock an object instantiated during the lifecycle of another object. For example, a service object might need to, on receiving one message, create an entity, and on receiving another message, call some method on that entity. The easy way to do this is to make a builder as a service for the object needing construction, and mock out the builder object to return a mock. So, for that service-layer code I'm trying to test... 1: public ......

Posted On Saturday, June 7, 2008 8:00 AM

Quick run unit tests.
I use Resharper's unit test runner for running my unit tests while coding. I got sick of having to use my mouse to run my tests, but I couldn't figure out a good way to do it using Resharpers available key bindings. When the application is focused on the text editor window, you basically had two options for key bindings: 1.) Context Run. I'm not sure exactly what this did in terms of how it determined what tests to run, but it had something to do with looking at what class was open currently. This ......

Posted On Friday, June 6, 2008 3:08 AM

I give up. I just can't hide my object states forever...
This is a weakness of mine that I just can't seem to shake, and I think it's starting to affect my productivity. As the single OOP developer at work, I don't have a senior developer to smack me over the head and say "get over it." Basically, I've been taught to keep my data encapsulated. At some point, the user wants it back. I don't want to give it to them. Somewhere in the past few days, I saw on a blog someone mention the "getters are evil" camp, referring to Allen Hulob's article, <a href="Somewhere ......

Posted On Thursday, June 5, 2008 7:36 AM

Encapsulating architecture from domain entities.
UPDATE (6/20/08): If you are at all confused about some of the techniques outlined in the blog posts by Udi and Ayende I discuss below, specifically about their multithreading-capabilities, you might want to check out my future post here. --- One of the first issues I have already found myself having to deal with in my game is the idea of how messages will be sent "from the entity" (since the entity is ultimately in charge of when something happens, and thus must trigger a message being sent), without ......

Posted On Wednesday, June 4, 2008 4:14 AM

Copyright © mhildreth | Powered by: GeeksWithBlogs.net