<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apple | AkitaOnRails.com</title><link>https://akitaonrails.github.io/en/tags/apple/</link><description>Fabio Akita's blog — tech, career, and assorted geek topics. English edition.</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 19 Oct 2026 23:20:51 +0000</lastBuildDate><atom:link href="https://akitaonrails.github.io/en/tags/apple/index.xml" rel="self" type="application/rss+xml"/><item><title>From Microsoft to Apple, and Back Again</title><link>https://akitaonrails.github.io/en/2017/11/21/from-microsoft-to-apple-and-back-again/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2017/11/21/from-microsoft-to-apple-and-back-again/</guid><pubDate>Tue, 21 Nov 2017 21:51:00 -0200</pubDate><description>&lt;p&gt;This is going to be a very lengthy article, buckle up ladies and gentlemen.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re hasty, here&amp;rsquo;s what you need to know:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 is still Windows, but it&amp;rsquo;s nowhere near the nightmare of the 2000s. It rightfully deserves a new chance.&lt;/li&gt;
&lt;li&gt;OS X is on its way to becoming no more than an XCode runtime. Rumor says that Apple doesn&amp;rsquo;t even have a dedicated team for the desktop OS anymore. They are entirely focused on iOS and to make the iPad the desktop replacement.&lt;/li&gt;
&lt;li&gt;Linux is great, if you&amp;rsquo;re a full-time web developer, you can comfortably run something like Ubuntu or Manjaro/Arch (my personal recommendation).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best cost-benefit: the Dell XPS 13. The Surface Book 2 is totally worth it if you&amp;rsquo;re a nerd like me. But as always, there are caveats to discuss.&lt;/p&gt;</description><content:encoded><![CDATA[<p>This is going to be a very lengthy article, buckle up ladies and gentlemen.</p>
<p>If you&rsquo;re hasty, here&rsquo;s what you need to know:</p>
<ul>
<li>Windows 10 is still Windows, but it&rsquo;s nowhere near the nightmare of the 2000s. It rightfully deserves a new chance.</li>
<li>OS X is on its way to becoming no more than an XCode runtime. Rumor says that Apple doesn&rsquo;t even have a dedicated team for the desktop OS anymore. They are entirely focused on iOS and to make the iPad the desktop replacement.</li>
<li>Linux is great, if you&rsquo;re a full-time web developer, you can comfortably run something like Ubuntu or Manjaro/Arch (my personal recommendation).</li>
</ul>
<p>Best cost-benefit: the Dell XPS 13. The Surface Book 2 is totally worth it if you&rsquo;re a nerd like me. But as always, there are caveats to discuss.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/663/20171121_111616.jpg" alt="Book 2"  loading="lazy" /></p>
<h2>The Specs<span class="hx:absolute hx:-mt-20" id="the-specs"></span>
    <a href="#the-specs" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I will definitely not duplicate every <a href="https://www.youtube.com/watch?v=-Hh0lZ7Jg4U"target="_blank" rel="noopener">hardware review</a> you can find out there. They are all true. As <a href="https://www.ifixit.com/Teardown/Microsoft&#43;Surface&#43;Book&#43;2&#43;Teardown/100364"target="_blank" rel="noopener">iFixIt says</a>: it&rsquo;s the worst score in repairability. Like a Macbook, the Surface line-up is a statement. It&rsquo;s the best combination of design and functionality. But the trade-off is that it has zero expandability and you should really take care not to break it. If it breaks, make sure you have a warranty and ask for a replacement.</p>
<p>In terms of specs, it is close to other top-of-the-line notebooks.</p>
<p>The top of the line Surface Book 2 costs <a href="https://www.microsoft.com/en-us/surface/devices/surface-book-2/overview"target="_blank" rel="noopener">USD 3,299</a> and comes with 1 TB SSD, 16GB RAM, GTX 1060 w/ 6 GB GDDR5,  Intel Core i7 8th Gen Kaby Lake R, 4K display. It is super expensive, but you can easily justify it. More on that below.</p>
<p>The top of the line Dell XPS 15&quot; Touch costs <a href="http://dell.to/2jMDOx5"target="_blank" rel="noopener">USD 2,459</a> and comes with 1 TB SSD, <strong>32GB RAM</strong>, GTX 1050 w/ 4 GB GDDR5, Intel Core i7 7th Gen Kaby Lake, 4K display. The design of the XPS is top notch for at least 3 generations now. To me, this is the best cost-benefit.</p>
<p>The top of the line Razer Blade costs <a href="https://www.razerzone.com/gaming-laptops/razer-blade/shop"target="_blank" rel="noopener">USD 2,599</a> and comes with 1 TB SSD, 16 GB RAM, GTX 1060 w/ 6 GB, Intel Core i7 7th Gen, 4K display. It&rsquo;s arguably the best industrial design of this bunch, with Razer&rsquo;s impeccable attention to detail. But it&rsquo;s also arguably the one with least available support and more construction problems reported, so be careful to buy it overseas.</p>
<p>The top of the line HP Spectre x360 costs <a href="http://store.hp.com/us/en/pdp/hp-spectre-x360-15-bl152nr"target="_blank" rel="noopener">USD 1,499</a> and comes with 512 GB SSD, GeForce MX150 w/ 2GB GDDR5, Intel Core i7 8th Gen, 4K display. The design is awesome, super thin convertible. The specs are not so great, but it&rsquo;s the cheapest of the premium notebooks, so there&rsquo;s that.</p>
<p>The top of the line Lenovo Yoga 920 14&quot; Vibe costs <a href="http://lnv.gy/2A4DjlU"target="_blank" rel="noopener">USD 1,899</a> but it only comes with Intel Integrated Graphics (no secondary GPU), 1 TB SSD, 16 GB RAM, Intel Core i7 8th Gen, 4K display, and comes with the Pen. The design, again, is great with an almost 360-degree hinge so you can flip your screen around and use it as a tablet. A very good 2-in-1.</p>
<p>Now, the top of the line MacBook Pro 15&quot; costs <a href="http://apple.co/2zXSz6d"target="_blank" rel="noopener">USD 3,399</a> and comes with 1 TB SSD, Radeon Pro 560 w/ 4GB, Intel Core i7 7th Gen, UHD Display, and the infamous touch bar (50% chance of liking it). And that&rsquo;s it. The industrial design and construction are still top-notch, but the others are nearly as good nowadays.</p>
<p>If you use graphics-intensive applications, the Radeon Pro 560 is good, but the GTX 1060 is <a href="http://bit.ly/2zsIjE5"target="_blank" rel="noopener">superior</a>. Apple&rsquo;s UHD IPS (LCD) displays have a maximum resolution of 2560x1600. All premium notebooks nowadays come with full 4K (LED) displays with a maximum resolution of 3840x2160. It is noticeable. If you&rsquo;ve never seen a modern 4K display, the MacBook displays will look good enough. And that&rsquo;s without mentioning that they are all touchscreens with 4,096 points of sensitivity. What was once just a gimmick nowadays compares with the best Wacom has to offer. The Surface line-up comes close to the top of the line Wacom Cintiq and the new iPad Pro. They are in the same league.</p>
<p>There are 2 aspects of the Surface Book 2 that are lacking, unfortunately. First is the absence of a proper Thunderbolt 3 port. Without it, you can&rsquo;t connect to modern external storage or external GPUs. The second is the weak power supply. Reports say that in highly demanding games (a.k.a. Destiny 2 not properly configured), the system will throttle down and drain all the battery faster than it can charge from the wall. <a href="https://www.theverge.com/2017/11/21/16685986/microsoft-surface-book-2-power-problem"target="_blank" rel="noopener">The Verge broke this story</a> and Microsoft is yet to unveil a solution if any. So, if gaming is your top priority buy a Razer or any of the gaming specific laptops such as an Alienware. The battery issue is <a href="https://www.youtube.com/watch?v=imzVR4JSITM&amp;t=1s"target="_blank" rel="noopener">not as dramatic</a> as some have previously reported, though.</p>
<p>In terms of construction. Macs are usually all built with the same aluminum unibody construction. The Book 2 uses Magnesium instead. It makes for a very solid construction but also very lightweight. By the way, after so many years, everybody mastered aluminum. And they are moving in other directions, for example, Dell uses carbon fiber on the palm rests, which I find much more comfortable. Magnesium is also not as freezing cold as aluminum, again, more comfortable. I like that they are past just copying and really trying new and interesting materials.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/664/20171121_111533.jpg" alt="it’s not as thin"  loading="lazy" /></p>
<h2>Value Proposition<span class="hx:absolute hx:-mt-20" id="value-proposition"></span>
    <a href="#value-proposition" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We established that the Surface Book 2 is very expensive, and it&rsquo;s not even good enough for highly demanding games such as Destiny 2.</p>
<p>Where it really shines is the fact that it&rsquo;s not a convertible 2-in-1 such as the Spectre or Yoga. You already know that it can detach the screen from the base.</p>
<p>The crown achievement of the Surface team is the <strong>dynamic fulcrum hinge</strong>. It&rsquo;s a marvel of engineering. When it&rsquo;s attached, it doesn&rsquo;t wobble nearly as much as one would expect. It&rsquo;s very solid, you can pick up the entire unit from the screen without worrying that the base might fall down or break.</p>
<p>When I first heard about it 2 years ago, I thought it was cool but that it could break over time, so I waited. I am all in now because 2 years later you don&rsquo;t see a &ldquo;hinge-gate&rdquo; or massive reports of the hinge falling apart, so you know it&rsquo;s solid. And 2 years later, no other manufacturer has it, and if you don&rsquo;t see a cheap knockoff from China, you can tell that this is a very difficult thing to build. Microsoft really nailed this part.</p>
<p>By having a detachable screen you also know that the main components are all behind the screen. The CPU, the GPU, the RAM, the SSD. So you have a top-of-the-line Intel i7 in a tablet! The battery is understandably small (no more than 3 hours) to drive a 15&quot; 4K display with touch capabilities and enough precision to rival the iPad Pro and the Wacom Cintiq or Mobile Studio.</p>
<p>Now, what most people don&rsquo;t report is that because of this, the screen housing is the one that gets warm. The performance base remains cool! So it&rsquo;s super comfortable to have it on your lap for many hours without the risk of getting sterile or getting boiled eggs in the process.</p>
<p>It has enough power to drive 1 external 4K display at 60hz or two 4K displays at 30hz. The MacBook Pro, with its custom port, can drive a 5K display. Something most notebooks still can&rsquo;t. So there&rsquo;s that.</p>
<p>I am not a designer by trade, but I am a hobbyist. And after many years working hard, I do believe that I can afford something like this. And don&rsquo;t get me wrong, the Surface Pro is another great option for a designer. The top-of-the-line Surface Pro has everything the Book 2 has, without the GTX 1060 but costing USD 600 less at <a href="https://www.microsoft.com/en-us/surface/devices/surface-pro/overview#surfaceconfiguration"target="_blank" rel="noopener">USD 2,699</a>. I think it&rsquo;s a more suitable product for most people interested in having an easy to carry sketch solution around.</p>
<p>Creative Professionals are the ones that fully need to be careful about specs. But for the majority of non-demanding professionals, they can pay a lot cheaper. They don&rsquo;t need extra GPU horsepower, or the i7 (an i5 is more than adequate), 8 GB of RAM is enough, even 256 GB of SSD is ok because everything is in the so-called &ldquo;Cloud&rdquo; these days. This is the <a href="http://www.dell.com/en-us/shop/dell-laptops/new-xps-13/spd/xps-13-9360-laptop/dncwtr744h"target="_blank" rel="noopener">USD 999</a> Dell XPS 13. Or the only comparable option from Apple is the <a href="https://www.apple.com/shop/buy-mac/macbook"target="_blank" rel="noopener">USD 1,299</a> with a ridiculous Intel m3 processor. For most professionals, the cheaper Dell XPS 13 is a much better value proposition than the Macbook.</p>
<p>For demanding professionals, the Dell XPS 15 is the best value for the buck. The Surface Book 2 is the best premium one for those that favor the touch screen more than workflow. Meaning: designers, go with the Book 2, video editors or 3D modelers, go with the Dell XPS.</p>
<p>Oh, and one last thing about price. The MacBook Pro 15&quot; costs USD 3,399 and the Book 2 costs USD 3,299. But if you want a tablet, you still need to add an extra USD 949 for a 12&quot; iPad Pro with Wi-Fi and 256 GB of storage. And you will end up having to carry around a heavier backpack.</p>
<h2>Why not install Linux?<span class="hx:absolute hx:-mt-20" id="why-not-install-linux"></span>
    <a href="#why-not-install-linux" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>You don&rsquo;t buy a Surface product unless you&rsquo;re interested in the <strong>Surface Pen</strong> experience and ecosystem. I think this is obvious, otherwise, you&rsquo;re better off buying a Dell XPS or any other cheaper notebook.</p>
<p>It&rsquo;s also obvious why it makes no sense to ask <em>&ldquo;Why don&rsquo;t you ditch Windows and install Linux on it?&rdquo;</em>. Because no Linux distro has Pen support, whatsoever. The performance base also has a physical key that you need to press in order for the hinge to release the display.</p>
<p>You want to have Adobe Photoshop, or Autodesk Sketchbook, or Sketchable, or any other great software package out there. Again, I don&rsquo;t want to repeat every other <a href="https://www.youtube.com/watch?v=U8cpC2jZdgM"target="_blank" rel="noopener">review available</a> out there showing how great the pen is. I will just confirm that, yes, the pen is super great, precise, accurate, and flows very naturally. It&rsquo;s an entire studio in a box.</p>
<p>Software developers by trade should <strong>stay away</strong> from this kind of product because most Linux distros won&rsquo;t have the proper drivers to hook up to so much exclusive hardware solutions. For those situations I highly recommend the Dell XPS 13, specifically the <a href="http://dell.to/2A3SPOZ"target="_blank" rel="noopener">USD 1,759</a> configuration with Windows 10 Pro (or you can save USD 60 and get it with the Home edition if you intend to install Linux on top of it), the great QHD+ (3200x1800) InfinityEdge touch display, 8th Gen Intel Core i7, 16 GB RAM, 512 GB SSD. This is, by far, the best value for the money for a full-time software developer.</p>
<p>OS X has a great community <strong>despite</strong> Apple not doing a lot to help them. Historically, the jump from the legacy MacOS to OS X meant having a UNIX-compatible kernel and toolchain available. To this day, it&rsquo;s still not comparable to a modern Linux distro. But OS X makes it up to it by having, by far, the best Graphics Compositor around. The GUI is smooth, responsive.</p>
<p>The Darwin Mach kernel supports multiple policies, most important for Creative Professionals, mainly musicians, was the <strong>soft real-time</strong> capabilities of the scheduler. To this day, <a href="https://wiki.archlinux.org/index.php/Realtime_kernel"target="_blank" rel="noopener">Linux Real Time</a> is not the default option, and it&rsquo;s not as well tuned or stable. And the Windows kernel evolved, but again, still not nearly as polished.</p>
<p>Soft Real-Time avoids the stuttering effect we see. And is one factor of why the Mac experience is, overall, superior even on less powerful hardware.</p>
<p>In particular, everybody around the <a href="https://brew.sh/"target="_blank" rel="noopener">Homebrew</a> community deserves high praise for their efforts of keeping up in bringing open source tools to OS X, <strong>despite</strong> every new Xcode update and OS X upgrade, breaking them.</p>
<h2>My Environment<span class="hx:absolute hx:-mt-20" id="my-environment"></span>
    <a href="#my-environment" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/662/20171121_111546.jpg" alt="Magnesium Body"  loading="lazy" /></p>
<p>After a lot of experimentation, I decided to settle on having a native Windows 10 to drive the host and having a full-blown Linux distro (<a href="https://manjaro.org/get-manjaro/"target="_blank" rel="noopener">Manjaro GNOME</a>) on a Virtualbox environment where I give 4 of the 8 cores (2 physical cores, each with 2 hyperthreads) and half the memory (8 GB).</p>
<p>Why not use the brand new <a href="https://msdn.microsoft.com/en-us/commandline/wsl/faq#can-i-run-all-linux-apps-in-wsl"target="_blank" rel="noopener">Windows Subsystem for Linux (WSL)</a> instead?</p>
<p>Because although it&rsquo;s great and all, we will need to wait until they figure out the rough edges. Particularly a better GUI support and faster I/O abstraction. What hurts the most is how <strong>painfully slow</strong> the filesystem layer is right now. It&rsquo;s an <a href="http://www.akitaonrails.com/en/2017/09/20/windows-subsystem-for-linux-e-bom-mas-ainda-nao-suficiente"target="_blank" rel="noopener">order of magnitude slower</a> than using Linux on Virtualbox.</p>
<p>I could use a Vagrant-like hybrid solution, having a headless Linux distro on Virtualbox and accessing a file through CIFS/NFS. And that should be fine if you like editors like Sublime Text 3, Visual Studio Code or Atom. But I am a Vim guy, and I like GVIM, which works best within GNOME, within a proper GUI-enabled Linux distro.</p>
<blockquote>
  <p><em>&ldquo;Why not use Docker? It&rsquo;s supposed to be super-fast and all.&rdquo;</em></p>

</blockquote>
<p>It surprises me when people ask that because it demonstrates how little they know about the tools they recommend.</p>
<p>Docker only really makes sense on a proper Linux distro. On Windows, it will have to run Linux on Virtualbox or Hyper-V. On Mac, it will use the Hypervisor framework, which - like Microsoft&rsquo;s Hyper-V - is a <strong>virtualization</strong> layer. It&rsquo;s just like Virtualbox, for all intents and purposes.</p>
<p>Docker, like LXC, is just making a process &ldquo;believe&rdquo; it&rsquo;s running alone on the OS by hiding the other processes from it. So, on Linux, it&rsquo;s super fast. On any other platform, they have to virtualize Linux proper and then run Docker there.</p>
<p>The Docker client is actually communicating with a virtualized Linux on Windows or Mac. You&rsquo;ve been fooled if you believed it&rsquo;s faster than Virtualbox or Hyper-V in any meaningful way. There is no magic here.</p>
<blockquote>
  <p><em>&ldquo;Why not just dual-booting then?&rdquo;</em></p>

</blockquote>
<p>Again, this doesn&rsquo;t help my scenario. I want a full GNOME GUI environment. And I don&rsquo;t want to keep Outlook on Windows and Thunderbird or Evolution on Linux for example, and managing different accounts on all sorts of different applications (and yes, I highly prefer native binaries instead of web apps, I am old-school like that). I don&rsquo;t want to reboot when I want to use Photoshop and reboot back to Linux to run Vim.</p>
<p>I <strong>want</strong> to have software from both platforms available to me <strong>at the same time</strong>. I don&rsquo;t believe in dual-boot scenarios unless the usages are completely separated. For example, using a Linux distro all day, and at night rebooting into Windows to run Steam and play some games.</p>
<p>Yes, Virtualbox will have a less responsive UI thanks to a virtualized Graphics pipeline. But for software development, it works just fine. I even see people doing gimmicky things such as having a full development environment in an AWS EC2 instance and SSH&rsquo;ing there to use Vim with Tmux, for example. That is far more convoluted if you ask me. I wouldn&rsquo;t go that far.</p>
<p>All top-of-the-line hardware I listed above has enough Cores and enough RAM so I can afford running 2 OSes at the same time. Don&rsquo;t do that on budget hardware.</p>
<p>And if you don&rsquo;t need to carry around a notebook, for the same amount of money you can buy a far superior desktop computer.</p>
<blockquote>
  <p><em>&ldquo;But you have all native on OS X, because it&rsquo;s UNIX and all&rdquo;</em></p>

</blockquote>
<p>Yes, but I really distrust Apple&rsquo;s OS X big upgrades. They always, always screw up something. After I had my fair share of lost work days after upgrades, I moved my development environment to <a href="https://www.vagrantup.com/"target="_blank" rel="noopener">Vagrant</a> at least 5 years ago. So I was using Linux in Virtualbox (or VMWare) all along. I never looked back. I was always reading people complaining after the big upgrades and there I was, unharmed and productive. Virtualbox was way worse back then, it&rsquo;s not so much nowadays. I can&rsquo;t remember the last time it crashed on me, if ever.</p>
<blockquote>
  <p><em>&ldquo;Well, and why not Hyper-V instead of Virtualbox?&rdquo;</em></p>

</blockquote>
<p>I did try it. And I do not recommend it right now. It was built so Windows can run Linux boxes in <strong>servers</strong>. So it&rsquo;s super good in partitioning the hardware resources between the different virtual instances. Unless you&rsquo;re a sysadmin in training or in need of a simulated server on your laptop, this is not for you.</p>
<p>It has very poor support for graphics (headless servers don&rsquo;t need graphics). The maximum resolution in the virtual monitor is a ridiculous 1152x864. My Virtualbox supports my LG Ultrawide 2560x1080 monitor just fine. Hyper-V can&rsquo;t and this is a deal breaker.</p>
<p>Virtualbox, VMWare, Parallels, Hyper-V will all use the same VT-X instructions provided by Intel. The base performance will not be so different. Guest tools might differ. Some stability might differ. But all in all, they&rsquo;re basically the same thing from the user&rsquo;s usability standpoint.</p>
<p>I know, it sounds &ldquo;weird&rdquo; to run Windows 10 as the primary native host. But it does work generally fine right now.</p>
<p>And I also know that it sounds weirder to run a Linux distro as a secondary guest OS in Virtualbox. And again, let me tell you that when I am using it in full-screen mode, working, I don&rsquo;t feel like it&rsquo;s slow or unresponsive.</p>
<h2>The Software<span class="hx:absolute hx:-mt-20" id="the-software"></span>
    <a href="#the-software" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>If you&rsquo;re in OS X you are probably used to a lot of tools. You paid money for some of those. And switching to another OS is always a pain.</p>
<p>In summary, the only piece of software that I really missed, at first, was Keynote. But I went past my prejudice against PowerPoint and I have to say that it does everything I really need right now.</p>
<p>I always hated Pages and Numbers, they are very good for amateurs. But nothing, not even LibreOffice, and definitely not Google Docs can replace Office. Google Slides is terrible and Impress is beyond useless to me (and it&rsquo;s super slow). Seriously, PowerPoint is now a much better tool.</p>
<p>Office in the Mac was always &ldquo;enough&rdquo;, luckily. But Office on Windows is far superior. No doubts in my mind, so one big benefit for me going back to Windows 10 is having the full Office experience.</p>
<p>If you use the Pro line of tools, you will miss Final Cut Pro. If you&rsquo;re a professional musician, you will miss Logic Pro. There is nothing like Garageband if you&rsquo;re a hobbyist musician. There is nothing we can do here. And even though we have better hardware on PC, Apple custom tweaks Final Cut to perform exceedingly better on AMD Radeon Pro. So Final Cut export times are still superior to Adobe Premiere&rsquo;s. Motion 5 is still easier and more responsive than After Effects.</p>
<p>That being said, it&rsquo;s not by a huge margin. Adobe Creative Suite is super strong, and unless you&rsquo;re a one-trick pony, any pro can switch to Adobe and get the job done.</p>
<p>In terms of software development, unless you&rsquo;re a one-trick .NET pony, you will want all the open source shebang. WSL is supposed to provide you that - in the future. Right now your best bet is running Virtualbox and you will not regret it.</p>
<p>Yes, yes, you have small exclusive software such as 1Password, Tweetbot, Alfred. I don&rsquo;t miss any of those. Especially because my last iPhone was the 4 back in 2010. Then I switched to Android with the Galaxy S4 and also never looked back. I&rsquo;m using an S8 and about to receive my Pixel 2, so I am good in terms of Twitter client or password management (I use LastPass and although it&rsquo;s not perfect, it gets the job done).</p>
<p>Either there is a good enough native desktop replacement or a mobile replacement, or there is a Web service. I may feel uncomfortable changing, but in practice, there is nothing in macOS that prohibits me from switching. Even if you bought iTunes songs or movies, there is iTunes for Windows.</p>
<blockquote>
  <p><em>&ldquo;But wait, Windows Update will annoy you!&rdquo;</em></p>

</blockquote>
<p>I thought as much. Microsoft did finally figure it out. It&rsquo;s still there, you still need to restart. But it&rsquo;s not nearly as annoying as it was before. Most updates will run in the background and you won&rsquo;t even notice. And you have several options such as <a href="https://support.microsoft.com/en-us/help/4028233/windows-10-schedule-or-pause-updates"target="_blank" rel="noopener">scheduling it</a> to run only at night when you&rsquo;re not working.</p>
<blockquote>
  <p><em>&ldquo;But what about the security issues and viruses!?&rdquo;</em></p>

</blockquote>
<p>Yes, I highly recommend you not to browse the Deep Web on a Windows machine, you will be owned. Not even using a Tor browser. You will be owned.</p>
<p>I also recommend you to use BitLocker (only available on Windows 10 Pro) to encrypt your partition. And also to backup to external hard drives as frequently as you can. Nothing can save you better than a readily available cold backup.</p>
<p>And yes, install some 3rd party solution such as <a href="https://www.avast.com/index"target="_blank" rel="noopener">Avast antivirus</a>. Have healthy web browsing behavior and avoid shady websites. You know what I am talking about. You will be owned.</p>
<p>If you must, install a secure Linux distro within Virtualbox and open Tor from there.</p>
<blockquote>
  <p><em>&ldquo;But what about the mess that is the Registry!?&rdquo;</em></p>

</blockquote>
<p>It&rsquo;s still there. If you never experienced it, the Registry is Windows&rsquo; equivalent of &ldquo;/etc&rdquo; in Linux distros. It&rsquo;s a binary database. It gets corrupted. It gets dirty entries.</p>
<p>But my recommendation is: forget about it. If you&rsquo;re thinking and tinkering with it, you will get a corrupt system. Do not try to clean it up (never, ever use something like CCleaner).</p>
<p>Windows itself now has automatic system restore snapshotting everytime something big happens. And it&rsquo;s mostly reliable. They go as far as duplicating the current &ldquo;C:\Windows&rdquo; directory into a &ldquo;C:\Windows.old&rdquo; when there is a big Windows Update, just in case. They shot themselves in the foot so many times that they finally learned to have several layers of recovery options.</p>
<p>Nowadays you can even download the <a href="https://www.microsoft.com/en-us/software-download/windows10"target="_blank" rel="noopener">Media Creation tool</a> from the Windows website itself. You don&rsquo;t even have to sign up anywhere. And the Windows license comes with the machine&rsquo;s firmware (BIOS). You don&rsquo;t even have to remember where your product activation key is. It automatically activates and because every machine comes with a license, the process is seamless. And most manufacturers have automatic updates for drivers and firmware.</p>
<p>So you should have a reasonably smooth experience, no matter what.</p>
<blockquote>
  <p><em>&ldquo;But Windows is not open source!&rdquo;</em></p>

</blockquote>
<p>Neither is OS X. And this is a Linux advantage. So, if you must, use just Linux natively. The point of the argument is finding an alternative to the Mac. So we&rsquo;re on the same page.</p>
<h2>The Ruby on Rails and the Hipsters effect<span class="hx:absolute hx:-mt-20" id="the-ruby-on-rails-and-the-hipsters-effect"></span>
    <a href="#the-ruby-on-rails-and-the-hipsters-effect" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Truth be told. In the software development arena, we switched to the Mac mainly because of Rails and Textmate 2. We had access to some open source tools built-in, we had GCC to compile the rest. Windows XP was way past due. Windows Vista was a terrible experience. The PC hardware manufacturers were not even trying, and Apple was launching good hardware and good experience all the time.</p>
<p>Developers switched in droves after the switch from PowerPC to Intel in 2005. My very first Mac was a G4 Mac Mini with OS X 10.4 Tiger. And then I bought the very first Intel White MacBook and I never looked back.</p>
<p>Software tools on Windows were laughable. Visual Studio.NET was terrible. Eclipse-based IDEs were terrible. We didn&rsquo;t have Powershell yet. And we definitely never had anything like WSL for command-line. You could install Cygwin, but it was a poor experience.</p>
<p>And running Linux as the primary OS was also terrible. Wine is still terrible, despite its best efforts. Unfortunately, NVIDIA and AMD GPUs will only run at their best on Windows. And Linux was never really good for content creation. It&rsquo;s not even a matter of learning a new workflow, the tools are mediocre. They have to reverse engineer everything, and that takes time. And in the velocity of social media, we don&rsquo;t have enough time, so we need to settle for compromises.</p>
<p>The Windows ecosystem stopped pretending, and finally embraced everything the open source and Apple ecosystem built. Now we all benefit.</p>
<p>By the way, if you like iTerm 2, you will be delighted to install <a href="https://gnunn1.github.io/tilix-web/"target="_blank" rel="noopener">Tilix for Linux</a>, which is very similar.</p>
<h2>As time goes by<span class="hx:absolute hx:-mt-20" id="as-time-goes-by"></span>
    <a href="#as-time-goes-by" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I have been following the Surface line-up evolution over the years. In the beginning, I was very skeptical. Because it&rsquo;s very easy to launch a gimmicky product and discontinue it. I trust companies that keep evolving their products over the years. Not only does an ecosystem form around it, but you have time to put together support services, there are parts available in the official stores and in the aftermarket. After all these years, Microsoft deserves to be called a hardware manufacturer.</p>
<p>This is Microsoft finally fulfilling what Alan Kay once said:</p>
<blockquote>
  <p><em>&ldquo;People who are really serious about software should make their own hardware.&rdquo;</em></p>

</blockquote>
<p>They only really failed in the smartphone market, the competition is way more difficult there and because of that margins are super low. But they did nail the tablet market, the desktop, the notebook, the gaming, the servers (with their own Azure services), so now I believe that they really <strong>understand</strong> the specific needs of all those areas, and it shows in the software. They have a far superior understanding of every market - but the smartphone - than Apple. They finally have true skin in the game.</p>
<p>Because now Microsoft builds their own hardware and they made a business out of it, they have real incentive inside the teams in the company for a positive feedback loop that results in more refinements to the Windows codebase.</p>
<p>They have been trying and failing in the touch-based solutions since the early 2000s. Now the Pen is not a gimmick anymore, it&rsquo;s a real product, with real qualities, and real use cases.</p>
<p>They also kept their vision of playing nice with Open Source. No one can reasonably expect Microsoft to go full-blown open source. But it shows. They are second only to Google on GitHub in terms of open source contributions. They acquired Xamarin and their .NET Core strategy is on-going and strong. Heck, even Visual Studio received the open source treatment. There is still a long road ahead, but one has to recognize the giant steps.</p>
<p>Which is way more than we can say about Apple, where the poor guys at <a href="https://github.com/Homebrew/homebrew-core/issues/14418"target="_blank" rel="noopener">Homebrew suffer</a> on each OS X upgrade.</p>
<p>The Surface RT and Windows Mobile attempt even made it possible for Windows to finally be compiled to run on ARM processors. This is a good sign going forward. Reminds me when OS X was first compiled to run on Intel processors (they ran on PowerPC before) in 2005.</p>
<p>And the Macbook? They get a gimmick touch bar. Apple is really out of touch with reality.</p>
<h2>Why am I out from the Apple ecosystem?<span class="hx:absolute hx:-mt-20" id="why-am-i-out-from-the-apple-ecosystem"></span>
    <a href="#why-am-i-out-from-the-apple-ecosystem" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Apple&rsquo;s focus is not on the Mac. Worse: the Mac is quickly becoming abandonware, despite the PR statements.</p>
<p>They are clearly an iPhone company, with a hobbyist side business that builds Macs and MacBooks, which exist mostly to serve as an iPhone app development toolchain. This is the business model.</p>
<p>Did you see their latest Ad for the iPad?</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/sQB2NjhJHvY"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>Yes, this is super cute and I dig it.</p>
<p>But the message is crystal clear: the vision is for people to use only iPhones and iPads. There is no such thing as a &ldquo;computer&rdquo;.</p>
<p>They are the most valued tech company right now. But since last year, they don&rsquo;t even have a dedicated OS X team anymore. What does that tell you?</p>
<p>The iOS line-up is a &ldquo;monopoly&rdquo; within Apple&rsquo;s line up. The Mac can&rsquo;t compete. Steve Jobs himself <a href="https://www.youtube.com/watch?v=ZBma82g3Uag"target="_blank" rel="noopener">warned</a> about what happens to monopolies.</p>
<p>We are starting to hear the same story all over the industry:</p>
<ul>
<li><a href="http://cdm.link/2016/09/apples-relationship-pro-music-needs-mending/"target="_blank" rel="noopener">Apple&rsquo;s relationship with pro music needs some mending</a> - Sep, 26, 2016</li>
<li><a href="https://www.bloomberg.com/news/articles/2016-12-20/how-apple-alienated-mac-loyalists"target="_blank" rel="noopener">How Apple Alienated Mac Loyalists</a> - Dec, 20, 2016</li>
<li><a href="https://www.theverge.com/2016/12/21/14037686/apple-macbook-macos-focus-mobile-features-ios"target="_blank" rel="noopener">macOS is becoming legacy software</a> - Dec, 21, 2016</li>
<li><a href="https://www.stuckincustoms.com/2017/02/10/switching-from-mac-to-windows/"target="_blank" rel="noopener">Apple Is Dead To Me… I&rsquo;m Switching To Windows!</a> - Feb, 10, 2017</li>
<li><a href="https://char.gd/blog/2017/why-i-left-mac-for-windows-apple-has-given-up"target="_blank" rel="noopener">Why I left Mac for Windows: Apple has given up</a> - Mar, 5, 2017</li>
</ul>
<p>Microsoft played their cards right. It took almost 15 years. But it paid off in spades. Apple really did alienate the loyalists, the ones that used to &ldquo;Think Different&rdquo;.</p>
<p>Apple is a &ldquo;victim&rdquo; of Clayton Christensen&rsquo;s <a href="https://www.amazon.com/Innovators-Dilemma-Revolutionary-Change-Business/dp/0062060244"target="_blank" rel="noopener">&ldquo;Innovator&rsquo;s Dilemma&rdquo;</a>. If they still had vision left, they could reach out and maintain. But instead, they chose to go all-in on a single product line.</p>
<p>Microsoft seems to have read the Clayton&rsquo;s <a href="https://www.amazon.com/Innovators-Solution-Creating-Sustaining-Successful/dp/1422196577/ref=pd_sim_14_4?_encoding=UTF8&amp;psc=1&amp;refRID=CC6NWGVZMEWTTDETMZ8W"target="_blank" rel="noopener">&ldquo;Innovator&rsquo;s Solution: Creating and Sustaining Successful Growth&rdquo;</a>.</p>
<p>When the iPod was at its peak, Microsoft had &ldquo;lost&rdquo;. They were out of the game. It was a depressing thing to see. Steve Ballmer was a shameful CEO. Windows Vista was a shameful OS. The Zune failed to capture the aura of the iPod. Windows Mobile was a mess. And Sharepoint &hellip; oh Sharepoint. They even celebrated when JQuery was added to ASP.NET! Talk about too little too late.</p>
<p>And Amazon - a retail store - successfully launched the best infrastructure in the world and became synonymous with &ldquo;Cloud&rdquo; and Microsoft was still struggling to understand what Linux was.</p>
<p>Failure after failure, instead of defending their low position, they finally decided to step up and move forward one step at a time. Refine. Evolve. Sustain.</p>
<p>Now, Windows 10 recaptured the aura of XP at its best. It&rsquo;s doing incremental, and solid upgrades. First the Anniversary Edition, then the Creators Update and finally the most recent Fall Creators Update. All solid upgrades.</p>
<p>The Surface line-up is going strong as the best reference for industrial design and features on desktops, notebooks, and accessories. Seriously, Apple still sells that terrible slippery, difficult to hold, <a href="https://www.apple.com/shop/product/MLA02LL/A/magic-mouse-2"target="_blank" rel="noopener">Magic Mouse 2</a>, but the &ldquo;magic&rdquo; is that someone actually buys those. Microsoft has the <a href="http://amzn.to/2ztHZVv"target="_blank" rel="noopener">Arc Touch</a> and the <a href="http://amzn.to/2zu8p9o"target="_blank" rel="noopener">Precision Mouse</a>, two of the best ever made.</p>
<p>Creative professionals, software developers, we all jumped ship in droves to OS X when it was the &ldquo;Different Thing&rdquo; on the &ldquo;Think Different&rdquo; campaign. We helped evangelize. We helped build tools. We helped build services. We wrote tons of <a href="http://www.akitaonrails.com/2012/04/20/off-topic-comprei-meu-primeiro-mac-e-agora-edicao-2012"target="_blank" rel="noopener">blog posts</a> and documentation to help out.</p>
<p>Steve Jobs died, and Apple died with him. They basically did nothing new ever since, and their once successful products were left to decay and die. The only thing left is the halo effect, the inertia, and their ever-growing hunger for milking the same cow indefinitely, while ditching R&amp;D altogether.</p>
<h2>Apple doesn&rsquo;t care. Why should I?<span class="hx:absolute hx:-mt-20" id="apple-doesnt-care-why-should-i"></span>
    <a href="#apple-doesnt-care-why-should-i" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Microsoft played smart, they kept fixing and evolving, year after year. They lost the 90s generation. They recaptured the 2010s generation. And they started early, getting their attention from the Xbox all the way to Windows.</p>
<p>Seriously, the XBox Dashboard is better than the PS4&rsquo;s. I highly prefer it.</p>
<p>And they are now in a good position. The players are inverted in the game. The &ldquo;Think Different&rdquo; now refers to Windows 10 and the PC hardware. Intel is playing conservative. NVIDIA builds the best GPUs. There are many great options not available on the Mac.</p>
<p>The jump from 32-bits to 64-bits and the necessities of the XBox even helped Microsoft rethink how to isolate and package their software. Even though the Windows Store is still a bad joke at this point.</p>
<p>And Bill Gates was dead right in the mid-90s: the browser would render the Windows monopoly obsolete. And it did. On the bright side, you have the very same Chrome and Firefox browsers available on OS X, Windows 10, and any Linux distro. This means instant access to most of what people need: Gmail, Google Docs, Office 365, Dropbox, LastPass, Spotify, Slack, Discord, Twitter, Netflix, HBO, Hulu, etc.</p>
<p>I hate Javascript-based desktop wrappers like the plague. Electron is dumb heavy. But, what can I do? At least powerful hardware and RAM come cheap these days, and we can afford browser tabs that eat up 100 MB each.</p>
<p>The browser is the new OS for the majority of people. Heck, most people can get around using Chromebooks! Everything else is on the phones, not the desktop. So hard tools are needed. Soft tools you already carry in your pocket.</p>
<p>The Apple ecosystem is not dead yet. Apple still has time to fix this situation. I&rsquo;ve been waiting for the past 3 years, but still zero signs of anything getting better. My very first switching article was <a href="http://www.akitaonrails.com/en/2015/11/10/situacao-brasil-no-macs-for-the-rest-of-us"target="_blank" rel="noopener">published on Nov 10, 2015</a>.</p>
<p>Unlike other &ldquo;switching&rdquo; articles, I am not saying this lightly. I have switched already, in the past 2 years.</p>
<p>As I say in many of my posts and talks about events: I am not defined by my tools. I don&rsquo;t carry banners. I am not loyal to anyone by default. I was never paid by Apple to defend it. And I am not paid by Microsoft to say good things about them. I just analyze the facts and state the best course of action going forward.</p>
<p>And the facts tell me that macOS is no more. It was a good ride. Goodbye to the Mac and thanks for all the fish.</p>
]]></content:encoded><category>apple</category><category>microsoft</category><category>hardware</category></item><item><title>From the Macbook Pro to the Dell XPS. Arch Linux for Creative Pro Users</title><link>https://akitaonrails.github.io/en/2017/01/31/from-the-macbook-pro-to-the-dell-xps-arch-linux-for-creative-pro-users/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2017/01/31/from-the-macbook-pro-to-the-dell-xps-arch-linux-for-creative-pro-users/</guid><pubDate>Tue, 31 Jan 2017 18:26:00 -0200</pubDate><description>&lt;p&gt;As I&amp;rsquo;ve been reporting in previous posts, I&amp;rsquo;m switching to Linux full-time. Here I&amp;rsquo;d like to show how to configure Arch Linux so it&amp;rsquo;s suitable for Creative &lt;strong&gt;Pro&lt;/strong&gt; Users, where access to the secondary GPU is very important.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re a Creative Pro User, you can&amp;rsquo;t really run Final Cut Pro X (with Motion, Compressor), Logic Pro, Adobe&amp;rsquo;s Photoshop and other apps. So you will have to change your workflow if you want to be in the Linux ecosystem. Fortunately, for many workflows Linux apps have matured quite nicely and you don&amp;rsquo;t need to settle for low quality, &amp;ldquo;hack-ish&amp;rdquo; software.&lt;/p&gt;</description><content:encoded><![CDATA[<p>As I&rsquo;ve been reporting in previous posts, I&rsquo;m switching to Linux full-time. Here I&rsquo;d like to show how to configure Arch Linux so it&rsquo;s suitable for Creative <strong>Pro</strong> Users, where access to the secondary GPU is very important.</p>
<p>If you&rsquo;re a Creative Pro User, you can&rsquo;t really run Final Cut Pro X (with Motion, Compressor), Logic Pro, Adobe&rsquo;s Photoshop and other apps. So you will have to change your workflow if you want to be in the Linux ecosystem. Fortunately, for many workflows Linux apps have matured quite nicely and you don&rsquo;t need to settle for low quality, &ldquo;hack-ish&rdquo; software.</p>
<p>Software developers don&rsquo;t ever need more than the cheap Intel integrated graphics, unless you want to install <a href="https://wiki.archlinux.org/index.php/Steam/Wine"target="_blank" rel="noopener">Steam through Wine</a> to play some demanding games.</p>
<p>After a lot of research (a.k.a. <a href="https://www.youtube.com/results?search_query=Dell&#43;XPS&#43;15&#43;9550&#43;review"target="_blank" rel="noopener">YouTube!</a>) I&rsquo;ve settled for the Dell XPS 15&quot; (9550 model). It&rsquo;s an almost 1-year-old SkyLake architecture using the NVIDIA Optimus Hybrid Intel + GTX960M.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/612/20170127_133009.jpg" alt="Dell XPS 15&#34; 9550"  loading="lazy" /></p>
<p>To this day, nothing can beat the software+hardware cohesiveness of Apple. This can&rsquo;t be underestimated. The PC/Windows world is a lot better, but it&rsquo;s still plagued with unstable BIOS, unstable drivers, etc. If you&rsquo;re on Linux, it&rsquo;s even worse.</p>
<p>Here&rsquo;s the first <strong>protip</strong>: avoid super brand new models. Most of them won&rsquo;t have stable drivers even for Windows 10, let alone Linux. Let the Windows guys suffer the first couple of months; give Dell, <a href="http://windowsreport.com/nvidia-driver-crash-windows-10/"target="_blank" rel="noopener">NVIDIA</a> and Intel time to fix the mess releasing more stable BIOS firmware and drivers.</p>
<p>If you really want to buy one of the 2017 brand new Kaby Lake models, you&rsquo;re in a Russian roulette situation. Even first generation Macbook models usually <a href="http://www.digitaltrends.com/computing/apple-releases-macos-sierra-10123-update/"target="_blank" rel="noopener">present trouble</a>. As a rule of thumb, do not buy on day 1, wait at the very least 3 months. You are warned.</p>
<p>Out of all the early-2016 machines that most Linux distros can support reasonably well, I believe the <a href="http://www.anandtech.com/show/10116/the-dell-xps-15-9550-review"target="_blank" rel="noopener">Dell XPS</a> series, <a href="http://www.anandtech.com/show/10697/the-lenovo-thinkpad-x1-yoga-review"target="_blank" rel="noopener">Lenovo Thinkpad X1 Yoga</a>, and possibly <a href="http://www.digitaltrends.com/computing/dell-xps-15-vs-asus-zenbook-pro-ux501-battle-of-the-plus-sized-premiums/"target="_blank" rel="noopener">Asus Zenbook Pro</a> and <a href="http://laptopmedia.com/review/hp-probook-450-g3-455-g3-review-what-a-budget-business-notebook-should-look-like/"target="_blank" rel="noopener">HP ProBook</a> are quite good nowadays.</p>
<p>But in most categories, the XPS series is the one to beat. Dell really did a pretty good job this time around.</p>
<p>The keyboard, as with most PCs, is mediocre, plastic-y, a little bit wobbly, with good enough travel but with a sudden hard click without enough resistance. For 99% of the people I believe it&rsquo;s fairly good, but not so much for really fast touch-typists.</p>
<p>The touchpad is one of the best in any PC notebook, but then again, most PC touchpads are shamelessly bad, especially with gestures more complicated than a 2 finger scroll. This is another area where the Mac is still untouched. That said, the Dell one is serviceable and should work well enough, with a few palm-rejection misses that will annoy you now and then.</p>
<p>Display monitor is a different story: the XPS 15&rsquo;s gorgeous 4K IPS display is superb, far surpassing the Macbook&rsquo;s Retina Displays. Samsung PCIe NVMe M.2 SSDs is also the best in its class. The aluminum enclosure is simple but well machined, and the carbon fiber finish is a welcome addition to make a machine that you can really enjoy and be proud to carry around.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/613/20170124_211855.jpg" alt="Dell XPS Display"  loading="lazy" /></p>
<p>If you don&rsquo;t want to tinker with the hardware configuration too much, usually the safest bet is installing Ubuntu and even then <a href="http://web.archive.org/web/20160707232552/http://ubuntuforums.org:80/showthread.php?t=2317843"target="_blank" rel="noopener">it&rsquo;s not</a> going to be perfect.</p>
<p>Especially with HiDPI displays (over Full-HD) Linux is still lagging behind. GNOME, KDE kinda support it, but other desktop environments have mixed results, and old applications are still not supporting it as they should. If you&rsquo;re using LTS distros with old packages, you will find a few applications doing HiDPI wrong, like <a href="https://bugs.documentfoundation.org/show_bug.cgi?id=99508"target="_blank" rel="noopener">Libreoffice</a> and <a href="https://community.spotify.com/t5/Desktop-Linux-Windows-Web-Player/Linux-client-barely-usable-on-HiDPI-displays/td-p/1067272"target="_blank" rel="noopener">Spotify</a>.</p>
<p>And if you&rsquo;re like me, using a multi monitor with different DPIs, you&rsquo;re out of luck. Either you&rsquo;re using the notebook with the lid closed (so you only have one external monitor to worry about) or you will have the texts all super small in the HiDPI primary monitor in order to have the correct DPI in the second external monitor.</p>
<p>One fallback is to configure the 4K display to downscale to Full-HD (1080p). And then again, what&rsquo;s the point of having a 4K display if you can&rsquo;t use it properly? So, do not buy the 4K unless you understand this.</p>
<p>Both MacOS and Windows handle this situation far better. And in MacOS I never experienced any HiDPI problem. Not once. Apple was much better pushing a higher standard than the rest of the industry, and this cohesiveness and no need to tinker drivers and configuration is super valuable.</p>
<p>With Macs, you can really just boot and use. With Windows, you&rsquo;re probably mostly ok unless there are driver issues. And with Linux, you must expect a fair amount of tinkering to have the basis covered.</p>
<p>New PC notebooks are also coming with several weird configurations that make sense for Windows, but that make Linux distros struggle a bit. Every time you must start by configuring the BIOS to disable stuff like Secure Boot, changing to AHCI issues, etc. So let&rsquo;s dive right into it.</p>
<h3>BIOS Setup<span class="hx:absolute hx:-mt-20" id="bios-setup"></span>
    <a href="#bios-setup" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The very first thing you must do is change BIOS settings. F2 your way into the setup when the Dell logo shows up and make the following changes:</p>
