Archive

Archive for July, 2009

Rants and Raves #5

July 23, 2009 2 comments

Back in form this week with both Rants and Raves…

Rants

CodeRush

I wrote last week about how much I love ReSharper and what a benefit it has been.  I also said that I was installing DevExpress’s CodeRush and would report back.  Unfortunately, my report is not good.

My biggest beef is that I just plain didn’t like it.  I especially disliked how it had a tendency to prevent IntelliSense from doing what I wanted.  In particular, it removed my ability to hit Tab to insert the highlighted element.  And when I tried to hit Enter, it inserted non-selected text.  I just couldn’t intuitively get the hang of it.

In fact, I had installed the entire DevExpress DXperience suite of products.  If you think loading the ToolBox in Visual Studio is bad natively, try doing it with a ton of third party controls along for the ride.  And it seemed my overall VS experience was significantly slowed down.  That plus my dislike of CodeRush meant it was actually more of a hindrance than a help, so I uninstalled it.

Enter my next issue.  When I went to uninstall it, the DevExpress software was listed in my programs as three separate products.  This was fine, because I really only wanted to uninstall CodeRush at the time because I hadn’t had a chance to try out any of the WPF Controls.  When I uninstalled the CodeRush part, it uninstalled the entire DXperience family of apps.  Uninstall Fail.  I have not reinstalled any of the software, and I don’t know if I will.

I only tried it for a few days.  I’m sure an experienced user may know how to work around my issues, most likely via configuration.  Perhaps I’ve been spoiled by ReSharper, but for productivity tools, I don’t think I should have to make a lot of effort to be productive.  Maybe I’m being unfair, but this is a Rant so I’m entitled.

Ravesoptical communications

Windows Live Writer

If you blog and are still using your blog software editor to add and edit posts, please hold your hand in your front of your face, palm facing you, and slap yourself in the forehead.  That’s what I did once I finally used Windows Live Writer: it is definitely a “coulda had a V8” moment (or a Homeresque “D’Oh!”).

Live Writer is an excellent desktop application that allows you to write posts and pages and submit them to your blog.  The great thing about it is that it downloads your theme and executes it in the editor so you can actually see what your post will look like once published.  There is also a full preview tab so you can view the entire page, and of course you can modify the HTML directly.

Live Writer stores drafts and posts locally, so you can also work on them whether or not you are connected to the Internet.  It also supports plug-ins such as Twitter Notify, which will automatically send a tweet when you publish something new.

Naturally, the editor is complete with all the WYSIWYG goodies, text editing tools, hyperlink and image inserters, spell checker and more.  And you can connect to multiple blogs.  This one is going in my list of “can’t do without” software.

Categories: Rants and Raves

Site Updates and Issues

July 20, 2009 Comments off

Howdy Reader,

I have made a few updates to the site.  Nothing big, but I wanted to go ahead and log them as a point of reference.

Issues

I’ve been having an issue recently with my MySQL server. It appears that on occasion it will shut down access because of too many failed login attempts.  Of course, it makes me wonder who or what is causing the problem, but for now I just have to catch it and clear the hosts file to reset it. 

Unfortunately, when it is happening the site is completely unavailable.  If you see the site having trouble in the future, like a database connection isn’t working, please DM or @ me on Twitter and I’ll fix it.

I’ve also been having some connection issues with Akismet. The plug-in is reporting that 2 of the servers will connect but 2 others won’t.  See updates below for more…

Updates

I updated today to WordPress 2.8.2.  The update seemed to hang for a log time on a blank screen, something that has not been an issue in previous updates.  I was getting nervous for a while but it finally flashed up and appears to have completed normally.

I found the WP-SpamFree plugin, which promises to eliminate Comment Spam.  Akismet has been doing fine, but I still have to moderate a few everyday.  We’ll see if this new plug-in fares any better.

On the same note, the plug-in also includes a spam free Contact page.  I’ve enabled it, so if you wish to send contact me through the site, go to the Contact Me page (listed on the right under ‘Pages’).

