[pmwiki-users] Rant: blogs/wikis/forums that include code snippets

Lucian Wischik lu.gmane at wischik.com
Tue Nov 28 19:26:08 CST 2006


I've been messing around with php and python in the past week, reading
lots of blogs and wikis and forums with small code snippets. Many of
them put the code into little scrollable windows:

  +--------------------------------------+
  | # Here is a code extract             |
  | # it does a little of what you want b|
  | # to scroll to see all of it.        |
  +<- [===] ---------------------------->+

I hate it! I never noticed it before, but I'm noticing it now, and
it's an awful design. Presumably people use it because otherwise
the code snippet would have too great a width, messing up the
aesthetics of their layout.

Well, the code snippet is almost always more important than the
aesthetics of the layout so you should show all of it, even if
it ruins the margins. People come to your blog to read the code,
damnit, not to admire the layout. If you're hindering the readibility
of the code just to preserve the aesthetics, then you've got
your priorities wrong.


That's my rant. I notice that pmwiki.org does things properly, and so
does pmwiki's default markup for embedding code. Good! But please,
if anyone here sees the irritating-code-box feature and decides to
add it, please think again.



That's my rant. Just had to get it out of my system!

-- 
Lucian






More information about the pmwiki-users mailing list