www.codinghillbilly.com   kyle.baley.org  Subscribe / Contact
 
 
 
 
LATEST POSTS
Thursday, January 28, 2010

I’m imagining the thought process of some of the session voters for the upcoming Mix conference. “Hey, here’s one on Open Rasta by the Coding Hillbilly. You know what would be funny? Let’s all vote for it even though he just submitted it on a lark to get some practice after taking time out from speaking engagements. It’ll be fun watching him explain to Mrs. Billy that he *has* to go to Vegas four weeks before he’s heading to Philadelphia for Udi Dahan’s course.”

Yeah, you’re all a bunch o’ comedians, ain’t ya. Well, I’ll show you. You’ll go to my Open Rasta session ready to watch me squirm and you’ll see no such thing. I don’t want to overhype it or anything but I can tell you without a doubt that this session is going to restore your virginity and then take it from you again. Savagely (but tastefully; last thing I need is a bunch of people accusing me of statutory rape in the middle of a presentation). Then maybe next time you’ll think twice before crossing a coder of the earth, woncha!

Couple of interesting tidbits on the session:

  • Somewhere along the line, the original title got changed. I submitted it with: “Open Rasta: The REST framework MVC wants to be.”
  • I also submitted a session on S#arp Architecture. (What can I say? I’m a web framework kinda guy.) I found it interesting that the Open Rasta one got chosen and the #arch one didn’t.

So while you’re waiting for Mix, have a gander at Open Rasta to see what all the hubbub is about. Between this and my new contract using Google Web Toolkit, that should set the stage for my post activity for the next few months.

Kyle the Bastardized

Monday, October 20, 2008

I'm preparing my presentations for DevTeach and have come to realize that there is a price to pay for creativity. Here are the abstracts for three of my presentations.


Guerrilla Refactoring

Greetings, comrades. Welcome to the resistance! Our quarry today is a shamefully designed application that grows fat with duplication and crusty with hard-codedness. It feeds on itself behind a shield of corporate deadlines, each one stricter than the last. The cowardly code mocks us with cries of "We don't have time! We don't have time!" while features are grafted onto the application haphazardly with no thought to future reform!

But fear not! We have studied our enemy and have altered our attack plan accordingly. No more frontal assaults. We must liberate the code in focused skirmishes from its bourgeois oppressors! Patiently, we shall advance, tightening our grip in an ever-widening net of unit tests as we hunt down bugs like the dogs they are!

So join me, brethren and sistren! With our allies, the Design Pattern Legionnaires and the Dependency Liberation Front, we will train you to take your rightful place in the movement toward a better world, where features are not divided into tasks that are meted out to the "database gal" and the "guy that does the UI because he has PhotoShop installed". Rather, they will be fully and utterly DEMOLISHED by fully armed, multi-functional, and domain-inspired programmers full of KNOWLEDGE AND FURY!!!1!!!

Viva La Revolucion!

(adapted, of course, from my original post on the subject)


Implementing a Brownfield Ecosystem: A Cultural Extravaganza

So you missed Folklorama again, eh? Of course, you did. It's in Winnipeg. Well, fear not, coders! In this session, we'll throw so much culture at you, you'll think you're back in high school biology.

A very important aspect of Brownfield applications is shifting the culture of your team. This starts with your project's ecosystem. Many developers in Brownfield applications don't even realize how many hoops they jump through during the course of a day to do simple things like checking in code and building the application. image

In this session, we'll implement a full-fledged ecosystem for a Brownfield application. Working from the perspective of a single developer in a team, we'll cover topics such as the structure of your version control system, your check-in process, automated builds, and continuous integration. In the process, we'll talk about common pain points and common areas of friction that we can overcome with a few simple tool choices and a couple of mindset tweaks.

I'll be getting by with a little help from my friends as we simulate a team environment using well-placed and impeccably groomed plants in the audience who will act as other developers in the team, some working with me, others not so much.


Adding automated tests to an existing codebase

It may seem like heresy but there are actual real-live applications out there inimage the world that don't have unit tests! No, really! And I know it sounds crazy, but you could be brought on to one of these applications and be tasked with adding automated testing to them. 

Rare as these circumstances may be, it'll help to be prepared for them. Because it won't be as fun as you are probably imagining right now. For example, how do you automate a test for a web form that connects to a database, displays a form, then posts that data back to the database?

In this session, we'll look at techniques for integrating tests into an existing codebase that has never had them before. When do you write tests for existing code? How do you test a mammoth method/class? How do you know if you aren't breaking anything else? For answers to all these questions and more, read Michael Feathers' Working Effectively with Legacy Code attend this session.

 


You see my dilemma. I wrote these in a fit of imagination without stopping to wonder how I would differentiate one from the other. For example, how do I talk about refactoring without mentioning automated tests? How do I implement a brownfield ecosystem without doing same?

 