<ul>
<li>General - Advanced Boot Options - Enable Legacy Option ROMs</li>
<li>General - Boot Sequence - Legacy (UEFI is the default)</li>
<li>System Configuration - SATA Operation - AHCI (default is RAID On)</li>
<li>System Configuration - Touchscreen (disable, as it&rsquo;s mostly unnecessary and it eats up more battery)</li>
<li>Security - Secure Boot - Secure Boot Enable - Disabled</li>
<li>POST Behavior - Fastboot - Through (default is minimal)</li>
</ul>
<p>By doing these changes, the pre-installed Windows 10 will not boot anymore, so make sure you don&rsquo;t need it before doing this.</p>
<h3>Kernel Tweaks<span class="hx:absolute hx:-mt-20" id="kernel-tweaks"></span>
    <a href="#kernel-tweaks" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>You should follow the <a href="https://wiki.archlinux.org/title/Dell_XPS_15_%289550%29"target="_blank" rel="noopener">Dell XPS (9550) Wiki</a> Page.</p>
<p>The 4K Display may flicker a bit, and to avoid it you must edit Grub configuration file <code>/boot/grub/grub.cfg</code> and append the following line with the specific flags:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>GRUB_CMDLINE_LINUX_DEFAULT=&#34;... i915.edp_vswing=2 i915.preliminary_hw_support=1 intel_idle.max_cstate=1 acpi_backlight=vendor acpi_osi=Linux&#34;</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>That line already exists with some flags, don&rsquo;t erase them, just append the additional configuration and don&rsquo;t forget to run the following:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo grub-mkconfig -o /boot/grub/grub.cfg</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>For the most part, all the rest will work just fine, but just to be safe I installed the <a href="https://wiki.archlinux.org/index.php/Powertop"target="_blank" rel="noopener">Powertop</a> and acpid packages as well.</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -S powertop acpid</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>I am happy to report that I can close the notebook&rsquo;s lid and the OS will properly suspend. When I open it up it comes back from sleep, saving battery and saving me the trouble of having to reboot every day.</p>
<h3>Arch Distros - Manjaro to the rescue<span class="hx:absolute hx:-mt-20" id="arch-distros---manjaro-to-the-rescue"></span>
    <a href="#arch-distros---manjaro-to-the-rescue" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I am becoming an Arch enthusiast myself, but to tweak it to work on a modern notebook is just too much work. I don&rsquo;t recommend trying if you&rsquo;re in a hurry. I tried <a href="https://arch-anywhere.org/"target="_blank" rel="noopener">Arch Anywhere</a>, but it can&rsquo;t even go through the disk partitioning stage (it doesn&rsquo;t like the SSD or SATA setup). I tried <a href="http://web.archive.org/web/20170205034235/https://antergos.com/"target="_blank" rel="noopener">Antergos</a> but for some reason Gnome Online Accounts didn&rsquo;t work properly there, even if I try to reinstall it. Finally I settled for <a href="https://manjaro.org/"target="_blank" rel="noopener">Manjaro</a>, which installed and worked without any major issues.</p>
<p>There are several distros based on Arch. Arch Anywhere and Antergos are mostly Arch &ldquo;installers&rdquo; where the main repository sources are still vanilla Arch and they try to make the install process easier than you having to find your way through a bare bone command line shell.</p>
<p>Manjaro is more of an independent distro. The main sources point to Manjaro first, so they can test the most recent packages and hold on to them for a bit longer so rogue packages don&rsquo;t break your system too often. But you still have raw access to AUR packages. The main selling point being a <strong>much</strong> better installer with a more sophisticated auto-partitioning software than Arch Anywhere and their own Hardware Detection software <a href="https://wiki.manjaro.org/index.php?title=Manjaro_Hardware_Detection_Overview"target="_blank" rel="noopener">MHWD</a>.</p>
<p>For the most part it did work properly although I still had to tweak the Graphics configuration as it opts for the open source Nouveau drivers first. Trust me: opt for the proprietary binaries.</p>
<p>If you&rsquo;re also a software developer, you will want to read my <a href="http://www.akitaonrails.com/en/2017/01/10/arch-linux-best-distro-ever"target="_blank" rel="noopener">previous post on Arch</a>.</p>
<h3>Optimus Hybrid Graphics<span class="hx:absolute hx:-mt-20" id="optimus-hybrid-graphics"></span>
    <a href="#optimus-hybrid-graphics" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The Dell XPS model 9550 uses the <strong>Optimus</strong> Hybrid architecture. <strong>Prime</strong> drivers are for standalone NVIDIA GPUs. But most notebooks work with the integrated Intel Graphics card as the primary and only card (particularly lightweight ultrabooks) and the more &ldquo;Pro&rdquo; models bridge it out to a secondary NVIDIA GTX 960M.</p>
<p>If you have only a simple, single Intel graphics, most distros will do the right thing out of the box and install the proper drivers and configuration.</p>
<p>Now, if you have a high-end machine like this XPS 9550 or 9560 (Kaby Lake), you will need more configuring. First you need to understand the terminology:</p>
<ul>
<li>You need to install Bumblebee. This is a daemon that enables access to the secondary GPU. Just installing Bumblebee solves most problems.</li>
<li>Then you need to install Primusrun which is a back-end for Bumblebee and you use it to run programs such as Steam in order for it to have access to the secondary GPU.</li>
<li>Sometimes you will see about Optirun, which nowadays seems to default to Primusrun (otherwise it originally uses a secondary X framebuffer, adding extra overhead).</li>
</ul>
<p>After you have it all installed, it&rsquo;s usually a matter of doing:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>primusrun kdenlive</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>For example, to load the video editor Kdenlive to use OpenGL through the Nvidia GPU. Or to run <a href="http://web.archive.org/web/20170220054700/https://forum.manjaro.org/t/newbie-questions-about-hybrid-nvidia-and-intel-gpu-drives-tutorial/2974/26"target="_blank" rel="noopener">Steam through Wine</a>:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>primusrun wine ~/.wine/drive_c/Program\ Files\ (x86)/Steam/Steam.exe</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>As I mentioned before, Manjaro will probably install the Nouveau driver, which is the open source driver. You should install the proprietary binaries, like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo mhwd -a pci nonfree 0300
sudo mhwd -r pci video-hybrid-intel-nouveau-bumblebee
sudo mhwd -i pci video-hybrid-intel-nvidia-bumblebee</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Again, I am considering the XPS 9550 which has the Intel-Nvidia Optimus/hybrid configuration. Read Manjaro&rsquo;s <a href="http://web.archive.org/web/20170517195417/https://wiki.manjaro.org/index.php/Configure_Graphics_Cards"target="_blank" rel="noopener">Configuring Graphics</a> page on the subject.</p>
<p>I did however stumble upon a strange problem. I am using <strong>Linux 4.9</strong> kernel:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ uname -a
Linux arch42 4.9.6-1-MANJARO #1 SMP PREEMPT Thu Jan 26 12:29:20 UTC 2017 x86_64 GNU/Linux</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>This is supposedly the <code>core/linux49 4.9.6-1</code> package. But for some reason the <code>mhwd -i</code> command was installing the <code>linux44-nvidia</code> drivers.</p>
<p>So the Nvidia GPU modules were never being loaded until I manually removed it:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -R linux44-nvidia</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And then I manually installed the correct version:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -S linux49-nvidia</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Just to be safe, I uninstalled the <code>linux44</code> package and any other <code>linux44-*</code> package:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -Ss linux44 | grep installed
# sudo pacman -R linux44-(name of the package)</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Now I have this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ sudo pacman -Ss linux4 | grep installed
core/linux49 4.9.6-1 [installed]
extra/linux49-bbswitch 0.8-6 (linux49-extramodules) [installed]
extra/linux49-ndiswrapper 1.61-4 (linux49-extramodules) [installed]
extra/linux49-nvidia 1:375.26-6 (linux49-extramodules) [installed]</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And in the <code>/etc/bumblebee/bumblebee.conf</code> I make sure it explicitly loads the proper <code>nvidia</code> driver (the aforementioned <code>linux49-nvidia</code>), otherwise you have to <code>sudo vim</code> and edit it:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ cat /etc/bumblebee/bumblebee.conf | grep Driver
# The Driver used by Bumblebee server. If this value is not set (or empty),
Driver=nvidia</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>At the end, if you load Manjaro Settings Manager, you should see something like this:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/614/Screenshot_from_2017-01-31_18-24-34.png" alt="Settings Manager"  loading="lazy" /></p>
<h3>Professional 3D and Video Editing<span class="hx:absolute hx:-mt-20" id="professional-3d-and-video-editing"></span>
    <a href="#professional-3d-and-video-editing" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>To test out this setup, I started out by installing <a href="https://wiki.archlinux.org/index.php/Blender"target="_blank" rel="noopener">Blender</a> (one of the best 3D editing tools in the industry). Then I downloaded a free 3D model and animation, and tried to render cycles through GPU Compute. Just to be safe, I also installed the Cuda package:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -S blender cuda</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If the proper drivers are installed, Blender should detect it and enable usage of its CUDA cores:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/608/Screenshot_from_2017-01-31_17-04-58.png" alt="CUDA GPU Compute"  loading="lazy" /></p>