Categories: This Site

Rants and Raves #4

July 17, 2009 1 comment

It is very difficult for me to come to terms with this, but I have nothing to Rant about.  I don’t know, maybe I’m sick or something, but nothing has really gotten under my skin this week.  Don’t worry, I’m sure I’ll be feeling better next time.  For now, I hope you enjoy this Rant-free entry.

Raves

More Pomodoro: GMail Tasks and an online Timer

I raved last week about Pomodoro, and I’m still raving.  This is quickly becoming a mainstay of my development, and so far with great results.  This week’s rave is about some of the tools I’m using to help me along.

I’m not sure when it happened, but sometime recently a new item showed up in my GMail: “Tasks”.  Now, obviously the idea of a task list is hardly revolutionary, but given my recent adventures with Pomodoro it was a very well timed discovery.

A Pomodoro purist would insist on Pencil and Paper to manage one’s daily tasks, but my desk has a tendency to get piled up with papers, among other things, and I’ve learned to essentially ignore the mess until I have no choice.  All arguments for a clean desk aside, this means that any system relying on me to regularly update anything on paper is destined for failure.

While I plan to tackle this shortcoming eventually, for now the GMail Task pane is my answer.  I can undock it and run it standalone, so I have it separated from my browser: this allows me to see it constantly.  For simple things like a daily task list, the service couldn’t be any easier, just add a task and check it off when complete.

The service supports more features, such as setting due dates and annotations.  For now, I plan to add a lot of specific tasks to my list: this seems best in keeping with the Pomodoro spirit.

My official Tomato Timer is on order ($5.99 + free shipping!), but thanks to reader Stephen Wrighton I have been using e.ggtimer.com/25minutes with some success.  It is a simple site that counts down from the number of minutes in the URL (you can change it as needed).  There is an audible beep when the timer is complete, and a popup message.  I have missed it a couple of times while busy with other tasks, but for the most part it has served me well.  Best of all it is free and easy to use: I just hit ‘Refresh’ at the beginning of each new Pomodoro.

I mentioned Pomodoro in our weekly Scrum (a topic for another time) and everyone thought it was cute – until I showed them what I was able to accomplish last week because of it.  My productivity is currently off the charts, so far a good justification for continuing the experiment.

ReSharper

I’ve certainly heard of productivity tools like ReSharper, but I’ve never really understood what the big deal was, until a couple of things happened recently to make me want to give it a go.  First, at the Charlottesville .NET User Group, Justin Etheredge gave a presentation and I got to see it in action for the first time.  I was very impressed by what I saw.  Then at CodeStock, Mike Wood had a great Open Spaces session, and one of the things said was that if you weren’t using a tool like this then you were shooting yourself in the foot.

Well, I certainly don’t want my foot shot, so I installed ReSharper and immediately began reaping the benefits.  I expected some kind of learning curve, but honestly it is all so intuitive that it just sort of happens.  My favorite feature so far is where you can begin to define a class and it will move the new class to a new file for you.  It’s small things like that, a whole slew of them, that make all the difference.  Above all else, this software helps keep my hands on the keyboard.

Coincidentally, I won a copy of DevExpress DXperience Enterprise, which includes a productivity tool called CodeRush.  I just installed it and will be experimenting with it in the near future, so more to come on that.

Categories: Rants and Raves

'Brush' type does not have a public TypeConverter class.

July 13, 2009 4 comments

I’ve been a big fan of Value Converters in WPF for some time now, but I was bitten today by something simple and thought it would be worth sharing.

Brush Converter

One of my favorite uses for Value Converters is to set colors of things based on object state.  In my current application, I have drawn a circle that I want to be filled in Red if the application is not connected to the database, and green if it is connected.  My binding engine has an “IsDatabaseConnected” boolean property that I can use for the binding, so what I need to do is bind the bool to a Brush. To do this, we create a simple converter:

