Aggregated online interactions

This blog hasn’t seen much action lately, but that’s a misrepresentation of my online interactions. Most of my interaction in the past few months has been on Stack Overflow Q&A, and some on Stack Overflow “Documentation” as well as a small amount on GitHub. I wanted to aggregate some of those interactions on my blog, as well as perhaps cross-post bits and pieces here, mainly for my own reference.

Let’s start with the first: aggregating the bits and pieces that I want to have easy links to.

Stack Overflow Documentation

  • Showcasing all common Angular constructs“. I’m linking to the most up to date version. I wrote V1 of that article, which was subsequently improved by various other folks. It’s the tutorial (and equally important: the style of tutorial) I wish I’d had when I started learning Angular.
  • KnockoutJS “Equivalents of AngularJS bindings“. Linked page summarizes the state SO Documentation is currently in, at least for low-traffic tags: little and poor collaboration, and some frustration because some decent examples I wrote just don’t get reviewed (neither approved nor rejected). Thinking I might turn my content there into a (series of) blog post(s) here. Not sure yet.

Stack Exchange Q&A

At around 20 questions and 200 answers in 2016 so far I’d say I’m “moderately active”. Here’s a few that stood out when I browsed through my recent history:

I also gave SoftwareRecs.SE another shot, posting some questions, but they fit right into my question history: lots of unanswered tumbleweeds. And not for lack of trying, as I spend a lot of effort on making my questions there as good as they can be. The main reason I do that (and the reason I keep coming back to softwarerecs.se, in spite of the tumbleweed-factor) is that thinking carefully about your wishes and requirements at the least will help you find something yourself, if no-one else recommends anything.

And even though I haven’t interacted with Cooking.SE much lately, every stray upvote now and then to my “Cooking fish in a dishwasher” answer makes me smile.

GitHub

I don’t interact as much here yet as I’d like. I specifically wish I remembered more often than a measly four times to create gists, because the ones I did create are ones I tend to go back to. In addition to gists, I’ve gotten to creating only very few issues and pull requests, something I want to work on.

One shoutout by the way to the DefinitelyTyped repository, because that community has to deal with a really scattered committer base, and seem to do so pretty well. My pull request (though small) was reviewed and merged quite quickly.

In Closing…

What to do next? The tags I followed on Stack Overflow for answering seem to have dried up a bit. Perhaps some more interaction on GitHub, as well as re-editing some of the above links into blog posts? Then again, a few weeks of vacation to Hawaii are coming up as well, so it might be a while again before posting…

CSS syntax naming conventions – REDUX

I’ve blogged about CSS naming conventions before. The Stack Exchange question I referred to then has since been closed (for understandable reasons). However, it recently also started gathering “delete” votes. Given that I don’t have enough reputation to see deleted posts on Programmers.SE, I intend to salvage up front whatever info was in that post and it’s answers here.

So, here’s the redux version of my post, along with the answers. If anything, this’ll be a good excercise in following the cc-by-sa license from Stack Overflow.


Question: what are the practical considerations for the syntax in class and id values?

Note that I’m not asking about the semantics, i.e. the actual words that are being used. There are a lot of resources on that side of naming conventions already, in fact obscuring my search for practical information on the various syntactical bits: casing, use of interpunction (specifically the - dash), specific characters to use or avoid, etc.

To sum up the reasons I’m asking this question:

  • The naming restrictions on id and class don’t naturally lead to any conventions
  • The abundance of resources on the semantic side of naming conventions obscure searches on the syntactic considerations
  • I couldn’t find any authorative source on this
  • There wasn’t any question on SE Programmers yet on this topic :)

Some of the conventions I’ve considered using:

  1. UpperCamelCase, mainly as a cross-over habit from server side coding
  2. lowerCamelCase, for consistency with JavaScript naming conventions
  3. css-style-classes, which is consistent with naming of css properties (but can be annoying when Ctrl+Shift+ArrowKey selection of text)
  4. with_under_scores, which I personally haven’t seen used much
  5. alllowercase, simple to remember but can be hard to read for longer names
  6. UPPERCASEFTW, as a great way to annoy your fellow programmers (perhaps combined with option 4 for readability)

And probably I’ve left out some important options or combinations as well. So: what considerations are there for naming conventions, and to which convention do they lead?


Amos M. Carpenter answered:

