Oracle Scratchpad

Comments

Just a few notes about contributing. Please check the details about tags and formatting at the end. WordPress does some odd things with comment text.

Delayed comments

The blog is protected by Akismet, which tries to identify spam. As a consequence it is possible that a comment you post will not appear because it has been marked as ‘possible spam’. This is particularly likely to happen if you include a few URLs (such as Metalink, other blogs etc.) in the comment. If you post a comment that doesn’t appear within a few minutes send me an email and I will “despam” it as soon as I can.

Code Demonstrations

It’s becoming quite common to see code samples being used to demonstrate a point. The commonest presentation seems to be to run from an SQL*Plus session with set echo on so that the SQL and the response to the SQL alternate.

I actually prefer to see the SQL as a continuous script – its easier to view and I like to read through the script and predict the results before seeing them; so my approach is simply to paste the code then run the script with echo off and paste the results. Do take a look at the note below about spaces disappearing and how to deal with that problem.

Cross-chat

If you reply to someone else’s comment it’s a good idea to start your comment with their name in case another unrelated comment arrives between the original and your reply; remember though, that there is a “reply” link under each comment that allows comments to become threaded. It is also quite helpful to quote a line or two from the original if you are just commenting on a specific detail.

Losing text:

It’s been really difficult writing the following three sections on text appearance because the visual editor keeps mangling my carefully constructed examples as I switch between edit modes. If you see odd empty spaces in the instructions please drop me an email to let me know it’s gone wrong again.

Various problems appear because many of the normal html tags are removed by the comment editor. Most significantly, the <pre></pre> tags do not work although the <code></code> tags do persist – but they still lose whitespace.

WordPress recently introduced “sourcecode” tags – which have to be used in square brackets [] – which seem to preserve the spaces in comments, and make it easy for readers to copy the text into their clipboards, and this is the ideal mechanism for including code and text output in comments.

“Less than” in code:

If you start writing SQL in comments be careful about < symbols. Anything from one of these to the next > symbol will disappear when you publish. Due the popularity of using a connect by query against dual to create data, lots of people have seen the interesting bits of their code vanish. You need to replace the symbol with the text &lt; (including the semi-colon).

Spaces in Edits:

When you create a comment (in the theme I have used), all white-space is eliminated, and there doesn’t seem to be an easy way to stop this happening. However I have found that if I prepare the comment in a simple text-editor and do a ‘global find and replace’ to change spaces to the text &nbsp; (including the semi-colon) then I can get whitespace where I need it. In some cases I’ve alternated real spaces with the “no-break space” code by doing a global replace of pairs of spaces because otherwise the lines have got longer than WordPress likes.

Of course it’s a nuisance to do, and even more fiddly if you have tab marks in your text, but if you want to make a point about code or output it’s much more likely to be read by other people if you’ve managed to get the text alignment working. (But see the note about sourcecode tag above.)

Emphasis in Comments:

There are three possibilities that I’ve found to work so far:

  • em gives you italic script, as does the single letter i
  • strong gives you bold, as does the single letter b
  • h1, h2, h3, h4, h5 give you options for headings – h4 is a good size

In these cases you have to use the html tag syntax, for example: <em> to start the highlight, and </em> to end it.

Accidents:

There doesn’t seem to be a preview option available (with this theme, at least), so if you do have an accident when entering a comment, remember that I can edit or delete your comment. So if you have to “finish” off a comment that you published by accident, you can either type the whole thing in again – and I’ll delete the earlier copy; or you can create an ending section – and I’ll cut and paste the two bits together for you..

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Comments and related questions are welcome.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by WordPress.com.