Stack Exchange Challenge: Half-time

Almost one year ago I started my own Stack Exchange Challenge: evaluating Stack Exchange sites while trying to contribute. Progress has been slow but semi-steady, and there are currently 6 episodes in the SE Challenge tag.

Wanting to finish this “challenge” somewhere in 2013 I’ve decided it’s time to make a plan. Here it is:

Done:

  1. Episode 1: Cooking Stack Exchange Challenge
  2. Episode 2: Programming Stack Exchange Challenge
  3. Episode 3: Gaming Stack Exchange Challenge
  4. Episode 4: Android Stack Exchange Challenge
  5. Episode 5: User Experience Stack Exchange Challenge
  6. Episode 6: DBA Stack Exchange Challenge

To do:

  1. Episode 7: Area 51 Stack Exchange Challenge
  2. Episode 8: Area 51 Discuss Stack Exchange Challenge
  3. Episode 9: Meta Stack Overflow Stack Exchange Challenge
  4. Episode 10: Stack Overflow Stack Exchange Challenge

So there you have it: I’ll be finishing up the coming weeks (possibly months) with the “special” Stack Exchange sites. I’ll update this post with links as I move on.

Boy, I love finishing projects!


Update September 2013: added links to the finished second half.

BattleTop

Exactly one month ago I wrote about Google Code hosting. At the time I wasn’t ready to divulge the project I was using to test it, but today’s different. Today, I have decided to put BattleTop in Beta!

BattleTop is a responsive single-page web application to assist in bookkeeping things like Characters, Initiative, Hit Points, Conditions, et cetera, during D20-based table top RPG sessions.

BattleTop Beta Logo
BattleTop Beta Logo

You can view it, clone it, and provide pull requests for it at Google Code. Mind you, it is still in beta, meaning there’s many rough edges and bugs to be found. I have been and will be dogfooding it during our own table top RPG sessions, so I’ll be sharing your frustrations about bugs and time permitting I will be fixing things.

The current list of features:

  • Track characters. Add and remove monsters, NPCs, PCs, and environment initiatives. You can also reset the list to the party, or to a blank, new list.
  • Track initiative. Keep initiative and initiative modifiers, sort the list by initiative, keep track of ready and delay actions.
  • Track conditions. Each character has its own list of conditions which you can add, remove or change, with a number of turns to it (so they wear off automatically).
  • Track hit points. Each character optionally has a number of hit points. You can deal damage or apply healing to change the hit point amount.
  • Save/Load. Using the LocalStorage API BattleTop will save your state every 5 seconds. If you navigate away or re-open the page on your next play session the old state will be there.

Note: because BattleTop extensively uses many modern features (html5 semantic markup, css3 features, modern JS such as LocalStorage), only modern browsers will be supported.

Here’s a general view of what it currently looks like:

 

BattleTop 0.9.0 Setup Mode
BattleTop 0.9.0 Setup Mode

 

BattleTop 0.9.0 Update Hit Points
BattleTop 0.9.0 Update Hit Points

The horrifying state of free Android initiative-keeping apps was what triggered me to create BattleTop. I’ve decided on a HTML5 app as opposed to a native app because (a) it would be easier for me to create something in a short amount of time, and (b) to keep it portable across devices and operating systems with little effort. Hopefully BattleTop will help or inspire others as well.

Google Code Hg Hosting

A few months back I wrote a short comparison of Hg Hosting Providers, followed by a post about CodePlex Hg Hosting. In the mean time I’ve also tested creating a Bitbucket project, but I’ve neglected writing a post about the experience. I may get back on that some time, but first I would like to share my more recent experience with Google Code.

Note that I’m not ready (read: “proud enough”) to share the actual project I’m hosting, as it’s still in (and may never leave) prototype status. Once it’s worth viewing, I’ll probably be doing a short blog post about the project itself.

Without further ado, let’s jump in!

Sign Up and Project Creation

In this case I’m not writing much about sign up. You need a Google account, which most folks will probably already have. If, like me, you are already signed in to your account, nothing more is needed here.

On to project creation, which was surprisingly simple. The process is one step total:

Creating a Google Code Project
Creating a Google Code Project