Bounty or not, to some extent the choice will always be a “matter of preference” – after all, how would you feel if the W3C recommended (or even imposed) a certain convention that you didn’t feel was right?

Having said that, though, I personally prefer the lowerCamelCase convention, and I’ll give the reasons and practical considerations I’ve used to make up my mind – I’ll do so by a process of elimination, using the numbering from your question:

(5.) justnoteasilyreadablebecauseyoudontknowwherewordsstartandend.

(6.) ASABOVEPLUSITSANNOYINGLIKESOMEONESHOUTING.

(4.) historical_incompatibility_plus_see: Mozilla Dev Documentation.

(3.) a-bit-trickier-to-explain… as you mention, selectability in text editors is one issue (as with underscores, depending on the editor), but for me it’s also the fact that it reminds me of the syntax reserved for vendor-specific keywords, even if those start with a hyphen as well as having words separated by them.

So this leaves your (1.) and (2.), UpperCamelCase and lowerCamelCase, respectively. Despite the mental link to Java classes (which are, by a more clearly defined convention, UpperCamelCase), CSS class names seem, to me, to be better off starting with a lowercase letter. Perhaps that is because of XHTML element and attribute names, but I guess you could also make the case that having CSS classes use UpperCamelCase would help to set them apart. If you need another reason, lowerCamelCase is what the W3C uses in examples for good class names (though the URL itself, annoyingly, disagrees with me).

I would advise against (4.), (5.) and (6.), for the reasons stated above, but suppose that arguments could be made for either of the other three.

Whether or not you (or anyone else for that matter) agree with me on this matter is up to you though. The fact that you haven’t got a definite answer quoting authoritative sources by now can be taken as a hint that there isn’t such a thing as a definite standard on this issue (else we’d all be using it). I’m not sure that’s necessarily a bad thing.


Emanuil Rusev answered:

Words in CSS class names should be separated with dashes (class-name), as that’s how words in CSS properties and pseudo-classes are separated and their syntax is defined by the CSS specs.

Words in ID names also should be separated with dashes, to match the syntactic style of class names and becaus ID names are often used in URLs and the dash is the original and most common word separator in URLs.


tdammers answered:

It’s mostly a matter of preference; there is no established standard, let alone an authoritative source, on the matter. Use whatever you feel most comfortable with; just be consistent.

Personally, I use css-style-with-dashes, but I try to avoid multi-word class names and use multiple classes wherever possible (so button important default rather than button-important-default). From my experience, this also seems to be the most popular choice among high-quality web sites and frameworks.

Lowercase with dashes is also easier to type than the other options (excluding the hard-to-read nowordseparatorswhatsoever convention), at least on US keyboards, because it doesn’t require using the Shift key.

For id’s, there is the additional practical consideration that if you want to reference elements by their ID directly in javascript (e.g. document.forms[0].btn_ok), dashes won’t work so well – but then, if you’re using jQuery, you’re probably going to use them through $() anyway, so then you can just have $('#btn-ok'), which makes this point mostly moot.

For the record, another convention I come across regularly uses Hungarian warts in ID’s to indicate the element type, especially for form controls – so you’d have #lblUsername, #tbUsername, #valUsername for the username label, input, and validator.


asfallows answered:

I strongly believe the thing that matters most is consistency.

There are two ways to look at this:

  1. A good argument can be made for alllowercase or css-style-clauses (probably the better choice) because they will be the most consistent with the code they’ll be in. It will lend a more natural flow to the code overall and nothing will be jarring or out of place.
  2. An equally good argument can be made for a style that is distinct from HTML tag names or CSS clauses, if it will differentiate IDs and classes in a way that aids readability. For example, if you used UpperCamelCase for IDs and classes, and didn’t use it for any other construct or purpose, you would know you had hit on one every time you saw a token in that format. One restriction this might impose is that it would be most effective if every ID or class were a 2+ word name, but that’s reasonable in many cases.

In writing this answer out I came to find that I’m much more inclined toward the second choice, but I will leave both because I think both cases have merit.

Stack Exchange Challenge: Full-time

I’ve finished my self-imposed Stack Exchange challenge. What a great feeling: finishing things. Only one thing left on my to do list: create a small epilogue. And this is it.

