The Passion versus The Job

Talking with my Twitter peeps, I see the 80/20 rule come up every now and then. Coding Horror refers to it in his post The Two Types of Programmers. Joel Ross suggests that may even be closer to 95/5 in his post Going from the 80% to the 20%.

Either way you look at it, there definitely are two types of programmers – those who see their programming as a job versus those who live with it as a passion. Those who see it as a job do the hours that are required by work and nothing further. After that 9-5 window, they leave the programming at work, where they will pick it up the next day. They do what they can to “get the job done now” and they don’t always see that they need to stay up on their skills to get ahead in the future.

For me, programming is a passion; it’s only natural for me. I’m not saying that I have all of these random programming languages in my nature, but I have a propensity to pick them up easily. I heard about programming in grade school, and everything just made sense. I couldn’t explain why I understood it, but I just did. Not only could I understand it, but I could also simplify it into plain English and explain it to others as well. I didn’t even have a computer until late in grade school, but yet I could work with it quite easily. I was excited about it, and I wanted to share my excitement with others.

In high school, I acquired Visual Basic and was able to play around with it and make sense of it. Eventually, I figured out how to do data access in VB, and Address Keeper made its way into the world through NoNags. (Unfortunately, the link and the code no longer exist, so I can’t show off my first public work anymore.)

By the time I graduated high school, I had felt comfortable enough with VB that I pushed for it and took an internship where I could use it. My internship and co-op experiences in college were all programming-based, and I really enjoyed building my technical skill set while developing a business skill set as well. Each position required me to step up in some way – from learning a new language to actually taking the initiative and saying “Hey, I see you’ve had this job in the classifieds for awhile. Take me on for the summer, while looking to fill the position full time.” (And yes, I got that co-op – which led to my own corner office downtown for a large, publicly-traded real estate company. Very well worth it!)

After graduating, I took a job just to get back into the computer industry here in Cleveland, and oddly enough, it wasn’t programming. I started out as a tier 2 tech for an ISP, and due to circumstances out of my control, I eventually took over as co-manager of the tech support department. Right out of college, I had the joys of putting my business skills to work. But my inner programmer knew I had to network to keep up on programming. And I knew deep down that I’d eventually return to my programming roots.

My passion for programming is what drove me to where I am today. After the ISP, I moved into programming and other various hats for manufacturing, which was a good place to learn things until I hit a point where things seemed too stagnant for my liking. I was back in the 80% there – but at the same time, I was on call 24/7 and dealing with projects that really took the life out of me. I didn’t have much time to realize just how long I had been in the 80%. But then I hit the burn out point – and that’s when I knew it was time to move on and find the happy me that had faded away into a grumpy me.

One of my friends (who I worked with and supervised at the ISP) had been raving to me about the company she was working for, and after almost 4 years, I finally followed her there. Even though she hadn’t dealt with “programmer Sarah”, she knew that I would be a good addition to their team. It’s good to be where I am – full-time programming with a lot of talented individuals. Being back in my environment just feeds my 20% tendencies. I’m blogging, and I’ve met a lot of awesome people, who’ve introduced me to more (as in quantity, not as in better) awesome people, who… well, you get the picture. I’ve had friends point me at various user groups, which lead me again to more people. I’ll be checking out yet another user group in a couple weeks.
The 20% tendencies just continue to push me forward.

If programming was just a job, I would be focused more on my initial dream of playing for the Cleveland Orchestra. But for me, it happens to be one of my many passions, one that rivals my passion for music, and one that will drive me to get into the 20% and stay in the 20%. Or is it 5%? Either way, I can see my passion for programming taking me far if I let it.

The Double Entendre of Regular Expressions

Since I am a gamer, I have a tendency to switch between gamer mode and developer mode sometimes without thinking. I’d like to introduce you to a few regular expressions that I may let slip when I accidentally switch between modes.

FTW, 4tw – “for the win” : This is a good thing. Basically if something good is happening or if we think something is really awesome, then we say “4tw”. For example, if out of the blue, a friend surprises me with one of my favorite treats at this time of year, I may say something like “Peeps 4tw!”.

FTL, 4tl – “for the lose”: Yes, I know that’s not grammatically correct. However, that’s what the kids kept telling me it stood for. This is the opposite of “4tw”. So, if I don’t want to do something but I have to do it, it’s usually “chores 4tl”.

IRL – “in real life”: This is as opposed to the life we live online. When you’re offline and dealing with people in a face-to-face setting (and not chatting with them online while you’re sitting right next to them), that’s considered being IRL. Sometimes IRL can be a harsh reality.

There’s a bigger list of gaming things at Rei’s Random Guide to MMP Gaming Terms.

Now the other reason for this post (and hence the title) was because I was thinking of regular expressions, of the pattern matching kind. When I first ran into regular expressions, I was writing in Perl. While looking at sample Perl scripts, I had a few head explosions along the way. Most of those were due to funny looking symbols that looked quite cryptic, syntax used in this thing called “regular expressions” (regex, for short). There’s definitely nothing regular looking about it, so I understand many people’s frustrations with it.