In the end, I believe there will be overlap among the presentations. Indeed, I will probably use the same sample application for all three. I've justified it in my head by saying that the overlap is probably a good thing to help people see the interaction 'twixt the various concepts. Plus, it means I can focus on a single element in, say, the refactoring presentation and leave some of the details to the automated tests presentation.

In any case, here is some clarification on the goal of each presentation:

Guerrilla Refactoring: How can you refactor an application for maintainability when there is no explicit buy-in from the PM and/or the business (and/or the rest of the development team)?

Implementing a Brownfield Ecosystem: A walk-through on adding source control, CI, and automated testing to an existing application. I'm planning to use plants in the audience to simulate a team environment to demonstrate what happens to you personally when others don't play by the rules. The "cultural" part comes because this is very much an exercise in changing your team's development culture. It was originally intended as a practical follow-up to Donald's Parachuting into a Brownfield Application presentation but I notice he's not doing it this time around.

Adding automated tests to an existing codebase: Here, we'll dive deeper into automated testing for an existing app. It will be sort of a continuation of the brownfield presentation which will add the testing framework but not go any further. Admittedly, it will borrow heavily from Feathers' book but I see that as a good thing.

For completeness, the fourth session I'm doing is on TDD for MVC applications. This one is more disparate than the others and should be a fun one as well, even if the abstract for it is the most boring of the four.

Kyle the Synergistic

Tuesday, August 05, 2008

Presented last week at the Calgary .NET User Group and the Edmonton .NET User Group. Both went swimmingly in this hillbilly's view and I had a fantastic time doing both. At some point, I'm going to have to admit to myself that I probably do this for my benefit more than the attendees. But as long as both our interests align, I'll keep telling myself I do it to help the community.

As a bonus, I get this nice shiny blog post out of it. Because the same question came up at both meetings and I didn't give it its due either time. The question was, and I'm paraphrasing:

I'm diggin' the new framework and all and your love of plaid is refreshing, but I'm a WebForms guy. This new-fangled way of putting these "INPUT" controls on a page is strange and unfamiliar, but not in a good way. You're asking me to abandon all I know of web development. My asp:ListBox? My asp:DropDownList?!? FOR THE LOVE OF ALL THAT IS HILLBILLY, DON'T MAKE ME GIVE UP MY PRECIOUS GRIDVIEW!!

The response I gave to this question in Edmonton was: We're web developers. Learn HTML.

I was about to say that this probably sounds more condescending than I meant it to be but I don't think that's true. Subconsciously, that's kind of what I think whenever I'm asked. Usually I sugarcoat it but I'm testing the waters into beligerence these days to see where it takes me. So far, I don't think I have the stomach for it but I'll give it a couple more weeks.

Anyway, as much as Microsoft has gone to great lengths to protect us from the scary world of HTML, let's not forget that the web is still very much powered by it. It behooves us to learn it (and I'm not using the Webster definition of "behooves", not the one I learned from my sister-cousin).

Here's the thing: HTML is not hard. Javascript is not hard. HTTP is not hard. Statelessness is not hard. In general, WebForms is an abstraction over a problem that is not hard. Especially now that we have some pretty mature Javascript libraries, like jQuery and Prototype. And certainly now that pretty much any problem you might encounter related to managing statelessness has already been solved several times over.

Web applications have become pretty sophisticated over the years such that users are starting to demand more for their "money". It is my experience that the demands they are making do not play nice with server-side controls. WebForms was a nice model back when it was acceptable to perform a full-on postback every time you wanted to go to the next page in a grid.

But this is 2008. And I'd like to be able to bookmark that page now and e-mail the link to someone else. I'd like the ability to click the Back button and not get a Page Expired error. I'd like to sort a list of items and not have it add to my browser history.

You can do all this in WebForms, of course. But usually, people say it like this: "Well, that's possible in WebForms...." Not "Dude, that's a freakin' BREEZE in WebForms. It was designed with that specific scenario in mind."

So yes, if you're interested in MVC, you'll need to know a bit about HTML. You'll need to manage any "state" yourself. You'll need to understand what happens when a form is submitted via POST vs. GET. You'll need to account for things like validation during a form submittal.

But don't shy away from it. Give it a try, it's not hard. The <INPUT> tag has its flaws but it's pretty simple to figure out. Maybe take a Javascript library out for a spin. You might even find that it's fun.

Or at the very least, that it's never been easier to add rounded corners to a DIV.

Kyle the Web-Formed

PS. Code from the presentation will be forthcoming.

Thursday, July 24, 2008

It has been only four days since my self-imposed, month-long incarceration in the prison known as Corporate Calgary, but already the three walls of my cell close in around me. My oppressors continue their assault on my psyche with inhuman tortures such as "Death by 1000 Quick Questions" and "Let's Talk About Weather" and "We Meet Because We Can".

