posts by : John Talarico

Below the Fold

newspaper-box-signage

I’ve been struggling with whether to write this for some time. By no means am I the authority on web usability and design, but I certainly have some strong opinions. Also, I keep getting asked about this topic and simply want to have a nice, convenient link as a way of answering. Finally, it’s because I simply cannot stand doing something just because “that’s the way it is done”. Whenever I hear that phrase, my internal alarms start wailing. …the “fold” was a psychological, economic, and ultimately physical barrier that needed to be overcome by a dramatic headline. For those ...[more]

Tiny Tip: Installing Windows Services with SC.EXE

Service-300x300

Developing Windows Services can be a fun and rewarding exercise….bah, who am I kidding? They’re very useful pieces of code, but are sometimes tricky to debug and slightly-less-than enjoyable to install and configure. In this Tiny Tip I’m not going to cover how to create a Windows Service project in Visual Studio; there are plenty of online resources that can help you with that. What I’m going to demonstrate is how to install and configure a service, as well as install a duplicate instance of the same service so you can run side-by-side tests with different configuration files. This is ...[more]

Transactional logging outside of transactions

I’ve constructed a central logging system for a solution that involves routing and processing messages on multiple private queues (MSMQ) using WCF. Within a contract method of a WCF service, I do some logging. Here’s some abbreviated code to illustrate: The ReceiveMessage is fired whenever a new message gets placed onto the queue that my service is monitoring. None of this is earth shattering. So, the full chain of events is… Transaction Start Receive Message Log the Message Process the Message Log Completion Transaction End The Problem The Logger itself writes to a transactional queue, so when an exception is ...[more]

13
Dec
2011

Tiny Tip: Ensuring your MSMQ destination queue exists

Return_to_sender1

There’s nothing like sending a message only to realize after-the-fact that the destination doesn’t exist. That’s just as true for the real world as it is for message queues. So, before I put any message on any queue, I make sure to call my static utility method EnsureQueueExists(string name) and I can rest easily. Here’s what it does: This is super handy if you’re deploying a solution to a new server. As long as MSMQ is up and running, your queues will all be created on demand. You could even take this one step further by creating a base class ...[more]

10
Dec
2011

Deserialize WCF MSMQ messages using System.Messaging

People queuing for the cinema

If you’ve ever done any traditional work with message queues, it can be a bit of a chore dealing with the plumbing code. That is to say, spinning up a message pump to transactionally read and process messages through some cobbled polling mechanism is tiresome and well…not very SOA-ish. Don’t get me wrong. It works. But, the same way ADO worked to read RecordSets on a Classic ASP page – ick. Which is why it has been a revelation for me when I started using WCF with MSMQ. This makes the queue plumbing somewhat transparent, letting your code act like ...[more]

30
Nov
2011

The minuses of Google+…for businesses, at least

google-plus

In our efforts to promote our business, we’ve done the usual dance that includes building or establishing: a company site a blog a Twitter presence a Facebook Page and 1M other tiny things not worth mentioning Now that Google Plus (G+? Google+? GPlus? whatever.) is gaining ground, no company can really afford to ignore it, so we’ve set up our own Google Plus Page for Avenue 80.  Or at least we tried to.  Look, I’m no big fan of Facebook.  In fact, I toy with purging it from my life at least once a week, but too many of my ...[more]

jQuery cross-browser animation problem

jquery_logo_color_onwhite

To quote Maxwell Smart, “they missed it by that much” (pinching fingers together). Don’t get me wrong, jQuery is the gold standard in terms of cross-browser functionality, but this is one of those oddities that can drive you nutzo if you ever run into it. And God help you if you’re using a 3rd party library that uses jQuery behind the scenes. Setup: I want to use the jQuery .animate() function, or one of its derivatives like .fadeTo() when I hover over an element to achieve a nice little effect with opacity (see the “our method” page on our site). The ...[more]

Show the current git branch in your bash prompt

200px-Git_icon

I know. To the uninitiated, that title sounds like nonsense. But if you use git for source control (and why the hell wouldn’t you?), something that can bite you in the backside is doing work and committing on the wrong branch. Of course, git has ways of rolling back commits and reversing these mistakes, but why not prevent them in the first place? The key to this is always having the active branch display in your prompt.  So when you’re about to fire off a command, it’s right there in your face. For example: This shows your typical prompt with ...[more]