How did you get started in programming?

I found this meme floating around some time ago, and thought it would be fun!

How old were you when you started programming?
Technically, about eight years old.  If you count plotting my initials on an Apple II+ in low-res, point by point, then that’s my first program.

How did you get started in programming?
My first real job programming was in the late 90′s.  I developed an event tracking system in Access for a single’s activity club.  They were a franchise until the franchiser packed up and disappeared, which left several franchisees around the country stuck with a bespoke Notes database.  The IT shop that developed the Notes system wanted more than the clubs could afford to support it.  I grabbed a book on Access and started coding.  A few months later, I had sold the system to five clubs.  I was hooked.


What was your first language?
Visual Basic was the first language I learned to any level of competence.  I’ve since moved on to C# and javascript.

What was the first real program you wrote?
The event and member tracking system was the first money-earning production program I wrote.

What languages have you used since you started programming?
C# is my “daily driver” language.  I also know Visual Basic, VBScript, and javascript.  I have a passing familiarity with C++ and Actionscript.

What was your first professional programming gig?
My first non-moonlighting gig was a contract with Texas Instruments, writing legacy ASP applications in VBScript.  I didn’t like that job very much, but it did demonstrate to me that I could make a living programming.

If you knew then what you know now, would you have started programming?
Absolutely.  I’m lucky to have found something I enjoy doing so much that also earns me and my family a living.  I’d still be doing it even if I couldn’t make a dime.

If there is one thing you learned along the way that you would tell new developers, what would it be?
99% of the information you need to learn your craft is available online.  I had a few mentors, but once I learned how to learn about programming, I discovered that the best answers are the ones you find for yourself.   That doesn’t mean you shouldn’t look to others for guidance and advice, just don’t use other people as your first resource for answers.  Don’t be satisfied with “it works.”  Challenge your assumptions, keep looking for the best patterns, and learn from the experts wherever you can.

What’s the most fun you’ve ever had … programming?
Ah, my magnum opus.  In the early aughts (2001) I developed an asset management system for a managed hosting company in Texas.  They were cramming their server data (over 7,000 servers) into a CRM and needed something better.  They were working on a hugely complex system, but it wasn’t due for months.  I bought several HP Jornada handheld computers- clamshell things with a full keyboard and PC card slot.  All the servers were marked with barcodes.  We scanned the ID information and “U-Top” (the position of the servers in the racks) of all 7,000+ servers in a single weekend, using the handhelds and some barcode scanners.  The data was then synched to a SQL Server using SQL Server CE 1.0.
Then, using legacy ASP and some amazing artwork created by a colleague, we built a rack visualizer.  I developed a web-based system that allowed users to view the datacenter in a top-down view, click a rack, and see the contents of any rack.  You could hover over a server and see its status, and over blank space to reserve  a spot for a new server.  This combined with a tracking system that allowed users to track the progress of a server from the build center to the data center and back, as well as movement of assets within the corporate office.  I learned a lot from this experience, and consider it my greatest overall achievement… so far :)

My Journey with the StackExchange API

On May 23, Jeff Atwood posted an announcement to the StackOverflow blog.  The StackOverflow team was getting to work on version 1.0 of the StackExchange API.  As you know from my previous post, I’m something of a StackExchange fan.  Needless to say (though I’ll say it anyway) I was pumped (did that rhyme?)

Two months later, I’ve created three new open-source projects based on the StackExchange API:

StackLINQ: A LINQ Provider to the StackExchange API
StackedDeck:  The TweetDeck of StackExchange.  Watch questions from any and all StackExchange sites stream in by tag.
StackWatcher:   A system tray application that watches in real-time for changes in your rep, favorites, and badge awards, and notifies you with some popup toast.

This effort has been an intensive and interesting experience.  I learned a TON about LINQ and Windows Presentation Foundation, WPF being the basis for StackedDeck and StackWatcher.  I won’t lie and say I did it just for the fun of it. I would love to win cool stuff for my efforts, but that’s truly not the whole deal.

LINQ, WPF, and Silverlight are three of my favorite Microsoft technologies.  I’ve learned a lot more by writing the StackLINQ library and the WPF apps, and I’ll be blogging and demoing my experience over the next several months, starting with StackLINQ.  StackedDeck is now version 0.9 beta.  It will be getting a major refactoring as I refine it to take better advantage of binding and MVVM.  I will probably roll StackWatcher’s functionality into StackedDeck, and will definitely be updating StackedDeck when the StackExchange API v2 is released, so you can ask and answer questions too!