using System.Windows.Data;
using System.Drawing;

namespace CamraSketchViewerWPF
{
    public class DatabaseConnectedColorConverter : IValueConverter
    {
        public Brush ConnectedBrush { get; set; }
        public Brush NotConnectedBrush { get; set; }

        #region IValueConverter Members

        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is bool)
            {
                var isConnected = (bool) value;
                return isConnected ? ConnectedBrush : NotConnectedBrush;
            }

            return null;
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new System.NotImplementedException();
        }

        #endregion
    }
}

In the XAML we need an instance of the Converter to bind to: I used Blend 3 to write the XAML, but whether you do it this way or write it by hand you should end up with something like this:

<local:DatabaseConnectedColorConverter x:Key="DatabaseConnectedColorConverter" />
 

This will create an instance of the Converter as a resource that can then be used for the actual binding:

<Ellipse Fill="{Binding IsDatabaseConnected, Converter={StaticResource DatabaseConnectedColorConverter}, Mode=Default}" Width="15" Height="15"/>
 

If you run the code like so, you will get a transparent circle.  What’s missing are the property value declarations for the Converter. In addition to declaring the instance in XAML, we can also set its properties in XAML like so:

<local:DatabaseConnectedColorConverter x:Key="DatabaseConnectedColorConverter" ConnectedBrush="{StaticResource GreenBrush}" NotConnectedBrush="Red" />
 

Note that for ConnectedBrush I have defined my own version of Green as a resource. Now, if you run this code, you’ll receive the same exception that bit me:

‘Brush’ type does not have a public TypeConverter class.

It’s always the simplest things…

I have run into this message and others like it, and it is always frustrating.  What it means is that the Type I am trying to descibe in XAML does not have TypeConverter behavior defined: this is what allows simple Strings in XAML to be properly transcribed into correct types at runtime.

In this case, the problem was a simple one but not an evident one.  Now I love code completion and refactoring tools as much as the next guy, so whenever Intellisense volunteers to help me out I am quick to accept the assistance.  In this case, however, it did more harm than good!

When I referenced the Brush in my Value Converter class code, I was prompted by Intellisense to resolve the missing namespace, which I did with the handy-dandy Shift-Alt-F10 keystoke.  Only I did it reflexively and did not actually read my options.  If you look at the code above, you will see that the Value Converter class is referencing the System.Drawing namespace instead of the System.Windows.Media namespace.  System.Drawing.Brush was not written for WPF and so does not have the TypeConverter code necessary for this to work.  The problem is easily corrected by changing the namespace appropriately.

Conclusion

I placed this in the “Read your options” file for future use. If you are interested in more TypeConverter details, check out this article by Rob Relyea at XAMLfied.

Categories: WPF

Rants and Raves #3

July 10, 2009 4 comments

Rants

Microsoft Certification Exam

I ranted in the last Rants and Raves about the Microsoft Certification exam, specifically about the format.  Well, this week I feel no better: I decided that since I was so close last time that I would push ahead and quickly retake the exam, so I scheduled the exam for 9 days after the initial fail.  After lots of studying, cramming, and practice tests, I was able to pass.  All the prep work is what really delivered in the end, and it was a good thing I had invested the time: this test was far more difficult than my first attempt.  It was an agonizing process.

My Rant is the same as last week: I just can’t believe the amount of memorization expected.  The exam does little to truly test your knowledge of .Net concepts: instead, it focuses on specific method signatures and return values.  But, I don’t want to just Rant and run, so I have a suggestion.

As this is an exam for coders, how about letting us code?  Split the exam into two parts: part 1 would be questions regarding general .Net concepts.  Part 2 would be a practical hands-on.  Develop the exam software to utilize or emulate Visual Studio.  Then have tasks to complete, where we write code to solve a particular problem.  The kicker is they could write Unit Tests to evaluate our “answers”.  Who cares about the specific implementation details?  If the Unit Test succeeds, you get credit for your solution.