<p>You can monitor the Nvidia card with the <code>nvidia-smi</code> command and it will show something like this:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/609/Screenshot_from_2017-01-31_16-43-46.png" alt="nvidia-smi monitoring"  loading="lazy" /></p>
<p>This should cover Pro 3D modeling if you need.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/615/Screenshot_from_2017-01-31_17-11-18.png" alt="Blender"  loading="lazy" /></p>
<p>Possibly the best video editing tool available for Linux is <a href="https://kdenlive.org/"target="_blank" rel="noopener">Kdenlive</a>. It&rsquo;s the closest you will find to Adobe Premiere or Apple Final Cut Pro.</p>
<p>This is how you must install it:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>sudo pacman -S kdenlive ladspa movit sox ffmpeg frei0r-plugins breeze-icons</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And for faster real-time previews, it can be started through Primusrun in a Terminal like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ primusrun kdenlive
OpenGL vendor:  &#34;NVIDIA Corporation&#34;
OpenGL renderer:  &#34;GeForce GTX 960M/PCIe/SSE2&#34;
OpenGL Threaded:  true
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false
OpenGL vendor:  &#34;NVIDIA Corporation&#34;
OpenGL renderer:  &#34;GeForce GTX 960M/PCIe/SSE2&#34;
OpenGL Threaded:  true
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>If I start it without Primusrun, it will first detect the Intel graphics:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>$ kdenlive
OpenGL vendor:  &#34;Intel Open Source Technology Center&#34;
OpenGL renderer:  &#34;Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) &#34;
OpenGL Threaded:  false
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false
OpenGL vendor:  &#34;Intel Open Source Technology Center&#34;
OpenGL renderer:  &#34;Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) &#34;
OpenGL Threaded:  false
OpenGL ARG_SYNC:  true
OpenGL OpenGLES:  false</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>I am not entirely sure, but I believe Kdenlive uses OpenGL to show you real-time previews of the effects you&rsquo;re applying to the video tracks, and that can probably be syphoned through primus into the secondary Nvidia card as well.</p>
<p>Actually Kdenlive, like its competitor OpenShot, both use the <a href="https://www.mltframework.org/"target="_blank" rel="noopener">MLT Multimedia Framework</a>, the engine for non-linear video editing. Finally, MLT uses <a href="https://movit.sesse.net/"target="_blank" rel="noopener">movit</a>, which is a high-performance, high-quality video filters for the GPU. The <code>pacman</code> install command I mentioned before takes care of installing those optional packages.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/616/Screenshot_from_2017-01-31_18-29-38.png" alt="Kdenlive"  loading="lazy" /></p>
<p>And if you want to leverage the Nvidia GPU for even GIMP, there is an ongoing effort to port filters to use <a href="https://wiki.gimp.org/wiki/Hacking:Porting_filters_to_GEGL"target="_blank" rel="noopener">GEGL/OpenCL</a>. You can enable GEGL by starting Gimp from the Terminal like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>GEGL_USE_OPENCL=yes gimp</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Then, you can use the ported plugins through the <code>Tools - GEGL Operation</code>:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/610/Screenshot_from_2017-01-31_17-49-30.png" alt="GEGL Operation"  loading="lazy" /></p>
<p>And if you&rsquo;re a professional photographer, you will want to install <a href="http://www.darktable.org/"target="_blank" rel="noopener">Darktable</a>, which is the closest you will get to Apple Aperture or Adobe Lightroom. It&rsquo;s actually quite nice looking and you will be able to properly retouch your photos.</p>
<p>Darktable automatically detects the Nvidia driver. You don&rsquo;t need to run it through Primusrun or use any special flag.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/617/Screenshot_from_2017-01-31_18-31-04.png" alt="Darktable"  loading="lazy" /></p>
<h3>Final Notes<span class="hx:absolute hx:-mt-20" id="final-notes"></span>
    <a href="#final-notes" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>You can check if the application is using the GPU by monitoring it with <code>nvidia-smi</code>:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>watch -n 0.5 nvidia-smi</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>This will keep monitoring the GPU every half second. And the application will show up in the processes list with a proper PID and you can see the memory usage (my GPU has 2GB of dedicated DRAM), processing usage, temperature (it can get hot at almost 70 degrees Celsius when I was rendering through Blender).</p>
<p>I think this is the most you can get out of your hardware with Pro-level multimedia applications. I am not a professional using Blender, Kdenlive, Darktable, or Gimp, but it&rsquo;s good to know I can use them for my small needs. Pro users will be able to take more advantage of this machine with this configuration.</p>
<p>As I said in the beginning, if you&rsquo;re really a Pro User, always on the move and in need to quickly make changes to your multimedia projects on-the-go, you will probably be better off with Apple&rsquo;s stack, a Macbook Pro with Final Cut Pro. Don&rsquo;t forget that Final Cut Pro and the other Apple Pro software are super optimized for the Mac hardware, being able to export videos orders of magnitude faster than Premiere, for example.</p>
<p>But you may be a Creative Pro User in the Games industry, or even Mobile development, 3D Video Animation or Post Production, or working in a mixed team with software engineers. And having the ability to build your multimedia assets on a Linux platform can make it interesting for future integration workflows.</p>
<p>Even if you&rsquo;re in the Mac or PC world, you will probably want to use software as Blender, which is a respectable competitor or even complement next to award winning tools such as Maya.</p>
<p>So, even though you have to go through some rough edges in the initial installation and configuration, once it&rsquo;s done it should work just fine.</p>
]]></content:encoded><category>linux</category><category>apple</category><category>hardware</category></item><item><title>[Off-Topic] Why are we all moving away from Apple?</title><link>https://akitaonrails.github.io/en/2017/01/12/off-topic-why-are-we-all-moving-away-from-apple/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2017/01/12/off-topic-why-are-we-all-moving-away-from-apple/</guid><pubDate>Thu, 12 Jan 2017 11:37:00 -0200</pubDate><description>&lt;p&gt;&amp;ldquo;Anyone that is someone has been following Apple for the past couple of decades. Love them, or hate them, the only thing you can&amp;rsquo;t do is ignore them.&amp;rdquo; - that was always the general thought.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Creative&amp;rdquo; professionals (as if &amp;ldquo;creative&amp;rdquo; were restricted to painters and illustrators) have always been the most loyal Apple followers, for good reason. It was the cradle of essential tools like Photoshop, QuarkXPress, PostScript, PDF, and QuickTime. Apple set the standards for media creation, and anyone that was someone used those tools.&lt;/p&gt;</description><content:encoded><![CDATA[<p>&ldquo;Anyone that is someone has been following Apple for the past couple of decades. Love them, or hate them, the only thing you can&rsquo;t do is ignore them.&rdquo; - that was always the general thought.</p>
<p>&ldquo;Creative&rdquo; professionals (as if &ldquo;creative&rdquo; were restricted to painters and illustrators) have always been the most loyal Apple followers, for good reason. It was the cradle of essential tools like Photoshop, QuarkXPress, PostScript, PDF, and QuickTime. Apple set the standards for media creation, and anyone that was someone used those tools.</p>
<p>Microsoft focused on the corporate market, not on the creatives. Linux was still in its infancy, and most developers didn&rsquo;t even know the difference between CMYK and RGB. They were content with a crude bitmap on the screen.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/587/918d80cb21131a7a62e6ccaf71229960.jpg" alt="Old Macintosh"  loading="lazy" /></p>
<p>I have this theory that we took technology for granted in the late 90&rsquo;s, thinking we were at the top of the world. That came from the Dotcom Bubble of the late 90&rsquo;s, which burst together with 9/11. The depression made us waste the next 3 to 4 years trying to figure out what we would do next.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/588/1dot.jpg" alt="Dotcom burst"  loading="lazy" /></p>
<p>Apple had the luck to dodge the burst. They were already at the rock bottom since 1997. The cleaning up of their hardware lineup and the release of the iPod created their own small bubble. Steve Jobs was back and he brought good developers that made OS X a joy to use not only for creatives, but developers as well.</p>
<p>The Microsoft Antitrust case of 2000, the Dotcom Bubble burst in 2001, the release of the iPod in 2001, the switch from System 9 to OS X/BSD in 1999, the switch from PowerPC to Intel in 2005, the release of the ultra desirable Titanium PowerBook G4 in 2001. All of those contributed to give Apple the edge. And while everybody was down, it made them feel even larger than life.</p>
<p><a href="http://www.economist.com/node/2535519"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/589/Microsoft.gif" alt="Microsoft Antitrust"  loading="lazy" /></a></p>
<p>Then in 2007/2008 they had a new push: the iPhone, the App Store, and the need to use Xcode, available only on Apple computers. Unlike being forced onto Windows because of Visual Studio, using Xcode was actually an extra reason to buy a Mac.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/590/SteveJobsUnveilsiPhone.jpg" alt="iPhone announcement"  loading="lazy" /></p>
<p>Linux distros were still struggling. Back then, we were stuck with the <a href="https://www.youtube.com/watch?v=RIctzAQOe44"target="_blank" rel="noopener">stupid X11</a>. If a Linux-based OS was cutting edge, X11 on top of it was the worst of both worlds. Apple was smart enough not to adopt it and built Quartz from scratch, improving it with each new OS X release. It took five years to fully stabilize. Only now, in 2017, are we finally moving from X to Wayland/Weston.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/591/steve-ballmer.jpg" alt="Steve Ballmer"  loading="lazy" /></p>
<p>Microsoft also struggled after Bill Gates handed the reins to Steve Ballmer. The road from XP to Windows 10 ran through the disasters of Vista, Windows 8, and Windows Mobile, plus the endless attempts to revive the dominant but defunct Internet Explorer, the largest Walking Dead ever in technology. The Ballmer era was a disaster.</p>
<p>Then the iPad got released and Steve Jobs died.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/592/hi-steve-jobs-memorial-0139.jpg" alt="Jobs Dies"  loading="lazy" /></p>
<h3>Apple is stuck in 2010.<span class="hx:absolute hx:-mt-20" id="apple-is-stuck-in-2010"></span>
    <a href="#apple-is-stuck-in-2010" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>And so are we.</p>
<p>Major Linux distros, Microsoft, PC hardware manufacturers, big industry turnarounds (Nokia, Blackberry, Motorola) the dawn of the GPU era, the end of Moore&rsquo;s Law speed clock wars into parallel computing, the dawn of ARM. It took 10 years for all the smoke to finally settle, and it took having Apple standing still for 6 years for everybody to finally catch up.</p>
<p>Ballmer left the reins to Satya Nadella. Microsoft acquired Xamarin, made huge strides into open source, and even <a href="/en/2016/07/26/the-year-of-linux-on-the-desktop-it-s-usable/">Ubuntu now runs natively on top of Windows 10</a>.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/593/THE_END_TIMES_ARE_HERE-399de53540c79757ac9af535579cdad9.jpg" alt="Satya Nadella"  loading="lazy" /></p>
<p>And the Asians. Samsung, LG, Huawei, the South Koreans and the Chinese all forced the North Americans to push harder.</p>
<p>One last legacy of the Steve Jobs era was both killing Adobe Flash (finally!) and pushing HTML 5 technologies forward, an acceleration of 10 years in 5. It was because of the iPhone that we have the Web as it is.</p>
<p><a href="https://web.archive.org/web/20170114150212/http://www.apple.com/hotnews/thoughts-on-flash/"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/594/flash-dead.jpg" alt="HTML 5 kills Flash"  loading="lazy" /></a></p>
<p>Google jumped in, took over the ball that Internet Explorer left behind. WebKit became the quintessential web browser reference. Javascript became the new application platform, pushed by the many evolving Social Networks.</p>
<p>For better or worse, the social networks forced the new dawn of complex and interactive Web Applications. We got the example of Gmail and Web 2.0 and with the new mobile environment, everything converged into making cross-platform, ubiquitous apps.</p>
<p>It&rsquo;s now easier than ever to switch between desktop OSes because we made it easy to jump around between the desktop and mobile devices already.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/599/alldevices.jpg" alt="All devices"  loading="lazy" /></p>
<p>Why is it easy now to move between macOS or Windows or Linux distros? Or between macOS and iOS, or between Linux and Android? Because most of the software is in &ldquo;the cloud&rdquo;. Linux dominates the Cloud world that Amazon debuted in 2006 with S3 and EC2, now closely followed by Google Cloud and Microsoft Azure and other smaller competitors.</p>
<p>Because there is at least a good Chrome browser in every platform.</p>
<p>Because the apps we use are mostly web enabled: Gmail, Spotify, Slack, Hangout, Twitter, Facebook, YouTube, Netflix, Amazon. The other half are all available natively under iOS or Android: Whatsapp, Waze, Swarm, Snapchat, Instagram.</p>
<p>10 years ago, with the release of the iPhone, the technology industry finally started to put their shit together.</p>
<p>It was a cat and mouse chase until at least 5 years ago, then everybody started to settle.</p>
<p>After Jobs died we still had expectations that Apple would keep pushing forward, albeit at a slower pace without Jobs&rsquo; whip.</p>
<p>It didn&rsquo;t happen. They made bad decision after bad decision and we keep feeling that we are back in the early 90&rsquo;s, under Scully, Spindler or Amelio.</p>
<p><a href="https://web.archive.org/web/20170116083256/http://uk.businessinsider.com/wired-1997-save-apple-predictions-pray-2015-5"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/595/wired_cover.jpg" alt="Apple, Prey"  loading="lazy" /></a></p>
<p>But now, there are fallbacks readily available: Windows 10 Anniversary Edition is finally a competent Windows, bringing back the glory days of the mid-90&rsquo;s. And major Linux distros are cohesive, requiring little to no nerdy tweaking into obscure config files, pushed by Canonical, for better or worse.</p>
<p>And most of the apps we use in our routines are available. Heck, you can find a good web-based cross platform text editor in the form of Atom nowadays.</p>
<p>Apple also left the legacy of ubiquitous cross platform compilation readily available in the form of <a href="https://www.infoq.com/br/presentations/novas-linguagens-o-que-vem-depois-do-ruby"target="_blank" rel="noopener">LLVM</a> (in Portuguese). It served their own needs to have Objective-C available on PowerPC, Intel, ARM and Apple Ax processors. But LLVM is now the best backbone to enable languages such as Rust, RubyMotion, Crystal to exist and easily create fast binaries on multiple platforms.</p>
<p><a href="https://www.tesla.com/blog/welcome-chris-lattner"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/596/11-1484116910-chris-lattner-01.jpg" alt="Chris Lattner leaves Apple to Tesla"  loading="lazy" /></a></p>
<p>&ldquo;Apple&rsquo;s current board of directors need to go&rdquo;. &ldquo;Tim Cook needs to step down&rdquo;. I am sure many are crying out loud like this, but there is no Steve Jobs waiting to return. Apple is so big that the inertia alone will keep them going a few more years, but they are in danger of falling into irrelevance.</p>
<p>Other industries such as energy, health, genetics, are evolving in their own ways, but computer technology is in a dangerous standstill.</p>
<p>Computer Languages stopped evolving in the mid-90&rsquo;s. All &ldquo;new&rdquo; languages are amalgams of language features that were already there since the 70&rsquo;s and 80&rsquo;s. CPU processors are stuck into just making transistors smaller and more energy efficient. And we are already there: <a href="https://www.kickstarter.com/projects/1598272670/chip-the-worlds-first-9-computer"target="_blank" rel="noopener">$9 computers</a> are good enough for trivial tasks such as web browsing. So much that we are putting them everywhere: even a bluetooth toothbrush that keeps track of your brushing sessions.</p>
<p><a href="https://www.dezeen.com/2017/01/06/ara-first-toothbrush-artifical-intelligence-kolibree-ces/"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/597/smart-video-toothbrush-ces.jpg" alt="Bluetooth Toothbrush"  loading="lazy" /></a></p>
<p>Did you see CES 2017 products? Pillows and beds that track your sleep and sync data to an app. Washing machines. Vacuum cleaners. Fitness devices. Health devices. Personal assistants such as Alexa. Everything takes data from you and syncs it into &ldquo;the cloud&rdquo;.</p>
<p>&ldquo;The cloud&rdquo; has also peaked. It&rsquo;s ubiquitous, accessible, and downright cheap. Technology in general is dirt cheap nowadays.</p>
<p>Wearables and VR are good gimmicks, but even if they become ubiquitous, they stay just an extension of the use cases that the iPhone revolution bootstrapped.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/600/3017180-inline-mg5205.jpg" alt="Baby monitor"  loading="lazy" /></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/601/iswimband-drowning-prevention-510px.jpg" alt="iSwimband"  loading="lazy" /></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/602/6e752109eac4d37830078517b2aefd583d52722a.jpg" alt="mobile"  loading="lazy" /></p>
<p>Mobile, wearables, and social networks only made people more anxious. Giving everyone a &ldquo;voice&rdquo; online didn&rsquo;t improve things, it just raised the overall anxiety. Opinions are in such large supply that they are worth less and less.</p>
<p>Every person online is now a source of terabytes of useless information to generate pseudo-statistics that are useless for the most part. <a href="http://www.techrepublic.com/article/the-dark-side-of-wearables-how-theyre-secretly-jeopardizing-your-security-and-privacy/"target="_blank" rel="noopener">Every person is now defined by a bunch of data in the cloud</a>.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/603/donald-trump-twitter-president.jpg" alt="Trump"  loading="lazy" /></p>
<p>I have no idea where we go from here. As a witness of history, I have to say I miss the excitement of exploring new frontiers. We had it from the mid-90&rsquo;s onward. We took a small break after the Dotcom burst, then got it back full blown in 2004. We lost it after 2010.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/598/20150824-bill-gates-microsoft-windows-95-launch.0.jpg" alt="Windows 95 launch"  loading="lazy" /></p>
<p>2010 has been the longest year I&rsquo;ve ever seen. Maybe settling down is a good thing. Who knows?</p>
]]></content:encoded><category>apple</category><category>tech-market</category><category>personal</category><category>off-topic</category></item><item><title>Brazil Situation: No Macs for the Rest of Us</title><link>https://akitaonrails.github.io/en/2015/11/10/situacao-brasil-no-macs-for-the-rest-of-us/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2015/11/10/situacao-brasil-no-macs-for-the-rest-of-us/</guid><pubDate>Tue, 10 Nov 2015 16:54:00 -0200</pubDate><description>&lt;p&gt;This article aims to be practical, so I&amp;rsquo;ll get right to the point. With the &lt;strong&gt;unquestionably&lt;/strong&gt; inept and corrupt government we have, one of the concrete effects for us software developers is the inability to buy good machines to do our own work.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/523/cotacao_dolar.png" alt="Dollar rate 2015" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The Real went into free fall at the beginning of this year and is only now stabilizing a bit. Even so, we keep drifting farther from the ideal of buying a professional laptop.&lt;/p&gt;</description><content:encoded><![CDATA[<p>This article aims to be practical, so I&rsquo;ll get right to the point. With the <strong>unquestionably</strong> inept and corrupt government we have, one of the concrete effects for us software developers is the inability to buy good machines to do our own work.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/523/cotacao_dolar.png" alt="Dollar rate 2015"  loading="lazy" /></p>
<p>The Real went into free fall at the beginning of this year and is only now stabilizing a bit. Even so, we keep drifting farther from the ideal of buying a professional laptop.</p>
<p>On the official Apple Brazil site, once you add the Real&rsquo;s devaluation and the <strong>damned</strong> Brazil Cost in taxes, the ideal development machine, a Macbook Pro 15&quot; Retina with 16GB of RAM and 512GB SSD, hits the impossible figure of R$ 23,499.00.</p>
<p>In the United States, that same machine costs USD 2,499 plus (a little) tax. If we went through the gray market (which I recommend), with the dollar at the current R$ 3.80 plus about 30% to 40% of the &ldquo;gray market cost,&rdquo; even then we won&rsquo;t pay less than R$ 13,500.</p>
<p>Even if we go for the 13&quot; Retina version with 8GB of RAM, which costs USD 1,799 in the US, it won&rsquo;t come out here for less than R$ 9,700.</p>
<p>That is more than double what most developers can afford, given a budget of R$ 4,000, up to R$ 5,000 if we really stretch.</p>
<p>The TL;DR is simple: the best hardware (not only the processor, but the keyboard, trackpad, and overall build) is still the Macbook Pro. No other machine comes close, and to me the best operating system is still OS X, with Linux virtualization for development. If you can&rsquo;t buy a Macbook, you&rsquo;re left picking a good PC and running Linux.</p>
<h3>Which Machine to Buy?<span class="hx:absolute hx:-mt-20" id="which-machine-to-buy"></span>
    <a href="#which-machine-to-buy" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Even buying a machine in Brazil, you can&rsquo;t get the best configuration, which pushes the price above R$ 8,000.</p>
<p>In the R$ 5,000 range, forget about SSD, it doesn&rsquo;t exist. The best value I found was the <a href="http://web.archive.org/web/20150625001142/http://www.dell.com/br/p/inspiron-15-5548-laptop/pd?oc=cai5548u1612656br052&amp;model_id=inspiron-15-5548-laptop"target="_blank" rel="noopener">Dell Inspiron 15 Series 5000</a>, which at the time of this article was R$ 4,117. It&rsquo;s worth choosing one with plenty of RAM, more than 8GB if possible, to avoid swapping to the slow disk as much as you can, usually a 5400 RPM mechanical one.</p>
<p>If anyone has good options in this range, at least a 3rd-generation Core i5, 8GB of RAM, and a 256GB SSD, drop them in the comments.</p>
<p>On the hardware front, a Lenovo Thinkpad or even a Sony Vaio (which is probably prohibitively expensive too) have better build quality than Dell. Asus and Acer I don&rsquo;t count as good options that will last, and the finish isn&rsquo;t much to write home about either.</p>
<p>I&rsquo;ll say it upfront: PC keyboards and trackpads are terrible. If you can, use an external Apple keyboard and trackpad. The Dell model I&rsquo;m testing has a horrible keyboard, on top of the Brazilian layout I can&rsquo;t stand: light plastic, with awful click feedback for anyone who types fast. The trackpad interrupts typing at the slightest touch, struggles to register multiple clicks correctly, and mostly gets in the way instead of helping.</p>
<h3>Developer Profiles<span class="hx:absolute hx:-mt-20" id="developer-profiles"></span>
    <a href="#developer-profiles" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The idea is a machine for developers. Unless you&rsquo;re a .NET developer, definitely install a Linux distribution. Which distro depends on your profile: the more low-level you are, the closer you get to wanting Arch Linux. The more high-level you are, especially a web app developer, the more I&rsquo;d steer you toward an Ubuntu LTS, which in this case would be Ubuntu 14.04.</p>
<p>Windows is off the table, sorry. I was a Windows user for almost 15 years before switching to Macs in 2004. I know Windows cold, I know all my winding paths through the Registry and the mess that is the infamous C:\WINDOWS. I tried every recent Windows (7, 8, 8.1, 10) and the conclusion is the same: I have zero interest in going back.</p>
<p>If I had to develop in .NET, I wouldn&rsquo;t even try to emulate the environment, I&rsquo;d just run Windows itself, in a virtual machine. The only workaround, when your setup needs a hybrid of .NET and open source, is to run Linux with virtualization.</p>
<p>The open-source development cycle on a Mac isn&rsquo;t exactly simple either. You need to understand XCode, and you need to know that GCC stopped being the default choice a while ago, since Apple moved to LLVM-Clang, and because of that plenty of things can break. Even so, the <a href="https://brew.sh/"target="_blank" rel="noopener">Homebrew</a> folks did a great job smoothing over most of the problems. So yes, you can develop comfortably, as long as you&rsquo;re not a system/low-level developer.</p>
<p>For iOS development, you need XCode. There&rsquo;s no alternative. For other languages you can work with relative ease, whether Python, Ruby, or the newer ones like Rust, Elixir, and Go. Java also runs reasonably well on Mac, so Java 8, Clojure, Scala, and Groovy are all on the table.</p>
<p>Optionally, I recommend running a virtualized Linux environment inside the Mac. Either straight through Virtualbox, which isn&rsquo;t the most stable thing in the world on a Mac, or through VMWare Fusion, with <a href="https://www.vagrantup.com/vmware"target="_blank" rel="noopener">Vagrant</a> to make it easier. That second option will cost you, USD 170.</p>
<h3>Proprietary Software vs Open Source<span class="hx:absolute hx:-mt-20" id="proprietary-software-vs-open-source"></span>
    <a href="#proprietary-software-vs-open-source" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Yes, on Linux we have plenty of options, like Inkscape, Gimp, and Blender. Yes, you &ldquo;can&rdquo; do a lot of things.</p>
<p>In practice, usability counts.</p>
<p>On OS X we have Keynote, iMovie, and Garageband, with no equals in usability. For higher-end work, we have Aperture, Final Cut Pro, and Logic Pro, again with no equals in usability and flexibility.</p>
<p>On Windows, you can pick the Adobe suite, which runs from Photoshop and Illustrator to Premiere Pro and After Effects, all of which also have Mac versions.</p>
<p>In the productivity world, forget LibreOffice or even Google Docs: the Microsoft Office suite, Word and Excel in particular, is still unbeatable. You can do something similar, you can edit something similar, but it still isn&rsquo;t close to the same thing, especially with more complex spreadsheets full of formulas, pivot tables, and the like.</p>
<p>They all cost money, and they cost a lot. Obviously it isn&rsquo;t fair to compare them with open source options. But I&rsquo;d love to have the option of paying to run them on a Linux distro. The problem is that Linux distros aren&rsquo;t friendly to proprietary software. It&rsquo;ll always be the dilemma of 100% open against hybrid or 100% closed. Just ask the Ubuntu crowd.</p>
<p>A small example is 1Password, which I use on Mac, on Android, used on iOS (when I had an iPhone), and has a Windows version. Everything except Linux. I was forced to run the Windows 1Password through Wine just to get to my passwords again. &ldquo;Serves you right for using proprietary software.&rdquo;</p>
<p>For better or worse, the ideal of 100% open software has never been farther away, especially now that every app has an online component. There&rsquo;s plenty of open source &ldquo;client&rdquo; these days, but the back-end is completely closed source. Worse: it isn&rsquo;t even a binary on your machine, it lives in the &ldquo;cloud.&rdquo;</p>
<p>Nobody is going to sign up for the ideal of the <a href="http://www.gnu.org/licenses/why-affero-gpl.en.html"target="_blank" rel="noopener">Affero GPL</a>, where the code running in the cloud should also be open. And even if it were, it wouldn&rsquo;t be practical for anyone to simulate everyone else&rsquo;s cloud environment.</p>
<p>Today, the open source world isn&rsquo;t a world of absolute freedom. I usually put it this way: it&rsquo;s the best value companies have ever had for maintaining commoditized software.</p>
<p>Languages, frameworks, toolkits, development tools, and cryptography libraries are commoditized software.</p>
<p>The Adobe suite, Office, and the rest aren&rsquo;t commodities yet. They keep going full steam, with new feature after new feature, every six months. It&rsquo;s impossible for an open source copy-cat, with no resources, to reach the same level. And there&rsquo;s no interest in doing so either.</p>
<p>For anyone who needs proprietary software as a daily tool, the advice is blunt: don&rsquo;t leave Windows, don&rsquo;t leave Mac.</p>
<p>I need it once in a while. 80% of my needs depend on commoditized software, or on software that isn&rsquo;t the core business of any company that makes it. For Google, Chromium is worth being open source, but don&rsquo;t go anywhere near the Ad Sense code, which is the real core business.</p>
<p>For everyone, it&rsquo;s worth having the clients that consume their services be open source. I&rsquo;ll find a good client for Dropbox, for Google Drive, but don&rsquo;t bother looking for the rest: the core business still is, and will stay, closed. That&rsquo;s where the ideal of Free Software keeps drifting farther and farther away.</p>
<p>I&rsquo;m not an idealist. For most developers, what we have is already enough, it sustains itself and becomes viable in a hybrid world. In the real world, 80% of what I need is available. The other 20% I solve through virtualization, with my Office running via Wine or via Virtualbox.</p>
<p>Maybe I can get Apple Keynote running via Hackintosh in a Virtualbox. Or I solve the last 5% with an outdated Macbook that still runs what I need for the few hours when I need it.</p>
<p>I tried installing a Hackintosh via Virtualbox and, even though I managed it after many attempts and many tutorials, it stays absolutely unstable and slow, even with 2 of my 4 Core i7, 4GB of RAM, and 128MB of video memory. It&rsquo;s not usable. If I want Keynote, it&rsquo;ll have to be a real Mac, there&rsquo;s no substitute.</p>
<h3>Why Ubuntu + Unity?<span class="hx:absolute hx:-mt-20" id="why-ubuntu--unity"></span>
    <a href="#why-ubuntu--unity" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>If there&rsquo;s one thing everyone has an opinion about, it&rsquo;s how to use your Linux. It depends on who you are.</p>