This process will be “televised”- that is, blogged and probably made into videos.  All three projects are on BitBucket for your perusal at the links above.  Enjoy, and watch this space to follow my progress.

How to Get Value From StackOverflow

I’ve been a regular user of StackOverflow since shortly after the beta.  It helped keep me sane during a period of semi-employment.  My company was bought out and I was paid to do nothing for eight months.  I know this sounds great, but it wasn’t.  Desperately bored and wanting to do something, I spent hours answering SO questions.

Over the course of eighteen months, I’ve learned a few useful ways to get the most out of this amazing site.  I thought now would be a good time to share the best ones.

There are four common ways to get value from StackOverflow:

  • Asking questions
  • Finding answers by landing on SO through a Google search
  • Finding answers by searching SO directly
  • Answering questions

We’ll take each one in turn.

Asking Questions

Asking questions on StackOverflow is a skill.  First and foremost, questions must be answerable. The progenitors and maintainers of the site (Jeff, Joel, and The Community) created StackOverflow to contain Questions and Answers, not Flames and Opinions. That’s not to say the latter doesn’t happen, but subjective questions are generally closed quickly.  I have only asked a few questions on SO when I’ve been truly stuck, and have been very satisfied with the results.  Answers to well-crafted questions come quickly.

Do:

  • Make questions concise and readable
  • Include enough information (code!!)
  • Markup code so it’s readable.  Use the ` before and after code blocks, or use the little binary button.
  • Include the steps you have already taken (no “How do I write Facebook?  Plz send the codez!”)
  • Accept Answers! Answerers do pay attention to your accept rate.

Don’t:

  • Ask a question until you understand the problem well enough to articulate it clearly
  • Ask for help with homework unless you have tried at least ten things (and include those things)
  • Ask subjective questions.  ”Why” questions are often subjective.
  • Downvote just because you disagree with an opinion, or out of retribution.  No one will know you did it, but it’s baaad karma.

Finding Answers

Finding answers on SO is easy:  search Google.  Over half of my technical searches lead to SO.  Searching SO directly is useful too, but here’s a pro tip:  when you’re at your wit’s end and you start asking a question, pay attention to the questions that pop up as you enter your question title.  For some inexplicable reason, that search seems to come up with better results.  It may be that your direct SO searches should be phrased Jeopardy-style, in the form of a question.  I haven’t tried that yet.

Answering Questions

Here it is- the fun part.  Answering questions on SO is all about giving back to the community, helping your fellow programmer.  In a divine light of altruistic service, the Oracles of StackOverflow share their wisdom with the masses.

Oh, and there’s that Reputation thing too :)

Honestly, earning rep for helping people is fun.  Somehow the one without the other isn’t quite the same, regardless of the fact that the reputation has no intrinsic value whatsoever.*

So, good answers:

Do:

  • Read the Entire Question. Answers that do not take the entire question into account are often wrong and will get downvoted.
  • Use Markdown to your advantage.  Bold is great for one-liner summaries of your answer.  Italics are good for emphasis.  Use bulleted lists when appropriate.
  • Mark code appropriately, just as with questions.
  • Make the answer easy to read by inserting gaps between thoughts, even if they’re only one or two sentences.  Long paragraphs are hard to read.
  • Include enough detail to answer the question without being long-winded.
  • Focus on your area of expertise.  You shouldn’t have to research your answer except to fill in blanks.

Don’t:

  • Rush the answer.  Getting in first doesn’t automatically mean getting the highest-voted answer.  You can edit to add more detail later (but be careful not to write a novel, unless the question warrants a long answer)
  • Guess.  Back up your information with references.  I rarely ever post an answer without a link to supporting information.
  • Answer with just a link, unless that link is exactly what the poster needs.

In Summary

Those are my guiding principles as I use SO.  This is certainly an incomplete list, so please leave comments and I’ll update the post with the best ideas.

If you enjoy answering questions on any StackExchange site, check out StackWatcher.

*Actually, Telerik offers a free copy of their Premium Collection to answerers with over 10K reputation :)

Tagged, I’m It: My Reading List

So I received a tag from Sara Dutkiewicz yesterday, asking that I share my reading list.  I’m a huge fan of hard science fiction, and over the years I’ve read a lot of it.

I just finished Saturn’s Children by Charles Stross.  It was okay, not Stross’ best work.  If you want to read great Stross, pick up:

  • Singularity Sky
  • Iron Sunrise
  • Accelerando

Before that was The Unincorporated Man by Dani and Eytan Kollin.  This is an awesome book!  I think it would make a great movie.  In the hands of a good writer and director, it could be a classic.  The next book, The Unincorporated War, is out in hardcover.  I’ll wait until March for the paperback- $25 is too much for a book.

Here is an incomplete list of my other favorite authors:

Peter F. Hamilton:  Nights Dawn series, Nano Flower, Fallen Dragon

David Brin: Uplift War series, Kiln People

Greg Bear:  Eon, Forge of God

Timothy Zahn:  Cobra series, Thrawn Trilogy (first Star Wars books set after episode 6)

Neil Gaiman:  American Gods, Sandman, Anansi Boys

Stephenie Meyer:  The Host, Twilight series (yes, I read them…)

Kim Stanley Robinson:  Mars trilogy (one of my favorites), Years of Rice and Salt

Tad Williams:  Otherland series

Vernor Vinge: A Deepness in the Sky, A Fire Upon the Deep

Robert Heinlein: Stranger From a Strange Land, The Moon is a Harsh Mistress

Stir Trek: We Boldly Went

The Stir Trek conference in Columbus was a big success by any measure.  We boldly listened to the first streamed keynote I’ve ever seen!  Molly Holzschlag shared some great tidbits about the future of web development.  According to Molly, CSS 3.0 and HTML 5 are the beginning of Web 2.0, not the destination.  I got to attend some great sessions on ASP.NET MVC2, Windows 7 Phone, and the new stuff in jQuery 1.4.  Topped it off with a win in the raffle (Microsoft Mobile Mouse FTW!), then on to Iron Man 2.  It was a long day driving in from Cleveland to arrive by 6am, but it was very worth it.  Thanks and kudos to Jeff Blankenburg and his intrepid team of volunteers for throwing such an awesome event!

BugNet

I just installed BugNet on a Windows XP system at work. It was easy to set up and I like the user interface. However, I ran into a problem: the FCKEditor wouldn’t load when I browsed from a remote system.

As it turned out, FCKEditor includes XML files. The FCKEditor XML files included in the latest release of BugNet contain comments that, for some reason, IIS 5.1 doesn’t like at all. The request for the fckstyles.xml file simply wouldn’t work- the connection is aborted and no data is returned. Remove the comments (including the ones with XML in them) from that file, and it works.

I hope this prevented another hours-long Google trek for you!

MetaWork

I’m working on a personal project related to some work I’m doing for my day job.  It’s a big idea I had recently based on ASP.NET MVC and I’m excited about it, so I’m pushing hard to get the work in.  I’ve done a lot more coding in the last couple weeks than I have since I “finished” VSTime.

My “productive” time starts at about 6am and ends, on a good day, around 6pm.  On a very good day, caffeine can extend that time into the evening.  I know this schedule is grounds for revocation of my geek card, but I’m a husband and dad with three kids, so my schedule is largely theirs.  Outside my productive time, my brain slowly descends into guacamole.  The frontal lobes turn to runny eggs and I can’t focus on code anymore.

This means that I have about eight good hours a day to devote to work, be it my own or otherwise.  Eight hours sounds like a lot, but when you count drive time, boot time (our login scripts are glacial,) lunch, and body breaks, it rounds out to more like six.  I try to game the system by working from home when I can (no drive time) and eating at my desk, but it’s still less than eight hours.

Six hours per day isn’t a lot.  I have to squeeze every possible moment out of those six hours in order to accomplish anything meaningful from one day to the next.  This means staying as focused as possible on the tasks that will truly make things happen.  I’ve recently noticed a major productivity killer: metawork.

Metawork is what we do to convince ourselves we’re doing something useful when we’re actually slacking off.  When our brains seize up and our focus is off, we turn to metawork to look and feel busy.  Examples of metawork include:

  • Updating to-do lists
  • Writing pseudocode
  • Tweeting/Talking about writing code
  • Meetings
  • Reading about technology that has nothing to do with anything you’re working on
  • Answering random StackOverflow questions
  • Reading blog posts (D’oh!)
  • Writing a blog post (Double D’oh!)

This is an incomplete list and will probably apply differently to different people.  Some people are paid to blog, so that wouldn’t be metawork for those people.  I’m not paid to blog, so I’m currently burning valuable time.

Back to it!

“Not Invented Here” Syndrome

I responded yesterday to a post by Steve Smith about programming anti-patterns. After writing a brief note about “Not Invented Here” syndrome, I thought about it some more and decided to expand on my comment.

Not Invented Here (NIH) happens for a variety of reasons. Those that follow NIH are loath to incorporate any ideas from outside their own team (and sometimes their own heads.) It’s a sort of mental ossification that occurs when a developer is unable to value contributions from outside. This may manifest as a reluctance to incorporate open source code into a project. NIH adherents tend to distrust frameworks developed by other companies or developers.  At its worst, NIH folks won’t even accept contributions from other team members.

“If it wasn’t Invented Here, by me or my peeps, we won’t use it.”

It is understandable why developers might prefer their own code and methods over those written by another. Codebase familiarity is comfortable and fast. New methods take time to learn and really incorporate, and we don’t always have the time or management blessings to climb new learning curves on the company nickel. We rarely get paid extra to write good, reliable software (there’s a whole other can of worms!)

It’s important to fight the urge to stick to your comfort zone. As developers, our value comes not from what we know, but what we can learn and how quickly we incorporate new information. Imagine trying to write an entire application without an Internet connection. The most competent developers still need to research and look up syntax now and again. It’s important to go beyond simple task-focused research. Challenge yourself to the core! Ask tough questions about why you do things the way you do them. Try new things. You can’t expect to maintain good professional bona fides while working in a bubble. New ideas are essential to any developer’s continuing education.

Avoiding NIH will also help you avoid RTW: Reinventing the Wheel. If you decide to build the biggest baddest new blogging system (for example), first ask yourself why you think yours will be better than the other million open source blogging systems out there. If you have a good answer, go for it! However, even if you think you have a totally new concept filled with win, do yourself a favor and evaluate the other systems. You’ll learn a TON.

There is a caveat here: don’t go looking for nails every time you find a shiny new hammer. Tools are just that: tools. You can build something great or smash your (or your clients!) thumb. Evaluate each newfangled thingie, whether it’s TDD, IoC Containers, Mocking, frameworks, or whatever, with a critical eye. Take some time to try it out. With a little practice, the really compelling stuff will feel like an old shoe that you’ve worn for years. Let the stuff that doesn’t sing for you just fall away.  It’s extra effort, but it’s totally worth it.

Deconstructing My Learning Process

Lately I’ve been doing some self-examination of my learning process.  With Microsoft releasing so much new technology, including .NET 3.5, Silverlight, Azure, and soon .NET 4 (just to name a few) in rapid succession, there is a TON of new stuff to learn.  The learning process is fun for me.  I really enjoy picking apart a new technology, figuring out what it can do that no one has done yet.

I tend to follow the same loosely defined process when I’m picking up something new:

  1. Decide I want to change the world with some technology (often the flavor of the day: Azure, LINQ , Silverlight, etc.)
  2. Do a blizzard of Google searching
  3. Save a bunch of links (Delicious, private wiki, etc)
  4. Add all of that domain’s guru’s blogs to Google Reader (ScottGu, Wildermuth, etc)
  5. Add the StackOverflow RSS for that subject to Google Reader (I currently watch Silverlight and Entity Framework-tagged questions, it’s very cool!)
  6. Read a bunch of “how-to” walkthroughs
  7. Download code samples that demonstrate the bits and bobs I want to learn
  8. Go to town with VS.NET

I suspect this is a common process for many people.  It has occurred to me that being more aware of this process might help me to improve it.  I’m currently in the process of a deep dive into Silverlight.  Silverlight is such a humongous subject unto itself that I find myself spending too much time spinning my wheels.  Therefore, in the interest of improving my learning process and making it more efficient, I’ve decided to deconstruct it here for all to see!

Strengths and Weaknesses

Here is what I like about my process:

  • Gathers lots of reference material
  • Identifies authoritative sources for information
  • Follows others work in the domain (StackOverflow, Blogs, Code Samples)

Here is where I think my process can be improved:

  • Disorderly
  • Too task-focused
  • Wastes too much time on narrow subdomains

My Current Process

I’ll use my Silverlight research to demonstrate my current modus operandi.  I’m really jazzed about Silverlight, so I’d like to learn as much as I can.  I want breadth and depth.  I started with #2 of Dave’s Way to Learn Stuff, so I went to Google:

The first link is the official Silverlight Get Started page.    It’s a good start.  I see all the tools I’ll need to get rolling.  I also see:

  • Tim Heuer’s “hello world!”  Silverlight screencast
  • ScottGu’s series on Silverlight
  • Lynda.com training videos

I looked at some of these videos and articles, but not all, and not in any particular order.  My current process is not that orderly.  I tend to start off with an idea of what I want to accomplish, then set out to achieve it by targeting the specific elements I need to “Make It Work.”  This is one of the major flaws in my process.  I get so excited about creating something that I absorb the information I need in a disorganized, scattershot fashion.  In my impatience, I go down a single rabbit-hole without building the larger picture around me first.  The return on my time investment yields, at best, a narrow task-oriented understanding.

Dave’s Learning Process 2.0

Step 1: Mind Maps

What to do?  I need to be patient enough to build a comprehensive, 10,000 foot-level understanding of the domain before I dig deeper. If you’re like me, you want the big picture…


Click to enlarge

I ran across the idea of Mind Maps some time ago, but only recently realized their potential.  I’m a visual kinda guy.  You can stand a talking head in front of me for hours and I’ll absorb maybe 30% of what he/she says.  Sit me in front of a cool Discovery program with lots of pretty graphics, and I’m a sponge- I’ll memorize 80% of the stuff.  Mind maps are an excellent way to create a visual representation of a subject.  They help synthesize domain information into a comprehensive mental model.

The mind map above took me less than twenty minutes to build.  I stole borrowed the structure right out of the MSDN Silverlight Roadmap.  It’s not complete, but it doesn’t have to be.  It covers the major aspects of Silverlight, so I have my 10,000-foot overview.  When I learn something new about Silverlight, I’ll know where to plant it in my mental garden.

Creating your own mind map of a subject is a great first step to learning it.  If breadth and depth is what you want, you can round-robin each major trunk, “drilling downward” into the subject, rather than inadvertently falling down one rabbit-hole to the exclusion of all other subdomains.  Using a mind map, you’re in better control over your research process.  If you’re only interested in one sliver of a domain, such as Silverlight Media and Animation, that’s fine, but I still believe the mind map is useful.   It helps you understand how subdomains relate to each other.  Notice in my Silverlight Mind Map how DataGrid straddles Data and Controls.  If you want to understand DataGrids, you’ll have to learn at least a little about how Silverlight handles Data.

Read, Follow, Create, Invent

Now that my mind map is created, I can build the foundation. My past research process has been driven by impatience- I want to get something done NOW! This has lead to a false economy of time investment. From now on, I will take the time to ingest the basics first. Ironically, I think this will save me time in the long run. I will spend less time looking things up and cross-referencing if I read up on the essentials first. I can also rely on the mind map to let me know how far I’ve gone and how far I have left to go. This will keep me from feeling that the foundational learning is an endless, pointless process… the feeling that has historically kept me from taking the time in the first place!


Step 1: Read

Let’s go back to the MSDN Silverlight Roadmap. I pulled eight major trunks out of the Roadmap and added it to my mind map. Each of those trunks has a dedicated top-level page on MSDN. This just isn’t a lot of reading. Once I’ve read each of these, I can make notations on my mind map, calling out areas where I want to dive deeper. I won’t spend more than say, fifteen minutes on each trunk before I move on to the next one.

Step 2: Follow

Now it’s time to do a little trying out by following simple examples. I’ll build a test project, and add a page for each of the major trunks. Here I will try out little bits and pieces of each subdomain. Nothing fancy, nothing complex, nothing integrated. Just tiny little examples of each subject. Look for the most basic how-to code samples for each subdomain and just copy and paste.

Step 3: Create

This is the stage where some creativity comes into play. As a few “what-if” questions about the examples you’ve built, and start to experiment with tweaks and modifications. Form and test some theories about the way the features work by themselves and together. Try combining features from related subdomains in a limited way until you have a feel for how they interoperate.

Step 4: Invent

Now we’re ready to build a real application. Using elements from several different subdomains, build something simple but useful. My first full Silverlight app will be… tada! a Sticky Note application. Stop the presses.

Lab Coat Time

Let me be clear: this is not wisdom from on high. It’s not the new bestselling productivity book. It’s an experiment- my experiment. I have a good feeling about it because it feels… weird, heavy somehow. I know that has to be a good thing because anything better than my current way of doing things will be outside my comfort zone. Therefore, a little discomfort is probably a good sign!

So, my next step will be to start with Read. I will dive into the MSDN Roadmap and go from there. I will dutifully report my progress, so watch this space for updates and code samples as I forge ahead! If this works as well as I hope it does, expect to see more open studying for lots of other goodies. Stay tuned!

DS

DaveSwersky.com is now on WordPress

I liked BlogEngine.NET, but you just can’t beat WordPress.  Plus it’s FREE.  Perhaps someday I’ll try self hosting WordPress, but for now I’ll let the experts handle the LAMP stuff!

Hope you like the new look!

DS

Follow

Get every new post delivered to your Inbox.