company May 22, 2008

Potential Markup and Editing Choices

Question and answer entry will be arguably the most crucial piece of stackoverflow. I used the post Is HTML a Humane Markup Language? as a form of collaborative research to determine what our Q&A; editor should look like. Based on the (extensive!) feedback, I’ve reached three conclusions: Most programmers want either an HTML subset or…
Avatar for Jeff Atwood
Co-Founder (Former)

Question and answer entry will be arguably the most crucial piece of stackoverflow. I used the post Is HTML a Humane Markup Language? as a form of collaborative research to determine what our Q&A; editor should look like. Based on the (extensive!) feedback, I’ve reached three conclusions:

  1. Most programmers want either an HTML subset or Markdown.

  2. Many prefer a formatting toolbar, although I view it as superfluous.

  3. Real-time preview of text formatting is an absolute must.

Good programmers never write what they can steal or borrow. With that in mind, I did some research and found the promising but unfortunately named WMD: The Wysiwym Markdown Editor from AttackLab.

wmd-advanced-demo1

I emailed AttackLab and John Fraser was kind enough to respond with a code drop. Apparently there’s going to be an open source release at http://wmd.googlecode.com/ any day now — it will also include a post-processing callback we can use to do syntax highlighting. Here’s a demo someone hacked together using WMD and a syntax highlighter:

showdown-demo

Adopting tools like these means we’d be very intimately tied to JavaScript on the client, of course, but it’s hard for me to see how that’s a problem on today’s web.

What do you think of these solutions? Would they work for you when posting programming questions and answers on stackoverflow?

Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

code-for-a-living July 5, 2021

Best practices for writing code comments

While there are many resources to help programmers write better code—such as books and static analyzers—there are few for writing better comments. While it's easy to measure the quantity of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.