Author: Matthew

  • Switching from WordPress to Jekyll – First Steps

    I wanted to switch from WordPress to Jekyll on this blog. I first started using WordPress on May 17, 2006 on another blog and have since used it regularly, and for a period of time between 2009 and 2011 I posted multiple times a day. Since starting this new blog several weeks ago I came across a handful of sites that use Jekyll. After a bit of study I decided it was time to test it out. With this being a fairly simple blog that is mostly lots of text and sometimes an image or 2, I decided it would be a good fit, or at least I think it will be a good fit.

    What I will Cover

    I will be walking you through how I installed Jekyll on my iMac. I will also be explaining what does what in Jekyll although it will be a very basic tutorial on how to publish a post and test the site locally.

    What I won’t cover is more in-depth things such as permalinks, themes etc… although I will at a later date.

    Requirements

    The requirements are extremely basic to run a Jekyll website. Jekyll is installed locally. You write your content locally in Markdown. You build the site. It spits out a static website in html and you then upload that to a web server of your choice. There is no database and no need for anything fancy to be installed on the server.

    The Process

    After finally getting to grips with how Jekyll works I decided that I need to create a new workflow to make the transition worth it. In WordPress it’s quite simple. I can log in from any browser, click New Post, write, publish, and be done. With Jekyll there’s a few more steps involved that all seemed a little complicated when I first came across them. Now that I have Jekyll installed I actually find it’s quite simple to use and quick to update.

    What I am Using

    In this post today I want to just show what I am using locally. In my next post I’ll write about what I am doing to get that content to a server and where that server is located.

    Locally I use the following:

    • Jekyll (as expected). This powers the website.
    • iA Writer. Used to write my content. I use this on macOS and iOS. You can use any text editor that you want. I just like this particular one at the moment. If I want to switch to another, that’s no problem because markdown is just text.
    • DropBox. I store my blog in a DropBox folder as it works well for syncing to my iOS devices and my MacBook.
    • Git. I use Git for tracking the changes made. My plan is to commit each successful build and send to GitHub. That way, if I am making large modifications and mess it up, I can just step back and start from where the site was working previously.

    I might consider TextExpander in the future which I think will be helpful for some common text such as the front matter, code snippets, etc… but I haven’t ever used it and don’t even know if it’s compatible with iA Writer. It isn’t too important to me in the first stages.

    Installing Jekyll

    The instructions are simple to follow on the Jekyll website. I just followed the quick start instructions on the main page. To do that, open Terminal and navigate to the folder where you want to add your new blog to. In my case I entered

    cd dropbox
    cd apps

    Install Jekyll by entering (note that this command isn’t related to the ones above… you can install Jekyll as soon as you open terminal).

    gem install jekyll bundler

    Next you generate a new site by entering:

    jekyll new websitename

    In my case I called it MatthewNewillBlog so that I can identify it.

    When this is done it runs through the process of building the site. When done:

    cd matthewnewillblog

    To test it’s working enter:

    bundle exec jekyll serve

    Then open a web browser and go to http://localhost:4000

    You will see a basic website running now.

    Configuring Jekyll

    The main configuration file for Jekyll is called _config.yml found in the root of the Jekyll install. Open this with your favourite text editor. To do this I opened the finder, navigated to my Jekyll install, opened the file with Textastic.

    There are a few items to modify in here. You can give the site a title, an email, a description, as well as a URL. There are also some build settings which I haven’t modified just yet.

    After making the changes, save.

    To see those changes we need to rebuild the site. The command for that is (make sure you ctrl-c if the server is still running):

    jekyll build

    When it completes you can start up the server again with:

    bundle exec jekyll serve

    When the server is started, reload the website. You should see your changes reflected on the page.

    Structure

    The basic structure of Jekyll is that you have a _posts folder and a _site folder. _posts is where you content is put that you want to go live on your site. The _site folder is generated automatically when you used the ‘jekyll build’ command. The contents of this folder are what you upload to your webserver after building the site.

    Creating a New Post

    Creating a new post can either be done in a _drafts folder, or you can create it in the _posts folder. If you use the _posts folder, just be aware that you might end up publishing a half baked post if you do a rebuild and sync the _site folder, so be careful with that option. For example, you might start working on a post, add the front matter, forget about the half finished post and leave it there and create something new. On your next build you may upload half a post that wasn’t intended for the blog. Be careful!

    Open your text editor and create a new file. The filename needs to be in a specific format which is:

    YEAR-MONTH-DAY-post-title.md

    If I want to publish a post with todays date that would become (my-post-title is what I want to call it. I guess that would be classed as the post slug in WordPress):

    2017-01-06-my-post-title.md

    When the text file is created you then need to create front matter in YAML as a block at the top. The front matter block for this post looks like this:

    layout: post
    title: "Switching from WordPress to Jekyll – First Steps"
    comments: false
    date: 2017-01-06 11:12:32

    It starts and ends with 3 dashes. The in between parts provide some needed information such as it uses a post layout, has no comments, and has a title. The date/time is in the following format:

    YYYY-MM-DD HH:MM:SS +/-TTTT

    The time and offset are optional. If you post a few times a day it could be worth specifying the time. I do just because it’s easy enough to do although I don’t use an offset.

    More details about Front Matter can be found here.

    When the front matter is in place, you can now write your blog post. You write in markdown or HTML. I am fairly new to markdown so won’t try give a tutorial on how it works. All I am doing is starting with the basics such as creating links and using bold text. Because my previous posts had some HTML for images, I just left those as they were, but there is syntax in markdown to specify images. You can read about all of what markdown can do over here.

    Publishing your new Post

    Now that your content is written and you are ready to publish, it’s time to test.

    If your post isn’t already in the _posts folder, move it there.

    In terminal navigate to the new blog folder.

    Run the following command:

    jekyll build // Note that you probably don’t need to ctrl+c from the server as it seems to build automatically on the fly… but if you don’t see changes then I suggest rebuilding.

    Followed by:

    bundle exec jekyll serve

    When you load up the website at localhost:4000 you should now see your new post. Note that you will also see another post which was automatically put there when you installed Jekyll. To remove that, just delete it from the _posts folder and rebuild your site. I hope that by testing doing this that you will see how easy it is to manage your Jekyll install.

    In the next post I’ll explain how the theme can be changed and how you can change the structure of your website. After we have the website looking good on the local server I’ll move on to explain how to put the site on to a webserver.

  • First Indie iOS App

    Today I decided to get started on my goal of creating iPhone apps for myself as an indie developer. As mentioned yesterday, I have a few things I want to accomplish this year. My first release will be a pedometer app. There are several already in existence on the app store, but none of which do exactly what I want them to do.

    If we rewind back a few years to 2013, I actually started this project in September that year just after the iPhone 5S was announced. However, like all other previous attempts at finishing my own apps I was sidetracked and ended up doing more work for clients. My app never got finished and sat in BitBucket gathering dust.

    Moving back to today, I actually created a new project a few weeks ago and started creating some classes to stub out. Christmas happened and I took time off, and then today is when I am officially starting and writing some code for the app. The reason I created a new project is that I want to create this version (and finish it) in Swift. The previous version was written in Objective-C. It just seemed like a better option to start from scratch than working with everything I had from the previous attempt.


    Just for fun I decided to download the repository for the app as I left it in 2013 and after adding a couple of privacy description keys to info.plist it worked. To the left is a very bad looking screenshot. At the point I got to in developing it a few years ago I had just extracted data and had it represented on an hourly chart. The chart I used in the demo app was MyAppControlls iOS Bar Chart View. I may use this in the new project if there are no problems with it, or I may create my own with PaintCode in a similar way I demonstrated how to create a line chart with PaintCode on my tutorial blog.

    First Steps

    Having redone the design a few weeks ago to bring it to iOS 10 standards, I have everything I need on paper. I know what each view will look like. I’ve been through the several steps of design of which I highly recommend reading this article by Michael Flarup who speaks of the process of designing an app. I even have the classes I need written out and the relationships between them although some testing is needed to determine if modifications are needed (see next paragraph).

    So my first step in the Xcode project is to work on fetching the motion data, then work on fetching Health Kit data for historical data, and finally I want to work on tests to see how quick data can be extracted from Health Kit. Will it be acceptable to just extract direct from Health Kit for weekly, monthly, yearly data representations? or will that cause delays in putting the data on the view? I don’t know yet as I haven’t tested the import speed. It might be that I opt for Core Data and do a one-time import of historical data from HealthKit so the app can analyse it more quickly when needed.

    By the end of the day I expect to be extracting data from Core Motion and passing that to the view to put on screen.

  • 2017

    The New Year Begins

    Today is the first workday of the year for me. Over the Christmas period I thought about what I want to achieve in business and life over this year. I also looked at what was achieved in 2016 to see where I might have gone wrong and what I could have done better at. There is plenty of room for improvement. Some time was wasted by idling it away. I need to avoid social media through the day as well as news websites.

    Although I don’t feel the need to share my specific goals here, what I decided to do was create a list of all things that I wanted to complete by the end of this new year as well as what I want to do each day, month, or year. I quickly realised that all items are far more than I could physically accomplish, but instead of cutting things out, I prioritised what each day would look like for me. Rather than measuring success by the number of jobs complete and the number of tasks marked as done by the last day of the year, I decided that my success this year would be measured by how I spent my time and if I did good things with my allotted time.

    Some Goals

    There are many things that I want to accomplish such as reading XX amount of books, but I don’t want to get inundated with the calculations of how many pages per day and what books I want to read and how many pages each are. It feels too mechanical. Instead, my goal is to simply read each day for at least a certain amount of time. If I accomplish that then I will read XX amount of books in a year. That won’t matter if it’s 10 or 50. The success will be that I managed to keep the commitment for the year.

    Another goal is to create my own apps for the iPhone and Apple Watch as an indie developer. I create apps for others, but when I plan on making my own apps, I always get sidetracked in to working for others again. I have many incomplete apps that could be finished. I want to change that in 2017 and create my own apps. Just like book reading, the success for me will be measured by the amount of time each day I spend creating the apps. I may end up creating just a couple or several, but if I feel I have worked honestly each day for a few hours, then I will define that as success regardless of what the outcome is. Of course, I include promoting the apps to contribute as part of the success although creating them is the first step. I can’t promote something I haven’t created.

    Some of the tracking will be done by simply looking at the contributions graph in GitHub. If I can fill Monday to Friday with green, then that will be success. There’s no point me cheating by committing a minor change to turn a square green. I will know if a green is well earned. If it looks like 2016 as seen below, I clearly will have to put a lot more effort in.

    I want to become a better writer. For that reason I plan to regularly update this blog, perhaps showing my progress in some cases, as well as put more time in to my iOS tutorial website.

    Writing isn’t my strong point, but I expect that writing regularly will help to change that a little.

    There are several other things I want to achieve. I want to take my DSLR everywhere I go instead of relying on just my iPhone 6. I would like to learn how to use it by using it.

    Family

    Also, I want to spend more time with family. I am lucky with working at home but at the same time that brings challenges of not shutting off from work when the children and my wife are around. I need to do better there.

    Tracking

    While reading MacSparky earlier today I came across an app called Productive which helps track habits. For me I need to make a habit of writing regularly, reading regularly, and creating regularly. I also need to look after fitness as well which I expect this app would be great to encourage me not to break a streak of going to the gym.

  • The Evernote Privacy Problem

    I was disappointed to learn recently that Evernote decided to bring in an intrusive change in to its privacy policy and then default that change as an opt-out rather than an opt-in. I first saw this reported on TechCrunch which informed me that the change was coming in to play on January 23, 2017.

    The Change to the Privacy Policy

    Evernote decided that they would give employees access to reading your notes stored in the service. Although this access would be given to a handful of “trusted” employees, it still gave me the shudders to think that people might be reading my personal notes.

    Although there’s nothing illegal going on in my account, there is certainly some private information that I believed was private and that only I could access. Think things such as medical information and pay slips from my past employment. I don’t want someone random reading those. For Evernote to automatically opt me in to this showed to me that my notes are not my notes, despite them claiming otherwise with the first of the 3 laws of data protection which inform me that my data is mine. Likewise, the second law could also be questioned as well.

    Opt-out???

    What surprised me most is that Evernote would think it be acceptable to automatically opt-in all users in to their machine learning algorithm with human assistance. This should never have been opt-out. The big mistake they made was assuming that everybody would be OK with this.

    As it turns out, there was a backlash on Twitter with many people cancelling their accounts. Trust was immediately lost for many. After a day or so of pressure on social media (perhaps not the pressure, but the number of people terminating their account), Evernote did the right thing and made this change an opt-in meaning that to be included in the service you will need to give permission.

    An Acceptable Change

    To me, this is an acceptable fix to the problem for now. However, I feel I’ve lost a lot of trust in Evernote. I decided not to jump ship for 2 reasons. First, the date for the change was January 23, 2017, so a little over a month away which gives me some time to think about this. Second, a quick jump to another service might be a bad move. Consider OneNote as an example, I have yet to read their privacy policy. Had I quickly jumped to another service I might find that my notes are even less secure or less private.

    What Next?

    For now, I’m sticking with Evernote. I like the service. I’ve been a premium user for maybe 5 years or more. I use it daily. I like many features such as being able to quickly sync across devices, easily scan documents with my ScanSnap scanner*, clip items from the web, store PDF’s and search them, amongst many other things. But I am on the lookout for something else where I can keep my notes to myself.

    I tried Bear and although an amazing looking app (one of which I will keep on my iPhone and desktop), I didn’t feel it had all the features I needed just yet. A positive side of Bear is that it syncs with iCloud which means that Bear does not/cannot read your notes, although sync comes with the paid accounts only.

    For a disappointing change, they managed to turn it around a little and settle things down somewhat. But I do need to pay more attention to privacy policies when signing up to new services and I need to regularly check for changes on any other services I use which contain important information. I don’t know how long I’ll be with Evernote for now, but it certainly has me a little concerned.

  • Hive Connected Home – Brief Review

    Hive is a service that lets you control electrical items from the internet or smartphone. The central part in the home is the hub which communicates with hive online. The hub receives its instructions and then tells the smart items in the home to switch on or off. These can be controlled by smartphone or through the web app. The system allows for both manual and scheduled changes to be made.

    Hive can connect to several types of smart items which include LED light bulbs, motion sensors, door sensors, as well as a thermostat to control your heating. The pack I got contained the hub and 2 dimmable LED light bulbs.

    The light bulbs I got work really well. They are 9W each which is equivalent to a 50 – 55W incandescent light bulb and thus, are far more energy efficient in terms of cost to run.

    Limitations

    At the moment Hive only works with regular bayonet or screw type light bulb fittings. I would love to see the technology moved in to a GU10 LED light, or alternatively, a smart switch being made available where you control the power to a collection of standard GU10 fittings. I’m sure this will happen, but they are not available yet and haven’t been announced either.

    Speaking about “collections”, it would be great to be able to group all my living room light bulbs (I have 4) in to one group and control them together, but retain the ability to control individually. If I need to switch on lights remotely I am stuck with having to use a schedule or by turning each bulb on individually from within the app. One up side for when being at home is that I can cut power to the bulbs and then switch them back on with the wall switch. This overrides any current settings you might have and puts them on at full brightness until any queued scheduled changes might tell it otherwise.

    I haven’t received the other bulbs and parts yet, but when I do I want to explore what can be done in terms of automation. The Hive app supposedly opens up a new option to make things smarter such as switching lights on when the door opens or using motion to switch them on. I’d like to see what I can get working when all the new items arrive. Rather than having lights on in the living room while I’m upstairs, I’d like it to switch them off after detecting no movement for a determined period of time.

    The Hive website says that the hub now integrates with the Alexa Echo and Alexa Dot. I don’t have an Alexa device yet, but have ordered one as a gift for when Santa visits this weekend. I noticed while using the Alexa config app that I might be able to group lights in to collections. I guess this means that I can say “Alexa, turn on all lights upstairs” or “Alexa, dim the living room lights to 50%”. I might be being optimistic with these thoughts, so I’ll put it through its paces next week and report back.

    Another test I am looking forwards to is seeing what difference the thermostat makes. I like the idea of coming home from a long drive and having the house warmed up for when I get home. Likewise, I like the idea of the heating being on a thermostat instead of always on or off as it has been for the last 10 years in this home. I’m sure we can be more fuel efficient as a family by making some small adjustments to how we use our heating system.

    Final Thoughts

    So far I like the Hive service. I haven’t worked out any cost savings just yet as I’m sure these will take a few years to be realised, but for someone who likes nerdy stuff, a smart “ish” home is quite cool.

    I’ll write more when the extras arrive and then another followup when the Alexa Dot arrives.

    If you are in the UK and do use British Gas as your energy provider, you might want to check emails that came in the first 10 days of December from them to see if you have an offer for a free Hive starter kit. I checked with my Dad and he did not, so I’m not sure how the selection process worked for this.

  • The iPad 3 and a needed upgrade for me…

    I received my iPad 3, AKA “The new iPad” on 16th March 2012. I previously owned the original iPad and an iPad 2, both of which were sold to make way for the newer version. The iPad 3 was fantastic. It was the first iPad with a retina display of which the retina display was first made available in the iPhone 4 which shipped in June of the previous year.

    The iPad 3 is the last iPad I ever purchased. I still use it today, although it’s painfully slow. I think the reason I didn’t continue to upgrade each year was related to the iPad 4 being shipped just a few months after the 3 launched. I didn’t want to upgrade so soon, and then the year after I got my first MacBook Pro (the 13 inch retina). It knocked me out of the cycle of upgrades and I never got back in to that cycle.

    iOS Updates on Old Devices

    One of the challenges I find on any iOS device that I have owned is that after 2 major iOS releases, things begin to slow down. The upgrade for iOS 5.1 to iOS 6 was just fine, but then the update to iOS 7 was where the slowness began to show it’s ugly face. For some unknown reason to me, I continued the yearly upgrade cycle to 8 and then 9. I currently run the latest version available which is 9.3.5 and it’s just ridiculously slow for many things. I’m surprised that Apple even though it was a good idea to move past iOS 6 for this device. To give some idea of how slow it can be, I can write a note in Evernote or Day One and type a full sentence out; I then sit for 10 – 20 seconds waiting for text to appear on the screen at which point it catches up with me.

    So why do I still use the iPad 3? Other than the extreme lag, I still like the screen and I still find it fairly convenient for doing some basic work on such as marking off tasks in OmniFocus, or looking up reference material. The children also love games on it which in most cases do run just fine after the initial load. I also use it to play Amazon Prime video over Air Play to my Apple TV. It’s mostly a device that I consume information on. I cannot create on it. It’s just too slow and frustrating to do that.

    Time for an Upgrade?

    I need to upgrade. I use the word “need” carefully as an iPad is not really a “need” in life. Perhaps I should say “I would like” instead. I would like to purchase the 12.9 inch iPad Pro, probably the wifi only model and the lowest storage, but it was released over a year ago in November 2015. If I buy now, I suspect that Apple will upgrade in the new year and thus, lower the price of the current gen. Likewise, if I buy an iPad that’s over a year old then iOS 11 will probably be the last usable OS on the device: usable meaning running without any lag at all. I could stick to iOS 11 when it launches and never upgrade, but sometimes it’s just far too tempting to hold back because of the new features available. Either way, I’d prefer to wait for the iPad pro 2 and purchase when/if that is released.

    I still think the iPad is great. I know of a number of people who have switched to iPad only setups. iPad only doesn’t suit me as I need Xcode for creating apps for the iPhone, but for many day to day tasks it was a good laptop replacement when it worked well. For now, I use my MacBook Pro, but I like the idea of simplifying where I can. A MacBook Pro is often a lot more than I need.

    I think the best temporary solution prior to my upgrade is that I will just switch off many of the features such as location services, background app refresh, notifications, and anything else that might cause the iPad to do a little more work than absolutely necessary. It’s a compromise, but perhaps something to keep my iPad 3 breathing a little longer.

  • Optimizing Image Size for Your Website

    Visitors to your website are more likely to stick around and not abandon your website if the page is quick to load. Google has a whole host of information about this. There is typically no single solution that would speed a page load up on a website; instead, there are many small optimisations that can be done each shaving a few fractions of a second off of the page load.

    (more…)

  • iMac 27 Inch Mid 2010 SSD Upgrade

    I purchased my iMac in 2010; I opted for the lowest spec model. A year after buying it I upgraded the RAM from 4GB to 16GB and about a year after that I had to replace a faulty hard drive. Apple recalled the original drive due to a fault in the firmware on the drive, I ignored the product recall and then found I had to replace it when it broke just out of that recall window.

    After 6 years and several OS updates, the old spinning disk just wasn’t cutting it anymore. I didn’t want to pay over £1,000 for a new iMac so instead I went the route of upgrading the hard drive to an SSD.

    Rather than me explain how to take apart a mid 2010 27 inch iMac and upgrade to an SSD, I thought I’d just share with you the items I purchased so that you can see what worked for me. I spent hours trying to decide what would work and what would not. The full iFixit guide should be sufficient for you once you have chosen the drive and adapter that you will use. One of the options could be to leave the HD where it is and then use the optical drive area for the SSD. My optical drive broke years ago, but I just left it where it was this time around.

    The drive I selected was the Crucial MX300 1TB SSD. The MX300 is a SATA 6.0Gb/s device although this particular iMac (the mid 2010) works on an older SATA standard at 3.0Gb/s. The reason I went for this was so that when I do get rid of my iMac and upgrade, I can keep the SSD and use it elsewhere in a machine that can use it to its full potential. The downside is that I won’t get to use the SSD to its fullest potential in this machine. In fact, the fastest it will work is at the 3.0Gb/s standard. But don’t worry, you won’t regret the upgrade once performed; it’s super quick.

    I purchased my 1TB SSD from Amazon in the UK and paid around £230 for it. Here is the drive that I ordered. The same model can be found on the US Amazon store here. It is priced at $244.43 at the time of writing this.

    The Crucial MX300 is a 2.5″ drive, but the iMac uses a 3.5 inch hard drive. I am sure you could probably secure the drive by some other means, but I purchased a 2.5″ to 3.5″ AdaptaDrive from NewerTechnology, again on Amazon. This worked perfectly for what I needed. The Amazon US store sells it here.

    One optional item that I chose not to buy but might do at a later date is a temperature sensor. I haven’t tested this cable, but have read reports that others have and that it works well. It is available on Amazon UK here, and Amazon US here. Instead, I just wrapped the old sensor around the frame to keep it from dropping down behind the circuit board(s).

    Instead of using a temperature sensor I downloaded an app called SSD Fan Control which allows me to select SMART for the hard disk which appears to use the temp sensor built in to the drive. The only downsides that I have come across so far are that when the Mac is rebooted, the fan will spin at full speed until SSD Fan Control starts up. From a cold boot it does not spin up as the overall temperature is lower. Also the fan was on full speed for the duration of the operating system reload.

    I may purchase a temp sensor in the near future, but so far all appears to be running just fine without it.

    The only other items you need are the following:

    1. A good backup of your files. I use BackBlaze and Time Machine. Although BackBlaze is a paid server at $50/year, I find it invaluable as when my first hard drive failed (my fault), I had a 600GB or so backup that I could download and use.
      2.You will need the correct screwdriver(s); T10 Torx screws are used as well as T8 Torx for the drive. A precision screwdriver set typically contains these. One option is this one from Amazon in the UK with this option for Amazon in the US.

    2. Suction cups are needed to remove the glass on the front of the iMac. iFixit shows that you need 2, one for the top left and one for the top right. I’ll whisper this as I’m sure this isn’t recommended, but I used one of the kids bath toys with suction cups on the back. It worked just fine. It just needs to be strong enough to overpower the magnets that hold the glass in place.

    If you have all the items above, you are ready to upgrade to an SSD. After I installed Sierra when all came back up, I installed the SSD Fan Control app, and also Disk Sensei. I enabled Trim but if I am honest, I do not know if this is needed or required. I did read that if the drive supports Trim then it will be just fine and if not, I’ll just need to disable it. After a few weeks of running my iMac with this SSD and Trim enabled, I’ve had no problems at all.

    Is the iMac 27 inch Mid 2010 Quicker with an SSD?

    I have to say that my iMac feels like a new machine when I now use the SSD. Of course, the processor is still from 2010, but the disk is far newer and when it was a spinning disk previously, it was so sluggish. It would take a good 30 minutes to reboot and settle down clicking away that it became frustrating to even power it off. Now that it runs an SSD I can be up and running within a minute or 2. From my understanding, the drive works at half the speed of its potential due to the 2010 iMac using the old SATA standard, but the speed increase is great and I no longer have apps freeze while the hard drive churns away in what seems like an endless shuffling of files.

  • Creating my First Static Library in Xcode

    After learning to program for a couple of years and even posting some tutorials of my own of things I learned along the way, I figured it’s time that I start putting some work out there both in the app store and for developers to use.

    I work primarily with Xcode and enjoy designing and creating apps for the iPhone and iPad the first of which is has been released and in the app store (I’ll blog about that later) and the second one should be in the app store by the end of this month (April 2014).

    The time has now come that I share some of the work with companies and because this is for a company I did some work for, I’ve been asked to put it in to a static library. Although I’ve made use of static libraries and plenty of frameworks in my code, up till this week I hadn’t created my own work and put it in a static library.

    After a bit of digging around, I came across this handy tutorial by the team at RayWenderlich.com. The tutorial covers how to create a static library and also includes a few extras such as some code and instruction on how to make the library universal so that developers can use it to both test on devices and to test in the simulator.

    The main reason I opted for a static library was because of this comment on the RW site (linked above):

    You’d like to share a library with a number of people, but not allow them to see your code.

    With this being for business purposes, the code is required to be locked up for now.

    Although I haven’t quite finished creating the static library, I have done some testing and followed the tutorial above and found its relatively easy to implement. There’s a few Xcode quirks along the way such as re-importing a newer version causing 2 sets of paths to be searched for and creating warnings. Also, you also might find you need to remove the headers from the target and add them back in to reset everything back up to avoid errors. Finally, when building the static library, remember to specify what headers you want exposing when you create the universal library. You do this in the “Copy Files” section of “Build Phases” for the target.

    After a few small speed bumps, I think I’m almost there creating the library.

  • How to Keep Your PC Safe and Secure

    For almost 20 years I tend to have been the go-to guy when people run in to software problems with their PC. Along that journey I have fixed a number of computers and helped bring them back up to speed and make them safe and secure.

    The purpose of this post is to share with you the tools that I regularly use as well as the best practices that I have found relating to being secure when online.

    This post is not a step-by-step way to clean an already infected and slow machine. Instead, these ideas are presented to help you be secure so that you avoid being infected by a virus or be the victim of a phishing scam.

    Use OpenDNS

    OpenDNS is a free service that is designed to protect your home network. There is no software to install for OpenDNS. Instead, you make a small configuration change on your router which means that any device connected to it wired or wirelessly will be protected from various websites which includes adult themed as well as sites aimed to steal information from you or install a virus on your PC.

    There are two free options when signing up for OpenDNS. The first is OpenDNS Home which aims to make browsing the web faster, give parental controls to parents for children and provide phishing protection and identity theft protection. The second option is called OpenDNS Family Shield which does all that the Home service does but adds in blocks to adult websites.

    Lets take a look at what OpenDNS does in more detail. Note that there may be other similar services. I just happen to like OpenDNS because it’s free and works well. If you know of another DNS service aimed to protect a PC then feel free to post a mini review in the comments below.

    Blocking Websites and Phishing/ID Theft Attempts

    The biggest risk you have when being connected to the internet are emails that you receive which appear to be from banks, Paypal, popular shopping sites like eBay, Amazon and even friends as well as websites that you visit that carry a virus or malware. OpenDNS attempts to tackle both these problems by keeping a 24/7 updated list of problem sites. With you installing OpenDNS on a router, the service automatically intercepts any call to a webpage that might be bad and serves you a warning page instead. This alone is a great way to stop malware or a virus from attacking your PC.

    One of the services included for free with OpenDNS is Phishing Protection. Phishing is the term used where someone sends you a fake email from your bank and entices you to click through to a fake website and log in to your bank. Essentially, because the email is fake and it has sent you to an identical (but fake) website, you are not logging in to an online bank but instead are simply providing your username and password to someone else so that they can log in and have full access to your bank account. The same applies for PayPal, Amazon, eBay and many other services that are connected to your bank card. Although accessing your account just to steal money is mentioned above, it isn’t the only reason. Some fake bank emails just want you to visit a webpage so that your PC is infected with malware which can then use your PC to launch an attack on another system or steel files and all your keystrokes so they can get a lot more information from you.

    The built in phishing service attempts to block these sorts of websites. It is backed by a company called PhishTank who collect real time information about scams and phishing attempts and add the bad websites to a block list. OpenDNS utilises this block list and if you click on a link, you should be lucky and see a warning telling you to go back. This service also blocks other forms of identity theft.

    One bit of extra advice I’ll give here is that if your bank emails and gives you a link to log in and read something or check an option, do not use the link. Instead just go to the web browser and load up the webpage by typing in the URL (or using a book mark). If the message is important enough then after logging in, it will be presented to you. Do not click links in emails to Paypal, Amazon or your online bank unless you know for sure that it came from one of those organisations.

    Windows Updates – Keeping your PC Patched

    Moving on, the next subject is Windows Updates. One thing I regularly see when fixing friends PCs is the amount of Windows Updates that need to be installed. I’ve seen some cases where none were installed other than perhaps SP1 which came with the operating system. Windows Updates are easy to install on whatever Windows operating system you use. Assuming you have XP or above because Windows 2000/ME and older no longer qualify for security updates.

    Make sure that you go to the control panel and Windows Updates and set them to be automatically installed when available. After doing that, run the Windows Update from the Start menu to make sure you are current with your updates. Installing updates will ensure that you are patched from all the known vulnerabilities. When I say updates, I mean all critical updates such as service packs and other individual updates.

    Software Updates

    As well as Windows Updates, it is worth also checking updates for all of your software. The majority of software has a link, usually within the Help menu, that allows you to check for updates. Office occasionally gets updated to fix vulnerabilities in Outlook as well as other software. Keeping your software current helps prevent malicious attacks from hitting your PC.

    I mentioned software updates here. With that, always make sure you are running one of the latest supported web browser. I recommend Chrome or Firefox and then when you are notified an update is available, install it. Using an out of date browser is a high risk as a number of scripting type attacks can be done which will allow unwanted software to be installed. By using the latest versions of your browser, you help prevent malicious websites from installing software you don’t want. That is of course if OpenDNS hasn’t already prevented this from happening. Either way, it’s still best to use the latest software and even more so when it comes down to the web browser.

    Virus Scanners

    Installing a virus scanner is usually mandatory for most people. I know a few who don’t use virus scanners as they are experienced in noticing and quickly fixing issues, but for the 99.9% of the rest of PC users, this is pretty much a given. Luckily there are some free options out there from the likes of AVG which will provide some decent protection to your PC. Although you can prevent a large amount of attacks coming to you by implementing OpenDNS and running the latest software, there’s still a risk there. If AVG is updated regularly by the user, it provides another protective barrier and can prevent the virus being installed, thus saving paying out money for someone to help fix your PC.

    Malware Scanners

    Although you might not want to run a virus and a malware scanner on your PC, I always like to have a few around which includes MalwareBytes and Spybot. If I suspect visiting a bad site, then I’ll run a scan to see if anything was installed and then use the software to remove the malware.

    In Closing

    Keeping your PC clean can be achieved by the few simple steps above and with being a bit more observant.
    In summary, I’d like to remind you of the following:

    1. Use OpenDNS – It’s free and can help block phishing and id theft.
    2. Use Windows Update and set it to automatically run.
    3. Update all your software, most importantly Outlook (if you use it) and your web browser(s).
    4. Be careful when you open emails. Even though they might come from a friend, if the URL (link within) looks suspicious then don’t open it. If you do then hopefully OpenDNS blocks it or your virus scanner stops the effect. Ask yourself, why would my friend send me this email with little to no detail?
    5. If your bank or an online store emails you then be cautious. If you do think a link is genuine (which it likely isn’t) then make sure it takes you to the correct website. If Amazon it will be something like https://www.amazon.com and not https://www.myamazon.com or www.amazons.com.
    6. Install a virus scanner and have Malware scanners installed just in case.
    7. I’ll throw in this one as a bonus… use two-step authentication where available. Google uses this, Dropbox does and more and more services are transitioning over. Banks often use devices like the PINSentry from Barclays to make up a new password each time you log in.