Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm toying with starting an occasional blog for posting odd bits of coding related stuff (mainly C++, probably).

Are there any platforms which can be recommended as providing exceptionally good support (e.g syntax highlighting) for posting snippets of code ? (Or any to avoid because posting mono-spaced font blocks of text is a pain).

Outcome: I accepted Josh K's answer because what I actually ended up doing was realizing I was more interested in articles than a blog style, getting back into LaTeX (after almost 20 years away from it), using the "listings" package for code, and pushing the HTML/PDF results to my ISP's static-hosting pages. (HTML generated using tex4ht). Kudos to the answers mentioning Wordpress, Tumblr and Jekyll; I spent some time looking into all of them.

share|improve this question
4  
I think this is better suited for webapps.stackexchange.com since all your looking for is syntax highlighting – TheLQ Oct 10 '10 at 20:00
1  
Thanks for the link (for us lazy people), perhaps I had confused that site with one for web programming. – Mark C Oct 10 '10 at 20:45

closed as off topic by gnat, Walter, Jim G., ChrisF Dec 19 '12 at 14:04

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

8 Answers

up vote 29 down vote accepted

Make your own

And include Prettify.

Reasons for:

  • You know what you're doing.
  • You understand the innerworkings
  • Why not?
  • Pick and choose what you want. Want comments? Done. Want built in caching? Done. Don't want images? Done.
  • Code highlighting / formatting is easy. Wrap your <code> blocks in a <pre> block and format.

Things I did on my blog

Link to said blog

  • MongoDB for storage. Flexible, quick, and above all uncomplicated database backend. Comments, tags, everything is stored inline which rids yourself from needing the multiple tables and joins that MySQL or PostgreSQL need.
  • Comments
  • Markdown format. This is a godsend from having to actually write the markup and work with it. Super easy code blocks, quotes, lists, or anything else.
  • Tags
  • Post downloads
  • Anything else you might want to add.

If you don't want to make your own, I would suggest Moveable Type or Jekyll as two alternatives. I would put my own on this list but honestly don't think it's ready for public consumption at the moment.

share|improve this answer
6  
JoshK. Looks like you really enjoyed to make it. If you can afford to build it AND maintain it, then +1. – user2567 Oct 10 '10 at 18:41
@Walter: I had retracted the downvote. – Josh K Oct 10 '10 at 19:05
I'll have to try out Moveable Type sometime – WalterJ89 Oct 10 '10 at 19:18
1  
@WalterJ89 your reason for downvoting him included that he downvoted you. – alternative Oct 10 '10 at 20:39
3  
+1 because I did the same. In addition to the benefits listed above, you can also write posts about how you build the blog ;-). – Pavel Shved Oct 10 '10 at 21:19
show 8 more comments

Wordpress with WP-Syntax plugin

need I say more?

EDIT Victor Hurdugaci mentioned SyntaxHighlighter Evolved which is another option

share|improve this answer
1  
+1 WordPress was my answer (I'm removing it) – user2567 Oct 10 '10 at 18:19
4  
@JoshK WordPress is great. It's so simple, it's my prefered choice to "start something". Every times I needed a functionnality, I found it in the plugins directory. I have no bad experience with it yet. That was not the case of many others I tested. You can't maintain your own blog engine. You don't have the time to waste in that. – user2567 Oct 10 '10 at 18:29
3  
@JoshK If I can use my time at something more valuable or enjoyable, yes it's a waste of time. In my case coding a blog engine is a waste of time, because during that time, I can't write code on project I'm interested in (such as Arduino based system, I'm currently spending time on). It's not a blogging engine. However, I can understand you do enjoy coding a blog engine, so in your case, it's not a waste of time. It's full pleasure and your statement is now correct. But in YOUR case. Not mine, and maybe not WalterJ89 or timday. – user2567 Oct 10 '10 at 18:36
2  
@JoshK, I love your giant saw thing ;) You made my day. – user2567 Oct 10 '10 at 19:02
3  
@Josh - no time to waste maintaining his own blog engine doesn't even remotely demonstrate that he's not interested in coding. Writing your own blog engine would be a fun project for some people, sure, but fundamentally, you're really reinventing the wheel, and I daresay many enthusiastic programmers would rather do something new in a personal project. – Carson63000 Oct 10 '10 at 22:08
show 23 more comments

TUMBLR! I feel that this platform, allows for the haphazardness of blogging when programmers come to mind. They can post interesting links and cool code snippets as well as share with other programmers.

I would for sure give tumblr a look.

share|improve this answer
2  
Use Tumblr's markdown editor. It's not very fancy (no live preview or keyboard shortcuts), but it works. Also, edit your theme to include the Prettify library. – squirrel Nov 17 '12 at 19:38

I use Github's Gist and embed it to my tumblr and blogger posts... you can use it everywhere.

Examples:

http://igordevlog.blogspot.com/2011/01/haskell-vs-python.html

http://mightbetoolate.tumblr.com/post/2741366776/python-vs-haskell

share|improve this answer
I signed up for a Tumblr account and tried this suggestion and it does not work. – djangofan May 3 at 20:17

I don't really blog on programming matters, but a colleague swears by Windows Live Writer with the Paste from Visual Studio plugin. He coded up his own blog, but Live Writer supports several of the major hosts (Wordpress, Blogger, TypePad, etc.).

Not sure if that's relevant to you, but for Windows/.NET people, it's pretty sweet.

share|improve this answer
That's really useful for me, thanks :) – Ian Feb 8 '11 at 12:33

I use Jekyll. It's simple, especially if you don't mind using JavaScript for small bits of dynamic content, and with Pygments it does excellent syntax highlighting.

share|improve this answer
1  
As a plus, github can act as a free hosting for your Jekyll site. pages.github.com – ejel Mar 15 '11 at 16:48

For a free site (Wordpress.com, Blogspot, etc.) you can embed gists. They won't show up through RSS readers (dunno if there's a way around that), but posts accessed through your site will have them in with proper syntax highlighting.

Edit: the free hosted version of Wordpress now supports syntax highlighting without workarounds with gists.

share|improve this answer
Thanks for the link! – Mark C Oct 10 '10 at 21:50

You can try this: http://www.codeshelve.com

You can start a blog of your own there. This Codeshelve product is in active development, so there are some new rich features that will come up in near future.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.