Being a developer or just a good Googler

Scott Hanselman posted a quick blog post about a question he got from a young developer asking “am I a developer or just a good Googler?”  I thought it would be fitting to post it here in my neglected blog.

It’s true that we find ourselves trying to Google an answer often.  In fact, my Google history is up to about 60,000 searches over a few years.  I think Scott has a couple of great points in how to better yourself as a developer.  I try to do project Euler on occasion and I also read as much as time will allow.

I would like to add one more suggestion though:  learn test driven development. I started to do this a couple of weeks ago, and it has really changed how I program.  Test driven development forces development to be more focused on specific problems and solutions to those problems by starting with a failed test. You then program until the test is successful.  Then you rinse and repeat.

It helps you become a better programmer because once you’ve learned how the tests work, there’s really nothing to Google; it’s just you and the specifics of the test.

The internet is a fantastic tool for helping developers do their job faster, but it does allow us to become more complacent. Learning how to actually develop instead of just “Googling” is the difference between good and great developers.

Programmers learning something new: a simple guide

I struggle a lot to learn new programming languages on my own.  It’s not that I’m not smart (I want to believe I am VERY smart) but it’s the combination of lack of time, lack of desire and having no answer to the question: “Great, I’ve learned X… now what?”

I’ve started to learn about Django, and I believe it will be DIFFERENT this time.  Why?  Because I have created a simple guide to learning something new from a programming perspective:

STEP 1: Accept that you may burn out and ask “why bother” and figure out the answer to it before starting

I had stated before:  It’s hard for me to learn something new when I expect to do precisely nothing with it.  This is what happened with me and Ruby on Rails.  Ruby is a cool language and Ruby on Rails was really awesome to build scaffolding with.  However, I didn’t really know what else I wanted to do with it.  I suppose I could have learned it’s cool AJAX capabilities that go with it, but really, it just didn’t appeal to me.  Therefore, it went on the infinite back-burner

Back when LINQ was new, I struggled to learn it as well, because even though I do .NET professionally, I was so knee-deep into what I was doing that it would have been almost a waste of time to really sufficiently learn it.  I finally got a project in which allowed me to utilize LINQ to SQL effectively and easily and since then I wouldn’t know what I’d do without it. Again, once purpose settled in, I was ready and very willing to learn.

Your ‘why bother’ may be different.  Your success may be dependent on how you handle it.

STEP 2: Do the tutorials

These days, it’s pretty hard to find popular frameworks which have no or incomplete tutorials (I’m sure anyone could find examples where this isn’t true, but in general, it’s true).  Also, framework creators know that a quick and simple tutorial is the best chance for a developer to get on board, especially in the framework’s early stages.  Django has a wonderful tutorial, split up into four parts building a poll system (I feel like poll systems are the hello world of the web development world).

Here are reasons why I don’t like to just “dive into the code”:

  • You cannot be guaranteed what you are looking at is the correct way to do it
  • Most of us are lazy, and there may be certain things hidden by shortcuts which obfuscate key basic techniques used by the framework/programming language
  • There is more impact in doing it yourself, seeing what works and what doesn’t, rather than just reading through it and trusting it works
  • It’s less fun!

Tutorials are the best way to get yourself acclimated, set up your environment, and ultimately help you decide “why bother?”

STEP 3: Research technology on StackOverflow

I am a HUGE fan of StackOverflow.  I’ve never met a bigger group of developers, all willing to write great questions and thorough yet quick responses.  The reputation system is awesome.  Any developer not utilizing StackOverflow is SERIOUSLY missing out.

StackOverflow is a great way to see what difficulties most users have, as well as to see how these user’s issues are resolved.  While it’s not immediately helpful, you will drill back into your head, and all of a sudden, you’ll come up to a problem where you say “wow, I remember this on StackOverflow!”

StackOverflow is a great place to see how a technology stacks (get it) up.  For example, a quick search of Django immediately show questions about scalability, whether a user should use Django or X and configuration questions. A few quick searches and research will give you a sense of what type of framework Django is.

STEP 4: Think Small

I picked Django because I had an idea for a website and needed a specific framework.  I discussed the idea with a buddy of mine, a developer who uses Django, and he sold me the benefits of using Django.  I owned hosting which could support Django but not .NET, so it looked like a good choice.  Also, I was in the ‘market’ to learn something new.

Unfortunately, I couldn’t just dive in because I needed to learn Python as well as the basics of the framework.  Therefore, I decided to table the original idea for now and decided to build a personal website for myself entirely in Django.  It took hours to do, I had to read up on a lot of how Django and Pyhton works, but the idea was simple enough to wrap my head around so I was successful.  You should see a site hopefully by the end of next week.  Because it’s my own personal website (and not a large, professional site), it’s okay if it has a few problems with it or if I did it incorrectly;  it’s all part of the learning process.