My jailors mock me with bizarre acronyms and epic tales of projects past. Yesterday, I nearly screamed in terror when I caught myself chuckling knowingly at one such anecdote. During a meeting to review progress of a system I didn't know existed, let alone used, no less. I fear I may be going insane.

Two things keep me alive. One is the presentation I give next week on ASP.NET MVC to the Calgary .NET User Group on the 29th and the Edmonton .NET User Group on the 31st. During status meetings, I surreptitiously pull up my VM and review my code and notes, ignoring the sidelong glances at my insolent giggles. These presentations are my one tenuous grip on reality and I shall protect them with, well, not *my* life but probably the life of someone close to me.

The second is the one ray of light in my task list: a throwaway application I pull up when I need an extra dose of lucidity. Just this morning, I discovered an error that made me nearly leap for joy for the mere mental exercise, slight as it was:

private void ConvertFile( string converterName, string sourceFile, string destinationFile )
{
    IConverter converter = FindConverter( converterName );
    converter.ItemProcessed += converter_ItemProcessed;
    int recordsProcessed = converter.processFile( sourceFile, destinationFile);
}

This (much simplified) piece of code contained an error. The first time it was called, it ran fine. Each subsequent call appeared to process the file multiple times. I.e. the second time it ran, the file was processed twice, the third time, thrice, the fourth, ummm...quadrice. And so on and so forth.

Alas, the solution presented itself all too quickly. The file was not actually being processed multiple times. Rather, a brand new ItemProcessed event was being appended to the event handler each time through. So the second time the file was processed, the ItemProcessed event was called twice each time an item was processed. The third time, thrice. Etc, etc.

Unfortunately, the fix was trivial:

private void ConvertFile( string converterName, string sourceFile, string destinationFile )
{
    IConverter converter = FindConverter( converterName );
    converter.ItemProcessed += converter_ItemProcessed;
    int recordsProcessed = converter.processFile( sourceFile, destinationFile);
    converter.ItemProcessed -= converter_ItemProcessed;
}

And now I am left to ponder my decision to work onsite for the next month in this soulless place. Left to wonder why I left my safe haven. To toil between a woman whose radio is always slightly off-station and a man with a cruel tendency to squeeze his squeaky, rubber duck at inopportune moments.

Pray for me, readers. Pray. For hope.

Kyle the Indentured

Thursday, June 26, 2008

I've become rather acutely aware that my content has been lacking of late in the technical department. But I do have a couple of community announcements to make that are time-based so I'll compromise a bit and combine them into a single post. Then I'll take a hiatus until I have something more generically useful to say.

First off: Next BahaNET meeting is tonight at the usual digs, IPBS House. And based on past experience: When I say Moseley Lane is right after the entrance/exit to Harbour Bay off Shirley Street, I mean it's RIGHT after. As in about three feet. You can basically make a U-turn from the Harbour Bay exit on to Moseley Lane. Don't miss it.

The topic will be: connecting a website to a database. We'll discuss basic CRUD operations and yes, we will be dragging and dropping for better or for worse. You have to know your audience. Take comfort in the fact that I'll attach a bunch of codicils as I'm presenting. Hopefully, I'll be able to demonstrate the Dynamic Data thing as well, assuming I have time to look into it.

Next announcement: Donald Belcham and I recorded an episode of .NET Rocks earlier this week and through the magic of technology, it is already available. The topic, as you may have guessed, is Brownfield development. Elapsed time 'twixt the initial e-mail and the finished product was about ten days, which is pretty amazing. Even if Carl refused my request to digitally enhance my voice so that it sounds like Humphrey Bogart. ("Of all the apps in all the contracts in all the world, she had to refactor mine.")

And to top it all off, Derik Whittaker will be releasing the first in my series of Brownfield casts tomorrow at www.dimecasts.net. First one is on setting up your version control structure. There are many more to come and feedback is welcome.

Kyle the Supersaturated

Monday, June 09, 2008

The obligatory follow-up post to the 99% of you (give or take 2%) that didn't attend my presentation, to let you know that I gave a presentation. This one is pure entertainment value only so if you're looking to code better, maybe Greg Young or Matt Podwysocki will finally post something technical.

I talked about Brownfield application development at the Florida Tweener weekend. On a side note to Joe Healy: Florida 'Twixter sounds a lot cooler. It's because of the 'x' (Come to think of it: Florida 'Twixxxter would be even better...). Nevertheless, he pulled off a pretty cool event in record time. At least from the brief bit I saw. I talked for an hour from 8:30am until 9:30am, then bolted like a cockroach (not the Bahamian kind, they're a little more lackadaisical when the lights come on).