<p>If you&rsquo;re a more idealistic programmer, you&rsquo;ll hate Ubuntu precisely for taking what Debian does and adding the <em>argh</em> terrible layer of proprietary software on top.</p>
<p>If you&rsquo;re a more hardcore programmer, you&rsquo;ll want to understand every inch of your Linux, and for that you&rsquo;ll always find Arch Linux (or at least <a href="http://web.archive.org/web/20150913071621/http://antergos.com/"target="_blank" rel="noopener">Antergos</a>) a superior option. For these folks, Pacman will always be infinitely superior to Apt-Get or Yum.</p>
<p>If you&rsquo;re the &ldquo;be stable without fiddling too much, but don&rsquo;t be ordinary&rdquo; type, you may end up drifting toward Fedora.</p>
<p>And whatever the distro, there will always be the eternal fight between Window Managers. The KDE crowd with their Plasma trashing the outdated Gnome, XFCE asserting its &ldquo;simple and stable&rdquo; stance, or a new distro like Elementary OS building its own new Pantheon. This has no end.</p>
<p>Most new programmers, who&rsquo;ve used Linux for 5 years or less, can&rsquo;t grasp how anyone could use a Linux without customizing it entirely to their taste. Editing every X11 file, every theme and icon pack to become a &ldquo;Windows-alternative,&rdquo; an &ldquo;OS X-rebel.&rdquo;</p>
<p>In my case, what many may not get, is that I&rsquo;m an old-school Linux user. My first Linux was Slackware 1.0 in 1996. I installed RedHat pre-4, and then came distros like Mandrake, long before a Kurumin. I installed the first versions of most of the distros around today.</p>
<p>I pulled night after night customizing my X, downloading themes, downloading widgets, tweaking every part of the system. Then I&rsquo;d do something wrong, decide to wipe everything, and start over from scratch. I spent a lot of time checking kernel compile flags to make mine as customized as possible.</p>
<p>I stayed in that vibe from 1997 to maybe 2001. It&rsquo;s exhausting, seriously. If you&rsquo;re a programmer, in your 20s, and you&rsquo;ve never done it, I&rsquo;d say you have a <strong>moral</strong> obligation to go through this process. Every programmer needs to enjoy having total control over their own environment.</p>
<p>But it isn&rsquo;t healthy to do this for more than 5 years. After that, what you really want is to be productive, to produce instead of customize. The number of hours it takes to make a distro 100% &ldquo;mine&rdquo; simply doesn&rsquo;t pay off.</p>
<p>That&rsquo;s why I like OS X: I don&rsquo;t need to customize anything. It all comes right out-of-the-box, the best Window Manager, on top of one of the best traditional Unix flavors, with reasonably simple access to both the open source world and the best of the closed source world. It&rsquo;s the best of both worlds.</p>
<p>In the Linux world, you have to deal with the ideology of the GPL. I fully understand Stallman&rsquo;s arguments, I&rsquo;ve read and reread the site countless times. How many times have you <strong>really</strong> read the whole <a href="http://www.gnu.org/philosophy/philosophy.html"target="_blank" rel="noopener">gnu.org</a>? Unfortunately there&rsquo;s no free lunch: staying in the ideology means giving up a lot of things I honestly don&rsquo;t have the willingness to give up.</p>
<p>As it happens, the Dell I bought came with Ubuntu preinstalled. It&rsquo;s what it&rsquo;s supported on, which means all the hardware works and the drivers are up to date. I plan to stay inside the Ubuntu ecosystem, Unity included, which I know many people don&rsquo;t like for ideological reasons or because they think XFCE, Gnome, KDE, or whatever works better for their taste.</p>
<p>Again: the cost of customization simply doesn&rsquo;t pay off. Software isn&rsquo;t installed once and works forever. You have to update it, you have to have support, it has to be consistent. The Canonical folks are the only company seriously focused on usability and the end consumer, and that matters.</p>
<p>Canonical gets slowed down constantly by ideology and by too many opinions that never reach a consensus, and it gets vilified every time it makes a decision: half the community will always miss out on what they want and gripe about it. It&rsquo;s a slow, bureaucratic process that an Apple simply decided to bypass entirely.</p>
<p>Except Apple can bring in Microsoft, Adobe, and generate profitable business models for hundreds of other software houses. Canonical still can&rsquo;t do that and leans heavily on the spare hours of volunteer programmers in the open source world. That dependency is at once a great strength and its biggest problem.</p>
<p>Last tip: I had trouble keeping the system in English (menus and everything else) while using an external Mac USB keyboard with the English (US, alternative international) layout. The usual way of accenting the &ldquo;c&rdquo; to get the cedilla &ldquo;ç&rdquo; didn&rsquo;t work. It only worked after I followed <a href="http://linuxlegal.blogspot.com/2014/02/cedilha-no-ubuntu-1310-com-teclado.html"target="_blank" rel="noopener">Kemel Zaidan&rsquo;s</a> tutorial.</p>
<h3>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Will I keep using Ubuntu as my main machine? I don&rsquo;t know yet. I&rsquo;m keeping my options open for harder times, with the dollar above R$ 2.50. Below that level, I&rsquo;ll stick with a Mac without thinking twice.</p>
<p>For home users, a Linux works well. It&rsquo;s the Chrome OS idea, a Linux basically running Web Apps like Google Docs, Gmail, and the rest. At that level, it doesn&rsquo;t matter which OS or which configuration. The advantage of a Linux for the web use of 90% of the population is not being vulnerable to the most obvious malware.</p>
<p>For office users, a Linux works reasonably well, but, as I said, Office still can&rsquo;t be replaced. The way out is the whole company adopting a simpler document format and not doing anything too complex in Excel, for example. In general, Google Docs and Google Drive or Dropbox, with Gmail Business, work well enough.</p>
<p>For .NET developers, stay on Windows.</p>
<p>For open source developers, it doesn&rsquo;t matter whether you stay on Linux or Mac. If it&rsquo;s high-end, choose a Mac if you can afford it. If it&rsquo;s more low-level, stay in the pure Linux world. When in doubt: Ubuntu 14.04 LTS (with Unity!), install your choice of Sublime Text 3, and the rest works perfectly.</p>
<p>For hybrid users, who are developers most of the time but also need proprietary software (my case), you can stay on Linux. Most of the time it won&rsquo;t hurt much. But in that one moment when you need to edit a video, work on a heavier Photoshop, or put together a more elaborate Keynote, have a Mac at hand. For that case, there&rsquo;s no alternative.</p>
]]></content:encoded><category>linux</category><category>apple</category><category>hardware</category><category>off-topic</category></item><item><title>[Objective-C] Distributing your Static Library</title><link>https://akitaonrails.github.io/en/2011/04/24/objective-c-distributing-your-static-library/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2011/04/24/objective-c-distributing-your-static-library/</guid><pubDate>Sun, 24 Apr 2011 00:46:00 -0300</pubDate><description>&lt;p&gt;If you didn&amp;rsquo;t read my &lt;a href="http://www.akitaonrails.com/2011/04/23/objective-c-it%27s-a-unix-system-i-know-this"target="_blank" rel="noopener"&gt;last&lt;/a&gt; &lt;a href="http://www.akitaonrails.com/en/2011/04/23/objective-c-categories-static-libraries-e-pegadinhas"target="_blank" rel="noopener"&gt;two articles&lt;/a&gt; I recommend you do so before going any further because I am using the same pet project, &lt;a href="http://www.akitaonrails.com/2011/04/23/objective-c-it%27s-a-unix-system-i-know-this"target="_blank" rel="noopener"&gt;ObjC Rubyfication&lt;/a&gt; as an example for this article. The point is: you are writing reusable code that you want in more than one project.&lt;/p&gt;
&lt;p&gt;Most of this was based on &lt;a href="http://www.cocoanetics.com/2010/04/universal-static-libraries/"target="_blank" rel="noopener"&gt;Cocoanetics&lt;/a&gt; article about universal static libraries. So, if you&amp;rsquo;ve paid attention to my &lt;a href="http://www.akitaonrails.com/en/2011/04/23/objective-c-categories-static-libraries-e-pegadinhas"target="_blank" rel="noopener"&gt;previous article&lt;/a&gt;, you saw this screenshot:&lt;/p&gt;
&lt;!-- broken image (host offline/expired): http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2011.41.27%20PM_original.png --&gt;
&lt;p&gt;I said that I only had these targets configured: CocoaOniguruma, Kiwi, Rubyfication and RubyficationTests. But there are 3 others: CocoaOniguruma SIM, Rubyfication SIM, and Build &amp;amp; Merge Libraries. The reason is simple:&lt;/p&gt;</description><content:encoded><![CDATA[<p>If you didn&rsquo;t read my <a href="http://www.akitaonrails.com/2011/04/23/objective-c-it%27s-a-unix-system-i-know-this"target="_blank" rel="noopener">last</a> <a href="http://www.akitaonrails.com/en/2011/04/23/objective-c-categories-static-libraries-e-pegadinhas"target="_blank" rel="noopener">two articles</a> I recommend you do so before going any further because I am using the same pet project, <a href="http://www.akitaonrails.com/2011/04/23/objective-c-it%27s-a-unix-system-i-know-this"target="_blank" rel="noopener">ObjC Rubyfication</a> as an example for this article. The point is: you are writing reusable code that you want in more than one project.</p>
<p>Most of this was based on <a href="http://www.cocoanetics.com/2010/04/universal-static-libraries/"target="_blank" rel="noopener">Cocoanetics</a> article about universal static libraries. So, if you&rsquo;ve paid attention to my <a href="http://www.akitaonrails.com/en/2011/04/23/objective-c-categories-static-libraries-e-pegadinhas"target="_blank" rel="noopener">previous article</a>, you saw this screenshot:</p>
<!-- broken image (host offline/expired): http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2011.41.27%20PM_original.png -->
<p>I said that I only had these targets configured: CocoaOniguruma, Kiwi, Rubyfication and RubyficationTests. But there are 3 others: CocoaOniguruma SIM, Rubyfication SIM, and Build &amp; Merge Libraries. The reason is simple:</p>
<ul>
<li>The &ldquo;CocoaOniguruma&rdquo; Target builds the <tt>libCocoaOniguruma.a</tt> binary that&rsquo;s compatible with the ARM processor for iOS</li>
<li>The &ldquo;CocoaOniguruma SIM&rdquo; Target builds the <tt>libCocoaOnigurumaSimulator.a</tt> binary that&rsquo;s compatible with the i386 processor for the local iPhone Simulator</li>
<li>The &ldquo;Rubyfication&rdquo; Target builds the <tt>libRubyfication.a</tt> binary that&rsquo;s compatible with the ARM processor for iOS</li>
<li>The &ldquo;Rubyfication SIM&rdquo; Target builds the <tt>libRubyficationSimulator.a</tt> binary that&rsquo;s compatible with the i386 processor for the local iPhone Simulator</li>
<li>The &ldquo;Build &amp; Merge Libraries&rdquo; Target merges the corresponding particular binaries of each target into a single Universal (Fat) Binary that we can easily distribute and reuse.</li>
</ul>
<h2>Concepts and History<span class="hx:absolute hx:-mt-20" id="concepts-and-history"></span>
    <a href="#concepts-and-history" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Some explanation is in order. When you&rsquo;re developing iOS applications, you can test it directly on your iPhone device or within the Simulator. Now, Apple was very clever: any other vendor in the market will try to first create an ARM processor emulator to run on top of your i386 processor. Then it will get all the binaries for ARM and run within this emulator. The OS itself will remain compiled for ARM processors and run within the emulator.</p>
<p>Now, this is dead slow, impractical. Anyone that has experienced an emulation environment like this knows how ridiculous it is. Don&rsquo;t confuse it for VMWare or Parallels solutions, which are fast because they are an emulated environment for <strong>the same processor</strong> , so you can run Windows on top of your Mac because the processors and operating systems now support VT-x, which means you mostly don&rsquo;t have to emulate the processor. Now, every smartphone and tablet on the market uses an ARM processor, which has nothing to do with i386.</p>
<p>So, how did Apple deliver a super-fast iPhone/iPad emulator that runs at real-time speed on your Mac? Simple, it didn&rsquo;t. It is called &ldquo;Simulator&rdquo; and not &ldquo;Emulator&rdquo; for a reason: everything that runs within the Simulator is compiled for i386, not for ARM. So what you&rsquo;re running is an actual binary that runs natively over your Mac! No emulation required. The iOS is very portable. The same way Mac OS X was able to transition from the Power PC to Intel back in 2005, the iOS can do the same trick as they are basically the very same operating system.</p>
<p>When you choose the iPhone scheme in XCode, it compiles for ARM and uploads the bits to your iPhone device to run the application. When you choose the Simulator scheme in XCode, it compiles for i386, uploads the bits to your Simulator and runs natively as any other application in your Mac.</p>
<p>Now, going back to the main issue: when I distribute a binary of my Static Library, I have to remember that the developer will be linking against my library to deploy for both the ARM device (iPhone/iPad) and the Simulator (i386). So I would have to deliver at least 2 binary files. But Apple is even smarter than that. Actually, NeXT was. When they first transitioned the NeXTStep operating system from Motorola to Intel processors back in the late 80&rsquo;s, they created <a href="http://en.wikipedia.org/wiki/Fat_binary"target="_blank" rel="noopener">Fat Binaries</a>, which is essentially one binary that contains both processor-specific bits in one single package. When Apple transitioned from the Power PC to Intel they renamed it to <a href="http://en.wikipedia.org/wiki/Universal_binary"target="_blank" rel="noopener">Universal Binaries</a>. And that&rsquo;s essentially what we need to build now.</p>
<h2>Operations<span class="hx:absolute hx:-mt-20" id="operations"></span>
    <a href="#operations" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>We now understand what a Universal Binary is. To make it easier, I right-clicked over the &ldquo;Rubyfication&rdquo; and &ldquo;CocoaOniguruma&rdquo; targets and duplicated them. They will be created as &ldquo;Rubyfication copy&rdquo; and &ldquo;CocoaOniguruma copy&rdquo;. We can change the &ldquo;Product Name&rdquo; in the build settings of each for a more reasonable name:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.21.02%20AM_original.png?1303615270" alt=""  loading="lazy" /></p>
<p>In my case I renamed them to &ldquo;RubyficationSimulator&rdquo; and &ldquo;CocoaOnigurumaSimulator&rdquo;. That will give me both &ldquo;libRubyficationSimulator.a&rdquo; and &ldquo;libCocoaOnigurumaSimulator.a&rdquo;. As you can see in the Products group:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.23.16%20AM_original.png?1303615348" alt=""  loading="lazy" /></p>
<p><strong>Important:</strong> remember that the Rubyfication target had CocoaOniguruma as a target dependency. You will need to change the &ldquo;Rubyfication SIM&rdquo; target to point to the new &ldquo;CocoaOniguruma SIM&rdquo; target! The other thing is that you will need to force both new targets to compile to &ldquo;Latest Mac OS X&rdquo; in the <tt>&ldquo;Base <span class="caps">SDK</span>&quot;</tt> option in the Build Settings of each, and &ldquo;32-bit Intel&rdquo; in the <tt>&ldquo;Architectures&rdquo;</tt> build option. This will make them compile for i386 processors. The original targets should have their <tt>&ldquo;Base <span class="caps">SDK</span>&quot;</tt> to &ldquo;Latest iOS&rdquo; and <tt>&ldquo;Architectures&rdquo;</tt> to &ldquo;Standard (armv6 armv7)&rdquo;.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.54.21%20AM_original.png?1303617223" alt=""  loading="lazy" /></p>
<p>Now, we need to create a new target of the kind &ldquo;Aggregate&rdquo; :</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.24.00%20AM_original.png?1303615407" alt=""  loading="lazy" /></p>
<p>I named it &ldquo;Build &amp; Merge Libraries&rdquo;. In the &ldquo;Build Phases&rdquo; tab you will start with just the &ldquo;Target Dependencies&rdquo; phase. You just need to add the new &ldquo;Rubyfication SIM&rdquo; and &ldquo;CocoaOniguruma SIM&rdquo; targets. Then you need to add 3 more phases, one for &ldquo;Run Script&rdquo;, another to &ldquo;Copy Files&rdquo; and a last &ldquo;Run Script&rdquo;.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.25.13%20AM_original.png?1303615678" alt=""  loading="lazy" /></p>
<p>In the &ldquo;Copy Files&rdquo; phase I have just added all the public headers that I want to distribute together with the universal binary library. This is because the other developers will need to add those header files into their projects in order to be able to compile against my library. Now notice that I am copying them to an &ldquo;Absolute Path&rdquo; that states <tt>${TARGET_BUILD_DIR}/../Rubyfication</tt>.</p>
<p>That&rsquo;s where we come to the previous &ldquo;Run Script&rdquo; phase that should have the following code:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 1. make a new output folder</span>
</span></span><span class="line"><span class="cl">mkdir -p <span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span>/../Rubyfication
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 2. combine lib files for various platforms into one</span>
</span></span><span class="line"><span class="cl">lipo create <span class="s2">&#34;</span><span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span><span class="s2">/../Debug-iphoneos/libRubyfication.a&#34;</span> <span class="s2">&#34;</span><span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span><span class="s2">/../Debug-iphonesimulator/libRubyfication.a&#34;</span> -output <span class="s2">&#34;</span><span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span><span class="s2">/../Rubyfication/libRubyfication</span><span class="si">${</span><span class="nv">BUILD_STYLE</span><span class="si">}</span><span class="s2">.a&#34;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>The first thing it does is create this new &ldquo;Rubyfication&rdquo; directory. The second command uses the <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/lipo.1.html"target="_blank" rel="noopener">lipo</a> command that merges 2 processor-dependent binaries into a universal binary. Pay attention to the PATHs if you&rsquo;re reusing this script somewhere else. At least with XCode 4 that&rsquo;s where it creates the binaries of each target:</p>
<ul>
<li>${TARGET_BUILD_DIR}/../Debug-iphoneos/libRubyfication.a – the ARM version</li>
<li>${TARGET_BUILD_DIR}/../Debug-iphonesimulator/libRubyfication.a – the i386 version</li>
<li>${TARGET_BUILD_DIR}/../Rubyfication/libRubyfication-Debug.a – the resulting universal binary we created</li>
</ul>
<p>Finally, the last &ldquo;Run Script&rdquo;, after the &ldquo;Copy Files&rdquo; phase described above, requires the following script:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ditto c -k --keepParent <span class="s2">&#34;</span><span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span><span class="s2">/../Rubyfication&#34;</span> <span class="s2">&#34;</span><span class="si">${</span><span class="nv">TARGET_BUILD_DIR</span><span class="si">}</span><span class="s2">/../Rubyfication.zip&#34;</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>&ndash;</p>
<p>It just creates a ZIP file with the universal binary library and its companion public header files. Any other developer can get this zip file, unzip it and add the files to their own projects now. If you want to find where this ZIP file is, the easiest way is to go to the project viewer (the left side pane) in XCode, open the &ldquo;Products&rdquo; group, right-click over the &ldquo;libRubyfication.a&rdquo; file (or any other resulting file) and choose &ldquo;Show in Finder&rdquo;. Then you can navigate one folder up in the hierarchy (to the &ldquo;Products&rdquo; folder) and you will see something like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.39.02%20AM_original.png?1303616300" alt=""  loading="lazy" /></p>
<p>And there you go: there&rsquo;s your ZIP file with your brand new redistributable universal binary!</p>
<h2>Using the Universal Binary<span class="hx:absolute hx:-mt-20" id="using-the-universal-binary"></span>
    <a href="#using-the-universal-binary" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>In order to demonstrate how to use this distributable ZIP file, I have created a very simple, bare-bone iOS project called <a href="https://github.com/akitaonrails/ObjC_OnigurumaDemo"target="_blank" rel="noopener">ObjC_OnigurumaDemo</a> that you can download from Github and run in your own iOS device.</p>
<p>As you can see in the screenshot below, I just unzipped the ZIP within a &ldquo;Dependencies&rdquo; folder in my iOS project and added the universal binary &ldquo;libRubyfication-Debug.a&rdquo; within the Library Linking Build Phase:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.42.09%20AM_original.png?1303616506" alt=""  loading="lazy" /></p>
<p>This allows me to just use anything from this library in my project, in particular a piece of code that uses the Oniguruma regular expressions:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="p">-</span> <span class="p">(</span><span class="kt">IBAction</span><span class="p">)</span><span class="nf">runRegex:</span><span class="p">(</span><span class="kt">id</span><span class="p">)</span><span class="nv">sender</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">OnigRegexp</span><span class="o">*</span> <span class="n">regex</span> <span class="o">=</span> <span class="p">[</span><span class="n">OnigRegexp</span> <span class="nl">compile</span><span class="p">:[</span><span class="n">regexPattern</span> <span class="n">text</span><span class="p">]];</span>
</span></span><span class="line"><span class="cl">    <span class="n">OnigResult</span><span class="o">*</span> <span class="n">res</span> <span class="o">=</span> <span class="p">[</span><span class="n">regex</span> <span class="nl">match</span><span class="p">:[</span><span class="n">initialText</span> <span class="n">text</span><span class="p">]];</span>
</span></span><span class="line"><span class="cl">    <span class="n">NSMutableString</span><span class="o">*</span> <span class="n">tmpResult</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSMutableString</span> <span class="nl">stringWithString</span><span class="p">:</span><span class="s">@&#34;&#34;</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">    <span class="k">for</span><span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="p">[</span><span class="n">res</span> <span class="n">count</span><span class="p">];</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="p">[</span><span class="n">tmpResult</span> <span class="nl">appendString</span><span class="p">:</span><span class="s">@&#34;(&#34;</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">        <span class="p">[</span><span class="n">tmpResult</span> <span class="nl">appendString</span><span class="p">:[</span><span class="n">res</span> <span class="nl">stringAt</span><span class="p">:</span><span class="n">i</span><span class="p">]];</span>
</span></span><span class="line"><span class="cl">        <span class="p">[</span><span class="n">tmpResult</span> <span class="nl">appendString</span><span class="p">:</span><span class="s">@&#34;)&#34;</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">[</span><span class="n">result</span> <span class="nl">setText</span><span class="p">:</span><span class="n">tmpResult</span><span class="p">];</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>This demonstration application has a text-field called &ldquo;initialText&rdquo;, where you can type any string. Then you can prepare a Regular Expression in the &ldquo;regexPattern&rdquo; text-field and when you hit the &ldquo;Run&rdquo; button, it will trigger the action above that will run the Regular Expression against the initial text and write the matches within parenthesis in the &ldquo;result&rdquo; text view. The application looks like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/24/Screen%20shot%202011-04-24%20at%2012.46.19%20AM_original.png?1303616748" alt=""  loading="lazy" /></p>
<p>And, <em>voilá</em>! Ruby 1.9-like Regular Expression, directly from Oniguruma, within an iOS Application!</p>
]]></content:encoded><category>apple</category><category>programming</category><category>tutorials</category></item><item><title>[Objective-C] Categories, Static Libraries and Gotchas</title><link>https://akitaonrails.github.io/en/2011/04/23/objective-c-categories-static-libraries-and-gotchas/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2011/04/23/objective-c-categories-static-libraries-and-gotchas/</guid><pubDate>Sat, 23 Apr 2011 23:44:00 -0300</pubDate><description>&lt;p&gt;As some of you may know, I have this small pet project called &lt;a href="https://github.com/akitaonrails/ObjC_Rubyfication"target="_blank" rel="noopener"&gt;ObjC Rubyfication&lt;/a&gt;, a personal exercise in writing some Ruby-like syntax within Objective-C. Most of this project uses the fact that we can reopen Objective-C standard classes – very much like Ruby, unlike Java – and insert our own code – through &lt;a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocCategories.html%23//apple_ref/doc/uid/TP30001163-CH20"target="_blank" rel="noopener"&gt;Categories&lt;/a&gt;, similar to Ruby&amp;rsquo;s modules.&lt;/p&gt;
&lt;p&gt;The idea of this pet project is to be a Static Library that I can easily add to any other project and have all of its features. In this article I&amp;rsquo;d like to present how I am organizing its many subprojects within one project (and I am accepting any suggestions and tips to make it better as I am just learning how to organize things within Obj-C projects) and talk about a gotcha that took me hours to figure out and might help someone else.&lt;/p&gt;</description><content:encoded><![CDATA[<p>As some of you may know, I have this small pet project called <a href="https://github.com/akitaonrails/ObjC_Rubyfication"target="_blank" rel="noopener">ObjC Rubyfication</a>, a personal exercise in writing some Ruby-like syntax within Objective-C. Most of this project uses the fact that we can reopen Objective-C standard classes – very much like Ruby, unlike Java – and insert our own code – through <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocCategories.html%23//apple_ref/doc/uid/TP30001163-CH20"target="_blank" rel="noopener">Categories</a>, similar to Ruby&rsquo;s modules.</p>
<p>The idea of this pet project is to be a Static Library that I can easily add to any other project and have all of its features. In this article I&rsquo;d like to present how I am organizing its many subprojects within one project (and I am accepting any suggestions and tips to make it better as I am just learning how to organize things within Obj-C projects) and talk about a gotcha that took me hours to figure out and might help someone else.</p>
<p>To make this exercise even more fun, I also added a separate target for my unit testing suite (and see how XCode supports tests), then another target for the <a href="http://kiwi-lib.info/"target="_blank" rel="noopener">Kiwi</a> BDD testing framework for Obj-C, and another one for <a href="http://limechat.net/cocoaoniguruma/"target="_blank" rel="noopener">CocoaOniguruma</a> as I have just explained in my <a href="http://www.akitaonrails.com/2011/04/23/objective-c-it%27s-a-unix-system-i-know-this"target="_blank" rel="noopener">previous article</a>.</p>
<p>I&rsquo;ve been playing with ways of reorganizing my project and I realized that I was doing it wrong. I was adding all the source files from my &ldquo;Rubyfication&rdquo; target into my Specs target. So everything was compiling fine, the specs were all passing, but the way I defined dependencies was wrong. It is kind of complicated to understand at first, but it should be something like this:</p>
<ul>
<li>CocoaOniguruma Target: should be a static library, with no target dependencies and no binary libraries to link against, just a dependency to the standard Foundation framework. It exposes the OnigRegexp.h, OnigRegexpUtility.h and oniguruma.h as public headers.</li>
<li>Kiwi Target: should be another static library, with no target dependencies and no binary libraries to link against, just having the Foundation and UIKit framework dependencies.</li>
<li>Rubyfication: should be another static library, with CocoaOniguruma as a target dependency, linking against the libCocoaOniguruma.a binary and depending on the Foundation framework as well. It exposes all of its <tt>.h</tt> files as public headers.</li>
<li>RubyficationTests: should be a Bundle which was created together with the Rubyfication target (you can specify whether you want a unit test target when you create new targets), with both Kiwi and Rubyfication targets as dependencies, linking against the libKiwi.a and libRubyfication.a binaries, and the Foundation and UIKit frameworks as well.</li>
</ul>
<p>If you keep creating new targets manually, XCode 4 will also create a bunch of Schemes that you don&rsquo;t really need. I keep mine clean with just the Rubyfication scheme. You can access the &ldquo;Product&rdquo; menu and the &ldquo;Edit Scheme&rdquo; option. Then my Scheme looks like this:</p>
<!-- broken image (host offline/expired): http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2011.26.25%20PM_original.png -->
<p>I usually configure all my build settings to use &ldquo;LLVM Compiler 2.0&rdquo; for the Debug settings and &ldquo;LLVM GCC 4.2&rdquo; for the Release settings (actually, I do that for precaution as I am not aware if people are actually deploying binaries in production compiled from LLVM).</p>
<p>I also set the <tt>&ldquo;Targeted Device Family&rdquo;</tt> to &ldquo;iPhone/iPad&rdquo; and I try to make the <tt>&ldquo;iOS Deployment Target&rdquo;</tt> to &ldquo;iOS 3.0&rdquo; whenever possible. People usually leave the default one which will be the latest release – now at 4.3. Be aware that your project may not run on older devices that way.</p>
<p>Finally I also make sure that the <tt>&ldquo;Framework Search Paths&rdquo;</tt> are pointing to these options:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>&#34;$(SDKROOT)/Developer/Library/Frameworks&#34;  
&#34;${DEVELOPER_LIBRARY_DIR}/Frameworks&#34;  </code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Everything compiles just fine that way. Then I can press &ldquo;Command-U&rdquo; (or go to the &ldquo;Product&rdquo; menu, &ldquo;Test&rdquo; option) to build the &ldquo;RubyficationTests&rdquo; target. It builds all the target dependencies, links everything together and runs the final script to execute the tests (you must make sure that you are selecting the &ldquo;Rubyfication – iPhone 4.3 Simulator&rdquo; in the Scheme Menu). It will fire up the Simulator so it can run the specs.</p>
<p>But then I was receiving:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>Test Suite &#39;/Users/akitaonrails/Library/Developer/Xcode/DerivedData/Rubyfication-gfqxbgyxicfpxugauehktilpmwzv/Build/Products/Debug-iphonesimulator/RubyficationTests.octest(Tests)&#39; started at 2011-04-24 02:16:27 &#43;0000  
Test Suite &#39;CollectionSpec&#39; started at 2011-04-24 02:16:27 &#43;0000  
Test Case &#39;-[CollectionSpec runSpec]&#39; started.  
2011-04-23 23:16:27.506 otest[40298:903] [__NSArrayI each:]: unrecognized selector sent to instance 0xe51a30  
2011-04-23 23:16:27.508 otest[40298:903] ***** Terminating app due to uncaught exception &#39;NSInvalidArgumentException&#39;, reason: &#39;[__NSArrayI each:]: unrecognized selector sent to instance 0xe51a30&#39;  </code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>It says that an instance of <tt>NSArray</tt> is not recognizing the selector <tt>each:</tt> sent to it in the <tt>CollectionSpec</tt> file. It is probably this snippet:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="cp"># import &#34;Kiwi.h&#34;  
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="cp"># import &#34;NSArray+functional.h&#34;  
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="cp"># import &#34;NSArray+helpers.h&#34;  
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="cp"># import &#34;NSArray+activesupport.h&#34;
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">SPEC_BEGIN</span><span class="p">(</span><span class="n">CollectionSpec</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">describe</span><span class="p">(</span><span class="s">@&#34;NSArray&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">__block</span> <span class="n">NSArray</span><span class="o">*</span> <span class="n">list</span> <span class="o">=</span> <span class="nb">nil</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">context</span><span class="p">(</span><span class="s">@&#34;Functional&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span> <span class="n">beforeEach</span><span class="p">(</span><span class="o">^</span><span class="p">{</span> <span class="n">list</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSArray</span> <span class="nl">arrayWithObjects</span><span class="p">:</span><span class="s">@&#34;a&#34;</span><span class="p">,</span> <span class="s">@&#34;b&#34;</span><span class="p">,</span> <span class="s">@&#34;c&#34;</span><span class="p">,</span> <span class="nb">nil</span><span class="p">];</span> <span class="p">});</span> 
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">it</span><span class="p">(</span><span class="s">@&#34;should iterate sequentially through the entire collection of items&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span> <span class="n">NSMutableArray</span><span class="o">*</span> <span class="n">output</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSMutableArray</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span> 
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="n">list</span> <span class="nl">each</span><span class="p">:</span><span class="o">^</span><span class="p">(</span><span class="kt">id</span> <span class="n">item</span><span class="p">)</span> <span class="p">{</span> <span class="p">[</span><span class="n">output</span> <span class="nl">addObject</span><span class="p">:</span><span class="n">item</span><span class="p">];</span> <span class="p">}];</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="n">theValue</span><span class="p">([</span><span class="n">output</span> <span class="n">count</span><span class="p">])</span> <span class="n">should</span><span class="p">]</span> <span class="nl">equal</span><span class="p">:</span><span class="n">theValue</span><span class="p">([</span><span class="n">list</span> <span class="n">count</span><span class="p">])];</span> <span class="p">});</span>
</span></span><span class="line"><span class="cl"><span class="err">…</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Reference: <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/RubyficationTests/CollectionSpec.m#L1-22"target="_blank" rel="noopener">CollectionSpec.m</a></p>
<p>Notice that at Line 3 there is the correct import statement where the <tt>NSArray(Helpers)</tt> category is defined with the correct <tt>each:</tt> method declared. The error is happening at the spec in line 18 in the above snippet.</p>
<p>Now, this was not a compile time error, it was a runtime error. So the import statement is finding the correct file and compiling but something in the linking phase is not going correctly and at runtime the <tt>NSArray(Helpers)</tt> category, and probably other categories, are not available.</p>
<p>It took me a few hours of research but I finally figured out one simple flag that changed everything, the <a href="http://developer.apple.com/library/mac/#qa/qa1490/_index.html"target="_blank" rel="noopener">-all_load</a> linker flag. As the documentation states:</p>
<blockquote>
  <p><strong>Important:</strong> For 64-bit and iPhone OS applications, there is a linker bug that prevents <tt>-ObjC</tt> from loading objects files from static libraries that contain only categories and no classes. The workaround is to use the <tt>-all_load</tt> or <tt>-force_load</tt> flags.</p>