STEP 5: Have a buddy help you learn

It’s nice to be able to send code to someone, even if it is just a file or two, for them to kindly message you back and say “get out of your .NET world, here’s a better way to handle what you are trying to do.”  Having a human allows you to do a sanity check as well as to see if you’ve missed any nuances.  It’s also nice to have someone to ask for help on really simple yet bothersome problems.  It’s a lot harder to do this using the Internet.

STEP 6: Have fun!

Every blog post with steps needs a cop-out answer.  Here is mine.  Most of us are learning new languages because ultimately we want to.  You should have fun with your learning experience!

Opening to a New Window – Why Isn’t the Target Attribute a Valid Tag?

Ever since I was a young web developer going through college, it has been drilled into me to be standards compliant when developing for the web.  In fact, it went as far as being 20% of your grade just to be XHTML 1.0 Strict standards compliance.

Just to be clear, I am talking about XHTML 1.0 Strict.  Transitional, while it has its uses, doesn’t capture the essence and spirit of why we want to be standards compliant.  Creating your web sites to be standards compliant is something as web developers we should strive for.  It promotes standardization of markup, it helps to separate layout from content, and it creates the ability for all modern browsers to display the site same way… sort of.

One thing that really gripes me is the target attribute for the <a> tag.  This was marked as obsolete, and in the strict specifications, it’s invalid.  Why is this the case?  It’s very helpful,  unobtrusive, and works really well with tabbed browsers.  I can understand every other valid XHTML ‘no-no’ such as not using align attributes or a center tag, just this one just kind of escapes me.

<a href="" target="_blank">Why is this invalid?</a>

So why is it invalid? As far as I can tell, it’s because we shouldn’t assume it is what the user intended and that it should be left up to the user.  I really hate this explanation.  It makes me think whomever thinks it has never dealt with a real world user.  Most people outside of the technological world are not savvy enough to right-click and open a page in a new window.  For us that do know how to do it, it’s actually quite annoying.  Besides, when I link to a webpage outside of my domain, how often would we want the user to navigate away? It is not very user interface friendly in my opinion.

Another reason is the page loses the effectiveness of the back button.  Okay, I can buy this, but it’s packed neatly on a new tab on all new modern browsers.  It’s easy to navigate back to the original site.

A last reason I can discover is because of screen clutter.  This is becoming a moot point due to the fact that almost every popular browser uses tabs rather than opening a new window.  In fact, the only browser which doesn’t utilize tabs is IE6, and it’s popularity is quickly dying.

The standards compliant solution: Use Javascript. Bah!  That’s just something else I have to test.  target=”_blank” works fine in all cases.  Using Javascript to do something the browser does natively feels silly.  I know the code is pretty compact and with jQuery you could literally do it in one line, it’s not nearly as clean and understandable as target.

My user experience friendly solution: In order to appease the target-hating standards compliant gods, my solution is this:  Provide a setting on the top of the page which asks “Open all links in a new window” and “Open all links in the current window.”  This way, you allow the user to decide how it works, it’s standards compliant, and it’s fairly simple to implement.

Perhaps help is on the way. Doing some research on the topic, I came across the spec document for CSS3 Hyperlink Presentation (yes, this opens in a new window!) which describes using CSS to determine target parameters.  I can easily get on board with that!  Hopefully we can see CSS3 implemented across all major browsers in the not-to-distant future.

In Conclusion: I will still be using target=”_blank” to pop up new tabs on my blog.  The blog is validated in Transitional anyway.  My belief is that any hyperlink in a blog post will be clicked on to allow further reading of the topic.  That is the experience I want to provide for my readers.

Mini Post: Tags and Categories

I was helping my fiancee set up her blog, when she asked the question:  “What is the difference between tags and categories?”

I explained that categories were used for organizing your posts in a hierarchical manner, whereas tags can be used more for searches.  I tried to show her using my blog, to which I discovered:  I don’t use either correctly, at all!  I think my tag cloud is weak, and my category structure is non-existent.

Fortunately, Google, as always, is to the rescue.  I did a quick search on the topic, and discovered this blog post: Categories versus Tags – What’s the Difference and Which One? The blog post describes that categories are primarily for internal navigation on your site, should be fairly well defined and are hierarchical, whereas tags are better suited for searches on other sites such as Technorati. It’s also important to note that categories are not tags, but tags can be categories.

Over the next few weeks, I’ll be looking to incorporate a better category structure on my blog and work on creating better tags. It’s always fun to learn new things when trying to teach others.