Reason for my leaving was that I had left my family alone with a credit card in the middle of theme park central. So the rest of the day was spent at Universal Studios Orlando and its sister park, Islands of Adventure, with them. My entertainment gland was supersaturated by the end of the day. Tip: when you're going for a single day, the Express Plus passes are just about the best money you can spend there. Seriously, bring a bag of peanuts and use the food money for these incredible time-savers. By my estimate, we saved no less than three hours of line-waiting during the course of the day. Longest line was RipSaw Falls for thirty minutes. All others were less than five.

The trip home was a noble little disaster. Delayed leaving Tampa, which meant getting bumped to a later connecting flight in Miami. (Little known fact: Miami's airport code, MIA, is actually a double-entendre. I'll let you figure out the other meaning. Hint: it has to do with luggage.) This usually isn't a problem because there are anywhere between two and forty-seven flights from MIA to Nassau on any given day, depending on the blood alcohol level of the American Eagle pilots.

Today, however, all twelve remaining flights (must have been a heckuva bender last night) were oversold. And it took a couple of batted eyelashes and an eight-year-old's temper tantrum* to get us on a flight out of Fort Lauderdale the next morning on an oversold flight. All due credit to American Airlines' customer service people. They may not be competent as a rule, but they were unflappably nice in the face of a customer service disaster that, by the time we got there, looked like it had started during the Clinton administration.

Once flight confirmation was achieved, we set out to find a hotel in Fort Lauderdale. This may sound like an easy task unless you are intimately familiar with the wireless internet access in MIA, which does not recognize the Bahamas as a country for credit card processing. Nor, in fact, does it recognize the internet at all. Luckily, Mrs. Billy has a travel agent on speed dial...

The cab ride to the hotel in FLL was the highlight of the day. The driver was Kurdish and if you *really* want to hear about a "tweener weekend", listen to his stories about living 'tween Iran and Iraq for half his life.

Rest of the trip was uneventful which, ironically, makes it the best part of the flight home.

Back to the presentation. It went pretty well, I think. Started out with three early risers but ended around twenty-five strong. For me personally, it was another case of wondering why I go through the expense as I walked to the venue and wondering why I don't do this every weekend as I walked back to the hotel afterward. It really is fun though I still need to work on my audience participation skills.

The show, unfortunately, was not taped as I copied the slides over to one of the TechEd computers and barely had enough time to get the projector working. As it is, I was mike-less throughout and I'm not exactly Rush Limbaugh when it comes to voice projection.

Next up on the North American tour will be a couple of talks in the home turf. One in Calgary and the other in Edmonton. Both at the end of July and that's about as detailed as it gets so far. The Calgary site lists me as presenting on ASP.NET MVC which is good to know. Gives me a place to start anyway...

Kyle the Homebound

*Bonus trivia: I performed one of these acts myself. You may be surprised at which one. And at the level of success I achieved

Friday, May 30, 2008

Need to be more on the ball with announcing community events that I'm hosting.

The Bahamas .NET User Group had its second meeting on May 28 and it was another success. Running a user group is an odd kind of thing. There is more work than you imagined when you had the initial idea and you often get to the point where you wonder if it's worth it. Then the meeting starts and goes by in a blur and when you're driving home, you're wishing you could meet every week instead of monthly. It's a rush that is almost as good as...well, let's not get carried away. It's a good feeling is all.

The group was seven strong, not including me. That's one more than last time, and that includes six newcomers.

The topic was Building Websites in ASP.NET. The group was small enough, and the topic dear enough to my heart, that I could, and did, veer off in directions I didn't anticipate. At one point, I dove into the life cycle of an HTTP request, something I haven't stopped to think about in many a full moon.

Still working on getting things to run smoothly. The e-mail I sent to the group reminding them of the date actually contained the wrong date. So between that and the last minute venue change of the last one, it looks like the third one will hopefully be the charm.

The good news: I recorded the session. The bad news: The air conditioning didn't work and someone took mercy on me partway through by turning on the fan. A seemingly benign act of philanthropy but the fan happened to be directly over the microphone. Who knew air made that much noise when it moved?

The final half hour is nigh-incomprehensible so I had to mute the entire thing and add a soundtrack instead. My apologies for that. Guess you're never to old to learn.

Part 1 (47 minutes - 40MB - WMV)

Part 2 (44 minutes - 37MB - WMV)

Silverlight version may come later when I figure out how to encode them into files smaller than 185Mb each.

NEXT MEETING IS TENTATIVELY SCHEDULED FOR Thursday, June 26 at 6:00 at IPBS House

The topic is Connecting Web Applications to a Database but there is still room for discussion on that if there is enough interest in something else. And if you have any other suggestions or want to help out yourself, you know where to reach me.

The most encouraging part of the last meeting: One attendee asked if we could meet more than once a month.

Kyle the Adrenalized

Wednesday, May 21, 2008

