<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Posts about Apple</title><link>https://chriswarrick.com/</link><atom:link href="https://chriswarrick.com/blog/tags/apple.xml" rel="self" type="application/rss+xml" /><description>A rarely updated blog, mostly about programming.</description><lastBuildDate>Mon, 26 Sep 2022 17:45:00 GMT</lastBuildDate><generator>https://github.com/Kwpolska/YetAnotherBlogGenerator</generator><item><title>What an ARM Mac means for developers and Windows users</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2020/06/22/what-an-arm-mac-means-for-developers-and-windows-users/</link><pubDate>Mon, 22 Jun 2020 19:00:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2020/06/22/what-an-arm-mac-means-for-developers-and-windows-users/</guid><description>
The rumor mill was right this time, and Apple has just announced they will
transition Macs to ARM processors. These news have some side effects for
software developers, particularly those not working with the Apple ecosystem.
And they also affect people who depend on both macOS and Windows.
</description><content:encoded><![CDATA[
<p>The rumor mill was right this time, and Apple has just announced they will
transition Macs to ARM processors. These news have some side effects for
software developers, particularly those not working with the Apple ecosystem.
And they also affect people who depend on both macOS and Windows.</p>



<p>In this post, I am not going to focus in the differences between x86_64 and ARM,
RISC and CISC, and all the benchmarks. Let’s assume that Apple manages to offer
ARM-based CPUs that can match performance of most Intel processors in Apple’s
lineup, and let’s even assume they can make an ARM Mac Pro. (A note on naming:
Apple Silicon is the official name, but it sounds ugly. I’ll just call it ARM.
For Intel, I’ll use either Intel or x86(_64).)</p>
<p>For many users, the transition will be more-or-less transparent. Sure, they’ll
lose some apps, just like they probably did with Catalina (which dropped
support for 32-bit Intel apps), or some apps will not be available/will be
buggy in the first few months of the transition (though it will be easier than
the PowerPC transition, because Apple uses little-endian byte order on ARM).</p>
<section id="how-will-it-work-out-in-apple-land">
<h1>How will it work out in Apple land?</h1>
<p>For developers who work only on iOS apps, the transition also won’t mean much.
Maybe a faster, more accurate Simulator. They’ll need to buy an ARM Mac sooner
or later (within the next 5 years), because Apple requires them to use the
latest Xcode version for App Store submissions, and Xcode supports at best the
previous version of macOS.  But that has been Apple’s policy forever, and the
Intel Macs will probably be within the usual deprecation range when that
happens.</p>
<p>The requirements for macOS-only developers are pretty obvious, they will need
to buy an ARM Mac on day one, so they can test their apps on the new platform.
They will also need to work on ARM compatibility — although updating your app
for the new OS is a yearly ritual in Apple land, so that’s also mostly
business-as-usual (unless you do a lot of unportable low-level stuff in your
code). There are some pro apps that tend to lag behind new Apple decrees (some
might have been hit by Catalina), and users of those apps might prefer to stay
with Intel for a little bit longer.</p>
<p>But then, we get to the requirements of developers who use Macs, but don’t work
exclusively with the Apple platforms. This is a fairly large group, since many
developers like Macs for the good hardware, Unix-based software, and the
integration of both. And for some part, non-developers are affected too.</p>
</section>
<section id="who-needs-non-apple-operating-systems">
<h1>Who needs non-Apple operating systems?</h1>
<p>The first group are people tied to Windows, somehow. Some of them might be
using Boot Camp to play games. Others might be using Boot Camp or
virtualization software (Parallels Desktop, VMware Fusion, Oracle VM
VirtualBox) to run Windows and Windows-specific apps — perhaps they need the
Windows version of Office, or various Windows-onlypro apps, or they need
Windows to file their taxes, because their government does not care about
non-Windows OSes. Or perhaps they’re web developers, and they need to test
compatibility with the Windows versions of browsers, or the old Microsoft
browsers (IE and pre-Chromium Edge).</p>
<p>The second group is software developers who need Linux. While macOS provides a
very competent development environment, and many things can be run directly on
macOS, some use-cases may require a Linux VM.  Perhaps the most notable case is
Docker.</p>
<p>Docker is a solution for lightweight app containers, that can offer separation
between apps, and that can simplify and standardize deployment. Docker itself
is not a virtualization solution (at least in the traditional sense). Docker
must run on top of Linux (there’s also Docker-on-Windows, but that’s another
story). The Docker Desktop for Mac app runs a lightweight Linux VM, and runs
containers in that VM. The virtualization solution <a class="reference external" href="https://github.com/docker/for-mac">Docker for Mac uses</a> is <code class="docutils literal">Hypervisor.framework</code>, which is
part of macOS itself.</p>
<p>Who else needs virtualization? Android developers. The Android Emulator is also
a virtual machine that runs the Android operating system. Android can run on
different architectures, and so, a x86 system image is typically used for the
Emulator.</p>
</section>
<section id="is-virtualization-possible-on-arm">
<h1>Is virtualization possible on ARM?</h1>
<p>Yes, definitely. Apple has been testing it much earlier, since the
aforementioned <code class="docutils literal">Hypervisor.framework</code> was found <a class="reference external" href="https://twitter.com/never_released/status/1250533740557852674">on iOS in April</a>.
And Apple announced virtualization support for ARM Macs during the keynote, and
showed an example of a Linux VM. That VM was, of course, running an ARM64
distribution of Linux.</p>
<p>But what can we use this for? Turns out, it’s complicated. The easiest thing
from the few use-cases mentioned before is Android. Google just needs to get
the Emulator working on ARM Macs and ship that to the devs.</p>
<p>What about Linux in general? Many mainstream distributions
support ARM64, so that’s not a problem in general. The support for a particular
distro or software might be worse than on x86_64, but it’s generally not a
problem for users.</p>
<p>But for Docker, there’s a problem. One of the many advantages of Docker is
dev-prod parity. If you deploy your app with Docker to an x86_64 Linux server,
you can also install Docker on an x86_64 Linux developer machine (or a Linux VM on an
Intel Mac/Windows PC). Both the server and the dev machine can run <strong>the same</strong>
image, the same code, the same configuration. That won’t happen if they are a
different architecture. This means that you can end up with bugs happening
because of different environments, and it’s also possible that some images you
depend on are not available for both architectures.</p>
<p>And then we get to Windows. Windows also has an ARM version, but it’s currently
available only with a new ARM device (you can’t buy it standalone). If
Microsoft were to sell this, we’d have an issue with the software. Windows 10
on ARM supports 32/64-bit ARM software, and can run 32-bit Intel (x86) software
using emulation. It cannot, however, emulate apps that require 64-bit Intel
processors (x86_64).  This makes the software situation on that platform a bit
better. While many developers don’t care about ARM and might not have builds
for ARM available, most Windows software is available in both x86 and x86_64
versions, or is exclusively 32-bit. But certain pro apps are x86_64 only, so if
there is no ARM build of it, an ARM Windows PC currently cannot run it.
(<em>Update:</em> Microsoft announced <a class="reference external" href="https://blogs.windows.com/windowsexperience/2020/09/30/now-more-essential-than-ever-the-role-of-the-windows-pc-has-changed/">x86_64 emulation on ARM</a>,
which means more software will work.)</p>
<p>And note that Microsoft knows about the transition, but we haven’t heard
anything about Windows during the keynote…</p>
</section>
<section id="can-we-emulate-x86-64-and-run-x86-64-windows-10">
<h1>Can we emulate x86(_64) and run x86(_64) Windows 10?</h1>
<p>Theoretically? Yes. Practically? No.</p>
<p>The issue with emulation is speed. There are a few x86 emulators available, and
those emulators can be run on an ARM device just fine. You can find videos on
YouTube (not a very reliable source of information, I know) in which people try
to benchmark those, or try to run Windows using an emulator like that. And even
with an ancient Windows version, the emulation is painfully slow. Windows 10
would be basically unusable if you tried to emulate all of it.</p>
<p>How does the x86 emulation on Windows 10 for ARM work? You can watch <a class="reference external" href="https://channel9.msdn.com/Events/Build/2017/P4171">the
Channel 9 video about Windows 10 on ARM</a> (around 6:00) for more
details. The trick is that system DLLs are using a hybrid x86/ARM64 library
format, which means x86 code can call those DLLs at native speeds. This means
that many apps run at near-native speed (depending on the ratio of custom code
to system DLL calls). This technique cannot work for emulating the entire
operating system. If Windows 10 on ARM was made available for ARM Macs, running
x86 Windows apps would become feasible.</p>
<p>Rosetta probably uses similar technique. Most apps will be translated at
install time, not at run time. But you can’t do that with an entire OS.</p>
</section>
<section id="whats-next-for-people-who-rely-on-both-macos-and-windows">
<h1>What’s next for people who rely on both macOS and Windows?</h1>
<p>For a few more years, Intel Macs will still be supported by Apple (with new
macOS versions) and by software vendors. But after that? Well, you’re stuck
with two machines, at least until Windows on ARM becomes viable and runnable on
Macs. Or you can start exploring alternatives to macOS software. If you’re one
of the macOS-as-UNIX-with-great-UX developers (hello!), perhaps you’ll have to
switch to Linux — or perhaps Windows with Windows Subsystem for Linux? (The
latter is becoming more usable with every Windows release, so keep an eye on
that… I wrote this post in NeoVim in WSL2, with Windows Terminal supporting
many advanced terminal features, and the transparent filesystem integration
letting me access Windows files directly).</p>
</section>
<section id="post-m1-announcement-update-2020-11-14">
<h1>Post-M1 announcement update (2020-11-14)</h1>
<p>Parallels have confirmed <a class="reference external" href="https://www.parallels.com/blogs/parallels-desktop-apple-silicon-mac/">support for M1 Macs</a> and
are offering a Technical Preview of their M1 virtualization product. This
announcement’s mention of Windows 10 ARM supporting x86_64 apps has caused
some tech writers to assume Parallels will support Windows 10 ARM on M1
Macs. This is <strong>not</strong> what the post says. Parallels is not, and cannot
announce support for that OS, because Windows 10 ARM is (still) available to
ARM OEMs only to install on their devices — making an official announcement
about this feature today would be admitting to doing something illegal/not
allowed by the EULA. I’m pretty sure they are not working on support for
Windows 10 ARM now and in the foreseeable future, until Microsoft opens up
Windows 10 ARM to the public — their own legal issues aside, who would they sell
the Windows support to?</p>
<p>In other news, <a class="reference external" href="https://github.com/docker/for-mac/issues/4733">Docker is not ready yet</a>.</p>
</section>
]]></content:encoded><category>Apple</category><category>Apple</category><category>ARM</category><category>devel</category><category>Mac</category></item><item><title>Reinstalling macOS: What To Try When All Else Fails</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/</link><pubDate>Wed, 03 Jun 2020 21:00:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/</guid><description>
Recently, I reinstalled macOS on my device. Throughout the process, many
attempts failed miserably. But I now have some experience and assorted hints on
what to try (as long as you’ve got an Intel Mac).
</description><content:encoded><![CDATA[
<p>Recently, I reinstalled macOS on my device. Throughout the process, many
attempts failed miserably. But I now have some experience and assorted hints on
what to try (as long as you’ve got an Intel Mac).</p>



<p><strong>DISCLAIMER:</strong> All information in this post is provided as-is, and some of it may
void your warranty. Neither Chris Warrick nor Apple will be responsible for any
damage to your devices caused as a result of using information in this post.</p>
<p><strong>Note:</strong> This blog post is written for Intel Macs, particularly those that can
boot OS X El Capitan (or macOS Sierra, but that’s untested). If your Mac can’t, you’ll need to look for help
elsewhere. If you’ve got an Apple Silicon Mac, you probably want to perform
<a class="reference external" href="https://support.apple.com/guide/apple-configurator-mac/revive-or-restore-a-mac-with-apple-silicon-apdd5f3c75ad/mac">a DFU restore</a>
(requires another Mac and a USB-C cable.)</p>
<section id="making-install-media-with-el-capitan-with-access-only-to-recovery">
<h1>Making install media with El Capitan (with access only to Recovery)</h1>
<p>The best, safest, least error-prone way to do an install is with a USB stick.
Unfortunately, making a USB stick with the macOS installer on it is a nuisance.
The expected way to produce macOS install media is to download the installer
from App Store/Software Update, and run the <code class="docutils literal">createinstallmedia</code> command-line
program included with that installer app. All is well, as long as macOS works.
If it doesn’t, and Recovery can’t install it for you, that can be difficult to
solve.</p>
<p>Apple does not make macOS images publicly available. That’s probably to make
Hackintoshing this little bit harder, but this also affects legitimate users.
The only thing you can easily download from Apple is El Capitan. Apple offers
<a class="reference external" href="https://support.apple.com/en-us/HT206886">InstallMacOSX.dmg</a> on their
website.</p>
<p>There are also some other downloads available:</p>
<ul class="simple">
<li><p>there’s a Sierra download, with a broken link, although it can be fixed by changing <code class="docutils literal"><span class="pre">updates-http</span></code> to <code class="docutils literal">updates</code>: <a class="reference external" href="https://updates.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg">get Sierra installer</a>.</p></li>
<li><p>if you need something older than El Capitan, downloads are available as far
back as Lion, although these might not have the <code class="docutils literal">createinstallmedia</code> tool
required for this procedure.</p></li>
</ul>
<p>This post assumes you’re working with El Capitan; a quick look though that file
suggests the instructions in this post should work with Sierra as well.</p>
<p>If you take a look at the instructions, you will see that this is
<em>not</em> a bootable OS X image. This image has a <code class="docutils literal">.pkg</code> package. This package is
expected to install <code class="docutils literal">/Applications/Install OS X El Capitan.app</code>. Well, we’re
in recovery, we can’t install stuff. So, let’s do this the manual way.</p>
</section>
<section id="manually-installing-pkg-files">
<h1>Manually installing .pkg files</h1>
<p>Turns out the <code class="docutils literal">.pkg</code> format is just an archives all the way down, with all
archives being different formats (at least three).</p>
<aside class="float-md-right mt-md-0 sidebar">
<p class="sidebar-title">macOS flat package format</p>
<p>You can find more resources about the flat package format, <a class="reference external" href="http://s.sudre.free.fr/Stuff/Ivanhoe/FLAT.html">one</a> or <a class="reference external" href="https://matthew-brett.github.io/docosx/flat_packages.html#payload_">two</a>, although
this was deduced from the <code class="docutils literal">file</code> command and The Unarchiver.</p>
</aside>
<p>The first archive is the <code class="docutils literal">.pkg</code> file itself. Those files are in <a class="reference external" href="https://en.wikipedia.org/wiki/Xar_(archiver)">XAR format</a>, which was invented by the
OpenDarwin community. You can either extract it with <code class="docutils literal">pkgutil <span class="pre">--expand</span>
foo.pkg foo_files</code> (the last argument is the destination directory, can be
anything, will be created by <code class="docutils literal">pkgutil</code>) if you have access to that command (it’s
available in Recovery OS), or you can try the <code class="docutils literal">xar</code> utility as <code class="docutils literal">xar <span class="pre">-xf</span>
foo.pkg</code>. The structure produced by both tools is a bit different, but we can
work with both.</p>
<p>The second archive-in-archive is the <code class="docutils literal">Payload</code>. It’s a gzipped cpio archive
that contains the files installed by this package.  If you have BSD tar
(default on macOS, easily installable on Linux), you can just do <code class="docutils literal">tar <span class="pre">-xvf</span> Payload</code>.
Otherwise, you can use <code class="docutils literal">gunzip <span class="pre">-c</span> Payload | cpio <span class="pre">-i</span></code> (or <code class="docutils literal">gzcat</code>). That
will extract all the files the package has.</p>
<p>Another nested archive is the <code class="docutils literal">Scripts</code> archive, although note that
<code class="docutils literal">pkgutil</code> will extract it automatically. If it’s not extracted, it’s actually
<code class="docutils literal">.cpio.gz</code> again, with the same way to extract it.</p>
<p>(PS.  If you have <code class="docutils literal">7z</code> around (on Windows/Linux as well), you can just point
it at all the compressed files mentioned in this paragraph.)</p>
</section>
<section id="making-install-media-out-of-partial-macos-installers-not-a-valid-os-installer-application">
<h1>Making install media out of partial macOS installers (“not a valid OS installer application”)</h1>
<section id="a-from-the-el-capitan-download">
<h2>a. From the El Capitan download</h2>
<p>Let’s expand the El Capitan package.</p>
<div class="code"><pre class="code console"><a id="rest_code_a12b8e2380434f0097be4f820a042a57-1" name="rest_code_a12b8e2380434f0097be4f820a042a57-1" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-1"></a><span class="gp">$ </span><span class="o">(</span>mount<span class="w"> </span>the<span class="w"> </span>DMG<span class="w"> </span><span class="k">in</span><span class="w"> </span>Disk<span class="w"> </span>Utility<span class="o">)</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-2" name="rest_code_a12b8e2380434f0097be4f820a042a57-2" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-2"></a><span class="gp">$ </span>cp<span class="w"> </span>/Volumes/Install<span class="se">\ </span>OS<span class="se">\ </span>X/InstallMacOSX.pkg<span class="w"> </span>/Volumes/Macintosh<span class="se">\ </span>HD/
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-3" name="rest_code_a12b8e2380434f0097be4f820a042a57-3" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-3"></a><span class="go">     (Or copy it to some other volume you can write to; NOT the USB stick)</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-4" name="rest_code_a12b8e2380434f0097be4f820a042a57-4" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-4"></a><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>/Volumes/Macintosh<span class="se">\ </span>HD/
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-5" name="rest_code_a12b8e2380434f0097be4f820a042a57-5" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-5"></a><span class="gp">$ </span>pkgutil<span class="w"> </span>--expand<span class="w"> </span>InstallMacOSX.pkg<span class="w"> </span>elcapitan
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-6" name="rest_code_a12b8e2380434f0097be4f820a042a57-6" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-6"></a><span class="gp">$ </span>ls<span class="w"> </span>-F<span class="w"> </span>elcapitan
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-7" name="rest_code_a12b8e2380434f0097be4f820a042a57-7" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-7"></a><span class="go">Distribution*       InstallMacOSX.pkg/ Resources/</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-8" name="rest_code_a12b8e2380434f0097be4f820a042a57-8" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-8"></a><span class="gp">$ </span><span class="nb">cd</span><span class="w"> </span>elcapitan/InstallMacOSX.pkg/
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-9" name="rest_code_a12b8e2380434f0097be4f820a042a57-9" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-9"></a><span class="gp">$ </span>tar<span class="w"> </span>-xvf<span class="w"> </span>Payload
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-10" name="rest_code_a12b8e2380434f0097be4f820a042a57-10" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-10"></a><span class="go">x .</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-11" name="rest_code_a12b8e2380434f0097be4f820a042a57-11" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-11"></a><span class="go">x ./Install OS X El Capitan.app</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-12" name="rest_code_a12b8e2380434f0097be4f820a042a57-12" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-12"></a><span class="go">x ./Install OS X El Capitan.app/Contents</span>
<a id="rest_code_a12b8e2380434f0097be4f820a042a57-13" name="rest_code_a12b8e2380434f0097be4f820a042a57-13" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_a12b8e2380434f0097be4f820a042a57-13"></a><span class="go">…</span>
</pre></div>
<p>We’ve got the installer app, which is what we need to create an install image.
Great, let’s try it!</p>
<div class="code"><pre class="code console"><a id="rest_code_dd7186a14dd947c1acd6377af6fa0a91-1" name="rest_code_dd7186a14dd947c1acd6377af6fa0a91-1" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_dd7186a14dd947c1acd6377af6fa0a91-1"></a><span class="gp"># </span><span class="s2">&quot;Install OS X El Capitan.app/Contents/Resources/createinstallmedia&quot;</span><span class="w"> </span>--volume<span class="w"> </span>/Volumes/MyBlankUSBDrive<span class="w"> </span>--applicationpath<span class="w"> </span><span class="s2">&quot;Install OS X El Capitan.app&quot;</span>
<a id="rest_code_dd7186a14dd947c1acd6377af6fa0a91-2" name="rest_code_dd7186a14dd947c1acd6377af6fa0a91-2" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_dd7186a14dd947c1acd6377af6fa0a91-2"></a><span class="go">Install OS X El Capitan.app does not appear to be a valid OS installer application.</span>
</pre></div>
<p>Oh, we’ve got a problem. Turns out there’s one more thing we need to take care
of, and it’s the scripts. MacOS packages have scripts, typically shell scripts,
that are run at various stages in the install process. We can look at the
<code class="docutils literal">PackageInfo</code> file, or just look in the <code class="docutils literal">Scripts</code> folder, to see that
there’s an <code class="docutils literal">link_package</code> script we need to run. This script creates a
<code class="docutils literal">Contents/SharedSupport</code> directory inside the installer app, and
copies/hardlinks the <code class="docutils literal">InstallESD.dmg</code> file (which is the install formerly-DVD
image) to that directory. Let’s try doing this on our own:</p>
<div class="code"><pre class="code console"><a id="rest_code_02681eda476540b2a277870eab700139-1" name="rest_code_02681eda476540b2a277870eab700139-1" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-1"></a><span class="gp">$ </span>mkdir<span class="w"> </span><span class="s2">&quot;Install OS X El Capitan.app/Contents/SharedSupport&quot;</span>
<a id="rest_code_02681eda476540b2a277870eab700139-2" name="rest_code_02681eda476540b2a277870eab700139-2" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-2"></a><span class="gp">$ </span>mv<span class="w"> </span>InstallESD.dmg<span class="w"> </span><span class="s2">&quot;Install OS X El Capitan.app/Contents/SharedSupport&quot;</span>
<a id="rest_code_02681eda476540b2a277870eab700139-3" name="rest_code_02681eda476540b2a277870eab700139-3" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-3"></a><span class="gp"># </span><span class="s2">&quot;Install OS X El Capitan.app/Contents/Resources/createinstallmedia&quot;</span><span class="w"> </span>--volume<span class="w"> </span>/Volumes/MyBlankUSBDrive<span class="w"> </span>--applicationpath<span class="w"> </span><span class="s2">&quot;Install OS X El Capitan.app&quot;</span>
<a id="rest_code_02681eda476540b2a277870eab700139-4" name="rest_code_02681eda476540b2a277870eab700139-4" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-4"></a><span class="go">Ready to start.</span>
<a id="rest_code_02681eda476540b2a277870eab700139-5" name="rest_code_02681eda476540b2a277870eab700139-5" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-5"></a><span class="go">To continue we need to erase the disk at /Volumes/MyBlankUSBDrive.</span>
<a id="rest_code_02681eda476540b2a277870eab700139-6" name="rest_code_02681eda476540b2a277870eab700139-6" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_02681eda476540b2a277870eab700139-6"></a><span class="go">If you wish to continue type (Y) then press return:</span>
</pre></div>
<p>And it works! <code class="docutils literal">createinstallmedia</code> will now produce valid install media.</p>
</section>
<section id="b-installer-from-recovery-app-store-any-macos-version">
<h2>b. Installer from Recovery/App Store (any macOS version)</h2>
<p>If you are in Recovery, you can find an Install app on the filesystem. If you
try to run it, you will get the same error as in the previous paragraph:</p>
<div class="code"><pre class="code text"><a id="rest_code_0447ee55c787469fb1388d1fd77a288f-1" name="rest_code_0447ee55c787469fb1388d1fd77a288f-1" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_0447ee55c787469fb1388d1fd77a288f-1"></a>Install macOS Catalina.app does not appear to be a valid OS installer application.
</pre></div>
<p>This also happens with some older macOS versions, where you get a small
<code class="docutils literal">.app</code> from the App Store, and that app does the actual download.</p>
<p>Whatever the issue was, we need to download the install files with the
installer. Open the installer and let it run until the download finishes. If
the app asks you to reboot, quit it at this point. If it never asks, you can
still find a way to get files out (after a failed install, they should not be
removed).</p>
<p>The install files can be found in <code class="docutils literal">/macOS Install Data</code> on the destination
volume. For older versions, you will just have <code class="docutils literal">InstallESD.dmg</code>, newer
versions add more and more files, some of which are hardware-specific (and
Catalina has <code class="docutils literal">InstallESDDmg.pkg</code>, because Apple loves nesting archives for no
reason!). However many files you find, you can just:</p>
<ol class="arabic simple">
<li><p>Copy <code class="docutils literal">Install macOS Catalina.app</code> to a read-write volume.</p></li>
<li><p>Copy the contents of <code class="docutils literal">/Volumes/TARGET/macOS Install Data</code> to <code class="docutils literal">Install
macOS Catalina.app/Content/SharedSupport</code>. Make sure you account for hidden
files, if any (copy the entire directory). If you did this correctly,
<code class="docutils literal">InstallESDDmg.pkg</code> (or <code class="docutils literal">InstallESD.dmg</code> on older verisons) is in the <code class="docutils literal">SharedSupport</code>
directory (not in a subdirectory).</p></li>
<li><p>Run <code class="docutils literal">createinstallmedia</code>. It should now consider the installer valid. The
available options differ slightly depending on the OS version.</p></li>
</ol>
</section>
</section>
<section id="el-capitan-installer-cant-be-verified">
<h1>El Capitan installer can’t be verified</h1>
<p>If you get this error, it might be because Apple’s signing keys expired, or
because of other date/time weirdness. Regardless, you can force an install if
you are sure the installer is not damaged with this command <a class="reference external" href="https://apple.stackexchange.com/questions/216730/this-copy-of-the-install-os-x-el-capitan-application-cant-be-verified-it-may-h">(source)</a>:</p>
<div class="code"><pre class="code console"><a id="rest_code_e9c19fefd716419597578cd44c42b942-1" name="rest_code_e9c19fefd716419597578cd44c42b942-1" href="https://chriswarrick.com/blog/2020/06/03/reinstalling-macos-what-to-try-when-all-else-fails/#rest_code_e9c19fefd716419597578cd44c42b942-1"></a><span class="gp"># </span>installer<span class="w"> </span>-pkg<span class="w">  </span>/Volumes/Mac<span class="se">\ </span>OS<span class="se">\ </span>X<span class="se">\ </span>Install<span class="se">\ </span>DVD/Packages/OSInstall.mpkg<span class="w"> </span>-target<span class="w"> </span>/Volumes/<span class="s2">&quot;XXX&quot;</span>
</pre></div>
</section>
<section id="bonus-tidbit-1-how-the-download-works">
<h1>Bonus tidbit 1: how the download works</h1>
<p>While messing with all the installer stuff, I found out a few
interesting/worrying things about the download process.</p>
<p>The first one is that the macOS installer uses plain HTTP without encryption to
download files. That opens you to all the standard issues — an attacker can
replace files you download, and the protocol doesn’t do anything to detect
errors (the installer will verify files, but where do the checksums come
from?).</p>
<p>The second one is how the download happens. You might have noticed it to be a
bit slower than usual traffic. The download happens in 10 MB chunks, using the
<code class="docutils literal">Range</code> HTTP header. The installer asks for 10 MB, gets it, saves, asks for
another chunk. Repeat that over 800 times, and the overhead of the entire HTTP
dance becomes noticeable. (I haven’t checked, but I hope the installer at least
uses Keep-Alive. I wouldn’t be particularly surprised if it didn’t, though.)</p>
<p>But this raises another question. The servers clearly support partial downloads.
And yet, if your network disconnects during the download, your download
progress for that file is reset, and in Catalina, you can go from 8 GB back to
500 MB if you’re particularly unlucky. The question is, why? This
infrastructure should make it trivial to continue the download, perhaps
discarding the most recent chunk if you’re concerned about that download of it
being unsuccessful.</p>
</section>
<section id="bonus-tidbit-2-using-terminal-from-setup-assistant">
<h1>Bonus tidbit 2: using Terminal from Setup Assistant</h1>
<p>The first time you boot a Mac after a clean install, it starts the Setup
Assistant. This app asks for basic OS settings (locale, date/time, user
accounts), and also lets you restore user data from backups.</p>
<p>Sometimes, you might want to access the Terminal or Console from that screen.
You can do that with Ctrl + Opt + Cmd + T and Ctrl + Opt + Cmd + C respectively <a class="reference external" href="https://chris-collins.io/2018/03/15/Using-Terminal-At-macOS-Setup-Assistant/">(source)</a>.</p>
<p>How could that come in handy? For example, if you want to check if the backup
drive still worked and if the process isn’t stuck (I wrote a test file and also
checked <code class="docutils literal">top</code>).</p>
</section>
<section id="bonus-tidbit-3-creating-an-image-of-the-install-media-might-not-work">
<h1>Bonus tidbit 3: creating an image of the install media might not work</h1>
<p>A few months later, in December, I upgraded to Big Sur and then installed Windows 10
alongside it in Boot Camp. I then did some more hacks, which led to
two unbootable OSes.</p>
<p>As part of the upgrade, I had prepared install media and used it to install (so
it wouldn’t fail, as it did last time), and made a <code class="docutils literal">.dmg</code> of it with Disk
Utility. (Also, Apple won’t tell you this, but you need to give Disk Utility
<em>Full Disk Access</em> for disk imaging to work. Otherwise, you get a cryptic
error.) I erased the USB drive after installing, but hey, I could get it back.
I booted into Internet Recovery and restored my image. Big Sur failed to boot
and showed a <a class="reference external" href="https://support.apple.com/en-us/HT210901">🚫 sign</a>. I tried
restoring my Catalina image from the previous reinstall, and that didn’t work
due to a size mismatch. I used a different USB drive than these months ago (I
didn’t have that one with me at the moment), and apparently the one I used had
a different size (both are marketed as 16 GB). The images could be mounted
fine, and <code class="docutils literal">createinstallmedia</code> should have worked, likely producing a
bootable drive.</p>
</section>
<section id="bonus-tidbit-4-dont-bother-restoring-a-time-machine-backup">
<h1>Bonus tidbit 4: don’t bother restoring a Time Machine backup</h1>
<p>Time Machine is Apple’s magical backup solution. Time Machine saves snapshots
of your entire disk. It’s supposed to help restore files that were deleted or
changed in an unwanted way, or help you restore a full macOS install.</p>
<p>Time Machine is great at file recovery, but none of my 3 system restore
attempts were successful. Attempt #1 was a full Time Machine System Restore,
from Recovery, back in June. It failed partway through, it couldn’t read
everything from the disk. There might have been underlying hardware issues with
that failure, so I had another attempt.</p>
<p>Attempt #2 was a Migration Assistant restore, as part of the initial setup.
This one succeeded, and things worked… except for one fairly important app.
This app requires online activation with the vendor, and it wouldn’t reactivate
after the install. Whatever the third-party vendor is doing didn’t like the
reinstall. I tried to nuke all the things in ~/Library related to their
software, and ran their nuke-everything uninstaller, but that didn’t work.
I reinstalled from scratch and copied over my files, settings and apps from the
Time Machine drive.</p>
<p>Attempt #3 involved the System Restore again, this time for the December
reinstall. The hardware issues were all fixed in the meantime, so I went for a
Time Machine System Restore.</p>
<p><strong>Issue #1:</strong> Internet Recovery booted into Catalina. There was an issue on Apple’s
side, <a class="reference external" href="https://mjtsai.com/blog/2020/12/30/no-more-big-sur-internet-recovery/">Big Sur was unavailable in Internet Recovery in December</a>. TM
Recovery will not restore a backup created with a newer version of macOS than
you’re booted into, so I was forced to restore a slightly older Catalina
backup. (I spent most of my time in Windows during that weekend, so other than
the need to upgrade macOS to Big Sur again, I didn’t really lose any data due
to this.)</p>
<p><strong>Issue #2:</strong> It wasted time computing an inaccurate size estimate. Before
restoring a backup, macOS first checks if it will fit on your drive. When it
does that, an indeterminate progress bar is shown. macOS won’t tell you the
result of that computation, but you can read the final value from the full
Installer Log (Cmd + L). On my Mac, the value was 96.2 GB. I was at the Mac
when it was getting close to that value. 94, 95, 96, 96.1, 96.2, 96.3… hold on
a second, 96.3 GB? Hopefully that’s just a bunch of extra things that are
installed from the system image directly, or something like that, right? Of
course, since the progress bar is based on the pre-computed size, it became
indeterminate and I couldn’t tell when it would end. 98, 100, 110, 120, 121.2
GB is where it ultimately ended. So, not only did it waste 20+ minutes
computing a size, it was off by 25 GB.</p>
<p><strong>Issue #3:</strong> The restore didn’t work. The System Restore finished and claimed to
have succeeded, but macOS wouldn’t boot. It showed an <em>Unrecoverable error</em>,
<em>SecurityAgent was unable to create requested mechanism</em>. Most people who had a
similar error had it caused by a botched TeamViewer uninstall; I didn’t have
that installed, and it was referring to a different component. So, wipe and
fresh reinstall it is.</p>
<p>I copied my stuff from the TM drive, and it was acting weird. Some apps failed
to load their settings copied into Library, others started with a “Move to
/Applications?” prompt (even though they were in that directory). For some
reason, those files had some hidden attribute set on it. I worked around it by
putting files in a <code class="docutils literal">.zip</code> archive with Keka, and then unzipping them;
<code class="docutils literal">xattr</code> might also help. (The attribute was likely <code class="docutils literal">com.apple.quarantine</code>.)</p>
<p>After I got the Mac to work, I reinstalled Windows and set up rEFInd, and it
now works fine. (I only use rEFInd because I want virtualization in Windows,
and that doesn’t work unless you’re warm-rebooting from macOS. I don’t need
anything more advanced than the Option key boot menu, but Apple made me use a
third-party bootloader.)</p>
<p><em>We now go back to the original post from June.</em></p>
</section>
<section id="an-open-letter-to-progress-bar-designers">
<h1>An Open Letter to Progress Bar Designers</h1>
<p>Dear Progress Bar Designers: can you please make your progress bars
functional? The macOS progress bar might look sleek at just 7 px (non-Retina)/6
pt = 12 px (Retina) high, but at the same time, you’re looking at individual
pixels if you need to know if it works or if it’s stuck. I have had to point my
mouse cursor at the end of the filled-in part just to know if it’s working or
not. Or sometimes, put a piece of paper in front of my screen, because there is
no mouse cursor when macOS installs on the black screen. How to make
that progress bar easier to use and more informative? Just add numbers on top of
it. For long-running processes, I wouldn’t mind progress bars that said
“12.34%”. That specific Setup/Migration Assistant window should be changed (it
only has a remaining time estimate and transfer speed, it should also show
moved data/total size), but wouldn’t more things benefit from a clear
indication of the progress? Yes, perhaps it looks less sleek, perhaps it
requires more space for the bar.</p>
<p>Just compare: which is easier to parse? Which is more informative?</p>
<div class="mb-3">
<div class="progress" style="height: 6.5px; border-radius: 6.5px;">
  <div class="progress-bar" role="progressbar" style="width: 42.42%;" aria-valuenow="42.42" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div><div class="mb-3">
<div class="progress" style="height: 20px; border-radius: 20px;">
  <div class="progress-bar" role="progressbar" style="width: 42.42%;" aria-valuenow="42.42" aria-valuemin="0" aria-valuemax="100">42%</div>
</div>
</div><div class="mb-3">
<div class="progress" style="height: 20px; border-radius: 20px;">
  <div class="progress-bar" role="progressbar" style="width: 42.42%;" aria-valuenow="42.42" aria-valuemin="0" aria-valuemax="100">42.4%</div>
</div>
</div><div class="mb-3">
<div class="progress" style="height: 20px; border-radius: 20px;">
  <div class="progress-bar" role="progressbar" style="width: 64.64%;" aria-valuenow="64.64" aria-valuemin="0" aria-valuemax="100"></div>
  <div style="position: absolute; text-align: center; left: 0; right: 0; margin-top: 10px;">64.64% (6.7 GB/10 GB copied)</div>
</div>
</div><p>I’d honestly be happy enough with option 2, at least it can be read easily and
you can remember the number instead of a vague position.</p>
</section>
<section id="in-the-end">
<h1>In the end…</h1>
<p>After all this, I managed to get macOS Catalina installed. After various
failures in built-in El Capitan recovery and Catalina Internet Recovery, I first
installed El Capitan with this hack, then jumped to Mojave because I thought
the new Software Update would help (it didn’t, same installer, same
failed-to-extract-package issue), then made a Catalina USB stick, and it
finally clean-installed, but I was worried about the backup disk’s operation,
and I used a proxy on my local network to try and speed up Catalina downloads
without much improvement… but hey, at least it works. Apple should really make
it easier to install their OS and to make boot media even when stuff doesn’t
work, even from Windows. The Hackintosh folks can just find someone with a
working Mac and ask them to download from App Store and make install media, or
find less legitimate sources, they probably don’t care as much. But if my own
system crashes, I’d probably want to get working install media immediately,
myself, and from Apple. Without all this mess.</p>
</section>
]]></content:encoded><category>Apple</category><category>Apple</category><category>install</category><category>Mac</category><category>macOS</category></item><item><title>Apple broke the display menu, so I wrote my own</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/</link><pubDate>Sat, 24 Jun 2017 19:02:47 GMT</pubDate><guid>https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/</guid><description>
A short time ago, the macOS display menu stopped working for me. It no longer had options to change mirroring settings, only supporting AirPlay. So I wrote my own, also solving some other issues.
</description><content:encoded><![CDATA[
<p>A short time ago, the macOS display menu stopped working for me. It no longer had options to change mirroring settings, only supporting AirPlay. So I wrote my own, also solving some other issues.</p>



<p>The first thing to consider is: what features do I really want? I’m using a MacBook Pro with an external display. I sometimes need to switch to only one display <a class="brackets" href="https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/#footnote-1" id="footnote-reference-1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> — mirroring is useful here. Although I can afford to put the dock at the bottom in dual-screen mode, it works better on the right if I’m tight on space. <a class="brackets" href="https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/#footnote-2" id="footnote-reference-2" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a> Also when working on the MacBook screen, I can switch to a higher resolution. So, I need:</p>
<ul class="simple">
<li><p>mirroring</p></li>
<li><p>screen resolution</p></li>
<li><p>dock position and icon size</p></li>
</ul>
<p>But I don’t want to pick all those three independently — a preset, like <em>dual screen</em> or <em>MacBook only, 1440×900</em> works better.</p>
<p>So, I wrote <strong>Display Menu</strong>. It’s a simple menu bar extra — I haven’t yet built any friendly configuration GUI for it, so all you get for now is a JSON file. It’s roughly 600 lines of Swift. The app doesn’t do much, other than displaying an icon in the menu bar, and setting display preferences when asked to. But hey, it works for me.</p>
<p>Also, I must admit that Swift is a pretty nifty thing. Although the function to read JSON files needs to do a ton of type casting, and some of the low-level stuff looks as ugly as in C, but other than that, Swift is a modern, friendly language.</p>
<p>Display Menu is open-source, licensed under the 3-clause BSD license. <a class="reference external" href="https://github.com/Kwpolska/DisplayMenu">Fork it on GitHub</a> or <a class="reference external" href="https://github.com/Kwpolska/DisplayMenu/releases">download binary releases</a>.</p>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="footnote-1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/#footnote-reference-1">1</a><span class="fn-bracket">]</span></span>
<p>Inkscape/Xorg don’t work well with multiple displays. I can also mirror and turn off the external screen or use it with some other device.</p>
</aside>
<aside class="footnote brackets" id="footnote-2" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="https://chriswarrick.com/blog/2017/06/24/apple-broke-the-display-menu-so-i-wrote-my-own/#footnote-reference-2">2</a><span class="fn-bracket">]</span></span>
<p>also, in dual-screen mode, I can have the dock on one screen only, and the dock must live on the edge of the “extended” display — so either on the left side of the MacBook screen, or on the right side of the external display.</p>
</aside>
</aside>
]]></content:encoded><category>Programming</category><category>app</category><category>Apple</category><category>display</category><category>programming</category><category>projects</category><category>Swift</category></item><item><title>Apple’s new pricing strategy: don't buy the 12″ MacBook</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2017/06/08/apples-new-pricing-strategy-dont-buy-the-12-macbook/</link><pubDate>Thu, 08 Jun 2017 17:35:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2017/06/08/apples-new-pricing-strategy-dont-buy-the-12-macbook/</guid><description>
On Monday, Apple announced some changes to its Mac lineup. All MacBooks (even
the Air) got CPU upgrades, and the starting price of a MacBook Pro (13″, no
Touch Bar) went down to US$1299. Which makes the 12-inch model effectively
pointless.
A quick spec comparison reveals that the Pro comes with a much better CPU, GPU,
screen, camera — the only drawback is the storage space.
</description><content:encoded><![CDATA[
<p>On Monday, Apple announced some changes to its Mac lineup. All MacBooks (even
the Air) got CPU upgrades, and the starting price of a MacBook Pro (13″, no
Touch Bar) went down to US$1299. Which makes the 12-inch model effectively
pointless.</p>
<p>A quick spec comparison reveals that the Pro comes with a much better CPU, GPU,
screen, camera — the only drawback is the storage space.</p>



<p>If you look at the cheapest MacBook in each category, you end up with this:</p>
<ul class="simple">
<li><p>13″ Air, $999</p></li>
<li><p>12″, <strong>$1299</strong></p></li>
<li><p>13″ Pro, <strong>$1299</strong></p></li>
<li><p>13″ Pro with Touch Bar, $1799</p></li>
<li><p>15″ Pro with Touch Bar, $1299</p></li>
</ul>
<p>Yes, this is correct: a 12″ MacBook costs the same as a 13″ Pro. But is it really true? Let's compare the specs:</p>
<table class="table table-striped">
<thead>
<tr><th class="head"><p>Device</p></th>
<th class="head"><p>MacBook (12″)</p></th>
<th class="head"><p>MacBook Pro (13″, no Touch Bar)</p></th>
</tr>
</thead>
<tbody>
<tr><td><p>CPU</p></td>
<td><p>Intel Core m3, 1.2 GHz</p></td>
<td><p>Intel Core i5, 2.3 GHz ★</p></td>
</tr>
<tr><td><p>Memory</p></td>
<td><p>8 GB</p></td>
<td><p>8 GB</p></td>
</tr>
<tr><td><p>Storage</p></td>
<td><p>256 GB ★</p></td>
<td><p>128 GB</p></td>
</tr>
<tr><td><p>Ports</p></td>
<td><p>1 USB-C</p></td>
<td><p>2 Thunderbolt 3 (USB-C) ★★</p></td>
</tr>
<tr><td><p>Camera</p></td>
<td><p>480p</p></td>
<td><p>720p ★</p></td>
</tr>
<tr><td><p>Screen size</p></td>
<td><p>12″</p></td>
<td><p>13″ ★</p></td>
</tr>
<tr><td><p>External displays</p></td>
<td><p>1×4K</p></td>
<td><p>1×5K/2×4K/2×UHD ★</p></td>
</tr>
<tr><td><p>GPU</p></td>
<td><p>Intel HD Graphics 615</p></td>
<td><p>Intel Iris Plus Graphics 640 ★</p></td>
</tr>
<tr><td><p>Size (height×width×depth)</p></td>
<td><p>0.35–1.31×28.05×19.65 cm</p></td>
<td><p>1.49×30.41×21.24 cm</p></td>
</tr>
<tr><td><p>Weight</p></td>
<td><p>0.92 kg ★</p></td>
<td><p>1.37 kg</p></td>
</tr>
<tr><td><p>Available in Gold/Rose Gold</p></td>
<td><p>yes</p></td>
<td><p>no</p></td>
</tr>
</tbody>
</table>
<p>For $0 extra, you can get a device with a <strong>much</strong> better CPU, 2 Thunderbolt 3 ports, a (slightly) larger screen, a better front-facing camera, support for larger/more displays. The “price” for this? Only less storage space, 0.45 kg (roughly 1 lb) of weight. And no gold color options.</p>
<p>To me, this screams “don’t buy the 12-inch thing” — you can get much more <em>computer</em> for the same price. And the CPUs in those computers are pretty poor. Last year’s base model is beaten in <a class="reference external" href="https://browser.primatelabs.com/mac-benchmarks">benchmarks</a> by much older (and cheaper) machines, eg. 2014’s MacBook Air, 11″ base model in single-core benchmarks and upgraded 2015 Airs in multi-core benchmarks.</p>
<p>And even if you don’t care about the CPU, there are also other things, like the better camera, or two ports that support more devices. If you want a computer that lets you stay productive, and want a Mac, don’t even try buying the 12″ MacBook <strong>Abomination</strong>.</p>
]]></content:encoded><category>Apple</category><category>Apple</category><category>Mac</category><category>MacBook</category><category>MacBook Pro</category></item><item><title>5 months with a MacBook Pro: beautiful machine that just works</title><dc:creator>Chris Warrick</dc:creator><link>https://chriswarrick.com/blog/2016/12/28/5-months-with-a-macbook-pro-beautiful-machine-that-just-works/</link><pubDate>Tue, 27 Dec 2016 15:15:00 GMT</pubDate><guid>https://chriswarrick.com/blog/2016/12/28/5-months-with-a-macbook-pro-beautiful-machine-that-just-works/</guid><description>
Five months ago, I decided to make the switch from my trusty old desktop
computer, running Arch Linux, to a MacBook Pro. I picked the 2015 13&amp;quot; base
model with an upgraded hard drive. The device is beautiful, and just works™,
which is pretty important to me.
</description><content:encoded><![CDATA[
<p>Five months ago, I decided to make the switch from my trusty old desktop
computer, running Arch Linux, to a MacBook Pro. I picked the 2015 13&quot; base
model with an upgraded hard drive. The device is beautiful, and just works™,
which is pretty important to me.</p>



<section id="mac-as-a-unix-machine-nothing-beats-a-terminal">
<h1>Mac as a UNIX® machine: nothing beats a terminal</h1>
<p>What are the first things you should set up on a Mac, as a programmer?
<a class="reference external" href="http://brew.sh/">Homebrew</a> (and Homebrew Cask). That’s a package manager
that can install all software necessary to create an useful command-line
environment, including Python, ffmpeg and sox for media needs, git, GCC (clang
is wonderful, but I need plain old GCC sometimes), zsh, and a handful of other
programs. And, of course, Vim.</p>
<p>And what Homebrew Cask can do for you? Install many GUI programs, without
needing to mess with <code class="docutils literal">.dmg</code> installers or stuff.  Including web browsers, music
players, or iTerm2.</p>
<p>Did I mention UNIX®, with the registered trademark sign (belongs to The Open
Group; used for informational purposes only)? macOS has a fancy certificate to
prove it’s compliant with the relevant specifications. It runs the FreeBSD
userland, which is what you expect from a typical *nix system. (Linux converts
might get slightly annoyed at behavioral differences, for example <code class="docutils literal">rm
directory <span class="pre">-rf</span></code> will work on Linux with GNU coreutils, but won’t on
macOS/FreeBSD)</p>
</section>
<section id="the-gui-beautiful-fluid-friendly">
<h1>The GUI: beautiful, fluid, friendly</h1>
<p>macOS is famous for its user interface. The macOS GUI is well thought out, even
though there are some idiosyncrasies a long-time Linux/Windows user might
consider weird. For example, sorting folders before files is something natural
for Windows, but on macOS, it’s a brand new option — added in macOS Sierra,
which came out in September 2016.</p>
<p>That aside, the macOS user interface makes one coherent product. You can expect
consistent behavior between apps, and that often extends to third-party
software. Apple has a document, called <a class="reference external" href="https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html">Human Interface Guidelines</a>, which
describes how a macOS app should behave. While there are some documents like
this one for Windows, you can see many apps ignoring what it says — including
eg. built-in software, which cannot even decide on which font to use (bitmap MS
Sans Serif vs vectorized Microsoft Sans Serif vs Segoe UI — what is going on?!)</p>
<p>While the interface is friendly and coherent, it can get a little worse
when <em>foreign</em> apps are involved — for example, Qt or wxWidgets apps can
sometimes differ in behavior, but that’s not noticeable. X11 apps are another
story, but most of their developers are not aware that someone is running them
on macOS. (Excluding the Inkscape developers, which have a Mac “app” that
basically runs it in X11 and they do not even care…)</p>
</section>
<section id="programming-old-habits-die-hard">
<h1>Programming: old habits die hard</h1>
<p>Did I mention Vim? Well, I’m still using Vim and a terminal emulator to get a
lot of coding work done. Why? Because they are still the best ways to be
productive. I tried many <em>gooey</em> solutions for coding, from the heavyweights
(PyCharm, Visual Studio) to the laughable Atom editor (famous for being slow,
and effectively a web browser) — and none of them was able to replace Vim and a
Terminal. They are far too addictive.</p>
<p>That said, I sometimes use GitHub for Desktop, or other helper tools.
Sometimes, they work well — key word here is <em>sometimes</em>. Unlike Vim (or
NeoVim, or a GUI: MacVim/VimR), which boosts my productivity by a lot.</p>
<p>Honorable mention goes to Automator and AppleScript. They are a superb
solution for automating common tasks in the GUI, something other OSes do not
provide. With Automator, everyone can create a workflow to perform repetitive
tasks faster. With AppleScript, you can get even more stuff done.</p>
</section>
<section id="the-trackpad-addictive">
<h1>The trackpad: addictive</h1>
<p>Apple is famous for their trackpads. Their newest generation of these devices
does not really move when you click it, it uses the Taptic Engine and [insert
smart-sounding words here] to <em>simulate</em> a click. It also supports Force Touch,
for pressing down harder on something (eg. a word to reveal dictionary
definitions), and haptic feedback for certain operations <em>(in Soviet Russia,
trackpad clicks you!)</em></p>
<p>Those trackpads also provide intuitive gestures. Working with
full-screen windows or multiple desktops? Just swipe left/right to switch
between them. Need to see all your windows? Swipe up with three fingers. Smooth
zoom, scrolling and rotating can also be done with just the trackpad.</p>
<p>And recently I had to do some stuff on someone else’s Windows notebook. That
notebook features a touchpad that does not <em>click</em> — it has two buttons on the
bottom, and tap to click is enabled. I had to drag and drop some files between
two windows. I tried doing it the way I got used on the MBP trackpad, which is
basically the way you’d do it with a mouse: hover cursor above file, click the
trackpad, move mouse to other windows, and release. That doesn’t work on those
non-clicky touchpads. A software developer failing at drag-and-drop must be a
funny thing to see. That’s just how addictive the trackpad is. (Of course,
Windows notebooks with clicky trackpads exist, but are not as popular as the
tappy ones.)</p>
</section>
<section id="walled-garden-how-can-you-not-love-our-products">
<h1>Walled garden: how can you NOT love our products?</h1>
<p>Of course, there are some issues with living in an Apple walled garden. The
main issue is: if you want to use something that is not an Apple product, good
luck with that. Sure, you can use an Android phone, but you won’t get
some of the nice Handoff features, and if you want to transfer files, have fun
using a forgotten barely-working app from 2012. That phone also won’t be able
to access your iCloud stuff, so put your data somewhere else.</p>
<p>Do you want to use an external hard drive, or a USB stick? With other operating
systems? Well, you might have an issue with the file system. You can choose
between ExFAT, which is not popular but kinda does the job; FAT32, which has a
4GB file size limit (virtual disk images are often larger than that), or NTFS,
but for that you will need to pay a third-party company — and trust them not to
do anything nefarious. Or use experimental built-in support, or an open-source
project, both of which aren’t something one would normally trust with important
data.</p>
<p>Speaking of external hard drives, here’s a hint: if you want to use a drive for
Time Machine (a wonderful, foolproof, one-click backup solution), and you want
it encrypted, make sure it uses GPT and not MBR. I had to reformat my drive
twice, and that’s not well documented (you need to click the help button,
then go through 3 pages to find a mention of this).</p>
<p>Do you want to play some games? Well, there is basically no support for
gamepads, only some community beta drivers for the official PS3/Xbox 360 pads.
Apple does not care.</p>
<p>And then we get to mouse issues. You see, even though the trackpad is awesome,
I also want to use a regular mouse. So I started with my old PC mouse, as a
temporary solution. The mouse was a Logitech M560, which uses the wireless
Unifying USB connector. It turns out the middle mouse button is supposed to be
a Windows button on one click and left mouse button on another, but Linux
drivers seem to change that behavior. To fix that, I’d need drivers for macOS.
Logitech believes this mouse is not worthy of a Mac, and so the mouse is not
detected by their driver suite. I got rid of that mouse and replaced it with a
Microsoft Sculpt Comfort Mouse. The mouse has a real middle button, which is
activated by clicking the scroll wheel, and a Windows button on the side
(generally useless on macOS).</p>
<p>Sadly, macOS insists on scrolling in a weird accelerated way, where the number
of pixels scrolled grows over time — which means scrolling by one step means
scrolling by 5 pixels, but the longer you scroll, the larger the scroll
becomes.</p>
</section>
<section id="the-future-im-worried">
<h1>The future: I’m worried</h1>
<p>I made the decision to buy the MacBook Pro in the middle of rumor season, after
WWDC which left a lot of people disappointed. I decided that, if all the rumors
about removed ports and touchy-feely screens were true, I would not want that
device on my desk.</p>
<p><strong>And boy did Apple deliver!</strong> The new MacBook Pro has only USB-C ports (and a
headphone jack!), a gimmicky Touch Bar that only helps with emoji (the rest can
be done with standard keyboard shortcuts, or on-screen toolbars — I thought
that was a Pro machine, not a toy?), and a fingerprint reader (which I don’t
care about). And then there’s the cheaper model, with two USB-C ports and no
touch interfaces. My MBP, mainly a desktop replacement, is on AC power all the
time, and runs an external HDMI display. With the cheaper model (worse CPU than
2015; same price as 2015 with the same 256GB drive), I would have zero ports
for any other external devices. And I often have some thing plugged in, in
which case the only unoccupied ports are the Thunderbolt ports (which I don’t
have any devices for).</p>
<p>So, I hope this 2015 model will live on for years, and hopefully when it fails,
Apple will have a more sensible machine out there. For now, I’ll keep my
<em>MacBook Pro (Retina, 13-inch, Early 2015)</em> and will be pretty happy with it.</p>
<p>With just only one exception: two kernel panics in nearly 5 months. A bit
unstable, eh?</p>
</section>
]]></content:encoded><category>Apple</category><category>Apple</category><category>MacBook Pro</category><category>programming</category><category>review</category></item></channel></rss>