Archive | Blogging RSS for this section

I’m 90p up! Adverts on CS Blogs

Adverts on CSBlogs

Unfortunately it took 2 months to make that 90p!

Since Rob and I rebuilt CS Blogs in 2016 neither of us have really done a lot with it. Whilst I am accountable for some of the 3,000 monthly page views the most I have done with it operationally for some time has been to ensure that the servers & domain keep being paid for.

I think that at some point because of this I started seeing CS Blogs as an expense which I should try to break even on despite the fact that it started as a labour of love.

To try and recoup to small amount of money I throw at it each year I thought I could simply include the Google AdSense Auto Ad script and let that take care of monetisation.

Auto Ad itself is quite nifty and takes all of the effort out of adding adverts to your site whilst still giving you enough flexibility to tailor them to your content and audience. However, just plugging in adverts was somewhat low effort and so unsurprisingly didn’t yield good results. I would go so far as to say that adding adverts was a negative as it didn’t cover the CS Blogs bills but did have a negative impact on the user experience.

To put the matter right I have now removed all ads from the platform and will be taking another look at ways to improve both the software and the reach of the platform (perhaps by marketing directly to Computer Science departments around the UK).

If you’d be interested in helping with these efforts please get in touch.

Danny

DannyBrown.blog

I first created this blog in September 2011 in preparation for the start of my undergraduate degree — the idea being that I would chronicle my time at university both in terms of what I learnt and the fun I was having.

Not being able to get a wordpress.com domain using my name (there are 1,574 people in the US called Danny Brown according to the US Census Bureau) I stuck on the name “dannycomputerscientist”, perhaps somewhat presumptuously considering I hadn’t even started my Computer Science degree.

256 blog posts later I’m still here blogging about Computer Science but also about my hobbies and holidays. A change of domain name to something shorter, more memorable and easier to communicate made sense — so when I discovered that DannyBrown.blog was still available to purchase I jumped at the chance.

So for the time being I — reluctantly — remain on wordpress.com but now the blog is known as, and accessible by, dannybrown.blog.

I hope you continue to enjoy reading as much as I enjoy writing.

Danny

Computer Science Blogs Beta

CSBlogs.com Homepage - Desktop

Rob and I have both been doing a lot of work on CS Blogs since the last time I blogged about it. Its now in a usable state, and the public is now welcome to sign up and use the service, as long as they are aware there may be some bugs and changes to public interfaces at any time.

The service has been split up into 4 main areas, which will be discussed below:

csblogs.com – The CS Blogs Web App

CSBlogs.com provides the HTML5 website interface to Computer Science Blogs. The website itself is HTML5 and CSS 3 compliant, supports all screen sizes through responsive web design and supports high and low DPI devices through its use of scalable vector graphics for iconography.

Through the web app a user can read all blog posts on the homepage, select a blogger from a list and view their profile — including links to their social media, github and cv — or sign up for the service themselves.

One of the major flaws with the hullcompsciblogs system was that to sign up a user had to email the administrator and be added to a database manually. Updating a profile happened in the same way. CSBlogs.com times to entirely remove that pain point by providing a secure, easy way to get involved. Users are prompted to sign in with a service — either GitHub, WordPress or StackExchange — and then register. This use of OAuth services means that we never know a users password (meaning we can’t lose it) and that we can auto-fill some of their information upon sign in, such as email address and name, saving them precious time.

As with every part of the site a user can sign up, register manage and update their profile entirely from a mobile device.

api.csblogs.com – The CS Blogs Application Programming Interface

Everything that can be viewed and edited on the web application can be viewed and edited from any application which can interact with a RESTful JSON API. The web application itself is actually built onto of the same API functions.

We think making our data and functions available for use outside of our system will allow people to come up with some interesting applications for a multitude of platforms that we couldn’t support on our own. Alex Pringle has already started writing an Android App.

docs.csblogs.com – The CS Blogs Documentation Website

docs.csblogs.com is the source of information for all users, from application developers consuming the API to potential web app and feed aggregator developers. Alongside pages of documentation on functions and developer workflows there are live API docs and support forums.

In the screenshot below you can see a screenshot of a docs.csblogs.com page which shows a developer the expected outcome of an API call and actually allows them to test it, in a similar way to the Facebook graph explorer, live on the documentation page.

CS Blogs API Documentation

CS Blogs API Documentation

Thanks to readme.io for providing our documentation website for free due to us being an open source project they are interested in!

The CS Blogs Feed Aggregator