I’m sure there are plenty of holes in this idea, and by all means I encourage you to point them out, but I’ve really been annoyed by this and would welcome almost any change.  I hope it’s not as bad when I go to take my next exam, 70-502 “Microsoft .NET Framework 3.5: Windows Presentation Foundation Applciation Development”.

Raves

Pomodoro

Pomodoro, short for The Pomodoro Technique, is a time-management method that has been picking up steam lately with the developer crowd.  I first heard of this a couple weeks ago at CodeStock 2009.  I initially dismissed it as gimicky, but out of curiosity I read up on it some more.  I was intrigued, so over the last week I’ve been testing the waters, and I must tell you: I’m officially hooked.

It’s an easy read, and the technique is very simple.  In a nutshell, you break all your work time into 25 minute increments, each followed by a 5 minute break.  This is called a “Pomodoro” (Italian for Tomato.)  After 4 consecutive Pomodoros you take an extended break.  At the beginning of the day you write down your priorities and tasks, and at the beginning of each Pomodoro you write down what you are going to work on.  Then, at the end of the Pomodoro you update your status on that task.

The most important rule is you never violate the Pomodoro.  Focus and work intensely on your task for those 25 minutes: not a minute more nor a minute less.  To keep you on track, you use a kitchen timer or other device.  When the bell goes off, no matter where you are in your task, you stop.

There is more, in fact there is a 40+ page PDF book on implementing the technique that answers all those questions I can hear you asking, like “what about interruptions”, “what about emergencies”, “what if I finish my task in ten minutes”, and so on.  Essentially, the whole thing comes down to prioritizing your work and focusing.

The results for me have been excellent.  I used the technique to carve out blocks of study time for my exam, time for practice tests, and managed to write a new application in only a few days. By focusing on one thing, intently, I’ve been surprised at how much I can get done in a short while.

I haven’t tried using an actual timer yet, but I soon will.  I find it too distracting to constantly check the time, and I frequently work too long when I don’t pay enough attention.  I’ll be working on perfecting my technique in the weeks to come.  Of course, managing distractions is another key, so things like Twitter are suffering, but I’ve been so productive that I can deal with that.

Silverlight 3 and Expression 3

This probably isn’t news, but today marks the official launch of Silverlight 3 and Expression Studio 3.  I’ve been using the Mix09 Preview of Blend 3 for a while now and I’m very happy with it.  I haven’t gotten my hands on SketchFlow yet, but I’ve seen it and I’m anxious to give it a whirl.  I’m downloading the RC with SketchFlow as I write this, so you can expect I’ll be writing about it soon.

Silverlight 3 is a superb upgrade to Silverlight 2 with tons of new features.  For the best news available, be sure to read Scott Guthrie’s announcement.

Categories: Rants and Raves

Rants and Raves #2

July 1, 2009 2 comments

Wow, it’s been a busy few weeks since the last Rants and Raves: Silverlight Firestarter DC, CHODOTNET, RVNUG, and CodeStock (not to mention two Craft shows!)

Rants

Microsoft Certification Exam

Along the way I have also been studying for my very first Microsoft Certification Exam, 70-536 “Microsoft .NET Framework – Application Development Foundation”. I am pursuing my Microsoft Certified Technology Specialist (MCTS) and this is the core exam for all Microsoft Visual Studio and Microsoft .NET Framework technologies tracks.  If you want to prove to yourself just how little you know, try studying for this exam.  I realized a couple of weeks ago that I would be fortunate to pass, and I was right: unfortunately I was not so fortunate.

I realize that failing Cert exams is nothing new, and in all honesty I think my 669 was a respectable first go.  My Rant is not that I failed the test, but rather the nature of the tests and the focus of this particular one.  I am bound by NDA not to discuss the contents of the exam, but I will say that I was completely unprepared for how irrelevant and out of date the contents were: (hey MS, .NET 1.1 called and wants its questions back).

