views:

88

answers:

3

I've since long wanted a place I can toss my programming related nuggets at. Every day I feel I solve something that I'll surely hit again in a not so distant future, but by then I most certainly will have forgotten about the previous solution I came up with.

So I need to blog it down, quick and dirty, for my own documentation and memory's sake.

  • Must be easy to set up and use.
  • Must handle code syntax and highlighting gracefully for a number of languages, but mainly C# and C++.
  • Must be PHP-based, because that's what my host supplies.

I know and have used WordPress (not for code, though), but is it really what I want or need?

+4  A: 

Wordpress is by far the best solution in my opinion. Learning to build themes and extensions is easy considering the various resources and tutorials online. Use Wordpress, you'll learn to like it!

Raphael Caixeta
I think wordpress steals the show when it comes to blogging
Burt
@Raphael: Amount of extra effort needed to set it up for code display purposes?
Johann Gerell
None really. There are TONS of plugins that will allow you to do just that. Just look around, you'll definitely like it.
Raphael Caixeta
+2  A: 

Use Wordpress with a Geshi plugin. Geshi supports a ton of languages.

One Such Plugin - WP-SynHighlight

Noctrine
+1  A: 

I've always used WordPress for this and have had great results. If you go that route, there are two syntax highlighter plugins in particular I'd recommend looking into.

Syntax Highlighter Evolved
http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/

This one uses square brackets ([ ]) to denote your code blocks and provides line numbering, but you have to use the "copy to clipboard" or "view source" buttons it generates when copying more than one line of code, otherwise the line numbers get copied too. It's uses the SyntaxHighlighter Javascript package for the code highlighting.

Sample syntax
[css].foo {bar:'baz';}[/css]
[sourcecode language="plain"]your code here[/sourcecode]

WP-Syntax
http://wordpress.org/extend/plugins/wp-syntax/

WP-Syntax - my highlighter of choice for WordPress - uses <pre> tags to signify blocks of code. Like Syntax Highlighter Evolved, it also offers line numbering options, but with the distinct difference that the line numbers don't get selected when copying/pasting from code examples. WP-Syntax uses GeSHi for its highlighting.

Sample syntax
<pre lang="php">
$debug = print_r($foo, true);
$debug .= print_r($bar, true);
echo '<pre>' . $debug . '</pre>';
</pre>

Mike Branski