The feed aggregator is a node.js application which, every five minutes, requests the RSS/ATOM feed of each blogger and adds any new blogs to the CSBlogs database.

The job is triggered using a Microsoft Azure WebJob, however it is written so that it could also be triggered by a standard UNIX chronjob.

Whilst much of the actual RSS/ATOM parsing is provided by libraries it has been interesting to see inconsistencies between different platforms handling of syndication feeds. Some give you links to images used in blog posts, some don’t, some give you “Read more here” links, some don’t. A reasonable amount of code was written to ensure that all blog posts appear the same to end-users, no matter their original source.

Try it!

I welcome anyone who wants to to try to service now at http://csblogs.com. We would also love any help, whether that be submitting bugs via GitHub issues or writing code over at our public repository.

Danny

Introducing CSBlogs.com

CSBlogs.com Homepage

Between studying hard for my masters degree — and applying for jobs for when it ends — I have managed to find some time to set up a new website called CSBlogs.com

People who have been reading this blog for a few years will have seen HullCompSciBlogs.com mentioned a few times, for those that haven’t it was a service which aggregated all of the blog feeds of computer science students at the University of Hull.

John Van Rij did a great job of keeping that service online, but unfortunately doesn’t have time to maintain it anymore. Since the service went down I have grown to miss it — I guess I didn’t realise how much enjoyment I get from seeing how well everyone is doing from back in Hull — current students, alumni and even lecturers.

In order to resolve this problem I set up CSBlogs.com with the aim of getting all of the Hull Computer Science bloggers and others from around the country onboard.

The project is entirely open source, under the MIT license, and can be forked, modified and improved by the community on Github.

The website itself is hosted on Microsoft Azure and utilises CloudFlare to provide security, analytics and a global content delivery network. Node.js is used as the backend programming language and the MongoDB NoSQL database is used for persistent data storage. Nodes packages are used extensively, including Express.js for routing, Handlebars for data-binding to the front end and LESS-Middleware to improve CSS development.

Complicated acronyms aside I have worked hard to make setting up a local development environment and contributing source as easy as possible for beginners via the instructions I have written on the homepage of the Github repository. I would really recommend any 1st or 2nd year students give it a go — open source development looks great on your CV! And if you need any help contact me as per the instructions.

We are currently in the process of setting up all of the required frameworks and technologies and writing guides for how to get involved (this has actually been one of the more challenging and interesting parts of the project so far) and hope to have a working minimum viable product in the next week.

At this point I would like to thank Charlotte Godley, Alex Pringle & Rob Crocombe for their extensive help in getting the project to where it is now. Charlotte has taken on a role of project management, Alex has developed a rudimentary database controller and Rob has been working on implementing less.js support and developing a theme for the site.

I will keep the blog updated with progress on the project.

Danny

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

Hull CS Blogs Freshers Presentation

On Thursday morning Nick, John, Alex and I spoke to about 220 of the new first year computer scientists about blogging and the Hull CS Blogs platform. It was great fun and we received a lot of interest, we even ended up going to lunch with a few freshmen and making some friends, which  is always a bonus.

As a result we’ve actually gained 4 new bloggers, and had a few more people say they’re going to start, which is both good for them and us.

If you wan’t to download the presentation we showed off you can grab it from SkyDrive here.

Danny

Introducing Hull CS Blogs for Windows 8

This week I’ve been working on porting my Hull CS Blogs app for Windows Phone 7 to Windows 8 (The PC &  Tablet Operating System).

I’ve been able to use a lot of my code from the WP7 app, but making some changes. For example saving and writing files is now done through Local Storage using StorageFolder, StorageFile and Stream objects rather than through Isolated Storage on Windows Phone. It took me a while to get used to the new API’s but now I understand them I actually prefer them and think they make more sense. For example my code to load an XML file on Windows Phone 7 Looked like this:

public static void LoadXML(string Location, out XDocument XMLFile)
        {
            // Get the local storage directory for this application
            using (IsolatedStorageFile IsoFile = IsolatedStorageFile.GetUserStoreForApplication())
            {
                //Open the file and make it into a stream
                using (IsolatedStorageFileStream IsoSteam = new IsolatedStorageFileStream(Location, FileMode.Open, IsoFile))
                {
                    XMLFile = XDocument.Load(IsoSteam);
                }
            }
        }