I was invited to speak at the Florida Tweener weekend which is the weekend 'twixt the two TechEd weeks in Orlando. The schedule is up and I had no idea what the scale of this thing would be! Not only is there a full day .NET code camp but also over a dozen other activities. The ones I'm excited about are the Day of Agile, the Day of Silverlight, the Open Space, and the Mickey Mouse Club.NET session. The last one's not on the schedule yet but I have high hopes.

For my part, I'll be presenting on Brownfield applications, mostly because I have the presentation ready (well, actually Donald Belcham has the presentation ready). Luckily, I'm the first session in the morning on Saturday which leaves the rest of the weekend to drink it all in.

Oh, and don't be dissuaded by the registration process. "Click to attend" is an appropriate name given how much &*%$ clicking you have to do to sign up.

Kyle the Tween

Saturday, February 23, 2008

OK, I've already given away the ending so I'll skip the build-up. But to set the stage for the official announcement, I'll direct your attention to the pictures adorningThank goodness for neighbours with no sense of wireless security this post. They represent two of the workspaces I frequent, both in my condo complex. All pictures are clickable for larger, more enviable versions. I could try to justify why I'm putting them up with some sort of ergonomic crap but really, I'm just gloating.

The formal announcement: The Bahamas .NET User Group is up and, quite possibly, running. With little more than a half-baked plan and a dream (but still no location for the first meeting). The inaugural meeting is April 30 and the topic is Software Development in the Bahamas. It will be a round-table discussion, very likely done in fishbowl style because I predict a lot of opinions on the subject.

Many thanks to all who listened to me babble on it to date and those who showed enough enthusiasm to convince me that this might actually work. And to those who critiqued the various incarnations of the websites. These include: Donald Belcham (head of www.edmug.net), Derik Whittaker, Josh Schwartzberg, Dave Noderer (of www.fladotnet.com fame), and Morgan Baker of INETA.

Because the version you see before you is actually version 3.0. Version 1.0 was a DotNetNuke site that didn't last long after I received some advice from someone who has had to deal with it on a regular basis. I'd reprint it but I don't want to offend my younger readers. Besides, I'm not sure I could spell some of the profanity he used.

