Chris Hannah

Big Cats

Big Cats is a new documentary series, being produced by the BBC. They have an incredible track record with documentaries, especially ones focussed on nature. As proved by the recent Planet Earth II and Blue Planet II series.

This series follows in the same footsteps, as it is being pushed by a new generation of advanced camera technology, and techniques. Which enables them to get some pretty impressive shots of evasive cat species, such as the Snow Leopard, and the Rusty Spotted-Cat.

The first episode is already out, and it’s great! The scenes were impressive, the amount of knowledge about the different species was incredible, and it was just generally intriguing.

It’s the first time I’ve also heard about the Rusty Spotted-Cat, which is the smallest cat species, and grows to between 35 to 48 cm in length, and a 15 to 30 cm tail. They released a small clip from the first episode, so you can watch that below, or on YouTube.

I’m not sure how they can really make the next episode better than the first, but I expect it will go beyond my expectations. Although it is only a three-episode series, so I guess it will also be pretty packed!

BBC – Big Cats

BBC iPlayer – Big Cats – Episode 1

BBC iPlayer – Episode 1 Clip – The world’s smallest cat

 

Two More iPad Pro Focussed Adverts From Apple

Apple today, launched two more videos focussed on the iPad Pro to their YouTube channel.

Augement Reality

With iPad Pro + iOS 11, you can use augmented reality to literally transform the world around you. Your next computer might not be a computer.

Take Notes

With iPad Pro + iOS 11, you can use Apple Pencil to create multimedia notes. Draw, type, or drag and drop your favorite photos from Files. Your next computer might not be a computer.

I’m really enjoying their latest series of iOS 11 videos. It’s not a simple, an iPad is better than a Mac argument. Instead, they tend to focus on a younger user that has no concept of ”a computer”, but treat an iPad as the device.

It’s starting to become even more apparent, that younger generations are the ones that are truly adapting to new technology. Mainly because they haven’t got the burden of really knowing what it was like before these new devices, such as the iPad Pro.

Apple / Meltdown Patches

Just a quick reference of all the patches that fix the Meltdown bug (CVE-2017-5754) on Apple’s operating systems.

watchOS

Not impacted.

tvOS

Patched.
Version: 11.2
Release Date: 4th December 2017
Release Notes

iOS

Patched.
Version: 11.2
Release Date: 2nd December 2017
Release Notes

macOS

Patched.
Version: High Sierra 10.13.2
Patches for older versions:

  • Security Update 2017-005 El Capitan
  • Security Update 2017-002 Sierra

Release Date: 6th December 2017
Release Notes


More information on Meltdown/Spectre.
Apple’s Statement on Markdown/Spectre

Picking a Great Writing Font

Michael Descy has written a great piece about finding a writing font, and why it isn’t just a waste of time.

Choosing the perfect writing font is a classic way to procrastinate—but it is not a waste of time. Fonts are important. A good font is not only highly legible, it also conveys a subliminal emotional effect on the reader. Naturally, it follows that it will also have similar effects on the writer. A good font will make you feel better while you are writing—maybe because you can read it more easily, or because you find elements of it, its curves or serifs, aesthetically pleasing. Whatever the reason, picking a font that is pleasing can have a profound effect on your writing.

He goes into detail on what makes a good writing font, some considerations you will have to make, and also a bunch of great suggestions.

For myself personally, I’ve always used a monospace font to write with. I once saw someone write about it before, although I can’t remember the source, but they explained how they used monospace fonts while they were writing/editing, and a sans-serif for previews. This is similar to how I feel myself.

Because I write everything I do in Markdown, it still feels like I’m writing code, not a programming language, but still something that has to be deciphered before it’s fit to be seen by anyone else. And for some reason, monospace fonts use feel like they represent something that’s in progress.

So, the font I use for nearly everything is SF Mono. It’s the monospace version of Apple’s San Francisco font, and it’s been my favourite ever since they released it. However, it requires some fiddling to have it installed like a regular font. Before that I used the pretty similar, Andale Mono.

Meltdown and Spectre

You’ve probably heard about the two major bugs that have been hitting the news recently. Their names are Meltdown and Spectre, and they affect nearly every modern computer processor.

As there’s so much information flying around the internet, it’s easy to not grasp the whole picture, or just have an easy place to direct other people to.

Luckily, Graz University of Technology have created MeltdownAttack.com, which explains both bugs, links to their relevant papers, and then some common questions and answers.

Meltdown and Spectre exploit critical vulnerabilities in modern processors. These hardware bugs allow programs to steal data which is currently processed on the computer. While programs are typically not permitted to read data from other programs, a malicious program can exploit Meltdown and Spectre to get hold of secrets stored in the memory of other running programs. This might include your passwords stored in a password manager or browser, your personal photos, emails, instant messages and even business-critical documents.