And in Windows 8 it now looks like this:

        public async static Task LoadXMLAsync(string Location)
        {
            // Get the local storage directory for this application
            StorageFolder storageArea = Windows.Storage.ApplicationData.Current.LocalFolder;

            // Get the file itself
            StorageFile storageFile = await storageArea.GetFileAsync(Location);

            // Read the file in as a stream
            IRandomAccessStream randomAccessFileStream = await storageFile.OpenReadAsync();
            Stream fileStream = randomAccessFileStream.AsStreamForRead((int)randomAccessFileStream.Size);

            return XDocument.Load(fileStream);
        }

Whilst the Windows 8 code appears to be longer, to me it makes more sense, and that can be more important in projects such as ours in which the code is going to be handed over to other software developers. First you find the directory, then you find the file, then you use it. It’s the exact same way of accessing data as people do in real life, or through windows explorer.

At the moment I’m still working on the user interface. An interesting challenge of Windows 8 development, which I haven’t had to deal with before in Windows Phone development, is the large amount of different screen sizes and resolutions that devices can have. In Windows Phone 7 there was one size,  800 x 480px.

The Windows 8 version of Hull CS Blogs should be available on the Windows Store before Windows 8 is available to the general public on the 26th October.

Danny

Introducing The Hull Computer Science Blogs Workgroup

I’ve found that for projects like this is useful to have a Facebook group as most people at uni check Facebook more often than their Email Inbox

You may recall that earlier this year I started work on a Windows Phone 7 application for HullCompSciBlogs.com, this quickly progressed into a full scale project to make sure that the 3 smartphone operating systems with the highest market share had an application available. So far we already have a Windows Phone 7 app available on the Windows Phone Marketplace and an Android App available on Google Play.

Cameron is still working hard on the iOS application and expects that it will be available through iTunes in the very near future! When we were discussing this we both agreed that the back end system needed a complete revamp.

When I was designing the Windows Phone 7 application I decided on using XML as the data interchange format, mainly because I was getting used to using LINQ which means that an XML based solution is very easy to implement in C# for Windows Phone. I never expected that it would turn into a full scale project and instead expected that it would remain my own personal project. Probably a silly idea in hindsight considering that the Hull CS Blogs very fundamental idea is that of a community. Not only is XML not as well supported out-of-the-box on certain other fruity platforms, its not the best format for the job. In my opinion JSON is much better because it provides the same data in a much smaller file due to its simpler syntax.

The Data Interchange Format is just one niggle with the system, the other is that it is at the moment a bit of a pain to update. I have to manually edit an XML file to create, edit or update information on featured applications and contributors — which is based on my portion of Freeside, so no one else has access rights in order to update it themselves. There’s also currently no system for someone to submit their blog to our system and have it reviewed before becoming publically viewable. So the addition, removal and editing of contributor profiles and blog feeds isn’t exactly the perfect solution at the moment.

The final big issue with the system is that we simply don’t keep enough data on our contributors. The system we are currently proposing will keep the following details for contributors:

  • A display picture
  • Their full name
  • URL’s for both their website and blog RSS feed
  • Twitter Username
  • LinkedIn Username
  • Reddit Username
  • Date they joined HCSB
  • Study Year
  • Study Programme

Whereas at the moment we only keep their Name, Twitter username and Blog RSS url. We’ll also keep information on applications developed by students and lecturers who attend the university including:

  • Platform
  • Release date
  • Name
  • Version
  • Price
  • License type
  • Description

At this point we need to think about security because we carry a lot of information. It then becomes a bit more of a project that needs to be handled by more than one person, and instead handled by a team of competent computer scientists, and wheres better to source them than from the list of contributors itself? Therefore yesterday I put together the Hull CS Blogs Workgroup consisting of the current mobile application developers, John Van Rij — who set HCSB up initially — and a few people I thought would be helpful in producing a back end.

The basic aims of The HCSBW is to create a community based around Computer Science at the University of Hull based on an open JSON api that can be expanded on and improved by University students for years to come (one of the reasons why the whole system will only be written in language formally taught within the university itself) allowing students to improve their career prospects by getting their story out there for employers to see.

It will all begin properly in freshers week where the team and I will be presenting to the new first year computer scientists in an attempt to get them interested in Hull Comp Sci Blogs and indeed blogging itself. I’ll be sure to write about how our software project and social project of getting people on board works.

Danny.

10,000 people have read Danny – Computer Scientist

I started this blog back in Late September last year – just over 10 months ago. I started off with around 300 views a month and quickly accelerated to having over 1800 in a single month in March.

Recently I’ve reached some sort of equilibrium with an average of around 900 – 1,100 views a month.

As you can guess from the title this week I finally managed to get my 10,000th overall view 🙂

Thanks to everyone who’s been reading the blog. I hope to keep producing content you enjoy reading 🙂

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