For me, after the initial head explosions, I realized that I must be a sick and twisted individual – I was starting to get the hang of regular expressions and fell quickly for them. I felt just how powerful they could be and what they could do for me.

To reaffirm my love for regular expressions… my very first C# program was not a “Hello world” program or some demo. I figured out how to write a script to read files from a directory, find certain patterns (regex!), and store all the data in one flat file to eventually be used in a database. That was almost 11 months ago, and it was a windows app that did what I needed. It got the base for my app, and it gave me a lot of self-confidence in learning a new language. If I could fit the screwiness of regular expressions into a language I wasn’t familiar with, I knew I’d be fine.

If you’re one of those people who can notice patterns well, then regular expressions is definitely a very powerful tool for putting your pattern matching abilities to work. Once you learn how to “speak” it, it’s one wicked (in a New England sense) tool.

A couple resources for regular expressions of the pattern matching kind include:

Internet Explorer (h)8

Disclaimer: I am writing this entry from Internet Explorer 8 Beta 1 (for Web Developers and Designers). Already I have a problem, as the Title bar is not showing in Blogger like it should. The button text is cut off, and the buttons don’t line up properly. This text editor behaves different too – using the <em> tag for italics rather than the <span style=”font-style:italic;”>. Fair warning that this is probably just the beginning of my irritations with IE 8 beta 1.

I’m calling this post:

IE (h)8

(and I’ll go back and edit it in using a more stable browser once I’m done.)

Last week, at MIX08, they released IE 8 beta 1. I wasn’t at MIX08, but Jeff Blankenburg was and he blogged a little on it. After reading his post, I figured that I’d at least check it out on both of my computers – my beefy gaming laptop (Windows Vista) and my not-so-beefy, mostly neglected desktop (Windows XP). Both machines behaved similarly, which surprised me a little seeing that they are quite different in their setup.

One of the things that IE 8 is pushing is standards. Now this is a sore topic with me, mostly because they’re called “standards”, but there hasn’t been anything standard about various browsers’ implementations of them. It’s always appeared to be a “pick and choose” implementation or a “choose your own adventure” implementation. So why they’re finally getting on board and trying to implement the whole thing is beyond me. But maybe it’s about time the browsers come closer to putting the “standard” in standard.

Viewing various websites through Internet Explorer 8, I had mixed feelings about it. I like that you can easily see where CSS needs tweaking and where people really need to update their code, without really needing to look at the source. I also have to admit that I like the Developer tools. My preferred browser for web development has been Firefox, with the Firebug add-on. The Developer tools in Internet Explorer 8 have that same feel – with the ability to inspect elements just by clicking on them, changing styles with a simple check, or even debugging Javascript. It’s nice to see Microsoft taking this route – definitely a step in the right direction.

From a web developer’s standpoint, I like that the standards are being enforced a bit closer than before.

But from a user’s standpoint, IE 8 just makes me super cranky. I post on various forums, and textareas act really strange. From horrible lag with textareas that use Javascript (but don’t lag in IE 7) to not being able to see what I have highlighted, it’s frustrating. This is what makes me yell it’s abbreviation – “Aieeeeeeee!” These little frustrations are what reminds me of the key word in this release – beta.

If you’re a developer or a designer, definitely check it out, as the Developer Tools have enough coolness factor for me to recommend it. However, if you use a lot of forums that use textareas for posting, have another browser on hand just in case you run into the same headaches that I have. And if you want to download it, there’s a link to it over in Jeff’s post on Dean Hachamovich’s IE8 Keynote.

Miguel Castro and URL Rewriting: Cleveland .NET SIG 3/11

Last night, I was at the Bennett Adelson .NET SIG meeting. Miguel Castro came out and talked to us about URL Rewriting, HTTP Modules, and HTTP Handlers.

Where was this guy a few months ago when I had to figure this out on my own for a project at work?!? All the points he had hit on in his presentation are things I ran into a few months back while implementing rewriting on our main site at work.

First off, a little on Miguel… contrary to what some of the guys had teased me about, he’s not Fidel’s long lost brother from Cuba (or at least not that he admitted to). Miguel is an INETA speaker from New Jersey, and he is SteelBlue Solutions. He kept plugging his program CodeBreeze throughout the presentation, and the poor guy in front of me became his target. He had to remember Episode 77 on dnrTV was the show where Miguel mentioned CodeBreeze. But for all that Miguel talked about URL Rewriting, he still hasn’t set up http://www.steelbluesolutions.com/CodeBreeze to forward to CodeBreeze. (So if he actually sees this, the URL expectation has not been met.)

If you ever get a chance to see Miguel talk, go for it. This guy is quite animated when he talks, and he seems to thrive on audience interaction. Unfortunately, his audience last night was mostly dead.