I will, however, discuss the format.  My biggest Rant is the amount of memorization.  MS has given us a fantastic IDE, Visual Studio, with an unparelled feature: Intellisense.  I’ve become so accustomed to it that I almost can’t code without it, and it’s all Microsoft’s fault.  That being said, why am I expected now to memorize available methods and signatures? Test my core knowledge, absolutely, but perhaps you could do so in more of a real world environment.

Speaking of not very real world, the Test center itself left something to be desired. While the environment wasn’t great, the worst part was the actual exam software.  I don’t think it has been updated in quite some time: the UI is classic “Developer Art”. This was aggravated by the fact that the monitor I had was so large that I had to move the mouse a half acre to click a button.  It was functional, but far from pleasant.  Then again, perhaps that’s the idea.  Mostly I’m just disappointed: the UI was as out of date as the questions.

So maybe I sound like the nerd in class who wants to argue his teacher up to a higher grade, but really I’m OK with my score if this is the kind of stuff being tested.  I’ll take it again (and maybe again), but I will pass and move on to something near and dear to my heart: Microsoft .NET Framewor 3.5, Windows Presentation Foundation Application Development.

I Hate My Cell Phone

I have a Verizon PN-820 flip phone.  My phone before was a Palm Treo 700W, which I loved.  I switched to this POS last time our plan expired because I wanted the Internet Tethering feature.  While I have used it a few times, I have not needed it nearly as much as I thought I would, so it hs largely been a waste of money.  I miss the QWERTY keyboard, the better Calendar and Contacts.  My friends are sick of hearing it, although it provides a certain level of entertainment when they see me tweeting on my flip phone.  All I can say is “7777-222-777-33-9 999-666-88” (with love, of course!)

While I am happy to provide laughter for all involved, I eagerly await the day I can get a new phone, hopefully in the next couple of months.  Now comes the dilemma: my company has Verizon, and the coverage is excellent, but I want an iPhone, which means switching to AT&T.  I’ve heard that Verizon is in talks with Apple to also have the iPhone, but I’m sure that will not happen before my time of choosing arrives.

Verizon has some interesting phone options, like the enV-3, Samsung Omnia (5MP Camera!), and Blackberries Storm, Curve, and Tour.  While I want an iPhone, I’m leaning towards a BlackBerry.  Not wishing to start a Holy War or anything, but I could use some feedback on this one, so leave your comments below.

Raves

CodeStock 2009

Over the last few years I have become a huge fan of our Developer Community, and I love going to events.  Last weekend I had the pleasure of attending CodeStock 2009.  This was a great 2 day event with almost 400 people registered.  The speakers and topics were excellent, as was the food and SWAG.  I want to commend the organizers for putting on a top notch event.

By far, my favorite part of these events has become Open Spaces.  In short, the attendees create the agenda and hold unprepared meetings about their chosen topic.  Discussions are open and vibrant, not to mention completely unpredictable.  Some people contribute, some just listen, but everyone learns, and they do so in an atmosphere of complete openness.  If you haven’t experienced this format yet, then I encourage you to search it out.  More and more Code Camps and larger events, like DevLink in August, are hosting Open Spaces.  As I told Alan Stevens, an Open Space champion and organizer, they have become my primary reason for attending such events.

Our .NET Community

If you are reading this and wondering what all this Community stuff is about, let me say this: it’s about YOU.  We are very fortunate to have such a passionate group of developers: all over the country there are User Groups, Code Camps, Developer Conferences, Geek Dinners, Roadshows, and much more.  Microsoft is certainly part of the community, but it wouldn’t exist without the volunteers who organize it and the developers who attend the events.  And the one trait I’ve found to be universal is a desire and willingness to share knowledge with others.

This is where you come in: if you have never gone to a User Group, or a Code Camp, or a Developer Conference, I challenge you to find one and attend.  Give it a chance: it could change the Developer you are into the Developer you could be.  Not to mention, it’s always a blast!

Until next time, Happy Coding!

Categories: Rants and Raves