Meltdown and Spectre work on personal computers, mobile devices, and in the cloud. Depending on the cloud provider’s infrastructure, it might be possible to steal data from other customers.

MeltdownAttack.com

A Simple and Clean Way to Store Sectioned Data for a UITableView

This is just something small in Swift/iOS that I find pretty handy, so I thought I’d share it just in case it can help.

So, the problem is that creating data that has to be presented in a UITableView can be somewhat complex, especially if you have multiple columns. This solution is geared towards quickly creating dummy data, but I think it could be expanded into an overall DataSource solution.

Anyway, we’ll start with the current way of managing sections. Usually, you would have some kind of enum that would correspond to a section integer, and also however many arrays of data for the number of sections. You would then either use the section enum to find the correct array. Or maybe you’d use a 2d array, and then use it as the index.

It just doesn’t see very Swift to me. In Swift, everything is simple, easy to read, and is pretty easy to write. So I thought I’d come up with a slight abstraction.

My first idea was to just make two structs, one for a Section, and another for a Table:

struct Section {
    var title: String
    var items: [String]
}

struct Table { var sections: [Section] }

You could then go ahead, create individual sections, and add them to one table. Easy.

Example Data

Animals:

  • Cats
    • Tiger
    • Lion
    • Lynx
  • Bears
    • Grizzly
    • Black
    • Polar

Example Code

let catSection = Section(title: "Cats", items: ["Tiger", "Lion", "Lynx"])
let bearSection = Section(title: "Bears", items: ["Grizzly", "Black", "Polar"])

let animalTable = Table(sections: [catSection, bearSection])

I just find that a bit more readable.

It also makes the number of sections and rows a bit simpler:

let numberOfSections = animalTable.sections.count
let numberOfRows = animalTable.sections[0].items.count

However, you can add this functionality to the Table struct Which makes it much, much better.

Here is the definition of the ComplexTable struct:

struct ComplexTable {
    var sections: [Section]

func numberOfRows(forSection section: Int) -> Int { if sections.count > section { return sections[section].items.count } else { return 0 } }

func numberOfSections() -> Int { return sections.count } }

Which would make it this easy to get the row and section counts:

let numberOfSections = complexAnimalTable.numberOfSections()
let numberOfRows = complexAnimalTable.numberOfRows(forSection: 0)

So there you go.

It’s nothing big, and it won’t win many programming awards. But it’s a small piece of code that will certainly help me when I’m just messing around with tables, or I want a really clean and simple way to store small amounts of organised data.

Easily Clear Out Xcode Simulator

I’ve been getting annoyed recently with the amount of simulators I had installed in Xcode at work. But I’ve come across a really simple command that will fix this automatically.

I had 10.1, 10.2, 11.0. 11.1, and 11.2 installed, which I then reduced to just two of them. Then instead of painfully selecting and deleting each generated simulator, I just typed this:

fastlane snapshot reset_simulators

It uses Fastlane’s Snapshot tool, and what it does is delete all of your current simulators, and generate a set of new ones depening on the current SDKs you have installed.

Avatar Images

The avatar images “work”!

I have them displaying properly, downloading properly, and also using placeholders when it hasn’t been downloaded yet.

Images also cache up to a predefined limit, and are stored with the URL as a key.

The only thing left, is to then update whatever is presenting the placeholder image, when the real one has finished downloading.

Insights Into the Performance of My Blog

A few months ago, I started working on my own analytics service for my blog. I did this for many reasons, but ultimately for control and user privacy.

I only actually ever store four pieces of data:

  • Website Title
  • URL
  • Referral URL (Only if it’s been given)
  • Date Accessed

So while there’s not much data there, I can track everything I need, so like visits per day, per post, and I can get an idea of where traffic is coming from.

There have been occasions where the service, which I named “Minilytics”, has gone down though, so I can’t say I’ve tracked all the visits. But I’ve got a few things to share.

Performance

I made nice SQL query that shows me the performance of the site for each day. I use the view count for that day, and run it through a few conditions that will then output a string that I’ve manually set up. It’s not as exact as viewing the view count, but much easier to visualise.

Monthly View Count

Again, this isn’t totally accurate as these numbers may be higher and it hasn’t tracked them. But this simple count of views from each month, is a good way to check the general increase/decrease in visits over time.

I’m going to try writing some more queries soon, and see what other insights I can pull from the data. But overall I think the site has been getting a lot more traffic recently! Especially since I moved the blog over to WordPress a few days ago. My guess is that the WordPress installation has better meta tags, descriptions, and stuff that search engines like.