Very similar to the CodePlex project creation. To note the differences:

  • It’s not entirely clear in Google Code how the project name would become part of the project URL.
  • Source control at Google Code (understandably) excludes TFS.
  • Google Code asks you to label (tag?) your project at creation time.
  • Most importantly: Google Code requires you to pick a license at project creation time.

That last one is really the only difference from CodePlex, but a big one at that! With CodePlex you get a one-month “Setup Mode“, which means your project is private and you can still work out the details (including picking an appropriate license). This is a big plus for CodePlex, especially if (like me at the time) you’re creating your first open source project.

Importing the Existing Repository

Where I had some cautionary steps importing my existing repository the previous time around, this time I had only one, making a total of four steps to get my existing repo pushed to Google Code:

  1. Create a temporary “copy-paste-backup” of my (existing) repo folder.
  2. Clone the Google Code (empty) repo locally.
  3. Copy the existing repo into the empty repo.
  4. Push the repo.

Step one turned out to be superfluous. So, this is in fact easy as pie.

Google Code Features Overview

Here’s my first impression of the various features of a Google Code project:

  • Project home is what you see when you land on the URL of your project (which is in the format: http://code.google.com/p/project-name)
  • Downloads is where you can host releases you’ve built and packaged. Haven’t tried this feature yet, but it looks very straightforward.
  • Wiki feels a little odd, because you start at a table-based listing of all pages. Beyond that it’s just a basic wiki (with yet another syntax), that’ll do the job.
  • Issues are for tracking bugs and tasks. Haven’t tried this yet, but it looks both straightforward and barebones.
  • Source provides a way to browse the files, view a history of the changes, and check on any clones there may be. Not as fancy as -say- GitHub, but gets the job done.
  • Administer allows you to change just about everything you see in your project, and works quite okay.

The theme should be clear: everything in Google Code is no-nonsense. All important features for code hosting are there though.

Conclusions

This hosting provider is pushing the KISS principle to the max. Google Code gets the job done, but it is very barebones, at times even downright ugly. Great hosting, but it doesn’t leave me “WOWed”. With the same functionality but a more pleasant experience, I think I would prefer CodePlex.

Pivot vs Unpivot

When mnemonics and learning by heart fail: write a blog post! So here is my own personal “which is which” reference post about the Pivot and Unpivot operations. First things first:

 

Example of the pivot and unpivot operation

 

Using the great Scipio Africanus and Hannibal as puppets, the above example shows the two operations in their most basic form. The pivot operation would be along these lines in T-SQL:

The query above is also available as a SQL Fiddle, to toy around with it some more, as there are many more complex queries possible with these operations.

Enjoy!

Sassy Styles

In my previous post I ranted about the way the design community seems to violate the DRY principle. Let’s revisit the code (and Repeat the code, I know, I know):

What’s going on here? Well, to get to our beloved Em measurements, we apparently need a calculation based on our body’s font-size (24px) and the h1 target font-size (16px). This “would make future adjustments much, much easier”.

It’s not that I dislike this really, but more that I despise (having to do) this. We’re saying “1.5em” here, only we’re doing it twice.

Last week I’ve tried one of the solutions to this: SASS. And let me say, this feels like it could be love at first sight! With SASS, the above snippet will quickly transform into the following:

Much better, no? We’ve now only stated once what the font-size should be: a certain fraction × 1em. I’m a little bit disappointed about needing the “* 1em” there, but hey: it’s a great reason to ask another Stack Overflow question.

Anyways, SASS doesn’t stop here. It will add more improvements, one of particular importance to the above snippet. Consider this:

What’s up with the additional lines of code? Isn’t that extra code bloat? Well no, those lines help us achieve two very important goals:

  1. Our calculation is now much more meaningful, and will now truly “make future adjustments much, much easier”.
  2. We can reuse those variables in our style sheets. In the somewhat contrived example above it doesn’t really shine, but you can surely imagine this is a great benefit to the entire style sheet.

For my current pet project I’ve tried SASS in a feature branch, but I’ve already closed that branch: it was merged into the main branch after only a few hours. With this I’m indeed implying there’s a very friendly learning curve for SASS.

And yes: I’m also implying that you should try it for yourself! There’s many more nice features I haven’t even mentioned yet. And if I didn’t convince you, perhaps the two-page tutorial will!

Measurements in Responsive Design

My wife called me out for looking at CSS through a pair of Programmer’s Glasses™. She hastily added this could well be a Good Thing, and I suppose I’ll just interpret it as a compliment. In fact, I must say I agree, feeling more like a “developer” than a “designer”.

Let’s first look at how we ended up at this name-calling. Here’s a code snippet from Ethan Marcotte‘s book Responsive Web Design from the A Book Apart series:

He then goes on to state that:

I usually put the math behind my measurements in a comment to the right-hand side of the line, which makes future adjustments much, much easier for me to make.

At first glance, this makes sense. However, in the long run, this feels really weird to me: it smells like code duplication. The actual result and the calculation in the comment both express the “what“, just in different form. It reminded me of Clean Code, where a whole chapter is dedicated to comments, and I’d think this would fall under the Bad Comments section (“Noisy Comment”, perhaps?).

Now I’m currently thinking I must be wrong: everyone who is something in responsive design is generating this type of sample code. Maybe it is because I should read this kind of code like:

Both forms describe what the font-size should be. Form 2 is probably “best” from a Clean Code point of view (as it’s most descriptive), but unfortunately only form 1 is valid (plain) CSS. As a compromise both forms are kept.

So, what are the options for improving things? There’s at least a few I can currently see:

  1. Combine “Form 1 and 2”. Accept that you’ll need discipline to keep the measurement and comment in synch. This is what the Responsive Design community leaders seem to practice.
  2. Just use “Form 1”. You’ll loose (or never have) the benefit of understanding your measurement.
  3. Use a CSS pre-processor. There are Sass and LESS, the most well-known ways to introduce (among others) calculations in stylesheets.
  4. CSS3 modules. The CSS3 Calculations module introduces calculations, and the Variables module may even take this one step further (as far as preventing code duplication is concerned).

To be honest, this list is currently my reverse order of preference. I’d love for option 4 (the CSS3 modules) to become a success. Until then, I’m bound to investigate the CSS pre-processors, because option 1 and 2 are both crappy, in my opinion.

MCTS 70-513 (WCF) Study Plan (part 2 of 2)

This is part 2 in a series on the MCTS 70-513 exam. The first part is an introduction, the second part describes the study plan I followed to complete the exam.

There were two questions I wanted answered when I set out to study for the exam:

  1. How much time is reasonably needed to pass the exam?
  2. What materials are recommended and/or needed to pass the exam?

The first question was impossible to answer or to find an answer to. The second one was a bit easier, even though I had to filter the many suggestions to use Braindumps. Here is my answer to both.

Overview

Let’s kick off with an overview of the materials used, and provide an answer to question one:

Material Hours spent
MSDN Getting Started With WCF Tutorial 2
Book: Programming WCF services, 3rd Edition 35
Book: Windows Communication Foundation 4 Step by Step 47
Book: Microsoft .NET Framework 3.5- WCF Self-paced Training Kit 34
Stack Overflow: Reading and answering questions on [WCF] 30
Memorizing web.config’s system.serviceModel section 6
Reviewing All 70-513 Exam Objectives 36
Grand Total 190

If you’re going to create a study plan for yourself based on this, you should note the following:

  • These are pure study hours; breaks and such are not included.
  • This is what worked for me; no warranty given or implied!
  • I spent these hours mostly in the order above.
  • Before these hours I had zero experience with WCF, a wee bit experience with ASMX services, and quite a bit of experience with ASP.NET.

The great thing about these 200- hours: this is approximately what I estimated up front I’d need to get a passing grade.

Materials Used

Here are some miscellaneous details about the abovementioned materials.

Programming WCF ServicesProgramming WCF services, 3rd edition

This book by Juval Löwy is widely considered the most in-depth book about WCF. It explicitly focuses on the things the author deems important, leaving out (or just barely mentioning) the esoteric or “useless” bits of WCF. When studying for something I prefer to get in over my head, and slowly fill in the gaps. If you prefer to build up your knowledge steadily instead of doing a deep-dive: save this book for last.

Windows Communication Foundation Step-by-StepWindows Communication Foundation 4, Step by Step

This book was probably the worst but most complete tour you could get for WCF. It takes you along most of the features with practical excercises, but is horrible in explaining things (even mis-informing at times). The worst part about this tour is the fact that you have to follow the tour guide to the letter, otherwise you’ll get lost without any clue how to get back on track. Glad I read the other book first, which allowed me to understand what this tour guide was showing me.

WCF Training KitWCF 3.5 Self-paced Training Kit

There is no .NET 4 version of the WCF training kit (makes you wonder how invested Microsoft is in this technology, huh?). Instead, most fora recommend just grabbing the 3.5 version. This book is very decent, has topics chopped into nice small chunks, offering a mix of theory, exercises, and training questions. It also was very complementary to the book by Juval Löwy.

Stack Overflow

Answering questions on the various Stack Exchange sites is one of my current hobbies. It made sense to practice and test my WCF knowledge by answering questions, and I can highly recommend it as a form of study! It was based on the slogan: “If you want to get good at something, start teaching it!“. Words of wisdom.

Memorizing <system.serviceModel>

Okay, maybe not one of the brightest ideas I had. It did act as a general review of WCF, but in the end it didn’t feel worth it. I suggest you spend your time on something else.

Reviewing the Exam Objectives

This was crucial to passing the exam. I printed all the objectives, and went through each letter of it, making sure I knew exactly what each and every item was about. I reviewed every topic by at least looking it up in one of the books I had, and often enough I also went on to read more about it on MSDN. This exercise was useful not in the least because there were some objectives on the list that weren’t even mentioned in any of the books.

In Conclusion

There’s a lot about the 70-513 exam that understandably lures folks to using those brain dumps. The most important things to mention:

  • WCF is a vast topic, boring in many aspects. Given that you’ll only use a small subset of WCF.
  • Questions on the exam are horrible, with things like “In which namespace does class X reside?“.
  • The exam on itself tests factual knowledge and not in the slightest practical proficiency.

Yet still I’m glad I finished and passed without resorting to “cheating”. The above study plan is what did the trick for me. Maybe it’ll help someone else too.

MCTS 70-513 (WCF) Study Plan (part 1 of 2)

This is part 1 in a series on the MCTS 70-513 exam. The first part is an introduction, the second part describes the study plan I followed to complete the exam.

A few months ago I started studying for the MCTS 70-513 exam on Microsoft WCF (web services). Before I started I had already heard of a phenomenon I knew under the name “TestKing”: test-questions to prep you for the actual exam. As I found out, “TestKing” is just one of the more well-known Brain Dump providers: cheat sheets with just about all the possible questions you may get on your actual exam.

Microsoft Learning logo Turns out a lot of people use these prep sets, usually as a companion to quite a bit of study time. They ginormously improve your chances of passing the exam, partially because they shield you from (amongst others) the utterly worthless type of question: “In which namespace does BadAssClassXyz live?”. In fact, it seems you can pass an exam with nothing else but about 20 hours of cramming those brain dumps.

Early on, I decided I would try to get the certification without using brain dumps.

Okay, glad I got that decision out of the way. Time to make a plan of attack, time to find out how much study time would be needed to pass the exam without resorting to cheating. So I hit up a typical Google query, but that turned up nothing. Following that I searched Programmers.SE, finding only this meagre question which just links to companies providing test exams or brain dumps. In the end, the only thing remotely useful was a blog post I didn’t find until one week before my exam date: this overview of MSDN links for reviewing the exam objectives.

Turns out, nobody knows, or at least nobody has posted online how much time studying for MCTS exams typically takes. Is it 40 hours? Maybe 150 hours? Or even a 1000 hours? Sure, the answer will always be “it depends” to some degree, but if only someone had posted how much time it took him/her this could help get a general idea.

So I decided to diligently keep track of my study hours, and publish them on my blog once I had passed my exam. By now I’m the proud owner of an MCTS 70-513 certificate. So stay tuned for part 2 in this series, where I’ll post the study plan actuals that turned out to be good enough for me.

Read on for part 2, detailing the study plan.

Episode 6: DBA Stack Exchange Challenge

Database Administrators Stack Exchange
DBA.SE

Here’s a short episode in the Stack Exchange Challenge, for Database Administrators. It’s a weird one in the eco-system in my opinion. When you first hear about it this would seem like a great and vast topic to ask and answer questions about, but in reality it turns out this one’s not all that active. But lest I start with a conclusion, let’s first dig up the facts!

Current Statistics

Here are the usual stats for this particular sub-domain:

Fact DBA.SE
Questions 8,660
Questions with no upvoted answers 767 (8.86%)
FAQ (questions with most links) 1,619
Top 3 questions 130 votes, 74 votes, 64 votes
Questions active last hour 9
All-time rep for top 3 users 38.0k, 28.9k, 21.7k
Meta questions 245

My Questions

So far I’ve asked three questions on DBA.SE, and I’m moderately pleased with all of them:

That last one didn’t draw much response at first, so I took my chance to explore the bounty system some more. This worked perfectly, because someone was triggered by this to give me the answer I was looking for.

Related to my own questions there’s one more important thing to mention. This is the thing that triggered me to do an episode on the DBA site: the @StackDBAs Twitter engine tweeted a great question by a good friend of mine, on using the “sp_” prefix for stored procedures. It’s great to see something from a friend pop up in your Twitter feed via an unexpected angle!

My Answers

Yeah, well, ermm… still working on that. No answers so far. Weird thing is: most of my Stack Overflow reputation comes from answering DBA-related questions. But the questions on DBA are not very voluminous, and often also out of my league. Oh well.

Interesting Questions

Here are a small few gems with a lot of votes:

Community Wiki

Hmm, there aren’t any real great questions in this category that stand out from the bulk.

Conclusion

The main problem with this site is that people will probably prefer to ask their DBA questions on the subdomains that are more likely to generate a lot of views and answers: Stack Overflow and ServerFault. So let me summarize the pro’s and cons of this particular Stack Exchange:

Great, friendly community
Usually fast answers
Not very active
Askers seem to opt for asking on Stack Overflow or ServerFault instead

Bottom line: great community, not so great content (relative to other Stack Exchanges). Alas.

World of Guild Wars

Asura in Guild Wars 2
Asura in Guild Wars 2

Recently I mentioned there’s just so much to do (in a good way). One of the items on that list I didn’t even pick up, even though I was expecting to be sucked into the thing: Mists of Pandaria, the new World of Warcraft expansion. Instead, the alotted time for WoW went into Guild Wars 2, just because it’s more fun than I expect the new WoW expansion to be.

The game’s even diverted my attention from Stack Exchange (and my corresponding challenge) to Reddit. After helping out my wife converting a Reddit post into a browser bookmarklet, I decided to post it on Reddit as a reply. A few days later I had an encouraging 50+ Reddit Karma. As you can imagine it was with lifted spirits that I decided to start another undoubtedly great post, bound to draw hundreds of Karma points. So I asked about Missing Guild Wars 2 Features, and harvested … a wopping zero points!

Lesson learned? Not so much, I guess. That is, the post wasn’t really meant for Karma-grinding, but more to start a uservoice kind of thing: let ArenaNet know what things they should steal from WoW. Maybe the I didn’t even so much wanted to ask the question, as I wanted to answer it. So for your reading pleasure, here are some things I’d love for them to steal from WoW:

  • Dueling. Not for the top of a prioritized list, but still one of the first things that comes to mind.
  • Proper teamwork, especially in dungeons. Asked about it on Gaming Stack Exchange, and apparently instancing is mostly “soloing together”.
  • Would be nice to be able to mail your own alts, but apparently this isn’t possible (yet?).
  • Addons, plugins, and macros.
  • If the above isn’t possible I would love to see an official DPS Meter or something similar. Just for personal use, I just love optimizing my own playstyle.
  • More emotes! I find myself typing “/palm” and “/violin” just way too often.
  • A way to easily see map progress when you’re not on that map.
  • More different spells available. I loved having 40 different buttons to press when playing WoW.
  • Be more clear on the different roles players can fill. Currently this is too meager, and even though I don’t want or need the classic tank-healer-dps setup I still think GW2 can be clearer about its intentions here, in skills, the UI, etc.
  • End game raiding.
  • Monthly subscription fee and the horrific addiction level. No wait, the other way around of course.

“Wow”… glad I got that off my chest. Now back to enjoy the damn game!