All Blogging Web Programming Scripting Software

Displaying phrases containing numbers

Posted in Programming with : Swift

I’m in the middle of writing an app in Swift which requires an alert to appear which says something like “10 questions entered”. But of course some times it should say “1 question entered”. The traditional approach to the question/questions situation is to either test for the number and create a string accordingly or to use the rather tacky “question(s). As I needed similar phrases in a number of places, I decided that the best approach was to create a function. Although the app I’m writing is for OSX, the functions described below should work in iOS as well.

Read More...

Sidebar GitHub Repository

Posted in Programming with : GitHub, Swift, OSX

The Xcode project for an app with collapsible panels in a sidebar which was the subject of my previous post is now available here.

Read More...

A Sidebar with collapsable sub-views for OSX in Swift

Posted in Programming with : OSX, Swift

This is a long post so a table of content:

Read More...

Passing Validation

Posted in Web with : CSS, HTML, Validation

It occurred to me recently that I should make sure that this blog’s HTML and CSS pass HTML5 and CSS3 validation.

Read More...

Creating the Category index

Posted in Scripting with : Jekyll, Categories

In my last post I mentioned that I preferred my list of categories to go along the top of the summary of posts rather than in a column to the left or right. I also wanted them to appear in the same colours that were used in the blog posts. This is the code that I used:

Read More...

Filtering

Posted in Blogging with : GitHub Pages, Categories, Tags, Markdown

The more posts I write in this blog the more I see the need for filtering. Now I think I see better the difference between categories and tags.

Read More...

What are these curly brackets?

Posted in Software with : Markdown, Jekyll, Markdown

I mentioned in my previous post that Drafts was “corrupting” files containing curly brackets. These brackets are part of the Liquid templating language which is used by Jekyll to turn templates into html.

Read More...

A small problem with Drafts

Posted in Software with : Markdown

All was going really well with Drafts until I used it to edit my main index.html file (now renamed to index.md, for no particular reason other than to remind myself that this isn’t a pure html file). This file contains a number of instances of things enclosed in double curly brackets (the ones that looks like this: {} ). When I saved the file back in Working Copy I noticed the file was garbled. Luckily I hadn’t committed the file so I was able to revert it.

Read More...

Better Editing

Posted in Software with : Markdown, iPad, Mobile, Front Matter

I mentioned in my previous post that I’m now using Working Copy for posting to this blog and updating posts. What I didn’t say is that I’m not using it to edit the posts prior to them being uploaded.

Read More...

Going Mobile

Posted in Software with : GitHub, iPad, Mobile

I’m one of those people who is just as happy writing writing on an iPad as on my iMac. So it was natural that I would look for a GitHub client for the iPad. Searching for GitHub in the iOS AppStore, produces lots of responses, most of which are nothing to do with what I was looking for. the first one I tried was CodeHub - GitHub for iOS by mDillon Buchanan

Read More...

Tuning the blog - 5) a better masthead

Posted in Blogging with : Fonts, CSS, Graphics

Nearly there with the basic functionality of the blog. Time to put a bit more style into it. First up - a better masthead. Given the subject matter of the blog, I wanted it to have something of the look of Apple’s Swift page.

Read More...

Tuning the blog - 4) creating category and tag pages

Posted in Blogging with : Jekyll, Categories, Tags

This looked like it was going to be straightforward, but it took me ages to sort this out. Because of the nature of what Jekyll plugins are allowed in GitHub Pages, it is not possible to create tag and category pages. The solution from Stephan Groß - slightly adapted by me - is to create a dummy file for each tag in the folder /blog/tags with a name like tagname.md with an entry like this example for the tag GitHub-pages:

Read More...

Tuning the blog - 3) styling the categories and tags

Posted in Blogging with : Categories, Tags

The last post (!) got me almost there with the look I wanted for the category and tags list in the post, but the look wasn’t quite right. A bit more delving in Stephan’s site showed me two areas where I needed to add some styling.

Read More...

Tuning the blog - 2) adding categories and tags

Posted in Blogging with : Jekyll, Categories, Tags, Front Matter

I have always been one to flit from subject to subject - both inside and outside a work environment, life is generally like that. Given that a blog (with a little cheating here and there) is generally written chronologically, I feel the need to be able to identify themes and topics so that all the stuff on a single subject can be gathered together for a comprehensive read (if only by me).

Read More...

Tuning the blog - 1) adding the date and time to posts

Posted in Blogging with : Jekyll, Front Matter

Although the instructions for setting up the blog mentioned in my prevous post were excellent, a few tweaks were needed behind the scenes.

Read More...

Up and running!

Posted in Blogging with : Jekyll, GitHub Pages, Swift, Objective-C, blink(1)

Although I registered with GitHub nearly two years ago, it was only today that I started using it. I’ve been rummaging around with both blogging and programming for many years without any great sense of direction; but the conjunction of three things has led to this blog.

Read More...