The epilogue is going to be short, using the same format as the half-time post: a wrap up with links to all the bits of this series.

  1. Episode 1: Cooking Stack Exchange Challenge (March 20th, 2012)
  2. Episode 2: Programming Stack Exchange Challenge (April 2nd, 2012)
  3. Episode 3: Gaming Stack Exchange Challenge (May 14th, 2012)
  4. Episode 4: Android Stack Exchange Challenge (June 20th, 2012)
  5. Episode 5: User Experience Stack Exchange Challenge (September 9th, 2012)
  6. Episode 6: DBA Stack Exchange Challenge (October 8th, 2012)
  1. Episode 7: Area 51 Stack Exchange Challenge (May 13th, 2013)
  2. Episode 8: Area 51 Discuss Stack Exchange Challenge (June 30th, 2013)
  3. Episode 9: Meta Stack Overflow Stack Exchange Challenge (August 12th, 2013)
  4. Episode 10: Stack Overflow Stack Exchange Challenge (September 11th, 2013)

And that’s all I have to say about that. Time for a new challenge?

Episode 10: Stack Overflow Stack Exchange Challenge

So here it is, the final episode of the self-imposed Stack Exchange Challenge, detailing my journey through the network of Stack Exchange sites. It is the site I first got involved in, and also the site where I’m most active.

With this final episode it’s time to dig into the meaty bits of the network.

What is Stack Overflow?

Stack Overflow is the brainchild of IT guru’s Joel Spolsky and Jeff “CodingHorror” Atwood. They created it in 2008, and since then it has pushed just about everybody from search results for any typical programming question (well, except for w3fools perhaps). It is a community-driven site where you can ask and answer programming questions, but with a few twists:

  • A hint of Wikipedia: editing your own and other’s questions and answers to improve them;
  • A dose of gamification and Reddit: voting for questions and answers, reputation and badges to be earned, etc;

Only after its overwhelming success did the creators decide to use the engine for other topics as well, some of which I’ve discussed in previous episodes.

So basically Stack Overflow is the first and the biggest site in the network. Time to get to it.

Current Statistics

Here are the stats for Stack Overflow:

Fact Stack Overflow
Questions 5,678,329
Questions with no upvoted answers 1,275,254 (22.46%)
FAQ (questions with most links) 580,632
Top 3 questions 5593 votes, 3576 votes, 3345 votes
Questions active last hour 900
All-time rep for top 3 users 602.6k, 460.7k, 418.9k
Meta questions 18,960

Wow! Truly the biggest site.

My Questions

I’ve asked many more question than those showing on my profile page. However, with programming, you often find the answer yourself while asking. If the answer makes the question look silly, I don’t post it (though if it’s worth answering I document it anyways). From my questions, here’s a few that are interesting:

The ticker’s at 19 currently, versus 377 answers. I think that’s the ratio I’ll probably stick at.

My Answers

I’ve answered a total of 377 questions, and counting. Some that stand out:

Looking back at my answers, I seem to shun the blockbusters, and stick to helping with smaller and more individual questions. But that’s okay. Answering is my form of kata’s.

Interesting questions

Oh dear. I’ve seen too many interesting questions, really. Some are great but not really a good fit for Stack Overflow, like “Strangest language feature“, or “using tables for layout“. One typical question (on parsing HTML with regexes) has an epic answer spawning the “Tony the pony, he comes” meme.

Just browse the questions-by-votes or even closed-questions-by-votes for a few interesting reads.

Conclusion

This is a great site. It was the start of a great network of sites (even though not every site in the network works equally well). But hey, preaching to the choir probably: if you’re a programmer there’s no way around Stack Overflow anymore.

And I don’t mind at all.

Episode 9: Meta Stack Overflow Stack Exchange Challenge

This is the second-to-last episode in my Stack Exchange series, and it’ll be about the Meta site for Stack Overflow: the flagship site in the Stack Exchange network. A blog post about a meta site: that’s Meta For You.

What is “Meta” Stack Overflow?

It’s a place where you can discuss Stack Overflow and its sister sites. Jeff Atwood a.k.a. Coding Horror (one of the co-founders of Stack Overflow) long opposed having such a site at all, because discussion leads to internet maddness. He finally turned after he saw the error of his ways. The community has mostly proven herself and built a great meta site.

Current Statistics

Let’s go straight to the nitty gritty!

Fact Meta.SO
Questions 54,154
Questions with no upvoted answers 6,179 (11.41%)
FAQ (questions with most links) 18,493
Top 3 questions 1222 votes, 1027 votes, 659 votes
Questions active last hour 6
All-time rep for top 3 users 226.7k, 157.8k, 96.0k
Meta questions n/a