Miguel covered various ways of rewriting URLs, including:

  • <urlMappings> section in web.config

    • Good for 1-to-1 hard-coded relationships
    • Syntax for adding a mapping to this section:

      <add url=”friendly_looking_URL_that_doesnt_necessarily_exist” mappedURL=”intimidating_URL_that_better_exist” />

  • Application_BeginRequest in Global.asax

    • Good for application-specific logically-determined mappings
    • Not good from a reusability standpoint

  • Reusable HTTP Module

    • Can tap into the same events as Global.asax
    • Compiles into a DLL, which is great from a resuability standpoint
    • Easily setup in the <httpModules> section of web.config

  • Re-write Plug-Ins

    • Uses OnBeginRequest
    • Is a strategy pattern, for those who follow design patterns

  • Regular-Expression Engine

    • Uses regular expressions that are setup in web.config
    • Built as a plug-in

  • Custom HTTP Handler

    • Also compiled into a DLL, similar to a HTTP Module
    • Difference between Handler and Module is that Handlers are associated with specific extensions and wild cards
    • Setup in the web.config <httpHandlers> section
    • Handlers are assigned AFTER the OnBeginRequest

He went on to talk about Search Engine Optimization, in relationship to URL Rewriting. The bots index a “rendered” page and then crawl the site through other links on the pages. If you have your friendly links on your page, there’s a good chance that it’ll get ranked higher. (Argh… and I apparently slacked off in my notes, as there was a part where he mentioned one of his products and we laughed at its name and led Miguel to a realization about that name.) Though having “sex” in the name probably helps with SEO 😉

After the meeting, a group of us ended up at The Winking Lizard. Just like last month, it was a lot of storytelling, laughing, and hanging out with people we knew and new people… always a lot of fun!

Next month, Richard Broida is giving his talk “The Intelligent Programmer’s Guide to BizTalk”. I’ll admit now that I have no idea what that’s about, but I’ll at least go to see what it’s about and to hang out with them afterwards.

Microsoft SharedView

While stuck at home, I got a message from a friend who was working on some of his websites. He really wanted to work on a particular one, but he didn’t know enough PHP or any SQL to really get it going. It was a good thing that he found me online and that I had a lot of time on my hands.

He’s working on a site that I happen to understand quite well. All the features he’s looking for are pretty similar to the things I work on at my day job. The only difference is that I use .NET stuff and he’s using PHP5. I worked on a team that developed an inventory system in PHP with MySQL, so I’ve got that background to help as well. What could possibly go wrong?

I figured the best way for this to work would be for him to show me what he’s working with and take it from there. After paying attention to some Twitter people and to posts in the NEODevEvents group, I installed Microsoft SharedView and sent the link to my friend. After a quick install, we were hooked up and ready to go.

My friend started sharing his environment with me, which helped me understand a lot and enabled me to give him direction without having to guess at what he was looking at. It also was nice to see his database structure without him having to copy and paste it in IMs. I was able to walk him through basic SQL queries via phpMyAdmin (and point out some of MySQL’s quirks that I wish worked in SQL Server and vice versa). We looked at his database structure, in which I was able to give him a couple tips as well.

Then came the PHP part. When I worked with PHP and MySQL, it was PHP4 and MySQL before it grew up (got views, stored procedures, and a lot of other features that other database packages already had). I had to learn this mysqli syntax, which thankfully isn’t too much different from what I used to work with. I was able to work with him on how to take what he learned with the SQL queries and how to use it in his code. Granted, it was basic stuff, but to be able to see his environment while this was going on helped a ton.

I definitely will use Microsoft SharedView again. Hopefully I’ll be feeling better soon enough so that I can do voice chats while working with people over SharedView, as I can see that making things go a lot easier as well. So check it out – if you have to work with someone remotely on code, SharedView is nice because you can show them what you’ve got and vice versa. You can also delegate control of your shared things to other connected users. Definitely a useful tool for remote collaboration!

Simple Programming with Sound

Music has always been part of my mind, body, and soul. From listening to it to practicing one of my instruments, I’m almost always doing something that involves music. Once I picked up programming, I wondered how to program sounds to come out of the PC speaker.

So I spent many nights on my parents’ computer, tinkering in QBASIC. I eventually figured out how to get the sounds out of the PC speaker and how to get them to sound right so that a song could play. This is what I came up with:


DrMario$ = "O4L8A#BA#BAGGAA#BAGG"
PLAY "X" + VARPTR$(DrMario$)

As time went on, I figured out how to create MIDIs and would spend some spare time away from my computer keyboard to put my MIDI keyboard to use.

Now that I’m into programming again, my music talents are playing second (bass) fiddle. However, I’ve grown up since playing with QBASIC, and the PC speaker no longer easily amuses me. But I’m still curious about things that make sound, especially the Speech Synthesizer. So with IronPython, I figured I’d check out the Speech Synthesizer and how to invoke it. It was actually very easy to do. Here’s what I created:


>>> import clr
>>> clr.AddReference('System.Speech')
>>> from System.Speech.Synthesis import *
>>> ssSpeech = SpeechSynthesizer()
>>> ssSpeech.SpeakAsync('Cleveland Day of .NET Rocks!')

I was watching a presentation this morning on IronPython that gave me some other ideas as well, but seeing how simple speech looked, I just had to try it out for myself.

If you’re wondering why I chose IronPython for this, you’ll have to come to the Cleveland Day of .NET on May 17 to see my presentation on IronPython. Details will be posted as they come, but definitely keep the date reserved and keep an eye on the site!