We have added the SyntaxHighlighter plugin for WordPress. No more screen shots for coding tutorials. All code will be displayed in tables and most code will have decent syntax highlighting. You will also be able to copy and paste the code if you wish to. We are still testing this plug-in so if you see anything strange let us know. The plug in does line numbers, but the way we write tutorials you are not going to want to pay attention to the line numbers. For example, we will give you the first part of the code, which will start on line 1, then the next step will also start on line 1. I don’t think this should cause any confusion, the tutorials will be followed the same way, but they should be easier for you to work with now. We look forward to writing some great coding tutorials. I have included a preview of the syntax highlighting below.
Visual Basic:
' A "Hello, World!" program in Visual Basic. Module Hello Sub Main() MsgBox("Hello, World!") ' Display message on computer screen. End Sub End Module
Html/Xhtml:
<html> <head> <title>Hello World</title> </head> <body> <h1>My first page</h1> <p>This is my first webpage. <a href="link.html">I even made a link</a></p> </body> </html>
PHP:
<?php fwrite(STDOUT, "Please enter your name\n"); // Read the input $name = fgets(STDIN); fwrite(STDOUT, "Hello $name"); // Exit correctly exit(0); ?>
Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.