That’s a lot of content! Some additional interesting facts:

  • The most-used tag is [discussion], a whopping total of 20,949 questions (39% of total!).
  • After that, tags 2, 3 and 4 in ranking are -as expected- [feature-request], [support], and [bug] respectively.
  • The fifth tag with 7,239 questions is [status-completed], which is 13% of total and a respectable 50% of all [feature-request] tagged questions.

All in all a very active site.

My Questions

Much to my own surprise I apparently have asked 10 questions at the time of writing. The top one is a decently upvoted feature-request (NotImplementedException), but I guess all my questions are rather boring: minor bugs and that kind of thing.

One question that stands out a bit: the one with a whopping 9 downvotes. My intentions were good, but the community apparently hates the Fastest Gun In The West vigorously.

My Answers

Again, my participation is much higher than I remembered. Mostly boring stuff again too, with a few minor suggestions on bugfixes and feature-requests. The only one I’m mildly passionate about is on using italics: semantics over style any day!

Interesting Questions

One of the most interesting questions is one that’s deleted. There used to be a question on “What Stack Overflow Is Not”. An old version can still be found using the WayBackMachine. It was a controversial move to delete it, somewhat abrupt, but turned out for the best in my opinion. You can read the explanation here.

Community Wiki

This is actually a great list of questions, explaining the most curious features of the Stack Exchange system, often in great detail. It’s slightly awkward to format a help center using this Q&A system for everything, but it does leverage the Stack Exchange engine pretty well to get community involvement.

Conclusion

This is a very active site. The community obviously loves the place. I think it’s a great place for its purpose, but I try to spend as little time as possible on Meta: the “real” sites are far more interesting.

Episode 8: Area 51 Discuss Stack Exchange Challenge

In the previous episode I discussed Area 51, the staging area for new Stack Exchange sites. This episode is about Area 51’s meta site: “Discuss“.

What is “Discuss” Area 51?

The site shares its FAQ with Area 51 itself. The relevant bit of that page describes “Discuss” as:

For more extensive deliberations and discussions regarding the proposal as a whole, we have a separate Discussion Zone.

So where the proposals themselves should have the small and detailed discussions, “Discuss” is the place to discuss bigger issues.

Current Statistics

As I see it there are three different types of tags on the “Discuss” site:

  1. Category tags (“technology”, “culture”, “science”, etc)
  2. Typical meta tags (“status-completed”, “status-declined”, etc)
  3. Actual “discuss” tags (“area51-meta”, “proposal-scope”, etc)

The first one isn’t very interesting, because the popularity mirrors last episode’s statistics. The second one is really straightforward, and not really interesting either. What is interesting, is the last tag. Here are the stats for the top tags:

Tag Number of Questions
Area51-meta 381 questions
Discussion 197 questions
Proposal-Scope 128 questions
Merge-request 104 questions
Feature-request 68 questions

It may also be interesting to dig up statistics in the format I’ve used in earlier episodes on “normal” Stack Exchange sites, even though it’s comparing apples and oranges to some degree. Here goes:

Fact Discuss.Area51.SE
Questions 2,042
Questions with no upvoted answers 392
FAQ (questions with most links) 313
Top 3 questions 111 votes, 106 votes, 90 votes
Questions active last hour 1
All-time rep for top 3 users 14.5k, 13.9k, 13.4k
Meta questions n/a

Not a very active site, compared to other “normal” Stack Exchange sites.

My Questions

There’s a rather old question I asked in 2011, but that’s not all too interesting. What is interessting is something I can’t link to: I’ve asked two moderately controversial questions (as in: they got mixed and animated responses), but both of them are completely gone from the site. No waybackmachine, no Google cache, nothing. Probably intentional, and probably part of the Area51 process, but completely obscure to me.

Interesting Questions

By and large the most interesting question on Area51 Discuss:

The above is a list of one item, and that’s on purpose, because the above is a list of all interesting questions on “Discuss”…

Conclusion

It’s great that Stack Exchange tries to have an “open” process for creating new communities. However, the process and rules are obscure, and the “Discuss” site doesn’t help all that much. I guess that if you dive deep into Area 51 the “Discuss” site is great, but it’s not well suited for “light use”. Don’t think I’ll spend a lot of time there.