<p><tt>-all_load</tt> forces the linker to load all object files from every archive it sees, even those without Objective-C code. <tt>-force_load</tt> is available in Xcode 3.2 and later. It allows finer grain control of archive loading. Each <tt>-force_load</tt> option must be followed by a path to an archive, and every object file in that archive will be loaded.</p>

</blockquote>
<p>So every target that depends on external static libraries that loads Categories has to add this <tt>-all_load</tt> flag in the &ldquo;Other Linker Flags&rdquo;, under the &ldquo;Linking&rdquo; category on the &ldquo;Build Settings&rdquo; of the target, like this:</p>
<!-- broken image (host offline/expired): http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2011.41.27%20PM_original.png -->
<p>So both my <tt>RubyficationTests</tt> and <tt>Rubyfication</tt> targets had to receive this new flag. And now the Tests all pass flawlessly!</p>
]]></content:encoded><category>apple</category><category>programming</category><category>tutorials</category></item><item><title>[Objective-C] It's a Unix System! I know this!</title><link>https://akitaonrails.github.io/en/2011/04/23/objective-c-its-a-unix-system-i-know-this/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2011/04/23/objective-c-its-a-unix-system-i-know-this/</guid><pubDate>Sat, 23 Apr 2011 22:47:00 -0300</pubDate><description>&lt;p&gt;While experimenting with ways of using Objective-C a little bit closer to how I code Ruby, there were two things that annoyed me a bit. First, Date Formatting and, second, Regular Expressions.&lt;/p&gt;
&lt;p&gt;The Cocoa framework has both implemented as &lt;a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html%23//apple_ref/doc/uid/TP40002369-SW1"target="_blank" rel="noopener"&gt;NSDateFormatter&lt;/a&gt; and &lt;a href="http://developer.apple.com/library/iOS/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html"target="_blank" rel="noopener"&gt;NSRegularExpression&lt;/a&gt; that also happen to be available for iOS development.&lt;/p&gt;
&lt;p&gt;You can format dates like this:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objc" data-lang="objc"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;NSDateFormatter&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;dateFormatter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;NSDateFormatter&lt;/span&gt; &lt;span class="n"&gt;alloc&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;init&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;dateFormatter&lt;/span&gt; &lt;span class="nl"&gt;setDateStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;NSDateFormatterMediumStyle&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;dateFormatter&lt;/span&gt; &lt;span class="nl"&gt;setTimeStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;NSDateFormatterNoStyle&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;NSDate&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;NSDate&lt;/span&gt; &lt;span class="nl"&gt;dateWithTimeIntervalSinceReferenceDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;162000&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;NSString&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;formattedDateString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;dateFormatter&lt;/span&gt; &lt;span class="nl"&gt;stringFromDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;NSLog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;formattedDateString: %`&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;formattedDateString&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Output&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt; &lt;span class="nl"&gt;en_US&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;formattedDateString: Jan 2, 2001&amp;#34;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And you can use Regular Expressions like this:&lt;/p&gt;</description><content:encoded><![CDATA[<p>While experimenting with ways of using Objective-C a little bit closer to how I code Ruby, there were two things that annoyed me a bit. First, Date Formatting and, second, Regular Expressions.</p>
<p>The Cocoa framework has both implemented as <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html%23//apple_ref/doc/uid/TP40002369-SW1"target="_blank" rel="noopener">NSDateFormatter</a> and <a href="http://developer.apple.com/library/iOS/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html"target="_blank" rel="noopener">NSRegularExpression</a> that also happen to be available for iOS development.</p>
<p>You can format dates like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="n">NSDateFormatter</span> <span class="o">*</span><span class="n">dateFormatter</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSDateFormatter</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="n">dateFormatter</span> <span class="nl">setDateStyle</span><span class="p">:</span><span class="n">NSDateFormatterMediumStyle</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="n">dateFormatter</span> <span class="nl">setTimeStyle</span><span class="p">:</span><span class="n">NSDateFormatterNoStyle</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">NSDate</span> <span class="o">*</span><span class="n">date</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSDate</span> <span class="nl">dateWithTimeIntervalSinceReferenceDate</span><span class="p">:</span><span class="mi">162000</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">NSString</span> <span class="o">*</span><span class="n">formattedDateString</span> <span class="o">=</span> <span class="p">[</span><span class="n">dateFormatter</span> <span class="nl">stringFromDate</span><span class="p">:</span><span class="n">date</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"><span class="n">NSLog</span><span class="p">(</span><span class="err">`</span><span class="s">&#34;formattedDateString: %`&#34;</span><span class="p">,</span> <span class="n">formattedDateString</span><span class="p">);</span>  
</span></span><span class="line"><span class="cl"><span class="o">//</span> <span class="n">Output</span> <span class="k">for</span> <span class="n">locale</span> <span class="nl">en_US</span><span class="p">:</span> <span class="s">&#34;formattedDateString: Jan 2, 2001&#34;</span>  </span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And you can use Regular Expressions like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">NSError</span> <span class="o">*</span><span class="n">error</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>  
</span></span><span class="line"><span class="cl"><span class="n">NSRegularExpression</span> <span class="o">*</span><span class="n">regex</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSRegularExpression</span> <span class="nl">regularExpressionWithPattern</span><span class="p">:</span><span class="s">@&#34;</span><span class="se">\\</span><span class="s">b(a|b)(c|d)</span><span class="se">\\</span><span class="s">b&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="nl">options</span><span class="p">:</span><span class="n">NSRegularExpressionCaseInsensitive</span>  
</span></span><span class="line"><span class="cl"> <span class="nl">error</span><span class="p">:</span><span class="o">&amp;</span><span class="n">error</span><span class="p">];</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">NSUInteger</span> <span class="n">numberOfMatches</span> <span class="o">=</span> <span class="p">[</span><span class="n">regex</span> <span class="nl">numberOfMatchesInString</span><span class="p">:</span><span class="n">string</span>  
</span></span><span class="line"><span class="cl"> <span class="nl">options</span><span class="p">:</span><span class="mi">0</span>  
</span></span><span class="line"><span class="cl"> <span class="nl">range</span><span class="p">:</span><span class="n">NSMakeRange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="p">[</span><span class="n">string</span> <span class="n">length</span><span class="p">])];</span>  </span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>But I have issues with both of these. The Ruby equivalent for the date formatting example would be:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="nb">require</span> <span class="s1">&#39;activesupport&#39;</span>  
</span></span><span class="line"><span class="cl"><span class="n">date</span> <span class="o">=</span> <span class="no">Time</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="s2">&#34;2001-01-01&#34;</span><span class="p">)</span> <span class="o">+</span> <span class="mi">162000</span><span class="o">.</span><span class="n">seconds</span>  
</span></span><span class="line"><span class="cl"><span class="n">date</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&#34;%b %d, %Y&#34;</span><span class="p">)</span>  </span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And the regular expression example would be like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">number_of_matches</span> <span class="o">=</span> <span class="sr">/\W*[a|b][c|d]\W*/</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">string</span><span class="p">)</span><span class="o">.</span><span class="n">size</span>  </span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>There are 2 specific things that annoy me:</p>
<ul>
<li>the Obj-C versions feel unnecessarily verbose. Now, I do understand that they are lower level and they will probably allow for more flexibility, but I think they should have higher &ldquo;porcelain&rdquo; versions, that are more straightforward.</li>
<li>in Obj-C, the Date Formatting uses the <a href="http://unicode.org/reports/tr35/tr35-10.html#Date_Format_Patterns"target="_blank" rel="noopener">Unicode TR-35</a> formatting standard and Regular Expressions use the <a href="http://userguide.icu-project.org/strings/regexp"target="_blank" rel="noopener">ICU</a> standard that is inspired by Perl Regular Expression with support for Unicode and loosely based on JDK 1.4 java.util.regex.</li>
</ul>
<p>So, the ideal solution for me would be:</p>
<ul>
<li>to have higher level versions of those features;</li>
<li>to have C-compatible strftime date formatting and Ruby 1.9&rsquo;s Oniguruma level regular expressions.</li>
</ul>
<h2>It&rsquo;s a Unix System<span class="hx:absolute hx:-mt-20" id="its-a-unix-system"></span>
    <a href="#its-a-unix-system" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>That&rsquo;s when the obvious thing came to me: Objective-C is nothing more than a superset of C, so anything that is compatible with C is automatically compatible with Objective-C. More than that, the <strong>iOS is a Unix System</strong>! Meaning that it has all the goodies of Posix support.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/dFUlAQZB9Ng"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>So, how do I get <a href="http://www.cplusplus.com/reference/clibrary/ctime/strftime/"target="_blank" rel="noopener">C-compatible</a> strftime? Easy:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="cp"># import &#34;time.h&#34;  
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="err">…</span>  
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="p">(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span> <span class="nl">toFormattedString</span><span class="p">:(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span><span class="n">format</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="n">time_t</span> <span class="n">unixTime</span> <span class="o">=</span> <span class="p">(</span><span class="n">time_t</span><span class="p">)</span> <span class="p">[</span><span class="nb">self</span> <span class="n">timeIntervalSince1970</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"> <span class="k">struct</span> <span class="n">tm</span> <span class="n">timeStruct</span><span class="p">;</span>  
</span></span><span class="line"><span class="cl"> <span class="n">localtime_r</span><span class="p">(</span><span class="o">&amp;</span><span class="n">unixTime</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">timeStruct</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kt">char</span> <span class="n">buffer</span><span class="p">[</span><span class="mi">30</span><span class="p">];</span> 
</span></span><span class="line"><span class="cl"><span class="n">strftime</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="p">[[</span><span class="n">NSDate</span> <span class="nl">formatter</span><span class="p">:</span><span class="n">format</span><span class="p">]</span> <span class="nl">cStringUsingEncoding</span><span class="p">:[</span><span class="n">NSString</span> <span class="n">defaultCStringEncoding</span><span class="p">]],</span> <span class="o">&amp;</span><span class="n">timeStruct</span><span class="p">);</span> <span class="n">NSString</span><span class="o">*</span> <span class="n">output</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSString</span> <span class="nl">stringWithCString</span><span class="p">:</span><span class="n">buffer</span> <span class="nl">encoding</span><span class="p">:[</span><span class="n">NSString</span> <span class="n">defaultCStringEncoding</span><span class="p">]];</span> 
</span></span><span class="line"><span class="cl"><span class="k">return</span> <span class="n">output</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Reference: <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/Rubyfication/NSDate&#43;helpers.m#L71-80"target="_blank" rel="noopener">NSDate+helpers.m</a></p>
<p>Now follow each line to understand it:</p>
<ul>
<li>At line 4 it is returning the current time represented as the number of seconds since 1970. That method actually returns a <tt>NSTimeInterval</tt> which is a number that is essentially the same as the C-equivalent <tt>time_t</tt></li>
<li>At line 6 the C function <tt>localtime_r</tt> converts the <tt>unitTime</tt> number into the C-structure <tt>timeStruct</tt></li>
<li>At line 9 we call a custom method I created called <tt>formatter</tt> that just returns a <tt>strftime</tt> compatible string format. The Obj-C string (when we create using the &ldquo;@&rdquo; symbol) is an object that we must convert to an array of chars using the <tt>cStringUsingEncoding:</tt>. C functions don&rsquo;t understand Obj-C strings, hence the conversion. Then we finally call the <tt>strftime</tt> itself that will store the result in the <tt>buffer</tt> array of char that we declared before.</li>
<li>At line 10 we now do the reverse and convert the resulting C-string (array of chars) back into an Obj-C String.</li>
</ul>
<p>Now this is too nice. I have added a few other helper methods that now allow me to use it like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="n">it</span><span class="p">(</span><span class="err">`</span><span class="s">&#34;should convert the date to the rfc822 format&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="p">[[[</span><span class="n">ref</span> <span class="nl">toFormattedString</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;rfc822&#34;</span><span class="p">]</span> <span class="n">should</span><span class="p">]</span> <span class="nl">equal</span><span class="p">:</span><span class="s">@&#34;Fri, 01 Jan 2010 10:15:30&#34;</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"><span class="p">});</span> </span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Reference: <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/RubyficationTests/DateSpec.m#L69"target="_blank" rel="noopener">DateSpec.m</a></p>
<p>And the <tt>&ldquo;rfc822&rdquo;</tt> string will just be internally converted to <tt>@&quot;%a, %d %b %Y %H:%M:%S&quot;</tt> by the <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/Rubyfication/NSDate&#43;helpers.m#L82-100"target="_blank" rel="noopener"><tt>formatter:</tt></a> selector in the <tt>NSDate</tt> class.</p>
<p>Now, to add Ruby 1.9-level regular expressions you can go straight to the source and use the original C-based <a href="http://www.geocities.jp/kosako3/oniguruma/"target="_blank" rel="noopener">Oniguruma</a> itself, exactly what Ruby does. There are several ways to integrate a C library into your Cocoa project, but someone already did all the hard work. Satoshi Nakagawa wrote an Obj-C wrapper called <a href="http://limechat.net/cocoaoniguruma/"target="_blank" rel="noopener">CocoaOniguruma</a> that makes it dead easy to integrate into your project.</p>
<p>There are several ways to integrate an external library into your project. The easier way (albeit, not exactly the best) that I am showing here is by creating a new Static Library Target within my project, called <em>CocoaOniguruma</em>:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2010.33.47%20PM_original.png?1303608817" alt=""  loading="lazy" /></p>
<p>It will create a new Group called <em>CocoaOniguruma</em> in your project. Then you just add all the files from <a href="https://github.com/psychs/cocoaoniguruma/tree/master/framework/core"target="_blank" rel="noopener">CocoaOniguruma&rsquo;s core folder</a> to that group, select the new target and all the source files and headers will be properly added to the project, like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2010.37.19%20PM_original.png?1303608987" alt=""  loading="lazy" /></p>
<p>Finally, you need to go to the original main target of your application and add both the new target to the target dependencies and the binary <tt>.a</tt> file to the binary linking section, like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2011/4/23/Screen%20shot%202011-04-23%20at%2010.39.07%20PM_original.png?1303609098" alt=""  loading="lazy" /></p>
<p>With all this set, I recommend you to explore the <tt>OnigRegexp.m</tt> and <tt>OnigRegexpUtility.m</tt>, that are Obj-C wrappers to the Oniguruma library. The author already did some very Ruby-like syntax for you to use.</p>
<p>I have wrapped those helpers in my own classes like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="p">-</span> <span class="p">(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span> <span class="nf">gsub:</span><span class="p">(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span><span class="nv">pattern</span> <span class="nf">with:</span><span class="p">(</span><span class="kt">id</span><span class="p">)</span><span class="nv">replacement</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">if</span> <span class="p">([</span><span class="n">replacement</span> <span class="nl">isKindOfClass</span><span class="p">:[</span><span class="n">NSString</span> <span class="k">class</span><span class="p">]])</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="p">[</span><span class="nb">self</span> <span class="nl">replaceAllByRegexp</span><span class="p">:</span><span class="n">pattern</span> <span class="nl">with</span><span class="p">:</span><span class="n">replacement</span><span class="p">];</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span> <span class="k">else</span> <span class="k">if</span> <span class="p">([</span><span class="n">replacement</span> <span class="nl">isKindOfClass</span><span class="p">:[</span><span class="n">NSArray</span> <span class="k">class</span><span class="p">]])</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">__block</span> <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>  
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="p">[</span><span class="nb">self</span> <span class="nl">replaceAllByRegexp</span><span class="p">:</span><span class="n">pattern</span> <span class="nl">withBlock</span><span class="p">:</span><span class="o">^</span><span class="p">(</span><span class="n">OnigResult</span><span class="o">*</span> <span class="n">obj</span><span class="p">)</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="p">[</span><span class="n">NSString</span><span class="o">*</span><span class="p">](</span><span class="n">replacement</span> <span class="nl">objectAtIndex</span><span class="p">:(</span><span class="o">++</span><span class="n">i</span><span class="p">));</span>  
</span></span><span class="line"><span class="cl"> <span class="p">}];</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>  
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="nb">nil</span><span class="p">;</span>  
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">-</span> <span class="p">(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span> <span class="nf">gsub:</span><span class="p">(</span><span class="n">NSString</span><span class="o">*</span><span class="p">)</span><span class="nv">pattern</span> <span class="nf">withBlock:</span><span class="p">(</span><span class="n">NSString</span><span class="o">*</span> <span class="p">(</span><span class="o">^</span><span class="p">)(</span><span class="n">OnigResult</span><span class="o">*</span><span class="p">))</span><span class="nv">replacement</span> <span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="p">[</span><span class="nb">self</span> <span class="nl">replaceAllByRegexp</span><span class="p">:</span><span class="n">pattern</span> <span class="nl">withBlock</span><span class="p">:</span><span class="n">replacement</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Reference: <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/Rubyfication/NSString&#43;helpers.m#L176-190"target="_blank" rel="noopener">NSString+helpers.m</a></p>
<p>Which now allows me to use this nicer syntax:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-objc" data-lang="objc"><span class="line"><span class="cl"><span class="n">context</span><span class="p">(</span><span class="err">`</span><span class="s">&#34;Regular Expressions&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">it</span><span class="p">(</span><span class="err">`</span><span class="s">&#34;should replace all substrings that match the pattern&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span>  
</span></span><span class="line"><span class="cl"> <span class="p">[[[</span><span class="err">`</span><span class="s">&#34;hello world, heyho!&#34;</span> <span class="nl">gsub</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;h</span><span class="se">\\</span><span class="s">w+&#34;</span> <span class="nl">with</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;hi&#34;</span><span class="p">]</span> <span class="n">should</span><span class="p">]</span> <span class="nl">equal</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;hi world, hi!&#34;</span><span class="p">];</span>  
</span></span><span class="line"><span class="cl"> <span class="p">});</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">it</span><span class="p">(</span><span class="s">@&#34;should replace each substrings with one corresponding replacement in the array&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span> <span class="n">NSArray</span><span class="o">*</span> <span class="n">replacements</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSArray</span> <span class="nl">arrayWithObjects</span><span class="p">:</span><span class="s">@&#34;hi&#34;</span><span class="p">,</span> <span class="s">@&#34;everybody&#34;</span><span class="p">,</span> <span class="nb">nil</span><span class="p">];</span> <span class="p">[[[</span><span class="err">`</span><span class="s">&#34;hello world, heyho!&#34;</span> <span class="nl">gsub</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;h</span><span class="se">\\</span><span class="s">w+&#34;</span> <span class="nl">with</span><span class="p">:</span><span class="n">replacements</span><span class="p">]</span> <span class="n">should</span><span class="p">]</span> <span class="nl">equal</span><span class="p">:</span><span class="s">@&#34;hi world, everybody!&#34;</span><span class="p">];</span> <span class="p">});</span> <span class="n">it</span><span class="p">(</span><span class="s">@&#34;should replace each substring with the return of the block&#34;</span><span class="p">,</span> <span class="o">^</span><span class="p">{</span> <span class="p">[[[</span><span class="err">`</span><span class="s">&#34;hello world, heyho!&#34;</span> <span class="nl">gsub</span><span class="p">:</span><span class="err">`</span><span class="s">&#34;h</span><span class="se">\\</span><span class="s">w+&#34;</span> <span class="nl">withBlock</span><span class="p">:</span><span class="o">^</span><span class="p">(</span><span class="n">OnigResult</span><span class="o">*</span> <span class="n">obj</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="s">@&#34;foo&#34;</span><span class="p">;</span> <span class="p">}]</span> <span class="n">should</span><span class="p">]</span> <span class="nl">equal</span><span class="p">:</span><span class="s">@&#34;foo world, foo!&#34;</span><span class="p">];</span> <span class="p">});</span>
</span></span><span class="line"><span class="cl"><span class="p">});</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Reference: <a href="https://github.com/akitaonrails/ObjC_Rubyfication/blob/master/RubyficationTests/StringSpec.m#L86-102"target="_blank" rel="noopener">StringSpec.m</a></p>
<p>If you&rsquo;re thinking that it is strange for a snippet of Objective-C code to have keywords such as <tt>context</tt> or <tt>it</tt>, they come from <a href="http://www.kiwi-lib.info/"target="_blank" rel="noopener">Kiwi</a>, which builds an RSpec-like BDD testing framework on top of SenTesting Kit for Objective-C development that you should definitely check out. But the code above should be easy enough to understand without even knowing about Kiwi. If you&rsquo;re a Ruby developer, you will probably notice that the syntax bears some resemblance to what you&rsquo;re used to already.</p>
<p>So, linking to existing standard C libraries or even third-party open source C libraries is a piece of cake for those simple cases, without having to resort to any &ldquo;Native Interface&rdquo; tunneling between virtual machines or any other plumbing. If you want C, they&rsquo;re there for you to easily integrate and use.</p>
]]></content:encoded><category>apple</category><category>programming</category><category>tutorials</category></item><item><title>[Documentary] The iPod Revolution</title><link>https://akitaonrails.github.io/en/2011/01/30/documentario-the-ipod-revolution/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2011/01/30/documentario-the-ipod-revolution/</guid><pubDate>Sun, 30 Jan 2011 12:23:00 -0200</pubDate><description>&lt;p&gt;From what I could research, on December 27, 2006, Discovery Channel aired the documentary &amp;ldquo;The iPod Revolution: Inside Story of the Apple iPod and Steve Jobs.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This documentary is very well produced. In 40 minutes it sums up Apple&amp;rsquo;s history from 1997 to 2006, covering almost a decade that runs from Steve Jobs&amp;rsquo; return to the launch of the iPod and the huge success of the iTunes Music Store. And that&amp;rsquo;s only half the story: the iPhone wouldn&amp;rsquo;t be revealed until January 2007, so the plot is even bigger.&lt;/p&gt;</description><content:encoded><![CDATA[<p>From what I could research, on December 27, 2006, Discovery Channel aired the documentary &ldquo;The iPod Revolution: Inside Story of the Apple iPod and Steve Jobs.&rdquo;</p>
<p>This documentary is very well produced. In 40 minutes it sums up Apple&rsquo;s history from 1997 to 2006, covering almost a decade that runs from Steve Jobs&rsquo; return to the launch of the iPod and the huge success of the iTunes Music Store. And that&rsquo;s only half the story: the iPhone wouldn&rsquo;t be revealed until January 2007, so the plot is even bigger.</p>
<p>I always recommend researching this story because it&rsquo;s very interesting and engaging. For more details, read the books:</p>
<ul>
<li><a href="http://www.amazon.com/Perfect-Thing-Shuffles-Commerce-Coolness/dp/B001GVJCF6/ref=pd_sim_b_46"target="_blank" rel="noopener">The Perfect Thing: How the iPod Shuffles Commerce, Culture, and Coolness</a> – by Steven Levy.</li>
<li><a href="http://www.amazon.com/Cult-iPod-Leander-Kahney/dp/1593270666/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1296395947&amp;sr=8-1"target="_blank" rel="noopener">The Cult of the iPod</a> – by Leander Kahney, who also appears in the documentary.</li>
<li><a href="http://www.amazon.com/iCon-Steve-Jobs-Greatest-Business/dp/0471787841/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1296396002&amp;sr=1-1"target="_blank" rel="noopener">iCon Steve Jobs: The Greatest Second Act in the History of Business</a> – by Jeffrey Young and William Simon.</li>
</ul>
<p>Since I always show this video to friends who get curious, I decided it was past time to subtitle it. Not everyone I show it to works in tech, and go figure, English is a problem, but that&rsquo;s another subject. If you want the subtitle file, <a href="https://gist.github.com/802874"target="_blank" rel="noopener">I created a Gist</a> with it. To subtitle it I used <a href="http://www.fluffalopefactory.com/miyu/download.html"target="_blank" rel="noopener">Miyu</a>, to render the subtitle onto the video I used <a href="http://www.bitfield.se/submerge/"target="_blank" rel="noopener">Submerge</a>, and I finally uploaded the whole thing to my account on Blip.tv. Watch it below:</p>
<script type="text/javascript">
    jwplayer('playermbIDnNDsKnnR').setup({
        file: 'https://s3.amazonaws.com/videos-akitaonrails/Akitaonrails-iPodRevolutionPtBR748.m4v.mp4',
        title: 'Discovery Documentary - iPod Revolution (pt-BR)',
        width: '100%',
        aspectratio: '4:3',
        fallback: 'false'
    });
</script>
<p>Of course, the video is the property of Discovery Channel, with all rights reserved. This material should not be used for commercial purposes. It&rsquo;s already available on several other sites, but I&rsquo;ll take it down if needed. If I do, there are still other sources, for example on YouTube:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=iYumjyXEFms"target="_blank" rel="noopener">The iPod Revolution – Part One</a></li>
<li><a href="http://www.youtube.com/watch?v=K4rFh62Q1Rg"target="_blank" rel="noopener">The iPod Revolution – Part Two</a></li>
<li><a href="http://www.youtube.com/watch?v=b9rG_NOr44Q"target="_blank" rel="noopener">The iPod Revolution – Part Three</a></li>
<li><a href="http://www.youtube.com/watch?v=ZCriPTBlKQk"target="_blank" rel="noopener">The iPod Revolution – Part Four</a></li>
<li><a href="http://www.youtube.com/watch?v=QDTUFHJHEt4"target="_blank" rel="noopener">The iPod Revolution – Part Five</a></li>
</ul>
<p>But the story is much more interesting than that. I&rsquo;ve read and watched all the available material on the subject since 1983. Searching around, I found some pieces of this story on YouTube too. Here are more video links:</p>
<ul>
<li>
<p><a href="http://www.youtube.com/watch?v=lSiQA6KKyJo"target="_blank" rel="noopener">1983</a> – In this keynote, a young Steve Jobs, who had just turned Apple into a superpower, talks about his plans for a new computer to launch in 1984. It&rsquo;s an epic speech. At the end he unveils the most famous commercial in the world, <a href="http://www.youtube.com/watch?v=OYecfV3ubP8"target="_blank" rel="noopener">1984</a>, directed by Ridley Scott and shown only once, during the following year&rsquo;s Super Bowl.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=PEHNrqPkefI"target="_blank" rel="noopener">Boston Macworld 1997</a> – Steve Jobs was pushed out of Apple in 1985 and returns more than 11 years later to a devastated Apple, losing $1 billion a year, with people like Michael Dell saying <a href="http://www.nytimes.com/2006/01/16/technology/16apple.html"target="_blank" rel="noopener">If I were Apple, I&rsquo;d shut it down and give the money back to the shareholders</a>. He lays out the problems, points to Apple&rsquo;s still-strong assets, and sketches a recovery strategy that runs flat against every &ldquo;analyst.&rdquo; I recommend it to anyone who cares about management: how to get back up after a fall.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=0BHPtoTctDY"target="_blank" rel="noopener">Macworld 1998</a> – A year after his return, Steve had already reshaped all of Apple and launches the first product that marks the reboot: the colorful iMac. It was a machine aimed mainly at the nascent consumer internet market. Bear in mind, it&rsquo;s still the early days of the first internet bubble.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=vy01RzqA5RA"target="_blank" rel="noopener">iPod Introduction 2001</a> – Clip from the presentation where Steve shows the iPod for the first time. It was a closed event inside Apple&rsquo;s campus, for invited journalists only. The first day of a revolution none of those present could have imagined.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=B2n86TROxzY"target="_blank" rel="noopener">iTunes Store Introduction 2003</a> – With software like Napster and Limewire letting people download music for free, how do you sell a system where you have to pay for music? This video shows how Steve pulled it off. The most important part was bending the Big 5 of the music industry into accepting a single flat price for individual tracks and albums, and getting artists to break albums apart and sell individual songs.</p>
</li>
<li>
<p>&ldquo;iPhone Introduction 2007&rdquo; – This one is genius. After two and a half years working in secret, amid all the growing rumors about an iPod-phone, watch how Steve redefined the smartphone market. One fundamental point: control of the handset had always belonged to the carriers, but Steve negotiated an unprecedented contract with Cingular (today AT&amp;T) where the phone stayed under Apple&rsquo;s control. That meant no pre-installed marketing apps and nothing of the sort. This year the exclusivity contract with AT&amp;T ended, and Apple just announced the CDMA iPhone for Verizon&rsquo;s potential 93 million customers.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=ASkis57blsc"target="_blank" rel="noopener">Part 1</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=9VLb5XdxRm8"target="_blank" rel="noopener">Part 2</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=EeWj_6OeCTU"target="_blank" rel="noopener">Part 3</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=8awh59s0nEs"target="_blank" rel="noopener">Part 4</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=qIJoCw679ks"target="_blank" rel="noopener">Part 5</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=WKuM8lVOCg8"target="_blank" rel="noopener">Part 6</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=VPs8ECaZ__E"target="_blank" rel="noopener">Part 7</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=q_XXP32vchE"target="_blank" rel="noopener">Part 8</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=R42IOcYbKhU"target="_blank" rel="noopener">Part 9</a></p>
</li>
<li>
<p>&ldquo;iPad Introduction 2010&rdquo; – Here he reveals the iPad, which everyone said would be bad, would never catch on, would be no fun. Today it&rsquo;s a sales record and was voted product of the year.</p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=Tw8tljgZ30A"target="_blank" rel="noopener">Part 1</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=-o5NUcvKv1E"target="_blank" rel="noopener">Part 2</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=MQ5jaSqVTjk"target="_blank" rel="noopener">Part 3</a></p>
</li>
<li>
<p><a href="http://www.youtube.com/watch?v=gcIOrnQc3nU"target="_blank" rel="noopener">Part 4</a></p>
</li>
<li>
<p>&ldquo;The Fall and Rise of Apple&rdquo; – A summary of the fall and how Apple got back up, in the broader context of the market and its products:</p>
</li>
<li>
<p><a href="https://web.archive.org/web/20110525104838/http://www.roughlydrafted.com/RD/Q4.06/9FD12E37-8DC7-4AD1-872F-2021BEDE6D96.html"target="_blank" rel="noopener">Article 1</a></p>
</li>
<li>
<p><a href="https://web.archive.org/web/20101203183039/http://www.roughlydrafted.com/RD/Q4.06/469013E9-454C-42F0-AFB1-FA75871A028B.html"target="_blank" rel="noopener">Article 2</a></p>
</li>
<li>
<p><a href="https://web.archive.org/web/20111008215116/http://www.roughlydrafted.com/RD/Q4.06/8F4B780E-674F-4421-A44D-7B1EAE9C1BA6.html"target="_blank" rel="noopener">Article 3</a></p>
</li>
<li>
<p><a href="https://web.archive.org/web/20100516153401/http://www.roughlydrafted.com/RD/Q4.06/4BC7D963-7B31-47B7-A6ED-2706BD472377.html"target="_blank" rel="noopener">Article 4</a></p>
</li>
<li>
<p><a href="https://web.archive.org/web/20111101185216/http://www.roughlydrafted.com/RD/Q4.06/1DDD598A-7CE0-479E-A6F9-912777CAB484.html"target="_blank" rel="noopener">Article 5</a></p>
</li>
<li>
<p><a href="https://web.archive.org/web/20111121131217/http://www.roughlydrafted.com/RD/Q4.06/D61CFB13-4A09-4F0A-9B5A-4DCB8977503C.html"target="_blank" rel="noopener">Article 6</a></p>
</li>
</ul>
<p>To close: in the documentary, Apple starts 1996 in terrible shape, losing $1 billion a year, with shares falling to $17 each. Now, at the close of <a href="http://business.financialpost.com/2011/01/18/apple-reports-record-breaking-quarterly-results-again/"target="_blank" rel="noopener">the last quarter of 2010</a>, it sold 16.24 million iPhones in that quarter alone, plus 7.33 million iPads, 19.45 million iPods, and 4.13 million Macs. Again: in the quarter alone.</p>
<p>So far Apple has sold more than 14 million iPads since the launch, back in April of last year. And the share price is now $340. Whoever bought in 1996 and held saw their capital grow almost 80 times in 15 years, counting the splits Apple did in 2000 and 2005 (via @cassiozen&rsquo;s comment below). An excellent investment.</p>
]]></content:encoded><category>apple</category><category>computing-history</category><category>off-topic</category></item><item><title>[Off-Topic] All Marketers Are Liars</title><link>https://akitaonrails.github.io/en/2009/07/31/off-topic-todos-os-marketeiros-s-o-mentirosos/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/07/31/off-topic-todos-os-marketeiros-s-o-mentirosos/</guid><pubDate>Fri, 31 Jul 2009 09:54:00 -0300</pubDate><description>&lt;p&gt;&lt;a href="http://web.archive.org/web/20090802092432/http://sethgodin.typepad.com/all_marketers_are_liars/"target="_blank" rel="noopener"&gt;&lt;img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/31/the_book_original.gif" alt="" loading="lazy" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Like everything Seth Godin writes, this 2005 book is fun to read (in my case, to &lt;a href="http://tinyurl.com/allmarketersareliars"target="_blank" rel="noopener"&gt;listen to&lt;/a&gt;). Old as it is, it still lays out a marketing model that holds up.&lt;/p&gt;
&lt;p&gt;There are two ideas here I like. The first is his beef with marketing built on feature lists and bullet-point checklists. The worst kind is the feature comparison: &amp;ldquo;lower prices,&amp;rdquo; &amp;ldquo;surveys show consumers prefer us,&amp;rdquo; &amp;ldquo;we have more performance,&amp;rdquo; &amp;ldquo;we have more security,&amp;rdquo; &amp;ldquo;we have item X that the other guy doesn&amp;rsquo;t.&amp;rdquo; Almost always, that&amp;rsquo;s bad marketing.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="http://web.archive.org/web/20090802092432/http://sethgodin.typepad.com/all_marketers_are_liars/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/31/the_book_original.gif" alt=""  loading="lazy" /></a></p>
<p>Like everything Seth Godin writes, this 2005 book is fun to read (in my case, to <a href="http://tinyurl.com/allmarketersareliars"target="_blank" rel="noopener">listen to</a>). Old as it is, it still lays out a marketing model that holds up.</p>
<p>There are two ideas here I like. The first is his beef with marketing built on feature lists and bullet-point checklists. The worst kind is the feature comparison: &ldquo;lower prices,&rdquo; &ldquo;surveys show consumers prefer us,&rdquo; &ldquo;we have more performance,&rdquo; &ldquo;we have more security,&rdquo; &ldquo;we have item X that the other guy doesn&rsquo;t.&rdquo; Almost always, that&rsquo;s bad marketing.</p>
<p>The best marketing tells a story. A consumer doesn&rsquo;t pick a product because it beats the competition on 8 out of 10 line items; he buys a story. In our IT world, that&rsquo;s exactly why so many people buy Apple. Apple sells a lifestyle, and price, market share and the rest of the small stuff fall into the background.</p>
<p>The Apple world has its <a href="http://www.amazon.com/Cult-Mac-Leander-Kahney/dp/1886411832"target="_blank" rel="noopener">Cult of the Mac</a>. Does that make us fanboys? It does. The same way anyone who buys a Mercedes SUV is a fanboy: if the goal is just getting a passenger from point A to point B, a Mercedes does it no better than a Volkswagen. And if the goal is killing your hunger, a good steak at Rubaiyat feeds you no better than a burger at McDonald&rsquo;s.</p>
<p>None of this works unless there&rsquo;s a good product first, sold with a good story instead of a laundry list. Why isn&rsquo;t that obvious? On a checklist, the iPhone is one of the worst smartphones on the market, more so in its first version. A measly 2MP camera, no Bluetooth audio, no FM radio or digital TV, no dual SIM cards, no swappable battery. On paper, a loser.</p>
<p>Even so, it was already threatening to <a href="http://web.archive.org/web/20090802092433/http://www.gearlog.com/2009/07/generator_apple_to_pass_nokia.php"target="_blank" rel="noopener">squeeze the market share</a> of the mighty Nokia. The reason is that the product is excellent at what it sets out to do, and the story behind Apple&rsquo;s and the Mac&rsquo;s DNA is very strong.</p>
<p>And let nobody read this as &ldquo;similar&rdquo; products at different &ldquo;prices.&rdquo; You need, as Seth likes to say, a purple cow: a genuinely great product. That&rsquo;s the prerequisite. Without it, don&rsquo;t even bother selling; it&rsquo;s a waste of time.</p>
<p>The book&rsquo;s other point should also be obvious: <strong>never</strong> try to beat the competition by improving on the very same features they have. Losing marketing is the kind that copies what the other guy has and shouts &ldquo;we&rsquo;re cheaper,&rdquo; &ldquo;we&rsquo;re faster,&rdquo; &ldquo;we have this item they don&rsquo;t.&rdquo; Your only shot is being different and telling a story the others don&rsquo;t have.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/AZnYRaQfjK4"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>That brings me to a small case of my own I don&rsquo;t think I&rsquo;ve ever told. When 37signals put <a href="http://web.archive.org/web/20090802092432/http://gettingreal.37signals.com/GR_por.php"target="_blank" rel="noopener">Getting Real</a> online for free, I was sure it should be the first piece of material for the Brazilian Rails community. Back then there was barely any Ruby or Rails content in Portuguese, and plenty of people figured I should start with reference guides and tutorials, to help beginners get going.</p>
<p>I bet the other way. I wanted to translate Getting Real precisely because it would set the community&rsquo;s &ldquo;tone&rdquo;: its philosophy, values and pragmatism. That was my <em>wishful thinking</em>. On <a href="http://web.archive.org/web/20090802092507/http://akitaonrails.com/2006/11/13/vamos-traduzir-o-livro-getting-real"target="_blank" rel="noopener">November 13, 2006</a> I put out the first <em>call-to-arms</em> and, after great collective work from the community, we wrapped up on <a href="http://web.archive.org/web/20090802092515/http://akitaonrails.com/2007/03/26/getting-real-tradu%C3%A7%C3%A3o-completa-chegamos-ao-1-0"target="_blank" rel="noopener">March 26, 2007</a>. Not everyone read the book, but I believe it helped inspire Brazil&rsquo;s first Rails entrepreneurs.</p>
<p>A lot of people don&rsquo;t get why we choose Ruby on Rails. They waste time building comparison lists to prove anything else is better. And on the facts they&rsquo;re not wrong: Ruby is one of the slowest interpreters around, Rails is missing plenty of features others have, and it doesn&rsquo;t support half the commercial databases the competition does.</p>
<p>The thing is, a factual list isn&rsquo;t enough. Rails is good enough, and excellent where it counts. It sells itself through a story: the community&rsquo;s luminaries, the startups that grew up on it, the Agile and Pragmatic philosophy that came along for the ride.</p>
<p>Good ideas spread fast. All of us who try to spread ideas are, deep down, marketers. And to close, I&rsquo;ll hand the floor to Seth Godin on why marketing is too important to be left only to the marketing department:</p>
<!-- dead Flash embed removed (service offline): http://blip.tv/play/Ad6xPAI -->
]]></content:encoded><category>business</category><category>apple</category><category>rails</category><category>off-topic</category></item><item><title>[Off-Topic] Bought My First Mac — Now What?</title><link>https://akitaonrails.github.io/en/2009/07/19/off-topic-comprei-meu-primeiro-mac-e-agora/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/07/19/off-topic-comprei-meu-primeiro-mac-e-agora/</guid><pubDate>Sun, 19 Jul 2009 22:01:00 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Update 04/20/2012:&lt;/strong&gt; This is one of the most-read articles on my blog, first published in 09/2009. Most of the article still holds up well today, so I decided to adjust a few things and add more current information. If you&amp;rsquo;ve already read this article and want to see only what I added, check &lt;a href="http://akitaonrails.com/2012/04/20/off-topic-comprei-meu-primeiro-mac-e-agora-edicao-2012"target="_blank" rel="noopener"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re a &amp;ldquo;switcher&amp;rdquo;: you&amp;rsquo;ve decided to take the big leap, step away from the Windows world a bit, and buy your first Mac. The timing is good and prices are accessible, especially if you can buy from someone abroad. Keep one thing in mind from the start: this is a paradigm shift.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Update 04/20/2012:</strong> This is one of the most-read articles on my blog, first published in 09/2009. Most of the article still holds up well today, so I decided to adjust a few things and add more current information. If you&rsquo;ve already read this article and want to see only what I added, check <a href="http://akitaonrails.com/2012/04/20/off-topic-comprei-meu-primeiro-mac-e-agora-edicao-2012"target="_blank" rel="noopener">this post</a>.</p>
<p>You&rsquo;re a &ldquo;switcher&rdquo;: you&rsquo;ve decided to take the big leap, step away from the Windows world a bit, and buy your first Mac. The timing is good and prices are accessible, especially if you can buy from someone abroad. Keep one thing in mind from the start: this is a paradigm shift.</p>
<p>The first week or two are the worst. You&rsquo;ll always have that nagging thought, <em>&ldquo;On Windows I did this more easily…&rdquo;</em> or <em>&ldquo;On my Linux I did this more easily…&rdquo;</em>. The temptation to go back is strong the first time you leave your comfort zone, same as with any change. Push yourself to learn the new tricks instead of falling back on the old ones.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/overview-gallery1-20090608_original.png" alt=""  loading="lazy" /></p>
<p>As soon as you log in to the Mac for the first time, it arrives in a state where you need to configure very little. A few important things to get you started:</p>
<ul>
<li>The first difference is that application menus are all centralized. The bar at the top is the only menu, and it changes according to the application that currently has focus. The first option is the  icon, which gives access to global system options like &ldquo;About,&rdquo; where you can view details of your hardware; &ldquo;Software Update,&rdquo; the equivalent of Windows Update; and options like Shutdown. By the way, the very first thing to do when starting your Mac is to run Software Update and install the latest updates. Unlike Windows, you tend to get large packages rather than dozens of small updates.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_16_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>The second option is always the name of the focused application. Initially it will always be &ldquo;Finder,&rdquo; the equivalent of Windows Explorer. This menu always gives access to things like &ldquo;Preferences,&rdquo; which on Windows usually lives under the &ldquo;Edit&rdquo; or &ldquo;Tools&rdquo; menus.</p>
</li>
<li>
<p>Some shortcuts are global and constant. To start, understand that there is the Ctrl (control, as on a PC) key and a special one called Command ⌘. They are different, and although it isn&rsquo;t a strict rule, things done on a PC with Ctrl are done on a Mac with ⌘. For example, copying text to the clipboard is ⌘+C, not Ctrl+C. Pasting is ⌘+V. Every application closes with ⌘+Q. The &ldquo;Preferences&rdquo; option is always ⌘+, (comma). The &ldquo;Help&rdquo; menu is always ⌘+Shift+?. A tip on that last Help option: use it to discover menu items whose shortcut you don&rsquo;t remember or whose submenu you can&rsquo;t find. Just type a few letters and Mac OS will open the menu and highlight the right item for you.</p>
</li>
<li>
<p>Unlike Windows, the Mac paradigm is based on one window per document rather than a single application window with embedded document windows. ⌘+W closes the application&rsquo;s current window. ⌘+N or ⌘+Shift+N usually opens a new window. We don&rsquo;t normally close applications very often; they tend to stay open. That&rsquo;s indicated in the Dock, at the bottom of the screen, by a glowing circle below the icon of an open application.</p>
</li>
<li>
<p>Also unlike Windows windows, the red circle at the top of each window closes only that window, not the entire application. It&rsquo;s the equivalent of ⌘+W. Another thing: you can move a window from the title bar or the footer bar, when there is one. So even if a window is partly off the physical desktop, you can still move it. On the other hand, the only way to resize a window is from the lower-right corner, not from any edge.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_3_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>In the title bar of applications that manipulate files, like Finder, Pages, and most apps that show the filename with an icon next to it, the icon is &ldquo;normally&rdquo; draggable. You can drag it to a folder and the file being edited moves there. You can also click while holding ⌘ (Command) and it will show the parent folders, letting you navigate them.</p>
</li>
<li>
<p>Another thing that doesn&rsquo;t exist on Windows: &ldquo;Hide Windows.&rdquo; Get used to ⌘-H to hide all windows of an application. It isn&rsquo;t the same as minimizing, since hidden windows don&rsquo;t appear in the Dock. A hidden application keeps a transparent icon in the Dock. Even better: if you have dozens of applications open in a mess of windows behind windows, use ⌘-⌥-H (Command-Option-H) to hide every window except the one currently in focus. It&rsquo;s a very satisfying way to clean up your workspace and focus on what you&rsquo;re doing.</p>
</li>
<li>
<p>To switch between applications, on Windows we&rsquo;re used to Alt-Tab. On the Mac the near equivalent is ⌘-Tab. But it switches between Applications, not between Windows like on Windows. It&rsquo;s a subtle difference. If you have Photoshop with 4 windows and Word with 3 windows open, ⌘-Tab shows only 2 icons, one per application. To switch between windows of the same application, use ⌘-` (Command-Backtick). Or, more commonly, use Exposé to pick between windows.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_17_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Note the icons on the F1 through F12 keys; they clearly show the functions you get when you press them. F1 and F2 are screen brightness. F3 is Exposé. F4 is the Dashboard, where you install Widgets. F11 and F12 are volume. Those are the main ones. Don&rsquo;t forget that on newer MacBooks with a Multitouch Trackpad you have options like swiping 4 fingers down to activate Exposé or up to show the Desktop.</p>
</li>
<li>
<p>Spotlight is very useful. ⌘+Space activates the search field. If you use external hard drives or USB drives and don&rsquo;t want to waste time indexing their files, open &ldquo;System Preferences,&rdquo; option &ldquo;Spotlight,&rdquo; and drag the volumes that should be excluded.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_5_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>If you&rsquo;re used to Explorer, you&rsquo;ll miss a lot of things in Finder. You can copy and paste folders and files, but there&rsquo;s no cut. You move items to different volumes by dragging and dropping while holding ⌘. To force a copy, use the Option/Alt (⌥) key. You&rsquo;ll end up using drag-and-drop far more than on Windows. You also get different ways to organize your files, especially since ⌘+I opens the Info window, where you can add metadata like keywords for searching and colors (yes, you can even search for files and folders by color in Spotlight).</p>
</li>
<li>
<p>Another difference between Finder and Explorer is how you rename files and run programs. In Explorer you press &ldquo;Enter&rdquo; to run a file and a single mouse click to rename. On the Mac you press &ldquo;Enter&rdquo; to edit the name of a file or folder and ⌘+O to run a program. That avoids the situation where you select dozens of files, accidentally hit Enter, and set off a cascade of programs opening. On the Mac that accident basically never happens.</p>
</li>
<li>
<p>The Dock gives you quick access to your favorite applications. You can drag an icon out to remove it, or drag anything onto it to add it. If you open an application that wasn&rsquo;t there, its icon appears anyway, because the Dock also shows every running application, with a glowing indicator below it. To keep an application in the Dock, drag it there or, while it&rsquo;s open, use the context menu (right-click) on its icon and choose &ldquo;Keep in Dock.&rdquo; If you want that application to launch every time you log in, use &ldquo;Open at Login.&rdquo;</p>
</li>
<li>
<p>Mac OS Leopard (10.5) doesn&rsquo;t ship with the US International keyboard layout that&rsquo;s common on Windows for non-ABNT-2 keyboards (which lack the cedilla). The Mac default is to use shortcuts like ⌥+c for cedilla, ⌥+e for acute accent, ⌥+` for grave accent, ⌥+n for tilde. But if you want the traditional way, download the US International layout for Mac from Brazilian developer <a href="http://web.archive.org/web/20090802092433/http://www.brockerhoff.net/usi/"target="_blank" rel="noopener">Rainer Brokerhoff&rsquo;s</a> site and follow his instructions. From Snow Leopard (10.6) onward, this is no longer necessary.</p>
</li>
<li>
<p>As on Windows and other systems, the Mac&rsquo;s default key repeat rate is somewhat slow. Open any text editor and use the arrow keys to move the cursor and you&rsquo;ll notice the lag. I prefer maximum speed. Go to &ldquo;System Preferences, Keyboard&rdquo; and set &ldquo;Key Repeat&rdquo; to &ldquo;Fast&rdquo; and &ldquo;Delay Until Repeat&rdquo; to &ldquo;Short.&rdquo; You&rsquo;ll thank me:</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.02.32%20PM_original.png?1334956028" alt=""  loading="lazy" /></p>
<ul>
<li>Say you have hundreds of files, like photos from your digital camera, sitting in JPG, and you want to rename them all to another convention and convert them from JPG to PNG. You can do this and much more with a feature called &ldquo;Automator.&rdquo; In Finder, select the files, right-click (on the Trackpad, place two fingers in the middle and use your thumb to click once at the bottom), then choose &ldquo;More,&rdquo; &ldquo;Automator,&rdquo; &ldquo;Create Workflow.&rdquo; That opens the selected items in Automator, a linear flow of &ldquo;filters&rdquo; where you chain the output of one filter as input to the next, like &ldquo;Change Type of Images,&rdquo; then &ldquo;Rename Finder Items,&rdquo; and even &ldquo;Add attachments to Front Messages,&rdquo; and so on. It&rsquo;s an extremely powerful way to chain actions, a lot like Unix/Linux command-line pipes, but far more intuitive.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_6_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Few people figure out how to take screenshots at first, since there&rsquo;s no &ldquo;Print Screen&rdquo; key on a Mac. But there&rsquo;s something far better: ⌘+Shift+3 takes a full-screen shot and saves it as a PNG on your Desktop. If you don&rsquo;t want the file, ⌘+Ctrl+Shift+3 sends the shot to the clipboard so you can paste it into another application. Even more useful, ⌘+Shift+4 turns your cursor into a crosshair for capturing just the small area you select. Position the crosshair over any window and press &ldquo;Space&rdquo; and it captures that whole window. For clipboard-only, use ⌘+Ctrl+Shift+4.</p>
</li>
<li>
<p>Another important thing: every print dialog opens with ⌘+P, and it always has the option to generate a PDF instead of sending to a printer. That&rsquo;s extremely useful if you don&rsquo;t have a printer or want to save a receipt from the web or something like that. Beyond that, the &ldquo;Preview&rdquo; application that opens images and PDFs can also do simple editing: resizing images, cropping, copying pages between PDF files, reordering pages, deleting pages. In other words, PDFs are quite editable on a Mac without a commercial Adobe product.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_7_original.png?1248063204" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Speaking of &ldquo;Preview,&rdquo; learn to use &ldquo;Quick Look.&rdquo; To view images, videos, audio, PDFs, Office files, iWork files, and so on, just select the file (or a set of files) and press &ldquo;Space.&rdquo; A floating window opens where you can quickly view the file. &ldquo;Space&rdquo; again closes it. You can preview most major file formats without opening their respective programs.</p>
</li>
<li>
<p>On PCs we tend to create custom folders for videos, photos, and the like. On the Mac, try to use the default folders it already gives you. More than that, get in the habit of using iTunes to organize your music and videos, iPhoto for your photos, and iMovie to edit your videos. That keeps your Mac tidy, makes backups easier, simplifies searches, and keeps everything more accessible. Many Apple applications integrate with the iLife suite (iTunes, iPhoto, GarageBand, iMovie, iWeb), so it&rsquo;s simpler to let these apps manage your files. Watch the screencasts on Apple&rsquo;s website if you don&rsquo;t know how they work yet; they&rsquo;re simple, intuitive, and powerful.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_8_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>Installing applications on a Mac usually trips people up at first. You normally download one of two formats: DMG or MPKG. The first stands for (D)isk i(M)a(G)e and is similar to an ISO. When you double-click it, the DMG &ldquo;mounts&rdquo; inside /Volumes. The application is usually already there, and you just drag it to the &ldquo;Applications&rdquo; folder on your Mac. Then you &ldquo;eject&rdquo; the DMG with the ⏏ icon or with ⌘+E. The second format, (M)ac (P)ac(K)a(G)e, is the equivalent of Windows&rsquo; MSI: you double-click it and it runs like a standard installer. Usually only programs that need to install a lot of system components use MPKG, like Microsoft Office and Adobe CS4. Sometimes you download a ZIP that contains a DMG or an MPKG. The important part: if it&rsquo;s a DMG with no MPKG inside, always drag the application to Applications before running it. Safari does an extra step: it downloads the DMG, mounts it, extracts the application, and deletes the DMG, so you drag it from the Downloads folder. A technical detail: MPKGs come with a BOM (Bill of Materials) that works as a recipe of the original system file permissions for scripts that adjust permissions. The same BOM helps uninstall, since it records everything that was installed.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_1_original.png" alt=""  loading="lazy" /></p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_15_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>All application preferences are stored in your directory (/Users/your_login), then Library/Preferences. They&rsquo;re files in plist format, which is XML stored in binary. Regardless of where the application is copied, it saves preferences in that location. Don&rsquo;t confuse the &ldquo;Library&rdquo; local to your home folder with the global &ldquo;Library&rdquo; at the root of the system, since you&rsquo;ll rarely need to touch the latter. On the Mac there&rsquo;s no Registry, and so no nightmare of maintaining one. When an application starts behaving strangely, the first thing to try is deleting its .plist file.</p>
</li>
<li>
<p>On the Mac, Finder doesn&rsquo;t show every directory. Most are hidden, like /usr, /bin, /tmp, /dev, /var, /etc, and others that Unix or Linux users will recognize. Some important ones like System and Library at the root of your Mac are rarely accessed. User accounts live in the Users folder and applications in the Applications folder. Inside your &ldquo;Home&rdquo; folder are folders like Desktop, Documents, Downloads, Music, Movies, Pictures, Sites, Public, and Library. In that Library are things like &ldquo;Application Support,&rdquo; where plugins and other application dependencies live, and &ldquo;Preferences,&rdquo; which I explained earlier. Poke around these folders; the naming is fairly obvious.</p>
</li>
<li>
<p>Inside the &ldquo;Applications&rdquo; folder there&rsquo;s another called &ldquo;Utilities&rdquo; (also accessible via ⌘+Shift+U) with things like &ldquo;Activity Monitor,&rdquo; similar to the Windows Task Manager. There&rsquo;s also &ldquo;Console,&rdquo; an easy way to review system log files. Another important one is &ldquo;Disk Utility,&rdquo; which does advanced things like repartitioning your disk non-destructively, creating DMG files including encrypted volumes, burning DMGs to DVDs, and more.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_9_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Another difference from Windows: Macs don&rsquo;t have drive letters (C:, D:, E:, and so on). The Mac, being a BSD Unix, behaves more like Unix/Linux, where DMG and ISO files are &ldquo;mounted&rdquo; inside the /Volumes directory and show up normally as disks in Finder that can be ejected. The Mac is very flexible with disk images: you can use Disk Utility to create bootable USB drives, create multiple boot partitions, copy DVDs into DMGs, and such. Network shared folders are also mounted in /Volumes. The behavior is consistent and fast, and Finder, unlike Windows Explorer, rarely crashes and almost never returns to an inconsistent state.</p>
</li>
<li>
<p>A technical detail you&rsquo;ll notice: Finder (including the top menu and Desktop), the Dock, and applications are very independent. On Windows, especially XP, you&rsquo;ll remember an application sometimes getting sluggish, hard even to drag, making it difficult to click the Start menu or taskbar. On the Mac, even when Finder crashes or gets slow, the Dock behaves independently. Other applications aren&rsquo;t affected either, including their window refresh. Another tip: if an application truly freezes, use ⌘+⌥+⎋ (Command+Option+Esc) to open a window where you can force-quit it. And ⌘+Shift+Q forces the current user to log out.</p>
</li>
<li>
<p>Speaking of deleting: select files and use ⌘+Shift+⌫. That ⌫ key is called &ldquo;Delete&rdquo; but it&rsquo;s the Mac equivalent of the PC&rsquo;s &ldquo;Backspace.&rdquo; The Mac equivalent of the PC&rsquo;s &ldquo;Delete&rdquo; key is Shift+⌫. You can also do more, like ⌥+⌫ to delete the whole word to the left of your cursor, or ⌘+⌫ to delete to the beginning of the line.</p>
</li>
<li>
<p>For navigating text, get used to combinations like ⌘+← and ⌘+→ to go to the beginning or end of the line, ⌘+↑ or ⌘+↓ for the equivalents of Page Up and Page Down, and ⌥+← and ⌥+→ to move by word left or right. These keys become second nature because you use them constantly.</p>
</li>
<li>
<p>If you&rsquo;re in a text editor (Mail.app, Safari, TextEdit, and so on) and the text is too small to read comfortably, use ⌘-Shift-&rsquo;+&rsquo; to increase the font size and ⌘-Shift-&rsquo;-&rsquo; to decrease it. To zoom in on an image or small detail, hold Ctrl and drag two fingers up on the trackpad to zoom in, or two fingers down to zoom out.</p>
</li>
<li>
<p>Still on text: if you select a passage in any application, you can drag it to the desktop or another folder in Finder. It&rsquo;s saved as a &ldquo;snippet,&rdquo; like a persistent clipboard item you can drag back into another text editor or leave on the desktop until you decide what to do with it.</p>
</li>
<li>
<p>All MacBooks, including older ones, have always had a two-finger multi-touch action for scrolling. Just slide two fingers, without clicking, up or down on the trackpad to scroll, for example in Safari.</p>
</li>
<li>
<p>Before Lion, there was a feature to encrypt your files in real time. It was called FileVault and was bad enough to ignore. But from Lion onward, <strong>FileVault 2</strong> arrived, completely different and this time so good it would be foolish not to use it. Open &ldquo;System Preferences, Security &amp; Privacy,&rdquo; the &ldquo;FileVault&rdquo; tab, and enable full disk encryption. <strong>VERY IMPORTANT:</strong> it generates secure keys that allow decryption of your data. Write them down somewhere safe and <strong>never lose them</strong>. One tip: grab your iPhone or any smartphone with a camera and take a photo of the screen when it shows you the keys.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.29.06%20PM_original.png?1334957491" alt=""  loading="lazy" /></p>
<ul>
<li>From Lion onward there&rsquo;s <a href="http://web.archive.org/web/20120522082049/http://www.apple.com/br/macosx/whats-new/mission-control.html"target="_blank" rel="noopener">Mission Control</a>, which you activate by placing four fingers on the trackpad and swiping up. It&rsquo;s a replacement for the old Exposé and genuinely handy once you get used to it. When &ldquo;maximized,&rdquo; applications become their own parallel &ldquo;Space,&rdquo; and you navigate between them by swiping 3 fingers left or right. The default, though, has these Spaces rearranging automatically based on usage. I don&rsquo;t like that, because I prefer my applications and desktops always in the same position (in Mission Control you can drag Spaces to wherever you like). To disable the forced rearrangement, go to &ldquo;System Preferences, Mission Control&rdquo; and turn off &ldquo;Automatically rearrange spaces based on most recent use.&rdquo;</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%205.57.35%20PM_original.png?1334955644" alt=""  loading="lazy" /></p>
<ul>
<li>Also from Lion onward, the way you save files changed a lot. There&rsquo;s now an &ldquo;Auto Save&rdquo; feature. So if an unexpected crash happens, or you have to force-shutdown the machine, or any drastic situation where you&rsquo;d lose what you were editing, don&rsquo;t worry, because Lion is saving automatically. There is one annoyance, though: the file sometimes gets a &ldquo;Lock&rdquo; that prevents you from editing it. You can unlock it manually, but it&rsquo;s a hassle. I prefer to turn it off by going to &ldquo;System Preferences, Time Machine,&rdquo; clicking the &ldquo;options&rdquo; button, and disabling &ldquo;Lock documents.&rdquo; While you&rsquo;re there, check the photo below for how to do that, and also what I keep on my Time Machine exclusion list, things I&rsquo;d rather not back up either because they don&rsquo;t matter (Software Images, for example) or because I prefer to back them up manually (iPhoto).</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.38.10%20PM_original.png?1334958088" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Still on the new Lion way of handling documents and versions: in new applications you now have a &ldquo;Save a version&rdquo; option in the menu, so you can save moments in time in case you need to go back and recover an earlier state. Think of it as a mini Time Machine or granular backup. One option that no longer exists is &ldquo;Save As,&rdquo; which let you save the same file under a different name. Instead the operation is a bit more annoying: first &ldquo;Duplicate&rdquo; (all in the same main &ldquo;File&rdquo; menu) and then &ldquo;Save&rdquo; to store it under a different name. Get used to it; it&rsquo;s annoying at first but becomes trivial.</p>
</li>
<li>
<p>The Mac has plenty of unexpected surprises. In the main menu, the item with the application&rsquo;s name always has a sub-item called &ldquo;Services.&rdquo; Try selecting a block of text in any application, then go to the &ldquo;Services&rdquo; menu, then &ldquo;Speech,&rdquo; then &ldquo;Start Speaking Text,&rdquo; and the Mac reads the selected text aloud. Unfortunately there&rsquo;s no option in Portuguese.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_11_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>In Finder you have the &ldquo;Go&rdquo; menu, then &ldquo;Connect to Server,&rdquo; or the shortcut ⌘+K, to connect to shared folders on other Macs or on your company&rsquo;s Windows file server. For a Windows server you&rsquo;re used to typing something like \server\folder. On the Mac you type something like smb://server.domain/folder. If your server is Windows 2000 or later, include the full server name, including the root domain of your directory. Usually that&rsquo;s all you need.</p>
</li>
<li>
<p>There&rsquo;s no shortcut to force-lock your computer so nobody can access it while you&rsquo;re away. One way is the screen saver. First, open &ldquo;System Preferences&rdquo; and &ldquo;Security&rdquo; and enable &ldquo;Require password to wake this computer from sleep or screen saver.&rdquo; Now, still in &ldquo;System Preferences,&rdquo; choose &ldquo;Desktop &amp; Screen Saver,&rdquo; then &ldquo;Screen Saver.&rdquo; On that screen there&rsquo;s a &ldquo;Hot Corners&rdquo; option where you can pick a corner that starts the screensaver when you move the mouse there. That gives you a quick way to lock your computer.</p>
</li>
<li>
<p>Every time you download a program from the internet, the first time you run it the Mac shows you the URL it was downloaded from and asks for confirmation. To be prompted whenever you or something tries to modify a system setting, go to &ldquo;System Preferences,&rdquo; &ldquo;Security,&rdquo; and enable &ldquo;Require password to unlock each System Preferences pane.&rdquo; The Mac warns you whenever something tries to escalate authority, and you enter your administrator password to confirm. For Linux users, it&rsquo;s like using &ldquo;sudo&rdquo; in the Terminal. The Mac is quite secure: its architecture keeps trivial malware from taking over the machine the way it does on Windows, and that has nothing to do with market share, since the user has to explicitly do something foolish to get compromised. Antivirus is only useful to make sure you don&rsquo;t forward someone an infected attachment you received. Your machine stays fine, but you might pass the virus along by accident.</p>
</li>
<li>
<p>You&rsquo;ll miss programs like Norton Utilities because you simply don&rsquo;t need them. For a defragmenter, for example, Mac OS defragments automatically for you. Also understand that your filesystem is HFS+, not FAT or NTFS. One quirk is that HFS+ has <a href="http://en.wikipedia.org/wiki/Resource_fork"target="_blank" rel="noopener">Resource Forks</a>, so when you copy Mac files to FAT USB drives you end up with what look like &ldquo;duplicate&rdquo; files with an underscore at the start of the name, which is the resource fork representation on filesystems that don&rsquo;t support it. Also understand that every Mac &ldquo;application&rdquo; is actually a folder with a &ldquo;.app&rdquo; extension and an icon. When transporting applications, don&rsquo;t copy them straight to a FAT USB drive; first put them in a DMG or just zip them (the &ldquo;Archive&rdquo; option in the context menu), then copy. Remember too that Unix files have permissions and FAT doesn&rsquo;t preserve them.</p>
</li>
<li>
<p>The equivalent of Windows Startup Items is in &ldquo;System Preferences,&rdquo; &ldquo;Accounts,&rdquo; your user, &ldquo;Login Items.&rdquo;</p>
</li>
<li>
<p>The Mac is a BSD Unix. As such, it has a Terminal application in the Utilities folder. Use Spotlight to reach it easily. It opens a BASH shell, and from there you can manipulate files and programs easily in a POSIX environment. If you come from Linux, you&rsquo;ll feel right at home.</p>
</li>
<li>
<p>Speaking of Linux, one weak spot is the lack of a good package manager. On Ubuntu/Debian we have apt-get; on Redhat/Fedora/CentOS we have Yum. On the Mac there&rsquo;s no standard. My recommendation is <a href="http://web.archive.org/web/20120419165352/http://mxcl.github.com/homebrew/"target="_blank" rel="noopener">HomeBrew</a>, a system for installing and maintaining open source projects. It&rsquo;s not as powerful or robust as Aptitude on Ubuntu, but it does its job well. You&rsquo;ll also come across others like MacPorts and Fink, but they&rsquo;re either outdated or more hassle, so I don&rsquo;t recommend them. See the next tip.</p>
</li>
<li>
<p><a href="https://github.com/mxcl/homebrew"target="_blank" rel="noopener">HomeBrew</a> is the best installer for open-source software like MySQL, PostgreSQL, Redis, Git, Android SDK, and much more. In some cases it downloads the Mac binary directly, but usually it downloads the source code, applies necessary patches, and compiles. For that you need compilers and other tools. The simplest way is to use the <strong>App Store</strong> to buy and download XCode. This tip is more for software developers; if you&rsquo;re not one, you can ignore it.</p>
</li>
<li>
<p>Every Mac comes with Apache 2 pre-installed. It&rsquo;s hidden under the name &ldquo;Web Sharing.&rdquo; You&rsquo;ll find it in System Preferences, &ldquo;Sharing,&rdquo; then &ldquo;Web Sharing.&rdquo; When you turn this on or off, you&rsquo;re dealing with Apache 2, which by default looks at the &ldquo;Sites&rdquo; folder in your Users/Home directory. Another option, &ldquo;Remote Login,&rdquo; enables or disables OpenSSH access. &ldquo;Screen Sharing,&rdquo; in turn, activates a VNC server, so a VNC client on Windows can also share the screen of your Mac.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_10_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>One weakness fixed from Snow Leopard onward is the Firewall. On Leopard and earlier it ships disabled. Open System Preferences again, option &ldquo;Security,&rdquo; then &ldquo;Firewall.&rdquo; It comes set to &ldquo;Allow all incoming connections.&rdquo; Change it at minimum to &ldquo;Allow only essential services&rdquo; or, better, &ldquo;Set access for specific services and applications,&rdquo; which works as a whitelist. Everything is blocked by default, and only the applications you select in the box below get open ports.</p>
</li>
<li>
<p>Lion is the most practical version for disaster recovery. There&rsquo;s no more boot DVD. Every Mac now has a hidden partition with the installer, for when you need to reinstall, check disks, or do other things. Just boot while holding (Command-R) ⌘-R, or hold the (Option) ⌥ key during boot to get a menu with the available partitions and choose &ldquo;Recovery HD.&rdquo;</p>
</li>
</ul>
<p><a href="http://www.apple.com/macosx/recovery/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/commandr_original.jpg?1334958455" alt=""  loading="lazy" /></a></p>
<ul>
<li>Finally, to impress your friends: when you minimize a window, use Exposé, or activate the Dashboard, all these actions have animated transitions. Hold the &ldquo;Shift&rdquo; key at the same time and the animation plays in <em>slow motion</em>, showing every step of the transition at slow speed :-)</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_18_original.png" alt=""  loading="lazy" /></p>
<h3>Applications<span class="hx:absolute hx:-mt-20" id="applications"></span>
    <a href="#applications" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Some of the applications below are on the Mac App Store, and I always recommend checking there first. Otherwise, follow the links and download manually. At the end of this section I have a tip on keeping your applications up to date.</p>