Version 2.0 was SharePoint-based. Specifically, it was the Community Kit for SharePoint: User Group Edition template (more commonly known as CKS:UGE, which, and I'm sure this is a coincidence, is oThey really need to invent a screen that works in natural lightne letter away from containing all letters from the word "suckage").

This version actually lasted over a week. I even upgraded my server's RAM at GoDaddy to accommodate the slight increase in requirements that SharePoint needs in order to run. (Actually, to be fair to SharePoint, it ran fine on the box. It was every other web application that went on strike in a show of solidarity against the invading new kid.)

So I configured SharePoint (on the advice of my psychiatrist, I shan't elaborate) and figured out how to install the CKS:UGE template. It doesn't quite work out of the box but there are pretty detailed instructions on what to do to remedy that. Kudos where they're due, they have done a good job in helping user group leaders get a demo site going from which you can steal ideas.

But there were a fair share of minor annoyances with the templaWish the wireless worked out herete. You can follow along with my discussion of them with their demo site. Firstly is the usability of the design. There is way too much wasted space at the top which means users need to scroll down to see what is likely going to be the most commonly consumed piece of information: the next meeting. On my display resolution of 1440x900, the main content of the page starts just shy of halfway down the page. Everything above that is noise to me.

Also on my display resolution, the Events Calendar section has only enough space to display the title of the event in the bottom right corner (depending on the size of the announcements). In my opinion, this should be the most prominent thing on the site, along with the Welcome message. It shouldn't be relegated to the galleys right above the sponsors that nobody clicks on. Yes, users can subscribe to events with RSS but for those that don't and just want to whip the site up for a quick check (possibly in a mobile device), don't make 'em look for what they need.

Next issue: The left sidebar. The links here are mostly redundant so I wanted to ditch the thing and reclaim that space. No such luck. I don't think anyway. I can hide it but then it still takes up space. At least it did when I was logged in as an admin because it displayed the Recycle Bin. Looking at the demo, it doesn't display a Recycle Bin so perhaps it actually does go away when you are logged in anonymously.

Final problem is how users sign up. They do it by completing a survey. Which means that for me to see the membership, I need to sign in and navigate to the results of that survey and click on each one individually so see the details. Or export it to Excel. Neither option makes it easy for me to grab a quick list of current membership.

These little nitpicks, coupled with the fact that I needWatch out for sand-kicking bullies! only three of the forty features it offers, led me down the custom app route. The three features I wanted for the initial launch:

  • Ability to sign up
  • Ability to display the next event
  • Ability to display list of sponsors

That about covers it. Don't need discussion lists, wiki pages, photos, or even a past events page. In fact, for the amount I'll be updating this site, I have serious doubts as to whether I even need to make the events list dynamic at all. I am a software developer after all. How hard is it to cut and paste HTML?

Elapsed time to implement the current incarnation of the site: 1 day (thanks in part to the fine folks at www.oswd.org for their free web templatSucks I can't share this experience with anyone...es). This includes a sign up process that writes to a .CSV file and sends an e-mail to me when new members join. Which is about as dynamic as it gets down here.

So if you're in the Bahamas and have nothing else to do on April 30, consider joining us at a yet-to-be-determined location. I'm trying to decide between holding it at the local college or commandeering someone's yacht.

Now to work on my plan for a CodeCamp every week from November through the end of April.

Kyle the Ambitious

Friday, February 08, 2008

Fresh from my experience at South Florida Code Camp and based entirely on the evaluations I got, we present "Tips for Better Presentations"

1. Pick up the pace. You only have an hour
The overwhelming criticism aimed at me was to pick up the pace. Which was an eye-opener as I purposefully kept things slow to avoid what I thought was a common complaint at code camps: he went too fast. In retrospect, I think I underestimated the technical prowess of the crowd. Too fast is probably better than too slow but ideally, you want to move things along without losing the audience. Plus one of the presentations was a shortened version of the two-hour talk I did a week earlier and it was obvious I didn't take the new format into consideration. Point taken. And to answer the comment pleading with organizers to give me a Red Bull before the next presentation: I'll stock up on Earl Grey tea but that's as caffeinated as I get.

2. Book a warm-up act
Preferably someone like Sarah Silverman but Veronica Belmont has some good geek cred, too. Barring either of those, there's always the Mad Mexican.

3. Speak up
This one surprised me too because I made a conscious effort to be louder as it's always been a failing of mine during presentations, dating as far back as the Slop Tart commercial I did for my elementary school Christmas pageant. Still need some work in this regard apparently.

4. Strobe lights
It's not a presentation unless it comes with a seizure warning.

5. Answer questions when you can but move things along
Mark Miller did a good job of this in his Science of UI presentation. Give a few seconds for questions at appropriate intervals. But more importantly, recognize when to offline conversations if they break up the talk.

6. Learn the Macarena
You'll be glad you did. My laptop crashed twice during the day. And now I'm kicking myself for not having any material to fill that awkward silence while it booted up.

7. Don't lie in the abstract
For example, if your presentation is called "Introduction to TDD, Mocking, and Dependency Injection",  don't open with "I'm not sure we'll have time for mocking and dependency injection." You *will* be called out on it. Yes, you may have had grandiose plans when you submitted the abstract but come code camp, you'd better be ready to talk on what you said you would.

8. Give yourself a soundtrack
Anyone can tell you to write your tests first. But it won't truly sink in unless you do it to the strains of Neil Diamond singing "Good times NEVER seemed so good". And seriously, the combination of Dean Martin and MVC will have you beating the ladies off with a stick. But be very cautious. It takes a seasoned practitioner to use some songs effectively.

9. Be entertaining but be natural
Jeff Atwood's already covered this but it's always relevant. I'm still kinda working on this one. I don't script a lot of jokes into my presentation because I usually can't pull them off and instead, I rely on off-the-cuff remarks that are generally very dry, and very Canadian. The danger is that some people can't tell if you're kidding or boring. Or if you just don't get your own jokes. Plus there's the risk that you actually *are* boring. In which case, you may want to consider substituting your soundtrack with a laugh track.

10. When in doubt: tearaway pants 
This was my advice to Justice Gray before his DevTeach talk. Luckily, he already had a pair so there was no out-of-pocket cost for him. The tip works best when combined with tips 4 and 6.

I've focused on the negative comments here because they're generally the ones that give you ideas on how to improve. Overall though, my results were positive enough to be encouraging but not so positive that I'll do things the same way next time. Thanks to all who responded.

Kyle the Ameliorated

Monday, February 04, 2008

The company that invents a PDA that mimics the mind of Dave Noderer will have a license to print money based on what I witnessed this past Saturday. The man clearly thinks in terms of some DSL based on tasks and bulleted lists in order to pull together the South Florida Code Camp. Over 600 attendees, twelve tracks, at least three dozen speakers. All executed with the efficiency of a good UI, in that you don't even notice it until you stop to think about it.

Since I presented for half the allotted time, I didn't get a chance to see too many other presentations. Saw Mark Miller present on the science of good UI, a topic that probably deserves a separate post but I make no promises just yet. In any case, it was entertaining and thought-provoking. Also watched Larry Port talk on CruiseControl and NAnt and got some good tips from him.

For my part, I'm reasonably happy with how my sessions went though some need more work than others. Had a technical glitch during two of them in the form of a laptop crash that I won't speculate on just yet until I've had a chance to investigate further. Suffice it to say, my plan to screencast my presentations will not come to pass.

Other than that, if anyone attended any of the sessions, all feedback is welcome. But keep in mind that my psyche is very fragile and that any negative comments will be met with either, "I know you are but what am I?" or "Sticks and stones will break *your* bones..."

Also inspiring was the reaction I got from the user group community when I spoke of my plan to start a user group in the Bahamas. Hard to say whether it was the humanitarian spirit or the pleas of "For the love of all that is Hillbilly, schedule your code camp in winter!" from attendees visiting from northern parts of the country. I came away encouraged nonetheless.

Kyle the Camper

Friday, January 25, 2008

Ah, it's good to be back on the circuit. The Hillbilly made his first speaking engagement since May '06 earlier this week, thanks to the brave and trusting souls behind the South Florida .NET user groups. They have themselves a nice group out West Palm Beach way and I hope I can come back either there or one of the other places they're in charge of. I can only hope this last meeting was as fateful as my last presentation.

The official topic was ASP.NET MVC but we ventured into TDD, DDD, productivity tools, and AJAX if memory serves. Definitely played out differently than I expected but that's why speaking is so fun. Lots left uncovered but that just makes my presentation at South Florida Code Camp next week that much more interesting.

The code can be found here (3.8 Mb). It's a music catalog type application that lets you search for music in your library and play it, although only a song at a time. Check the ReadMe.txt for instructions on building. The short version, in theory, is: modify local-properties.xml and run clicktobuild.bat and you're good to go, assuming you have some version of SQL Server installed. It will create an IIS virtual directory pointing to your music folder to allow you to play the songs you select.

Before I start rambling on one of the more interesting aspects of the presentation, some acknowledgements. These are the main links I used in preparing both the code and the presentation:

Special thanks to Jeff Palermo's CodeCampServer from which I borrowed very heavily. I didn't go as deeply as he did in the architecture (unit tests? Pffft) and I switched out StructureMap for Windsor because it's what I know. Having said that, I've seen enough sample code for StructureMap that it's near the top of my list of things to check out in the near future.

The rest of this post discusses something I showed, albeit briefly, during the talk. It's the idea of "Fluent URLs".

It started when I created a search controller based on Scott Guthrie's sample search router. In this version, I'm searching a database of songs. Here is the route:

RouteTable.Routes.Add(new Route
{
    Url = "Search/[query]",
    Defaults = new { controller="Search", action = "Results" },
    RouteHandler = typeof(MvcRouteHandler)
});

Here are some sample URLs that use this route:

localhost/Suvius.Flamingo/Search/Brubeck
localhost/Suvius.Flamingo/Search/Folk
localhost/Suvius.Flamingo/Search/Muppet Movie Soundtrack

And so on and so forth. The idea is that you pass in a [query] and it will find any song containing that text in the title, artist, album, whatever.

After that, I got to thinkin'. What if we wanted a more specific query that search based on, say, artist only. So I added the route:

RouteTable.Routes.Add(new Route
{
    Url = "Search/FindSongsSungBy/[artist]",
    Defaults = new { controller="Search", action = "FindSongsSungBy" },
    RouteHandler = typeof(MvcRouteHandler)
});

And some sample URLs:

localhost/Suvius.Flamingo/Search/FindSongsSungBy/Dean Martin
localhost/Suvius.Flamingo/Search/FindSongsSungBy/Sarah Mclachlan
localhost/Suvius.Flamingo/Search/FindSongsSungBy/Mary Poppins

That route didn't last long due to the obvious duplication in the action. It's practically begging you to refactor into something more generic like:

RouteTable.Routes.Add(new Route
{
    Url = "Search/[searchCriteria]/[queryText]",
    Defaults = new { controller="Search" },
    RouteHandler = typeof(MvcRouteHandler)
});

In this case, searchCriteria can be one of: Title, Artist, Album, Genre, or whatever criteria you wish to search by.

I didn't even implement this one because that's where the idea of a fluent URL came in. The new route:

RouteTable.Routes.Add(new Route
{
    Url = "FindSongsWhere/[searchCriteria]/Is/[artist]",
    Defaults = new { controller="Search" },
    RouteHandler = typeof(MvcRouteHandler)
});

And some sample URLs:

localhost/Suvius.Flamingo/FindSongsWhere/Artist/Is/Neil Young 
localhost/Suvius.Flamingo/FindSongsWhere/Title/Is/Come Away With Me
localhost/Suvius.Flamingo/FindSongsWhere/Genre/Is/Disco Funk
localhost/Suvius.Flamingo/FindSongsWhere/Album/Is/William Shatner Sings The Hits

I didn't take it any further than that (by, say, parameterizing the /Is/ into options such as /Contains/ or /IsSimilarTo/).

I will leave it to someone more practical than I to determine the usefulness of something like this but coming up with it did make me feel ever so giddy that such a thing was even possible. Not that I'd advocate this being the sole interface to your search engine but at the very least, it does lend itself to quick launch tools like Launchy and SlickRun where you can set up parameterized URLs in a more intuitive way. On the downside, it's nigh impossible to use things like Url.Action when you insert random, hard-coded words (like "Is") into the Url for the route.

A final important note on the code. It uses Castle Windsor to create the controllers and inject services into them and it uses NHibernate for the data access layer. I remember my first exposure to both of these fairly vividly and if you are not familiar with them, they can be ever so slightly unintuitive. As it is, I'm no NHibernate expert which is why this code took three days to prepare for release. If there is anything about these aspects (or any others) that you need clarification on, please contact me and I'll do my best to edify and elucidate.

Kyle the Routed

Tuesday, January 15, 2008

Floridians beware! The Hillbilly descends on your fair state in the next few weeks:

FlaDotNet - West Palm Beach, January 22, 2008   6:30pm

Introducing MVC in .NET
OnLoad, OnPreRender, OnRender, OnInit. Traditional web forms development makes it sound like you're some crazed Santa Claus born from the imagination of Tim Burton. But it doesn't have to be that way.

In this session, Kyle will free you from the shackles of the ASP.NET event model and show you a shiny, happy world. A world where web developers write application code, not plumbing. A world where "ViewState" is the eighth word you can't say on television.

Such a world does exist. And Kyle can take you there with the help of Microsoft's shiny, new implementation of Model-View-Controller. And you will see a place where the air is clean, easily maintained, and testable.

 

South Florida Code Camp - Miramar, February 2, 2008    7:30am - 5:45pm

Not one, not two, but THREE doses of the Hillbilly:

Introduction to TDD, Mocking, and Dependency Injection
I know, I know, why would we need TDD? It’s not like requirements ever change, right? Users are always crystal clear when describing them and once they’re written down, everyone *knows* they’re set in stone.

So this session will be more of an academic exercise for those purely hypothetical situations where, say, your client claims he “forgot” about a key feature one week before delivery and that it “absolutely has to” be in the application and, wouldn’t you know it, it’s going to touch every single layer of the application.

Crazy talk, maybe. But indulge a budding theorist and join me for a demonstration of TDD in action and how it allows you to wholesale replace entire sections of your application with confidence. Along the way, we’ll discuss how you can test components entirely in isolation from each other through the power of mocking and dependency injection.

ASP.NET MVC and AJAX
No abstract for this one because I was originally going to re-hash my Introducing MVC in .NET presentation before David Hayden decided he wanted me to work for my money. But unlike Justice Gray, I'm folding like a new shirt and tweaking my presentation.

Brownfield Software Development: Inheriting Code
What a mess this code is! If only the mucky-mucks would let me rewrite it from scratch. (I’d *never* make the same mistakes the previous team did.)

But alas, I’m stuck adding features and making bug fixes to this convoluted codebase that has no unit tests, has no CI process, and is not even completely in the source code repository. And I’m scared to make changes because the first time I tried, some users couldn’t log in, the app crashed for others, and for one unfortunate person, a big gaping hole opened up under his desk when he tried to enter an order.

In this session, we’ll take an existing application and move it to a state where we can make changes with confidence. We’ll implement a continuous integration process and start you on the addictive road to refactoring. And once you get your first hit, you’ll never start a greenfield application from scratch again.

 

I'm rather excited about the last one even if it seems the least sexy of the topics. I think it has the most potential to help people in the NOW instead of some hypothetical future.

Kyle the Re-presented

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright © 2010 Kyle Baley. All rights reserved.
 
CATEGORIES
.NET General (18) alt.net (4) altnetconf (9) ASP.NET AJAX (40) ASP.NET MVC (29) Bahamas (1) Bahanet (9) BDD (1) Brownfield (18) Career (9) Castle (1) Code coverage (1) Coding Style (6) Communication (1) Community (18) Conscientious Coding (34) Continuous Integration (11) dasBlog (12) Development (16) DevTeach (4) Domain (2) Environment (4) Estimating (1) Featured (14) Flamingo (10) Games (1) Google App Engine (2) GWT (5) Hardware (6) Java (1) Javascript (7) Linq (2) Livelink (6) Lucene.NET (2) MbUnit (1) Metrics (1) Miscellaneous (24) Mocking (4) NAnt (4) NHibernate (12) NInject (1) Office (3) Office Development (6) Open Rasta (1) Patterns (5) Presenting (13) Professional Development (15) Refactoring (10) ReSharper (11) REST (2) S#arp Architecture (5) Security (3) Software (11) Sundry (18) TDD (19) Tools (21) User Interface (5) Utilities (8) Visual Studio (8) VSTO (1) Web development (12) Windows (3) Working Remotely (16) Workplace (3) Writing (4)
 
LATEST POSTS
 
POPULAR POSTS
 
 
ARCHIVE