Tag Archive | Wordpress

DannyBrown.net updated

DannyBrown.net on Mobile and Desktop

The website on both Desktop and Mobile platforms

Recently I’ve updated my website, dannybrown.net, to remove out-of-date information and make it easier for users to get to content they need.

Rather than having a list of projects I’ve completed and an over-the-top introduction the site now consists of a short introduction and a few rectangular tiles for commonly accessed information from the site — namely this blog, my CV, my LinkedIn profile and a contact email address. Any information that was previously on my website is in those resources.

In addition to the changes made on the client side I have also enabled IPv6, SSL and a Content Delivery Network via the free service provided by CloudFlare. IPv6 support will allow people who don’t have an IPv4 address to connect to my site without issues — which is important seen as we’ve technically ran out of IPv4 addresses. SSL will encrypt traffic between the user and my CloudFlare system and the Content Delivery Network will mean that my content is stored closer to the physical location of many international users resulting in faster download speeds.

On my server side I have also updated my configuration to allow for the use of dannybrown.net/cv and dannybrown.net/blog so you don’t have to remember dannybrown.net/cv.pdf and dannycomptuerscientist.wordpress.com respectively.

In the future I’m hoping to run this blog using the Ghost Blogging Platform hosted in the same Microsoft Azure instance as my static html website. This will allow me to have the same HTML/CSS theme on both and use all of the lovely features provided by Ghost. Currently I don’t think ghost is quite ready for my usage, due to the large amount of posts I have which have image galleries (which ghost doesn’t support) and the lack of two-factor authentication for logging in. However, these issues are currently being worked on and I hope to make the switch soon.

Danny

Posting Source Code on WordPress

I’ve posted a lot of non computer science blog posts recently, but this is supposed to be “the blog of a budding computer scientist!”. So here’s a post which I hope will help a few of my fellow computer science bloggers who use the WordPress blogging platform — which by the way is fantastic.

Quite often when I see blog posts that contain source code it’s formatted in an annoying way, doesn’t have any colour coding or in a worst case scenario is a screenshot of an IDE. It’s impossible for people to copy your code if you take a screenshot of it, and in my experience if you post your code online you want people to copy and adapt it for their own use.

On wordpress you could use <pre> tags in the HTML editor to make code boxes like the following:

//Here's some <pre> formatted code
public static void Main()
{
      Console.WriteLine("Hello WordPress");
}

Thats all well and good, it keeps the code seperate from the content of the blog post and gives it a different font and background colour to differentiate it as code, however those of us who are used to working in an IDE, such as Visual Studio, with its syntax highlighting may find it less friendly to read. This is where one of WordPress’ best features comes in.

The [ sourcecode ] tag allows you to post fully colour coded source code in a variety of languages including C#, C++, JavaScript and XML. It also adds some other features like line numbering,  code printing, copy to clipboard and view source — It looks like this:

//Here's some [ sourcecode ] formatted code
public static void Main()
{
      Console.WriteLine("Hello WordPress");
}

Much better!

All you have to do is wrap your code like so

[ sourcecode language="LANGUAGECODEHERE" ]
          //Code here
[ /sourcecode ]

Without the space in front of sourcecode (Which I’ve had to put to prevent WordPress from actually making it into a source code box). You then have to replace LANGUAGECODEHERE with the code corresponding to the programming language you are posting:

  • C#’s code is “csharp”
  • XML’s code is “xml”
  • PHP is “php”
  • Java is “java”

You can see all 29 codes at this helpful wordpress help page.

I hope this helps a few of my fellow CS bloggers! 🙂

Danny

Hull Computer Science on the ‘Net

Writing has become a bit of a UoH Computer Scientist past time recently with many more people joining the ranks of bloggers.

We’re frequently reminded how important it is to be “building the brand”, a phrase which refers to making yourself an attractive employee to potential future employers, because at the end of the day the outcome of higher education should be a better job.

A blog is a good way to show people that you’re passionate and knowledgeable about your subject and allows for feedback in the way of comments, allowing you to improve your communications.

Setting up a blog is pretty simple and can be cheap or free depending on how advanced your needs are. You can use a free blog on wordpress.com, or you can install and set your own up for free on Freeside, the universities open source server rack, this gives you more customizability and options but will require you to buy your own domain name to make it easy to get to.

Due to the sudden influx of bloggers it could have become a bit difficult to keep track of all the updates. In an effort to solve this problem my friend John set up HullCompSciBlogs.com which aggregates all of the blogs of University of Hull Computer Science Students into one place, including updates from my friends Nick, James, Charlotte, Christophe and John Himself as well as my flatmate and good friend Rob. You can of course also see my posts 🙂

So, head on over to HCSB and read some cool stuff!

Danny.