<ul>
<li>
<p>If you have an iPad, you can use it as a second monitor connected to your Mac over Wi-Fi (both need to be on the same network). For this, buy <a href="http://web.archive.org/web/20120420081551/http://avatron.com/apps/air-display"target="_blank" rel="noopener">Air Display</a>.</p>
</li>
<li>
<p>If you have a new Apple TV (the small black model), you can mirror the screen of your iPhone 4S, iPad 2, or later over Wi-Fi using the <a href="http://support.apple.com/kb/HT4437?viewlocale=pt_PT&amp;locale=pt_PT"target="_blank" rel="noopener">Air Play</a> feature on iOS. The next version of Mac, Mountain Lion, will let you do the same from your Mac. Until then, you can still mirror your Mac to an HDTV via Apple TV by buying <a href="http://airparrot.com/"target="_blank" rel="noopener">Air Parrot</a>. It&rsquo;s the simplest way to watch movies and videos from your Mac straight on your TV.</p>
</li>
<li>
<p>I personally love reading a lot of RSS and Atom feeds in my Google Reader account, and the best Mac and iOS app for that is easily <a href="http://reederapp.com/mac/"target="_blank" rel="noopener">Reeder</a>.</p>
</li>
<li>
<p>With so much internet content, you download a lot but don&rsquo;t always know which files are eating the most disk space. To find them (tip: most of the time it&rsquo;s your video podcasts in iTunes) there are excellent paid apps like <a href="http://www.daisydiskapp.com/"target="_blank" rel="noopener">DaisyDisk</a>, but I still like the free <a href="http://grandperspectiv.sourceforge.net/"target="_blank" rel="noopener">GrandPerspective</a>.</p>
</li>
<li>
<p>OS X handles compressed formats like zip and gz on its own. But to decompress more interesting formats like 7-zip and rar, be sure to install <a href="http://wakaba.c3.cx/s/apps/unarchiver.html"target="_blank" rel="noopener">The Unarchiver</a>.</p>
</li>
<li>
<p>For applications, use sites like Apple&rsquo;s own to see what&rsquo;s <a href="http://www.apple.com/downloads/macosx/index_top.html"target="_blank" rel="noopener">most popular</a>. To start, you&rsquo;ll want <a href="http://perian.org"target="_blank" rel="noopener">Perian</a> for more video codecs, <a href="http://www.telestream.net/flip4mac-wmv/overview.htm"target="_blank" rel="noopener">Flip4Mac</a> for Windows codecs, and <a href="http://www.videolan.org/vlc/download-macosx.html"target="_blank" rel="noopener">VLC</a> for a player that handles all the strangest codecs.</p>
</li>
<li>
<p>To rip DVDs and create mp4 files, use the freeware <a href="http://handbrake.fr/"target="_blank" rel="noopener">HandBrake</a>. To convert videos for iPod and iPhone, use <a href="http://www.macupdate.com/info.php/id/19769"target="_blank" rel="noopener">iSquint</a>. To create, edit, and convert subtitle files, use <a href="http://www.fluffalopefactory.com/miyu/"target="_blank" rel="noopener">Miyu</a> and <a href="http://www.bitfield.se/submerge/index.html"target="_blank" rel="noopener">Submerge</a>.</p>
</li>
<li>
<p>For presentations, forget Powerpoint. It&rsquo;s very <strong>worth</strong> buying <a href="http://web.archive.org/web/20110107211503/http://www.apple.com/iwork/download-trial/"target="_blank" rel="noopener">iWork</a> to use the famous Keynote. The iLife and iWork suites are all on the App Store, so buy them there.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/whatsnew-hero-20090106_original.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>For communication, use <a href="http://adium.im/"target="_blank" rel="noopener">Adium</a>, a client for Jabber, Messenger, Yahoo, AIM, and more, one of the best around, though it doesn&rsquo;t yet support video chat for Messenger. The classic <a href="http://www.skype.com/intl/pt/download/skype/macosx/"target="_blank" rel="noopener">Skype</a> is another great option. If you like IRC, one of the best clients is <a href="http://web.archive.org/web/20090717071516/http://colloquy.info/"target="_blank" rel="noopener">Colloquy</a>.</p>
</li>
<li>
<p>You want to run Windows or some Linux distro. The option that comes with the Mac is Bootcamp (in Utilities), to repartition your HD and install a second operating system. Before that, though, I recommend virtualization products like the open-source <a href="http://www.virtualbox.org/wiki/Downloads"target="_blank" rel="noopener">VirtualBox</a>, or the commercial <a href="http://www.parallels.com/download/desktop/"target="_blank" rel="noopener">Parallels Desktop</a> or <a href="http://web.archive.org/web/20090719015503/http://www.vmware.com/products/fusion/"target="_blank" rel="noopener">VMWare Fusion</a>. They&rsquo;re all very good. With them you can run Windows XP or Windows 7 (I don&rsquo;t recommend Vista unless you have a desktop Mac with more than 4GB of RAM), Ubuntu, Fedora, and so on. In most cases, even heavy stuff like SQL Server with Visual Studio works great. For games, no, better to dual-boot, or better yet, buy a PlayStation 3 or Xbox 360.</p>
</li>
<li>
<p>The Mac is quite secure. Things like saving passwords in Safari go into an infrastructure called Keychain, an encrypted, secure storage. You can even encrypt your entire Home folder if you want. For other things, like sharing authentication data across multiple browsers or just storing notes securely, I suggest <a href="http://agilewebsolutions.com/products/1Password"target="_blank" rel="noopener">1Password</a>, one of the best out there.</p>
</li>
<li>
<p>Macs normally don&rsquo;t need uninstallers. For the vast majority of programs you just drag them to the Applications folder, so you delete them from there. They do leave behind a few artifacts, like files in the Library/Preferences directory. Normally it&rsquo;s fine to leave them; they&rsquo;re tiny and don&rsquo;t corrupt anything like a Registry. But if you&rsquo;re the paranoid type who needs to remove everything, use <a href="http://www.appzapper.com/"target="_blank" rel="noopener">AppZapper</a>, which does it for you.</p>
</li>
<li>
<p>Anyone who&rsquo;s watched Mac screencasts online might wonder, <em>&ldquo;How do they do that?&rdquo;</em> One of the secrets is the commercial <a href="http://www.telestream.net/screen-flow/overview.htm"target="_blank" rel="noopener">ScreenFlow</a>, by far one of the best, most performant, and easiest to use. Worth every cent. To record the keyboard shortcuts you&rsquo;re using as a layer on top of your video, use <a href="http://web.archive.org/web/20090801050033/http://stephendeken.net/software/keycastr/"target="_blank" rel="noopener">KeyCastr</a>. For mouse effects like focus and others, use <a href="http://web.archive.org/web/20090802092433/http://www.omnigroup.com/applications/omnidazzle/download/"target="_blank" rel="noopener">OmniDazzle</a>.</p>
</li>
</ul>
<p><a href="http://peepcode.com/products/screencasting-on-the-mac"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/screencasting-on-the-mac_original.png" alt=""  loading="lazy" /></a></p>
<ul>
<li>
<p>The Mac needs very little maintenance, and most tools are already built into the operating system. As a visual shell to reach them more easily, use <a href="http://web.archive.org/web/20090802092434/http://www.titanium.free.fr/pgs2/english/download.html"target="_blank" rel="noopener">Onyx</a>, which runs all the maintenance scripts at once. Sometimes, when your Mac starts behaving strangely, running Onyx helps a lot, though that situation is very rare.</p>
</li>
<li>
<p>As a text editor there&rsquo;s no getting around it: after 3 years my favorite is still TextMate. If you&rsquo;re more of a Linux purist, you might prefer <a href="http://code.google.com/p/macvim/"target="_blank" rel="noopener">MacVim</a>, especially with my <a href="http://web.archive.org/web/20090725080422/http://akitaonrails.com/2009/04/27/the-best-environment-for-rails-on-windows-part-2"target="_blank" rel="noopener">Ruby snippets package</a> :-) Beyond those, there are dozens of other editors, but none really appealed to me. A plugin that makes TextMate even nicer is <a href="http://code.google.com/p/textmate-missingdrawer/"target="_blank" rel="noopener">MissingDrawer</a>, which I recommend trying. If you&rsquo;re a developer, follow my <a href="http://web.archive.org/web/20091005093524/http://github.com/akitaonrails/vimfiles"target="_blank" rel="noopener">vimfiles</a> repository to get your Vim pre-configured with the best of what&rsquo;s available.</p>
</li>
<li>
<p>For downloaders, Mozilla Firefox has various extensions, or if you&rsquo;re a solid Linux user you&rsquo;ll know how to use good old curl. But if you want something more visual, an excellent commercial alternative is <a href="http://yazsoft.com/"target="_blank" rel="noopener">Speed Download</a>, which has options for parallel downloads, resuming interrupted downloads, and so on. Still on downloads, if you&rsquo;re into BitTorrent, one of the best clients is <a href="http://web.archive.org/web/20090719033742/http://www.transmissionbt.com/download.php"target="_blank" rel="noopener">Transmission</a>.</p>
</li>
<li>
<p>For burning DVDs, the Mac handles it reasonably well on its own. But if you want more control and detail, one of the most traditional and best commercial options is <a href="http://www.roxio.com/enu/products/toast/default.html"target="_blank" rel="noopener">Toast</a> by Roxio, the equivalent of Nero on Windows. For something simpler there&rsquo;s <a href="http://web.archive.org/web/20090721195744/http://www.discoapp.com/"target="_blank" rel="noopener">Disco</a>, one of the most visually beautiful, with a feature that keeps a database of DVDs you&rsquo;ve burned to make searches easier. And a decent freeware is <a href="http://burn-osx.sourceforge.net/Pages/English/home.html"target="_blank" rel="noopener">Burn</a>.</p>
</li>
<li>
<p>Even though Time Machine already does an excellent job of backup, <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html"target="_blank" rel="noopener">SuperDuper!</a> remains an excellent alternative. It makes a bit-for-bit image of your system, supports delta updates, and lets you create bootable external hard drives. It&rsquo;s a good thing to do before anything drastic, like installing a new version of Mac OS. It&rsquo;s the equivalent of Norton Ghost on Windows.</p>
</li>
<li>
<p>If you&rsquo;re a developer using Git with Gitk, you can install Git via <a href="http://web.archive.org/web/20120419165352/http://mxcl.github.com/homebrew/"target="_blank" rel="noopener">HomeBrew</a> (with HomeBrew installed, just open a Terminal and use &ldquo;brew install git&rdquo;) and then use <a href="http://gitx.frim.nl/"target="_blank" rel="noopener">Gitx</a> instead of the ugly Gitk. It uses Cocoa components, so it has the look and feel of a native Mac app.</p>
</li>
<li>
<p>If you have an iPod, know that it can play Audiobooks. Unlike mp3 and aac, the standard audiobook format is m4b, or mpeg-4 with bookmark support. That&rsquo;s very important because mp3 has no bookmarks, and when a book is 20 hours long it&rsquo;s painful if your iPod loses your place, or worse, if you want to navigate between chapters of a 40-hour book. If you have audiobooks in mp3, use <a href="http://www.splasm.com/audiobookbuilder/"target="_blank" rel="noopener">Audiobook Builder</a>, which compiles all the mp3s into a single m4b that your iTunes syncs to your iPod.</p>
</li>
<li>
<p>You were a Windows developer with dozens of e-books in Microsoft&rsquo;s CHM (compiled HTML) format. Fortunately, on the Mac you have the open-source reader <a href="http://chmox.sourceforge.net/"target="_blank" rel="noopener">Chmox</a>.</p>
</li>
<li>
<p>Say you have two computers, or some external hard drives, and you need to keep some folders in sync. Again, if you&rsquo;re a solid Linux user, you can comfortably use &ldquo;rsync&rdquo; from the command line. But if you want a visual shell for rsync, a great option is <a href="http://www.econtechnologies.com/pages/cs/chrono_overview.html"target="_blank" rel="noopener">ChronoSync</a>, which allows bi-directional synchronization and much more. It&rsquo;s how I keep two 500GB external hard drives synced through my Mac Mini, a poor man&rsquo;s RAID 1 :-)</p>
</li>
<li>
<p>A well-known subsystem is <a href="http://web.archive.org/web/20090722012006/http://www.growl.info/"target="_blank" rel="noopener">Growl</a>, a notification infrastructure. For example, when an application like Transmission finishes a download, it sends a message to Growl, which pops up on your desktop to notify you. Adium also uses it to show who came online, and so on. Growl ships with plugins for iTunes and Mail.app, plus a command-line tool to integrate with other applications.</p>
</li>
<li>
<p>Mail.app is organized with a list of emails on top and a view of the selected email below. Some prefer vertical bars instead of horizontal, more like Outlook. In that case use the <a href="http://web.archive.org/web/20090802092437/http://harnly.net/software/letterbox/"target="_blank" rel="noopener">LetterBox</a> plugin for Mail.app.</p>
</li>
<li>
<p>A famous but more advanced application is the legendary <a href="http://quicksilver.en.softonic.com/"target="_blank" rel="noopener">QuickSilver</a>, which some see only as a fast way to find applications, but which is really a sophisticated environment for chaining functionality. You can, for example, find and select several files, attach them to an email, and send it to an address in your Address Book. It has dozens of plugins and themes for customization. It&rsquo;s interesting at first, and there are various clones with the same idea, but in the end you&rsquo;ll notice you mostly use it just to find applications. And for that, the simplest thing is Command ⌘ + Space to activate Spotlight (the magnifying glass in the upper-right corner) and type the application&rsquo;s name. Same for finding documents. I find it more practical and faster.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_12_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Those coming from Windows might still need to reach their old machine, or at the office deal with Windows programs. Fortunately, Windows has RDP (Remote Desktop Protocol) for remote access. On the Mac the best option is <a href="http://cord.sourceforge.net/"target="_blank" rel="noopener">CoRD</a>, the equivalent of a Terminal Client.</p>
</li>
<li>
<p>A very useful utility for monitoring your CPU, RAM, disk, and network usage is <a href="http://www.apple.com/downloads/dashboard/status/istatpro.html"target="_blank" rel="noopener">iStat Pro</a>, which has a widget version for the Dashboard, or <a href="http://web.archive.org/web/20090717080452/http://www.islayer.com/apps/istatmenus/"target="_blank" rel="noopener">iStat Menu</a> for the top menu bar. I personally prefer the second, but both are very good.</p>
</li>
<li>
<p>A well-known benchmarker in the Mac world is <a href="http://www.xbench.com/"target="_blank" rel="noopener">XBench</a>, which tests your Mac and lets you compare results on their website against other Macs.</p>
</li>
<li>
<p>The last tip is to create an account on <a href="http://www.macupdate.com/"target="_blank" rel="noopener">MacUpdate</a> and then download the <a href="http://www.macupdate.com/desktop/"target="_blank" rel="noopener">MacUpdate Desktop</a> software. Open it occasionally and it tells you everything that&rsquo;s outdated on your machine, letting you pick what to update:</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.14.40%20PM_original.png?1334956624" alt=""  loading="lazy" /></p>
<h3>History<span class="hx:absolute hx:-mt-20" id="history"></span>
    <a href="#history" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>To understand Mac OS X, you need to understand its history. For that, the best set of articles are the ones ArsTechnica has written since 2000:</p>
