<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Cumberland on Medium]]></title>
        <description><![CDATA[Stories by David Cumberland on Medium]]></description>
        <link>https://medium.com/@davidcumberland?source=rss-e8cdd566c677------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*opAt9v9h0gFT7TGBBWm8ZA.jpeg</url>
            <title>Stories by David Cumberland on Medium</title>
            <link>https://medium.com/@davidcumberland?source=rss-e8cdd566c677------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 22:17:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davidcumberland/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[When Mac’s Password Reset Fails you]]></title>
            <link>https://medium.com/@davidcumberland/when-macs-password-reset-fails-you-3ac54c590ab7?source=rss-e8cdd566c677------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ac54c590ab7</guid>
            <category><![CDATA[apple-id]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[password-reset]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[David Cumberland]]></dc:creator>
            <pubDate>Mon, 09 Jan 2017 22:02:00 GMT</pubDate>
            <atom:updated>2017-01-09T22:02:00.821Z</atom:updated>
            <content:encoded><![CDATA[<p>My wife recently found out that when we’re exporting videos or photos, her username is included in the metadata, for some, that’s not a problem, but when running a small business for professional photography, “edizzle” isn’t a wise choice of usernames. So began the journey of changing usernames and her name in the process.</p><p>Along the way I found out that she added a blank alias, and changed the user account (Name and username), upon restarting, the user selection screen was no more and just asked for a username and password. She tried all the combinations that the mac used to have to no avail.</p><p>I booted up in recovery mode (Command + R after the chime), opened up the terminal and ran the “resetpassword” command. This is normally a straight forward process, however, during the time of owning the Mac, she had changed her email address for the Apple ID and her old account was showing still. Attempting to log into the account resulted in an error stating that the account does not exist. Panic sets in.</p><p>Being someone familiar with unix systems, I decided to go into Single User Mode (Command + S after the chime), mount the drive and attempt to add a user via some built in Mac commands. That didn’t work. I checked the username in the Users directory to ensure that the username was ok, I could access the files, so at least we would be able to rescue them as a last resort.</p><p>After much frustrations and restarting the computer, we decided to call up Apple Support (10/10 for service), and walked through the basic stuff that we tried already. There was a bit of messing around with the Apple Account trying to get it back online, but that didn’t work. We were about to give up and just format the computer and start again, but there was one more thing to try. Removing a file to run the start up again to create an admin account.</p><p>This fix will only work with FireVault encryption is off or you know the passphrase for it. As a general rule, I tend to turn off the encryption by default, just in case of a drive failure which can be put into a drive bay and read with no problem.</p><h4>The Process</h4><p>The only thing we’re doing is removing Apple’s Setup Done file which tells the Mac that someone has already gone through the set up process and created their admin user account.</p><ol><li>Shut down your Mac (power off).</li><li>Turn on the Mac and when you hear the chime, press Command and S at the same time, keep the keys pressed until the screen flickers.</li><li>You will need to mount your drive by running the following command<br>/sbin/mount -uw / [Enter]</li><li>Remove the Apple Setup Done file (tells your Mac that the setup has been completed).<br>rm /var/db/.AppleSetupDone [Enter]</li><li>Reboot your mac<br>reboot [Enter]</li><li>Complete the setup process</li></ol><p>Congratulations, you now have an admin account up and running!</p><h4>Clean Up</h4><p>Since there was a few issues with the original account, here’s some helpful pointers that should get your original account back up and running.</p><p>Open System Preferences &gt; Users &amp; Groups &gt; Click the Padlock and enter your current user’s password.</p><p>To access advanced Options, control + click on the problem account, this will open up a new window. Although there is a warning on this screen, I am going to warn you as well, messing with this stuff may result in breaking your account and unable to log in.</p><p><strong>Remove Apple ID</strong><br>If you’ve come here due to a broken Apple ID, you can remove this by clicking change under the Apple ID section (there may be an email address). Click OK and restart.</p><p><strong>Remove Additional Aliases<br></strong>If you don’t see your user account on the login screen, you may have added a blank alias, click in the first position of the multi-select box, if the entire box highlights, you’re all good, might be something else, if it looks as though a line item has been selected, just click on the minus sign until there is nothing left (or the blank one has been removed). Click OK and restart.</p><p><strong>Login Options</strong><br>Close the advanced options and check the Login Options on the bottom left under the user accounts. Check to make sure Automatic login has been selected to your needs. Display login window as List of users (shows the circle pictures).</p><p><em>If none of these work, but your account is there and you have a secondary admin account, contact Apple Support for assistance.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ac54c590ab7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keep it simple. Like, real simple.]]></title>
            <link>https://medium.com/@davidcumberland/keep-it-simple-like-real-simple-8aee2abb0419?source=rss-e8cdd566c677------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aee2abb0419</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[David Cumberland]]></dc:creator>
            <pubDate>Mon, 12 Sep 2016 13:25:20 GMT</pubDate>
            <atom:updated>2016-09-15T02:41:07.736Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever had to make some updates to some old code that you or one of your colleagues wrote that one time two years ago? Was that code easy to read and navigate? Or was it a big pile of red bull fuelled ideas that just smelt of instant regret? We’ve all been there in one way or another, whether it was you who wrote it or had to maintain it, it’s something that every programmer dreads and eventually has to come to terms with maintaining said code one day.</p><p>There was a project I worked on a few years back where I thought it would be awesome to integrate an object oriented approach to our in house CMS so I would just need to pass in some parameters to update the database. Needless to say that it didn’t quite go to plan as there was some scope creep and it eventually ended up being Nonna’s world famous spaghetti code. It was cringe-worthy to say the least. Past me was so young and naive, never stopping to think about the future of this particular piece of code.</p><p>Then the worst thing imaginable happened. My colleague took over the project to make some updates. I sit right next to said colleague, I felt so bad for this poor individual who had to navigate through my unreadable, frustratingly messy spaghetti code. There was only one thing I could do at the time. In a true display of Australian mate-ship, I offered to buy this now weeping individual, a carton of our most finest Queensland brew. Realistically it should have been two.</p><p>Fast forward a few years to the start of 2016 where I’ve learnt to keep things simple and easy to follow for any programmer or front end developer of any skill level to follow along with my written code. One day I had a light bulb go off in my head, and I decided to write down three questions and swear by them.</p><ul><li>Should a junior programmer or front end developer see this code, could they understand it?</li><li>Could this code be followed along by myself or another programmer in 1, 3 or 5 years?</li><li>Would adding a feature be as simple as adding some extra lines?</li></ul><p>So they’re not perfect, but at least I’m starting to think about the future of my code. I call these the “<em>Shoulda Coulda Woulda</em>” of programming. The joys of having an in house CMS, we have to be careful about how we write our code, because who knows what would happen in the future next week, month or year from now.</p><p>You’re either probably thinking or shouting at the computer by now, something like “David, hold up a sec. What do you mean by simple? I can understand my code just fine the way it is.” And I say, that’s a great question. When I say keep it simple, I am asking that you keep it clean, readable and well documented. What if you’re having you first vacation in three years? Picture this, you’re in the Maldives and your team is working around the clock trying to get an urgent task completed that a client requested. Are you going to be disturbed while you’re enjoying the ocean breeze sipping on a Piña colada? I hope not. Okay, I had a point to this. Let’s just get on with some examples.</p><p>Let’s just pretend that we need to output and display the grand total of the customer’s cart. There’s the total purchase amount, shipping cost and the ever-so-wonderful GST of 10%. You need to display this to the customer with a dollar sign and formatted to two decimal places with a thousands separated. One way you could do it is all in one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*b0Pqf4p9ktnXY8uVYk3_9Q.png" /><figcaption>All on one like. Source: self.</figcaption></figure><p>Sure it gets the job done, but it doesn’t look that clean. What if next week you needed to add a discount to the output? Let’s improve this a little.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*e3jeCqjJJ_qRsV_FWPQRIw.png" /><figcaption>Clean it up to make it readable. Source: self.</figcaption></figure><p>There we go, it’s now a lot more easier to read, and if we needed to add the discount feature in, we can certainly do this now. Back to our Maldives example, If you were sitting back and relaxing enjoying your beverage, and suddenly you see a tweet that Mr Turnbull decided to up the GST to 15%, at least someone else could follow along and find where you calculate the tax and bump it up to 15%.</p><p>From one programmer to another, just keep it simple. You’re not out to write a simple one liner, you’re there to accomplish a task for your client. Working in a team or by yourself, you want to be able to add features and/or maintain code in the most efficient way possible. Writing clean code will save you a lot of wasted hours trying to figure out what it does and prevents you from having to sit down and re-write the code from scratch.</p><p>Once you’ve learnt how to write clean, simple, elegant code, then you can start looking at how to optimise your code. Just remember, less lines do not necessarily mean optimised code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aee2abb0419" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>