Episode 7: Area 51 Stack Exchange Challenge

Episodes 7 through 9 of this Stack Exchange Challenge will be all about meta-sites. First up: Area 51, the breeding grounds for new sites in the Stack Exchange Family. This episode will not follow the regular “Stats, My own Q&A, Interesting Questions” format, because this subsite is different.

What is Area 51?

The introduction on the site itself sums things up pretty good:

Area 51 is the Stack Exchange Network staging zone, where users come together to build new Q&A sites. New site ideas are proposed, discussed, and the best go on to beta.

Key word here is “users”. This refers to a subset of existing Stack Exchange users: those that take an above-average liking to the Q&A format of the Stack Exchange network. Folks (like yours truly) that leech and occasionally “commit” to actively participate to a new Q&A site, and folks that actually actively propose, monitor, and drive new proposals.

Current Statistics

It’s not possible to roll up statistics as I did in the other episodes, as there are no “Questions” in Area 51. However, there is one interesting statistic, which is the number of proposed Q&A sites by topic:

Topic Number of Proposals
Technology 208
Culture 104
Science 74
Life 70
Recreation 50
Professional 43
Arts 40
Business 27

As you can see, Technology is twice as big as the second-largest category. This is no surprise, because the largest Stack Exchange sites (which are the most obvious gateway to Area 51) are all tech sites.

All this has an interesting effect on Proposals, and on the sites that make it into beta and beyond. These sites, no matter what category they fall in, tend to draw these very tech-savvy users that roam Stack Exchange. This causes an unusually high degree of… well… geekness on those sites. I’ve contributed my fair share of geekness, and others have too.

Interesting Proposals

The default view shows the hottest proposals, which is nice because there’s a total of 616 proposed Q&A sites. I guess from those proposals a few are (as far as I know) interesting in one way or another:

  • Atheism and Agnosticism is interesting, because the same proposal has already been shot down twice. Much to my surprise, any trace to the old proposals has been erased.
  • Stack Overflow in (French / Hindi / Italian / Spanish / etc). Some of those have even been closed before and have been restarted. Glad I’m proficient in/at/with English.
  • Lockpicking! I’m currently committed to actively particpate if this site reaches beta. Purely recreational stuff, of course…

The above proposals are the ones that piqued my interest. Have a look yourself to see if there’s any you like. To each his own.

Conclusion

The basic idea behind Area 51 seems solid. The fact that the user base is not too diverse may not work in its favor though. Not that it matters to me: most topics improve with a touch of geekness to it as far as I’m concerned. I’ll be browsing the staging area every once in a while, and perhaps one day even participate in a beta.

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.

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.

Episode 5: User Experience Stack Exchange Challenge

User Experience Stack Exchange
User Experience Stack Exchange

One of the first Stack Exchange sites I found out about was User Experience. My interest in this topic was sparked long before, while I was in college. I found human-computer-interaction one of the more fascinating aspects of the particular “brand” of AI program that was taught at Utrecht University. So today it’s finally time to do a new episode of the Stack Exchange Challenge, on UX Stack Exchange.

Current Statistics

Let’s first roll up the stats for this particular sub-domain:

Fact UX.SE
Questions 5,278
Questions with no upvoted answers 42 (0.80%)
FAQ (questions with most links) 1,441
Top 3 questions 200 votes, 128 votes, 118 votes
Questions active last hour 2
All-time rep for top 3 users 26.7k, 18.8k, 15.4k
Meta questions 345

My Questions

This is where I struggled, the same way I had problems in the Programmers episode: it’s really hard to ask a question on this topic that’s not subjective. Here are the only two questions I mustered:

Even though I found it hard to formulate Stack Exchange worthy questions, I’m still pretty content with these two questions.

My Answers

It wasn’t until writing this post that I saw I already had written ten answers, and counting! Most of them don’t have more than one or two upvotes, except this one:

Honorable mention goes to my answer about the “Official JavaScript icon”. I gave that answer to prep myself for this blog post, but the question was closed as “off topic” before I even finished writing this post.

Interesting Questions

Here are a few entertaining questions from User Experience:

Community Wiki

The top question in this category is probably what you’d expect:

Conclusion

This site’s topic is great! Some of the questions are great! There are some really fundamental questions on there.

This site’s not very active. Only some of the questions are great. There are a lot of very “localized” quesions on there.

I’ll probably just keep lurking, hopping by every once in a while.