<ul>
<li>
<p><a href="http://arstechnica.com/reviews/4q99/macos-x-dp2/macos-x-dp2-1.html"target="_blank" rel="noopener">Mac OS X DP2: A Preview</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/1q00/macos-x-gui/macos-x-gui-1.html"target="_blank" rel="noopener">Mac OS X Update: Quartz &amp; Aqua</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/1q00/macos-x-dp3/macos-x-dp3-1.html"target="_blank" rel="noopener">Mac OS X DP3: Trial by Water</a></p>
</li>
<li>
<p><a href="http://www.arstechnica.com/reviews/2q00/macos-x-dp4/macos-x-dp4-1.html"target="_blank" rel="noopener">Mac OS X DP4</a></p>
</li>
<li>
<p><a href="http://www.arstechnica.com/reviews/2q00/macos-qna/macos-x-qa-1.html"target="_blank" rel="noopener">Mac OS X Q &amp; A</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/4q00/macosx-pb1/macos-x-beta-1.html"target="_blank" rel="noopener">Mac OS X Public Beta</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/01q1/macwldsf/mwsf-2.html"target="_blank" rel="noopener">MWSF: Mac OS X Post-Beta</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/01q2/macos-x-final/macos-x-1.html"target="_blank" rel="noopener">Mac OS X 10.0 Cheetah</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2001/10/macosx-10-1.ars"target="_blank" rel="noopener">Mac OS X 10.1 Puma</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2002/09/macosx-10-2.ars"target="_blank" rel="noopener">Mac OS X 10.2 Jaguar</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2003/11/macosx-10-3.ars"target="_blank" rel="noopener">Mac OS X 10.3 Panther</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2005/04/macosx-10-4.ars"target="_blank" rel="noopener">Mac OS X 10.4 Tiger</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars"target="_blank" rel="noopener">Mac OS X 10.5 Leopard: the Ars Technica review</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars"target="_blank" rel="noopener">Mac OS X 10.6 Snow Leopard: the Ars Technica review</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars"target="_blank" rel="noopener">Mac OS X 10.6 Lion: the Ars Technica review</a></p>
</li>
</ul>
<p>Also understand that Mac OS X is completely different from its predecessor, the Mac OS, which ended its life at version 9. When Steve Jobs was forced out of Apple in 1985, he founded the company Next and built the <a href="http://en.wikipedia.org/wiki/Nextstep"target="_blank" rel="noopener">NextStep</a> operating system, a 32-bit, multitasking OS with a Mach-based kernel. Watch Steve Jobs himself <a href="http://www.youtube.com/watch?v=j02b8Fuz73A"target="_blank" rel="noopener">demonstrating NextStep</a> version 3. NextStep was later opened as a standard together with Sun as <a href="http://en.wikipedia.org/wiki/OpenStep"target="_blank" rel="noopener">OpenStep</a>. The <a href="http://www.windowmaker.info/"target="_blank" rel="noopener">WindowMaker</a> window manager is inspired by OpenStep and supports its open-source implementation, <a href="http://gnustep.org/"target="_blank" rel="noopener">GNUStep</a>. Later, in 1997, Apple reacquired Next, and NextStep became the foundation for Mac OS X. Its development framework was renamed <a href="http://en.wikipedia.org/wiki/Cocoa_%28API%29"target="_blank" rel="noopener">Cocoa</a>, which is why the development APIs have names like NSString and NSWindow, where &ldquo;NS&rdquo; stands for &ldquo;NextStep.&rdquo;</p>
]]></content:encoded><category>apple</category><category>developer-tools</category><category>learning</category><category>off-topic</category></item><item><title>Off Topic: Steve Jobs, Stanford Commencement Speech, 2005</title><link>https://akitaonrails.github.io/en/2007/06/13/off-topic-steve-jobs-discurso-em-stanford-2005/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2007/06/13/off-topic-steve-jobs-discurso-em-stanford-2005/</guid><pubDate>Wed, 13 Jun 2007 21:51:03 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="http://web.archive.org/web/20100424021122/http://news-service.stanford.edu/news/2005/june15/jobs-061505.html"target="_blank" rel="noopener"&gt;Stanford Report, June 14, 2005&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the translation of the commencement address Steve Jobs delivered to Stanford University&amp;rsquo;s graduating class on June 12, 2005. Coincidentally, I stumbled across this video again exactly two years later.&lt;/p&gt;
&lt;p&gt;We all know Steve Jobs gives excellent speeches, but this one is particularly interesting. Deep down it may sound corny, even dated, but it holds some of the lessons I learned myself. The irony is that the only people who will appreciate this text are the ones who already know what it means.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Source:</strong> <a href="http://web.archive.org/web/20100424021122/http://news-service.stanford.edu/news/2005/june15/jobs-061505.html"target="_blank" rel="noopener">Stanford Report, June 14, 2005</a></p>
<p>This is the translation of the commencement address Steve Jobs delivered to Stanford University&rsquo;s graduating class on June 12, 2005. Coincidentally, I stumbled across this video again exactly two years later.</p>
<p>We all know Steve Jobs gives excellent speeches, but this one is particularly interesting. Deep down it may sound corny, even dated, but it holds some of the lessons I learned myself. The irony is that the only people who will appreciate this text are the ones who already know what it means.</p>
<p>I also recommend watching the video, available on <a href="http://www.youtube.com/watch?v=D1R-jKKp3NA"target="_blank" rel="noopener">YouTube!</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/grad_jobswalks.jpg" alt=""  loading="lazy" /></p>
<p><em>I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I&rsquo;ve ever gotten to a college graduation. Today I want to tell you three stories from my life. That&rsquo;s it. No big deal. Just three stories.</em></p>
<p>The first story is about connecting the dots.</p>
<h3>Connecting the Dots<span class="hx:absolute hx:-mt-20" id="connecting-the-dots"></span>
    <a href="#connecting-the-dots" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?</p>
<p>It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: &ldquo;We have an unexpected baby boy; do you want him?&rdquo; They said: &ldquo;Of course.&rdquo; My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.</p>
<p>And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents&rsquo; savings were being spent on my college tuition. After six months, I couldn&rsquo;t see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn&rsquo;t interest me, and begin dropping in on the ones that looked interesting.</p>
<p>It wasn&rsquo;t all romantic. I didn&rsquo;t have a dorm room, so I slept on the floor in friends&rsquo; rooms, I returned coke bottles for the 5¢ deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:</p>
<p>Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn&rsquo;t have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can&rsquo;t capture, and I found it fascinating.</p>
<p>None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.</p>
<p>Again, you can&rsquo;t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.</p>
<p>My second story is about love and loss.</p>
<h3>Love and Loss<span class="hx:absolute hx:-mt-20" id="love-and-loss"></span>
    <a href="#love-and-loss" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.</p>
<p>I really didn&rsquo;t know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down - that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me — I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.</p>
<p>I didn&rsquo;t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.</p>
<p>During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I returned to Apple, and the technology we developed at NeXT is at the heart of Apple&rsquo;s current renaissance. And Laurene and I have a wonderful family together.</p>
<p>I&rsquo;m pretty sure none of this would have happened if I hadn&rsquo;t been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don&rsquo;t lose faith. I&rsquo;m convinced that the only thing that kept me going was that I loved what I did. You&rsquo;ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven&rsquo;t found it yet, keep looking. Don&rsquo;t settle. As with all matters of the heart, you&rsquo;ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don&rsquo;t settle.</p>
<p>My third story is about death.</p>
<h3>Death<span class="hx:absolute hx:-mt-20" id="death"></span>
    <a href="#death" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>When I was 17, I read a quote that went something like: &ldquo;If you live each day as if it was your last, someday you&rsquo;ll most certainly be right.&rdquo; It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: &ldquo;If today were the last day of my life, would I want to do what I am about to do today?&rdquo; And whenever the answer has been &ldquo;No&rdquo; for too many days in a row, I know I need to change something.</p>
<p>Remembering that I&rsquo;ll be dead soon is the most important tool I&rsquo;ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.</p>
<p>About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn&rsquo;t even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor&rsquo;s code for prepare to die. It means to try to tell your kids everything you thought you&rsquo;d have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.</p>
<p>I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I&rsquo;m fine now.</p>
<p>This was the closest I&rsquo;ve been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:</p>
<p>No one wants to die. Even people who want to go to heaven don&rsquo;t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life&rsquo;s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.</p>
<p>Your time is limited, so don&rsquo;t waste it living someone else&rsquo;s life. Don&rsquo;t be trapped by dogma — which is living with the results of other people&rsquo;s thinking. Don&rsquo;t let the noise of others&rsquo; opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.</p>
<p>When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960&rsquo;s, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.</p>
<p>Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: &ldquo;Stay Hungry. Stay Foolish.&rdquo; It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.</p>
<p>Stay Hungry. Stay Foolish.</p>
<p>Thank you all very much.</p>
<p>© Stanford University. All Rights Reserved. Stanford, CA 94305. (650) 723-2300.</p>
]]></content:encoded><category>apple</category><category>philosophy</category><category>personal</category><category>off-topic</category></item><item><title>Off Topic: "Here's to the crazy ones ..."</title><link>https://akitaonrails.github.io/en/2007/01/27/off-topic-heres-to-the-crazy-ones/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2007/01/27/off-topic-heres-to-the-crazy-ones/</guid><pubDate>Sat, 27 Jan 2007 16:02:14 -0200</pubDate><description>&lt;p&gt;&lt;strong&gt;Source: &lt;a href="http://macmagazine.com.br/blog/page/54/"target="_blank" rel="noopener"&gt;Blog.MacMagazine.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This commercial marks Apple&amp;rsquo;s comeback from the ashes, Steve Jobs&amp;rsquo;s return to the helm. The &amp;ldquo;Think Different&amp;rdquo; campaign turns 10 this year, the post that reminded me of it is also somewhat &lt;a href="http://macmagazine.com.br/blog/2006/06/15/think-different-apple/"target="_blank" rel="noopener"&gt;old&lt;/a&gt;, but the message is still completely relevant. It even applies to us Railers: it would make a great ad from a company like 37signals. Enjoy.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/2006_06_15-thinkdifferent.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s to the crazy ones.&lt;/p&gt;
&lt;p&gt;The misfits.&lt;br&gt;
The rebels.&lt;br&gt;
The troublemakers.&lt;br&gt;
The round pegs in the square holes.&lt;br&gt;
The ones who see things differently.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Source: <a href="http://macmagazine.com.br/blog/page/54/"target="_blank" rel="noopener">Blog.MacMagazine.com</a></strong></p>
<p>This commercial marks Apple&rsquo;s comeback from the ashes, Steve Jobs&rsquo;s return to the helm. The &ldquo;Think Different&rdquo; campaign turns 10 this year, the post that reminded me of it is also somewhat <a href="http://macmagazine.com.br/blog/2006/06/15/think-different-apple/"target="_blank" rel="noopener">old</a>, but the message is still completely relevant. It even applies to us Railers: it would make a great ad from a company like 37signals. Enjoy.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2006_06_15-thinkdifferent.png" alt=""  loading="lazy" /></p>
<p>Here&rsquo;s to the crazy ones.</p>
<p>The misfits.<br>
The rebels.<br>
The troublemakers.<br>
The round pegs in the square holes.<br>
The ones who see things differently.</p>
<p>They&rsquo;re not fond of rules.<br>
And they have no respect for the status quo.</p>
<p>You can praise them, disagree with them, quote them,<br>
disbelieve them, glorify or vilify them.<br>
About the only thing that you can&rsquo;t do, is ignore them.</p>
<p>Because they change things.</p>
<p>They invent. They imagine. They heal.<br>
They explore. They create. They inspire.<br>
They push the human race forward.</p>
<p>Maybe they have to be crazy.</p>
<p>How else can you stare at an empty canvas and see a work of art?<br>
Or, sit in silence and hear a song that hasn&rsquo;t been written?<br>
Or, gaze at a red planet and see a laboratory on wheels?</p>
<p>We make tools for these kinds of people.<br>
While some may see them as the crazy ones, we see genius.</p>
<p>Because the ones who are crazy enough<br>
to think that they can change the world,</p>
<p>are the ones who do.</p>
]]></content:encoded><category>apple</category><category>philosophy</category><category>business</category><category>off-topic</category></item><item><title>Off-topic: MacWorld 2007 - Steve Jobs Announces the Long-Awaited iPhone!</title><link>https://akitaonrails.github.io/en/2007/01/09/off-topic-macworld-2007-steve-jobs-anuncia-o-esperado-iphone/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2007/01/09/off-topic-macworld-2007-steve-jobs-anuncia-o-esperado-iphone/</guid><pubDate>Tue, 09 Jan 2007 11:34:34 -0200</pubDate><description>&lt;p&gt;&lt;strong&gt;This keynote just went down in history. Period.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0159.jpg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Every self-respecting Railer loves Apple, so I&amp;rsquo;m sure everyone already knows: Steve Jobs&amp;rsquo;s keynote at MacWorld 2007 in San Francisco just wrapped up (17:07). The rumors over the past few days were enormous, no keynote was ever this anticipated, and Jobs did not disappoint. Details, transcript, and photos in &lt;a href="http://www.engadget.com/2007/01/09/live-from-macworld-2007-steve-jobs-keynote/"target="_blank" rel="noopener"&gt;Engadget&amp;rsquo;s&lt;/a&gt; live coverage.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0182.jpg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Apple TV aside (the prototype, still called &lt;em&gt;iTV&lt;/em&gt; back then, was shown at a special event in September 2006), the star of the show was the &lt;strong&gt;iPhone&lt;/strong&gt;: an iPod, a phone, and an internet communicator, as Jobs put it, 3 in 1. The standards for cell phones and smartphones just went down the drain; Apple raised the bar to stratospheric levels. The list:&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>This keynote just went down in history. Period.</strong></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0159.jpg" alt=""  loading="lazy" /></p>
<p>Every self-respecting Railer loves Apple, so I&rsquo;m sure everyone already knows: Steve Jobs&rsquo;s keynote at MacWorld 2007 in San Francisco just wrapped up (17:07). The rumors over the past few days were enormous, no keynote was ever this anticipated, and Jobs did not disappoint. Details, transcript, and photos in <a href="http://www.engadget.com/2007/01/09/live-from-macworld-2007-steve-jobs-keynote/"target="_blank" rel="noopener">Engadget&rsquo;s</a> live coverage.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0182.jpg" alt=""  loading="lazy" /></p>
<p>Apple TV aside (the prototype, still called <em>iTV</em> back then, was shown at a special event in September 2006), the star of the show was the <strong>iPhone</strong>: an iPod, a phone, and an internet communicator, as Jobs put it, 3 in 1. The standards for cell phones and smartphones just went down the drain; Apple raised the bar to stratospheric levels. The list:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0184.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>4GB or 8GB of flash memory</li>
<li>3.5&quot; high-resolution screen at 160ppi</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0226.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>Just <strong>1</strong> button; everything else is the multitouch widescreen display with 3 sensors (proximity, ambient light, accelerometer). Want to zoom into a photo? Put two fingers on the screen and spread them apart!</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0199.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>Syncs with iTunes (music, videos, photos, contacts, calendars)</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0186.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>WiFi, Bluetooth 2.0, quad-band GSM+EDGE (in the US, via Cingular/AT&amp;T)</li>
<li>2 Megapixel digital camera</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0210.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>Runs OS X (!), and Safari was shown working as the browser. Integration with Google Maps, Yahoo Mail, POP3, IMAP. Goes well beyond BlackBerry</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0217.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>5 hours of battery life, 16 hours audio-only</li>
<li>Accessories: earphones with an inline microphone (a quick squeeze of the button answers a call) and the smallest, most elegant Bluetooth headset I&rsquo;ve ever seen</li>
</ul>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0228.jpg" alt=""  loading="lazy" /></p>
<p>The prices are steep, but they match an exceptional device: US$499 for the 4GB model and US$599 for the 8GB, with a two-year contract. And starting today <em>Apple Computer, Inc.</em> becomes <em>Apple, Inc.</em>. Makes perfect sense: Apple products are already in our bedrooms (iMac), our offices (MacBook, Mac Pro), our cars (BMW, Audi and others), our living rooms (Apple TV), and our pockets (iPod, iPhone). Impressive, to say the least.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0236.jpg" alt=""  loading="lazy" /></p>
<p>Apple shares closed the day up more than 8%, and Leopard didn&rsquo;t even get a mention! The goal is 1% of a market of nearly 1 billion cell phones sold a year: something like 10 million iPhones by the end of 2008. The product launches in the US in June. I hope it gets here soon!</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/dsc_0233.jpg" alt=""  loading="lazy" /></p>
<p>If anyone finds a download link for the keynote video (I&rsquo;m hoping it hits BitTorrent soon), let me know!</p>
]]></content:encoded><category>apple</category><category>mobile</category><category>computing-history</category><category>off-topic</category></item><item><title>Off-topic: MacWorld 2007 - Steve Jobs Keynote</title><link>https://akitaonrails.github.io/en/2007/01/09/off-topic-macworld-2007-keynote-do-steve-jobs/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2007/01/09/off-topic-macworld-2007-keynote-do-steve-jobs/</guid><pubDate>Tue, 09 Jan 2007 08:18:13 -0200</pubDate><description>&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/welcome2007_20070101.jpg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In less than an hour, 3pm in Brasília, 9am Pacific time, Steve Jobs takes the stage at &lt;a href="http://web.archive.org/web/20070111001057/http://www.macworldexpo.com:80/live/20/"target="_blank" rel="noopener"&gt;MacWorld Conference &amp;amp; Expo 2007&lt;/a&gt; in San Francisco. The keynote can be followed live on several sites (&lt;a href="http://web.archive.org/web/20070111082621/http://www.glennwolsey.com:80/2007/01/09/where-to-watch-live-apple-keynote-updates/"target="_blank" rel="noopener"&gt;see the updated list&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This keynote has spawned dozens of rumors and articles across the industry. &lt;strong&gt;Forbes&lt;/strong&gt; published &lt;a href="https://www.forbes.com/2007/01/08/jobs-apple-macworld-tech-media-cz_rk_0108ces-apple.html"target="_blank" rel="noopener"&gt;All Eyes On Apple and Jobs&lt;/a&gt; yesterday, and for good reason: nobody in the industry builds anticipation like Steve Jobs&amp;rsquo;s Apple.&lt;/p&gt;</description><content:encoded><![CDATA[<p><img src="https://akitaonrails.s3.amazonaws.com/files/welcome2007_20070101.jpg" alt=""  loading="lazy" /></p>
<p>In less than an hour, 3pm in Brasília, 9am Pacific time, Steve Jobs takes the stage at <a href="http://web.archive.org/web/20070111001057/http://www.macworldexpo.com:80/live/20/"target="_blank" rel="noopener">MacWorld Conference &amp; Expo 2007</a> in San Francisco. The keynote can be followed live on several sites (<a href="http://web.archive.org/web/20070111082621/http://www.glennwolsey.com:80/2007/01/09/where-to-watch-live-apple-keynote-updates/"target="_blank" rel="noopener">see the updated list</a>).</p>
<p>This keynote has spawned dozens of rumors and articles across the industry. <strong>Forbes</strong> published <a href="https://www.forbes.com/2007/01/08/jobs-apple-macworld-tech-media-cz_rk_0108ces-apple.html"target="_blank" rel="noopener">All Eyes On Apple and Jobs</a> yesterday, and for good reason: nobody in the industry builds anticipation like Steve Jobs&rsquo;s Apple.</p>
<p>The enigmatic image above showed up on <a href="http://www.apple.com/"target="_blank" rel="noopener">Apple&rsquo;s site</a> a few days ago and fed a good share of that anticipation. What are they trying to say? A simple corporate &ldquo;happy new year&rdquo; message? From Apple? Probably not.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/wwdc-top-secret.png" alt=""  loading="lazy" /></p>
<p>At WWDC 2006, Steve announced some of the headline features of the next operating system, <strong>Mac OS X 10.5 Leopard</strong>, expected to ship this quarter. On that occasion he showed the famous &ldquo;Top Secret&rdquo; slide: there were new features they weren&rsquo;t going to reveal, so Microsoft couldn&rsquo;t copy them ahead of time. Has the moment come for us to finally learn those secrets?</p>
<p>Meanwhile the <a href="http://daringfireball.net/2007/01/macworld_expo_predictions"target="_blank" rel="noopener">rumors</a> keep coming. Will Steve announce his retirement? A new Mac to celebrate Apple&rsquo;s 30th anniversary? A subnotebook MacBook with solid-state storage? The long-rumored <strong>iPhone</strong>, the iPod plus phone combo? An immediate Leopard release?</p>
<p>Or will it be smaller stuff: the already-known iTV, new versions of iTunes and iLife, secondary Leopard details? Or the usual fare, a Mac Mini with a Core 2 Duo and a Mac Pro with the new Dual Quad Xeons?</p>
<p>Keep your eyes open. Steve Jobs&rsquo;s MacWorld keynotes are always explosive. Just remember 1997.</p>
]]></content:encoded><category>apple</category><category>computing-history</category><category>off-topic</category></item></channel></rss>