<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sam Johnson on Medium]]></title>
        <description><![CDATA[Stories by Sam Johnson on Medium]]></description>
        <link>https://medium.com/@DuroSoft?source=rss-d640ab517dbb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*et7PPGaJSHfKLfKoDK8k4A.png</url>
            <title>Stories by Sam Johnson on Medium</title>
            <link>https://medium.com/@DuroSoft?source=rss-d640ab517dbb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:00:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DuroSoft/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[s3cmd is still broken on MacOS— a docker-based solution]]></title>
            <link>https://medium.com/@DuroSoft/s3cmd-is-still-broken-on-macos-a-docker-based-solution-db6a1bca6299?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/db6a1bca6299</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 19:39:33 GMT</pubDate>
            <atom:updated>2019-08-08T19:39:33.409Z</atom:updated>
            <content:encoded><![CDATA[<p>Since September 2018, the cf-invalidate feature of s3cmd (which causes CloudFront to automatically update its cache when the respective files in S3 have changed) has been broken on all versions of MacOS, regardless of whether you install from pip directly, install directly from source, or if you use homebrew. Specifically, when s3cmd tries to send the invalidation to CloudFront, MacOS users get the following error:</p><pre>Problem: &lt;class &#39;TypeError: Unicode-objects must be encoded before hashing<br>S3cmd:   2.0.2<br>python:   3.7.3 (default, Mar 26 2019, 21:43:19) <br>[GCC 8.2.1 20181127]<br>environment LANG=es_CO.UTF-8</pre><p>You can see the original (and unaddressed) GitHub issues below:</p><ul><li><a href="https://github.com/s3tools/s3cmd/issues/1006">TypeError: Unicode-objects must be encoded before hashing in `s3cmd sync --cf-invalidate` · Issue #1006 · s3tools/s3cmd</a></li><li><a href="https://github.com/s3tools/s3cmd/issues/1046">TypeError: Unicode-objects must be encoded before hashing in `s3cmd sync --cf-invalidate` · Issue #1046 · s3tools/s3cmd</a></li></ul><h3>s3cmd-shim: a solution</h3><p>Because my own deployment workflow for a number of things depends on the cf-invalidate feature, as well as the deployment feature of my homemade JavaScript framework, <a href="https://github.com/sam0x17/conduit">conduit</a>, and since there is no solution for s3cmd on MacOS in sight, I set up a lightweight, Alpine Linux based docker container and a shell script that mimics s3cmd and passes along its arguments and files to the docker container which then executes them. Once you name this script s3cmd and add it to your PATH, the result is a seamless docker-based replacement for s3md that will work correctly on MacOS. Installation is an easy one-liner. You can find the docker container and installation instructions below:</p><p><a href="https://github.com/sam0x17/s3cmd-shim">sam0x17/s3cmd-shim</a></p><p>Hopefully the s3cmd team will eventually fix this issue so people on MacOS won’t have to rely on these sorts of solutions, but in the mean time this is a great and effective workaround.</p><p>Additionally, s3cmd-shim will be useful for users who for whatever reason are unable to install s3cmd directly but have access to docker. One could also use this setup to potentially embed s3cmd in a larger piece of software, so long as you are willing to accept docker as a runtime requirement.</p><p>If anyone has any issues using s3cmd-shim, or any additional feedback or questions, feel free to drop an issue on GitHub as I check it regularly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db6a1bca6299" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Macbook Gaming Rig: Portable Win 10 on an external SSD on a 2018 13-inch Macbook Pro w/AMD eGPU]]></title>
            <link>https://medium.com/@DuroSoft/macbook-gaming-rig-portable-win-10-on-an-external-ssd-on-a-2018-13-inch-macbook-pro-w-amd-egpu-500fe17a38b6?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/500fe17a38b6</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[egpu]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[windows-10]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Tue, 26 Feb 2019 00:53:09 GMT</pubDate>
            <atom:updated>2019-02-26T00:53:09.073Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I was able to get the Windows 10 “<a href="https://docs.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview">Windows To Go</a>” feature working, and I realized that it makes it easier to get an eGPU setup up and running on the notoriously difficult (due to the T2 security chip) 2018 Macbook Pro. This setup is a bit unconventional in that you end up with a fully portable Windows 10 installation that is installed on an external SSD or USB flash drive that you can run on machines other than your Mac, but the setup will work perfectly with an AMD eGPU (and potentially NVidia) if you follow my steps EXACTLY. Without Windows To Go, the eGPU will typically not work without other more invasive changes to UEFI related things.</p><p>Having Windows on an external drive is convenient because you can leave your windows installation with your desk/eGPU setup, and you don’t have to carry a Windows 10 partition around on your Mac hard drive, which is especially handy because currently there is no way of deleting a Bootcamp-created partition on newer APFS-based Macbooks without visiting an Apple store and having them boot from external recovery media (Apple has in fact disabled both the official and unofficial ability to create such media starting in Mojave, and the built in recovery tools are unable to delete partitions on a currently mounted APFS drive, so an Apple store is your ONLY option).</p><p>Currently there is no known way of getting the built-in monitor to work in Windows when an eGPU is plugged in on a 2018 Macbook, so if you expect to be able to use your built-in display with the eGPU within Windows 10, you might as well stop reading. You can’t. The T2 chip completely messes that up. A side effect of this is that when the eGPU is on, the Windows logo boot screen stays stuck on on the built-in monitor and the monitor is unusable. To keep this from damaging your screen, we turn on a hidden feature in Windows called Unbranded Boot, which will disable the Windows logo and Windows booting UI completely, resulting in a black screen on your built-in Mac monitor that will not cause burn-in damage.</p><h3>You will need</h3><ol><li>A 13-inch 2018 Macbook Pro. This guide <em>may</em> work with the 15-inch model as well, but I don’t have one so I don’t know. I have heard though that the built-in GPU makes things more problematic on the 15-inch model, but maybe you will have some luck.</li><li>An AMD GPU and a Mac-compatible eGPU enclosure. I used the Radeon RX 580 in a Sonnet eGFX Breakaway Box, but it is likely that many GPUs and e-GPUs work with this guide. For future builds I would recommend the Sonnet eGFX Breakaway Box 650 or the Razer Core v2 paired with the new Radeon VII. Make sure your eGPU enclosure has enough watts for your selected GPU.</li><li>An external monitor, plugged into your eGPU and with the correct input already selected. Preferably you should test out the eGPU in MacOS before you attempt to get it working in Windows.</li><li>Another computer or laptop running Windows and possibly Linux as well. This is needed to prepare and partition the Windows To Go drive and as a device to boot into when your Windows To Go setup runs the first time so that certain MacOS drivers are not automatically installed.</li><li>A good external SSD or fast USB flash drive for running Windows 10. I highly recommend the <a href="https://www.amazon.com/Samsung-T5-Portable-SSD-MU-PA500B/dp/B073GZBT36">Samsung T5</a> since it is incredibly fast, big enough for storing lots of games, and uses a USB Type-C cable that is directly compatible with your Macbook.</li><li>A wired external keyboard and mouse that you can plug into your mac somehow. I use a USB type-C dock that has a number of USB ports for this.</li><li>(optional) A very large external hard drive to back up your Windows To Go installation once you get it working the way you want.</li></ol><h3>Directions</h3><p>Note: annotated screenshots are provided below. For some reason Medium doesn’t allow embedding images in a numbered list.</p><ol><li>Boot into your Macbook Pro and open up the Boot Camp Assistant, but do not continue with the wizard or install Boot Camp! Instead go to the “Action” menu and select “Download Windows support Software”. This will download a zip file containing some drivers we will need later on Windows. Upload the zip to Google drive or some service you can use to access the file later on your Windows installation.</li><li>Boot into your alternate Windows 10 machine. Press the Start button and type in “partition”. The entry “create and format hard disk partitions” should show up. Open this.</li><li>Find your target drive in the list, delete any existing partitions and format the drive to use the GPT partitioning scheme. You may need to go into Linux or <a href="https://gparted.org/">GParted</a> and use a non-Windows disk utility to do this. You can also <a href="https://www.windowscentral.com/how-format-new-hard-drive-windows-10">consult this guide</a> to learn more. If this is a fresh disk, simply initialize the disk using GPT and you should be good to go.</li><li>Create a ~300 MB FAT32 partition on your target drive called “EFI System” at the beginning of the drive. I like to do 1000 MB because I triple boot with various Linux OSes and Linux likes to fill up the EFI partition with old kernel backups.</li><li>Right-click the newly-created partition and select “Format”. This time type in “EFI System Partition” and otherwise use the same options as before. You will get an error message, and the partition manager may crash, but this will trick Windows into creating a proper EFI System Partition (normally you can’t format or touch them).</li><li>Re-open the partitioning tool if necessary and create a large NTFS partition on the target drive to hold your Windows installation. You might as well fill up the rest of the drive if you aren’t going to dual boot something else onto it.</li><li>Download the x64 (64-bit) copy of the Windows 10 1803 (April) ISO from Microsoft or wherever you can find it. Currently you can download it from Microsoft by going to their ISO download page from a non-Windows machine, <a href="http://sihmar.com/download-windows-10-version-1803-iso-64-bit-or-32-bit-officially/">or by using the trick described here</a>. The 1809 (October) version will not work without the paid version of WinToUsb mentioned below, so if you wan’t to pay $30 you can go with the latest ISO file.</li><li>Download and run <a href="https://www.easyuefi.com/wintousb/index.html">Hasleo WinToUsb Creator</a> (free). No you can’t use something else like Rufus, Pendrivelinux, Unetbootin, or Etcher.io. They don’t do the same thing and aren’t able to install Windows To Go.</li><li>Select the ISO file you downloaded in step 7, select your desired version of Windows (you should select something you have a key for, though you won’t need a key until Windows bothers you later), and press “Next”.</li><li>Select your EFI System Partition as the ESP partition (first one) and the larger NTFS partition as the boot partition (second one).</li><li>Press “Next” and WinToUsb will start installing Windows on your drive.</li><li>After WinToUsb installation completes (100%), restart your computer and boot into the newly created drive (you will have to select the external drive as the boot device however your machines lets you do that, in my case spamming F12 during boot)</li><li>Go through the Windows setup, create your account, restart however many times is necessary, etc., and finally boot into your newly created windows installation (once again by selecting your drive at boot time)</li><li>Connect to the internet and download the WindowsSupport.zip file we uploaded to google drive in the first step and put it on your Desktop.</li><li>Also go to the AMD website and download the specific drivers for your GPU. You can go to <a href="https://www.amd.com/en/support">this page to select the drivers for a particular model</a>. Make sure you download the version for 64bit Windows 10 to your Desktop. Do not install the drivers yet.</li><li>Now go to Start and type in “windows features” and open up “Turn Windows features on or off”.</li><li>Expand the item that says “Device Lockdown”, fill in the check next to “Unbranded Boot” and press OK. Wait as the feature is installed.</li><li>Now open an administrator command prompt, type in “bcdedit.exe -set {globalsettings} bootuxdisabled on” and press [ENTER].</li><li>Now shut down and safely remove the external hard drive / USB drive and plug it into your (turned off) mac. Unplug the eGPU from the mac if it is not already unplugged. Also plug your external keyboard and mouse into your mac. Keep the left USB type-C port closest to the screen available for later when you plug in the eGPU. Only ever use the eGPU on this port.</li><li>Turn on the mac and hold down the option key until you are presented with boot options. You should see “EFI System” as an option. Select it and Windows will now boot. From here you will need to use the external mouse and keyboard as we have not installed any drivers that would allow Windows to recognize the proprietary Apple keyboard and touchpad. You also won’t have wifi/ethernet drivers yet.</li><li>Once in Windows, plug the eGPU into the mac. It should turn on but otherwise nothing else should happen.</li><li>Run the installer for the AMD drivers you downloaded previously. It should be able to detect your GPU since it is plugged in. Skip Radeon ReLive as it is not necessary.</li><li>Restart the mac and once again boot into the Windows installation. Give it a few minutes to blink and sputter. The monitor will turn off and on a few times and eventually you will end up with a blank screen on your mac and a blank screen on your external monitor. If you move the mouse around the mouse will eventually go onto the external monitor. This means the eGPU is working.</li><li>Press Windows Key + P several times and possibly Windows P + Right Arrow + Enter. Do this until you get the Windows login screen on the external monitor. Now restart the computer and boot into Windows once again.</li><li>Now we need to install the Boot Camp Support Software. Extract the WindowsSupport.zip file. Open the WindowsSupport/Bootcamp/Drivers directory. Delete the folder named “AMD”. Also delete the “Intel/Chipset” directory. If you do not delete these folders you will bork your installation and you will have to start over again!!!</li><li>Now run the Setup.exe file in WindowsSupport/Bootcamp. After the installer finishes, restart Windows. Now your touchbar and built-in mac devices like keyboard, touchpad, wifi, etc., (except, of course, for the built-in monitor) should all work perfectly. You can also now use the Windows installation in laptop-mode without the eGPU plugged in and everything will work perfectly.</li><li>That’s it!! You will probably want to get Windows updates, install some games and maybe benchmark your GPU to make sure everything is working properly. You can also use your Windows flash drive / external drive on other machines, and bring it back to your Mac and still use the eGPU and external monitor!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*xDaHzD4gkA9CanpAnNcnTg.png" /><figcaption>Download Boot Camp Support Software and upload it to Google Drive</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*FTqB3MsnyhCKsNxLH0I0ZQ.png" /><figcaption>Open the partition/disk editor on your alternate Windows machine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*TOPbYQfptsSw0N0mPBJaCw.png" /><figcaption>After creating the FAT32 partition, rename it to EFI System Partition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*BiFankjM_r81o0YKkKrNvQ.png" /><figcaption>This error will be displayed. Don’t worry this is supposed to happen.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*KGRuAr-dfwjpxMdpm31kKg.png" /><figcaption>Your target drive should end up looking something like this once you create both partitions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*ezcDB6YgOXuOtY4B3MgUEQ.png" /><figcaption>Open WinToUsb and select the 1803 (April) copy of the Windows 10 ISO you downloaded</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*n8jklF0ECINYYMYhxhyzJg.png" /><figcaption>Select your desired Windows version (make sure you have a key somewhere though)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*jeU6Yt4hOsQhhmQ_7gTipg.png" /><figcaption>Select your target drive (i.e. the drive you are installing Windows on)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*luIJbm4Wc9jIFU67r0_y_w.png" /><figcaption>Select the EFI System Partition you created as the ESP partition, and the larger Windows partition as boot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*6gs_ouIH4IXtovZ9YqeV1g.png" /><figcaption>Wait for WinToUsb to finish installing Windows 10 w/Windows To Go on your target drive</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*xvxmtQJNcnhSXqwlX7QiiQ.png" /><figcaption>After installing and booting into Windows and downloading the WindowsSupport.zip file from Google Drive, go to the AMD website and download the graphics drivers for your exact GPU</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=500fe17a38b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[XJoy — use Switch Joy-Cons as a virtual Xbox controller in Windows PC games]]></title>
            <link>https://medium.com/hackernoon/xjoy-use-switch-joy-cons-as-a-virtual-xbox-controller-in-windows-pc-games-30c50b84ce4?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/30c50b84ce4</guid>
            <category><![CDATA[pc-gaming]]></category>
            <category><![CDATA[xbox-one]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[nintendo-switch]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Fri, 24 Aug 2018 01:43:04 GMT</pubDate>
            <atom:updated>2018-08-24T01:43:04.152Z</atom:updated>
            <content:encoded><![CDATA[<p>Much has been said about the innovative detachable Joy-Con controllers that come with the Nintendo Switch. Well now with my <a href="https://github.com/sam0x17/XJoy">XJoy</a> utility you can use these delightful Bluetooth devices as an input for your favorite PC games that support Xbox controller input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJsrKhbL0hbAWFNlcIU6ew.png" /></figure><p><a href="https://github.com/sam0x17/XJoy">Visit the XJoy project to learn more</a></p><h3>The accessibility of Joy-Cons</h3><p>This project arose originally out of my husband’s nerve-damaged wrists — PC gaming mice and even ergonomic mice put too much strain on his wrists. He had an equally bad time with Xbox and PS4 controllers, as most of his strain came from having his hands too close together. Thus to his great dismay my husband was unable to play any PC or console games when his condition worsened — that is, until his Nintendo Switch arrived.</p><p>The Switch changed everything for my husband. Because the two Joy-Cons could be separated and held in his left and right hands apart in a resting position, he was able to play games once again, and for hours on end at that!</p><p>Still, he wanted to be able to play his old PC games, as the number of titles (and genres) available for the Switch (as with any Nintendo-based platform) can be quite limiting, and he has hundreds of games in his Steam library. Thus I began my quest to map the input from my husband’s Joy-Cons to something he could use to play PC games.</p><h3>Going it alone — XJoy origins</h3><p>At first I attempted using the <a href="https://github.com/mfosse/JoyCon-Driver">joycon-driver</a> project in conjunction with <a href="http://vjoystick.sourceforge.net/site/">VJoy</a>. This worked well in some games like Stardew Valley, but the configuration was extremely flaky and only worked in certain games. In particular, it didn’t work at all in BeamNG, which is my husband’s must-play go-to game when he is bored, so this solution was out. This phase was also dominated by a number of Steam-specific bugs in the edit controller window in Steam.</p><p>Next I became stubborn and decided to bypass this whole controller-emulation nonsense entirely by writing my own cross-platform Node.js program that used an HID library in conjunction with robotjs to read the Joy-Con input and translate it to mouse and keyboard. I was experimentally able to figure out what parts of the HID data did what by observing the numbers as they came in, and eventually I was able to map out all the controls for both Joy-Cons (this is much more fun than simply looking up what the values are for each button).</p><p>This worked extremely well at first, however games like No Man’s Sky, which has different controller mappings for practically every menu and every interaction in the game, I had to start coding in custom “modes” the program would enter into where the controller-to-keyboard-plus-mouse mapping would change based on any number of factors. This all fell apart when there were modes that were impossible to activate (because they depended on the presence of something in-game that I couldn’t detect without analyzing screenshots) without using a hotkey. I estimated that to fully cover all of the functionality in No Man’s Sky, I would need over 45 modes, so I quickly abandoned this approach. All of that said, it was extremely cool controlling a mouse on Linux, Windows, and OSX using a Joy-Con analog stick, and I definitely plan to do something with that project in the future, just not in a gaming-focused sort of way.</p><h3>A workable solution</h3><p>After doing some more research, I stumbled upon <a href="https://vigem.org/">ViGEm</a>, which is a very well put together, well-maintained virtual Xbox 360 (and DS4) controller library for Windows written in C++. Upon making this discovery, I ported over all of my Joy-Con parsing code to use HIDApi and ViGEm in windows C++. That did the trick. I was able to translate every Joy-Con button over to something on the virtual Xbox controller.</p><p>One difficulty I ran into was I realized rather late that I needed to multithread the program, as the left and right Joy-Cons need separate threads to properly maintain their HID-read loops. Once I retrofitted everything to run on two threads (and after adding a mutex), everything worked perfectly — I was able to control arbitrary PC games using my Joy-Cons!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30c50b84ce4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/xjoy-use-switch-joy-cons-as-a-virtual-xbox-controller-in-windows-pc-games-30c50b84ce4">XJoy — use Switch Joy-Cons as a virtual Xbox controller in Windows PC games</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Despite backlash, Microsoft sticks with controversial “GVFS” name]]></title>
            <link>https://medium.com/@DuroSoft/despite-backlash-microsoft-sticks-with-controversial-gvfs-name-57d6e175af9c?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/57d6e175af9c</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[filesystem]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Sun, 03 Jun 2018 02:01:24 GMT</pubDate>
            <atom:updated>2018-06-06T00:21:11.687Z</atom:updated>
            <content:encoded><![CDATA[<p>note: original GitHub issue: <a href="https://github.com/Microsoft/GVFS/issues/7">https://github.com/Microsoft/GVFS/issues/7</a></p><h3>UPDATE: Microsoft has decided to change the name.</h3><p>Visit <a href="https://github.com/Microsoft/GVFS/issues/72">https://github.com/Microsoft/GVFS/issues/72</a> to suggest new names for GVFS. Thanks so much to everyone who supported this thread! We couldn’t have done it without you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bh0wKHX8OrtvDF23apMGNQ.png" /></figure><p>Microsoft’s recent release of <a href="https://github.com/Microsoft/GVFS">Git Virtual File System</a> (GVFS), their open source plugin that allows Git to handle terabyte-sized repositories has not been without controversy. Since its initial unveiling, hundreds of developers (myself included) have expressed their concern with Microsoft’s naming decision on GitHub, social media, and various news sites. The source of this uproar is the fact that “GVFS” is effectively identical to GVfs, which is already the name of a <a href="https://wiki.gnome.org/Projects/gvfs">well-established virtual file-system </a>component run by GNOME.</p><h3>Frederic Crozat on Twitter</h3><p>@ennaelle and they didn&#39;t realize gvfs was also the name of a GNOME component ? sight :(</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*g7Mn-BddxGxx9x9o-VVCeQ.png" /></figure><p>This is already a bad look for Microsoft, as many open source veterans are quick to recall Redmond’s rather barbaric past in the early 2000s when <a href="https://www.zdnet.com/article/ballmer-i-may-have-called-linux-a-cancer-but-now-i-love-it/">Steve Ballmer</a> and others at Microsoft declared <a href="https://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/">open war</a> against Linux and FOSS in general, promising to run Linux and its ilk into the ground. In recent years, though, the company has embraced Linux and FOSS, even contributing to a number of open source projects, and creating free, open source, cross-platform projects like Visual Studio Code, which is now beginning to rival GitHub’s Atom as the de facto universal coding IDE on Windows, Linux, and even OSX. That said, it seems not everyone at Microsoft has seen the light.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UredVXxFhUbdz0m7YAIWhw.png" /><figcaption>A comment on the original Hacker News announcement thread for GVFS</figcaption></figure><p>For the first year many maintained hope that Microsoft would make good on its promise to “look into” the issue and consider a less contentious, less already taken name. It appears, however, that this dream will never be realized. Earlier this year, Microsoft closed all issues on GitHub issues related to the name change (three separate users created issues), and closed the <a href="https://github.com/Microsoft/GVFS/pull/51">pull request</a> where someone had painstakingly written scripts to change the name for the entire codebase to any name Microsoft elects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KBeUAuwx3xYhe6MdIL56Jw.png" /></figure><p>On the bright side, @sanoursa did promise that GVFS will not be called GVFS when they release on Linux. We will see if they keep their promise. My guess is they have already forgotten they said this, so we will have to hold them to it when the time comes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iIjPQkCKkXy1D-eVaL99UQ.png" /><figcaption>The primary GVFS maintainer promises to use a different name when they release on Linux</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cJVMY-cI1SIF2AwqLQG5NQ.png" /></figure><p>So what’s the takeaway from this? I guess it’s that Microsoft can still be pretty arrogant and still pretty entrenched in their old ways, even if they are embracing FOSS. For example, in developing GVFS they were surprised that Git has the odd behavior of requiring each release to support all previous repository formats (gasp!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*3GCvmeeOSaisheiYsspG-Q.png" /><figcaption>An anonymous comment from slashdot.org’s <a href="https://apple.slashdot.org/story/17/11/17/2119235/microsoft-and-github-team-up-to-take-git-virtual-file-system-to-macos-linux">article</a> about GVFS</figcaption></figure><p>All in all, it will be very interesting (and for more than a few people, quite alarming) to see how all of this and more plays out as Microsoft continues talks to acquire GitHub. Maybe we all should be switching to GitLab or BitBucket after all? Hopefully not, but time will tell.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57d6e175af9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Crystal is the most promising programming language of 2018]]></title>
            <link>https://medium.com/@DuroSoft/why-crystal-is-the-most-promising-programming-language-of-2018-aad669d8344f?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/aad669d8344f</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[c-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Wed, 24 Jan 2018 05:25:56 GMT</pubDate>
            <atom:updated>2018-07-06T04:28:49.252Z</atom:updated>
            <content:encoded><![CDATA[<p>Years ago a number of developers had the collective thought experiment “what if we took Ruby-like syntax and wrote a fast-as-C, general-purpose, typed language that (like C/C++) compiles to native binaries on any platform but keeps high level goodies like a rich standard library, full fibers support, etc?” Fast forward a few years and this dream has manifested itself in the C<a href="https://crystal-lang.org/">rystal programming language</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHm4XkrFFvAJDHinuBo3Sg.png" /></figure><p>In the following article I will make the case for why Crystal — rather than the likes of JavaScript, Elixir, Rust, Ruby, Python, or Go — is the most exciting and promising programming language in recent history.</p><h3>No more trade-offs: “Fast like C, slick like Ruby”</h3><p>The main draw of Crystal is that it appears to have shattered the barrier between syntactically sweet interpreted/dynamic languages like Ruby and Python — which are loved for their readability and ease-of-use — and the raw horsepower of C/C++ and low-level systems languages. Until now, you always had the choice between writing a lot of hard-to-read, hard-to-debug, complicated, but extremely <em>fast</em> C/C++ code, and writing a short 5-liner in Ruby/Python that does what you want, but wastes memory and speed. In other words, we have always had to choose between performance and syntax. Since it is much easier to develop an MVP in Ruby/Python than it is in C/C++, for the past 18+ years SAAS companies large and small have simply accepted dynamic languages as a necessary evil and have taken on these extra performance hits as an unavoidable cost of doing business. With Crystal, however, you can do all the stuff you were doing in Ruby/Python but with the speed and memory footprint of a native C/C++ binary. And did I mention your code will be beautiful and you can still use dynamic methods sort of?</p><h3>Why Crystal? 11 Reasons</h3><ol><li><strong>Performance</strong>. As I mention earlier, Crystal is a statically compiled language based on the venerable LLVM framework, and will go toe-to-toe with C/C++ and Rust any day of the week. Crystal is “speed without semicolons”. Just look at some of the latest benchmarks: <a href="https://github.com/tbrand/which_is_the_fastest">https://github.com/tbrand/which_is_the_fastest</a><br><a href="https://github.com/drujensen/fib">https://github.com/drujensen/fib</a></li><li><strong>Syntax</strong>. Like many interpreted languages, Crystal will let you do pretty much whatever you want in as few lines of code as possible, and in a way that is readable and aesthetically pleasing. For this reason, Crystal is sometimes advertised as similar to Rust but easier to read and write.</li><li><strong>Fibers</strong>. One thing you don’t get for free in the C/C++ world is Fibers. To avoid getting into a huge discussion about this, a truly complete fibers implementation like the one in Crystal lets you get around callback/promise hell (JavaScript) and makes it a lot easier to write things like game/UI loops, events, asynchronous and synchronous IO, etc.</li><li><strong>Static Typing</strong>. Crystal is a statically typed language, meaning every variable has one or more potential types and these need to be figured out at compile time and accounted for. Ruby/Python are dynamically typed, so it is very difficult to reason about and optimize Ruby/Python code. By enforcing static typing, Crystal rules out a huge number of type related bugs and paves the way for optimizations and static compilation. Even better, the Crystal compiler only requires you to explicitly specify types when it is syntactically ambiguous what the type of a variable should be, meaning that often you don’t even need to deal with types directly and can proceed like you normally would in Ruby/Python-land.</li><li><strong>Macros</strong>. In C/C++ land it is extremely difficult to do things statically without writing some confusing macros using very antiquated syntax. Crystal lets you leverage a large percentage of the language when writing macros, so you can do <a href="https://github.com/sam0x17/crystal-mongo-orm/blob/master/src/mongo_orm/fields.cr">crazy powerful things that normally would be impossible in a statically compiled language</a> like having a library class written by person A reason statically about and change its code based on the contents of an implementer class written by person B at compile-time.</li><li><strong>You can still dynamically define methods*</strong>. Many people are afraid to use Crystal because they can’t dynamically define methods as it is a compiled language, but macros let you do just that at compile time. I would argue that 99% of the time, your dynamic method definition could be replaced with a compile-time macro in as many lines of code. It is extremely rare that there is a legitimate use-case for dynamically defined methods — we just aren’t used to languages that have the ability to do what always should have been possible to do at compile time. For more information see <a href="https://crystal-lang.org/docs/syntax_and_semantics/macros/hooks.html">method_missing</a> in the docs.</li><li><strong>Nil/Null-related errors impossible</strong>. The Crystal compiler treats Nil as a type and enforces explicit nil checking before interacting with an object that could be nil. This means that those pesky errors where you try to access a method or property on an object that turns out to be nil (and thus does not have that method or property) are physically impossible since the compiler will throw an error.</li><li><strong>Shards</strong>. Much like the gems ecosystem in Ruby and packages in other languages (e.g. Node), Crystal has shards. They are super easy to install and maintain, and get compiled directly into your binary executable via static linking. That’s right, even if you use 100+ shards, you will end up with one monolithic executable.</li><li><strong>Meteoric rise in popularity</strong>. Now that the language is more mature, people are flocking to Crystal which means more shards and faster implementation of new features and bug fixes. Recently Crystal shocked the world when it <a href="https://www.infoworld.com/article/3212970/application-development/java-and-c-hit-all-time-lows-in-tiobe-language-popularity-index.html">rose from 60th place to 32nd place in the Tiobe index in a mere month</a>. No other modern programming language has experienced such a high rate of growth over such a short period of time.</li><li><strong>Cross-platform support</strong>. At the time of writing, Crystal has first-class support on Linux and OSX, with first-class windows support <a href="https://github.com/crystal-lang/crystal/issues/5430">mere weeks away</a>. This makes it perfectly suited for writing cross-platform tools, utilities and even desktop applications. I expect that within a year an Electron clone based on Chromium will emerge for Crystal, in addition to the existing cross-platform Qt-based (<a href="https://github.com/Papierkorb/qt5.cr">qt5.cr</a>) and Libui-based (<a href="https://github.com/Fusion/libui.cr">libui.cr</a>) user interface libraries. Cross-platform support also makes it easier to reach developers on every platform.</li><li><strong>Web frameworks</strong>. Amber, the most popular Crystal-based web framework, has been designed from the ground up to be similar to Rails, but in a quintessentially Crystal way. It is also an order of magnitude faster than Rails, and measures page load times in microseconds rather than milliseconds. Similarly Kemal.cr (similar to Sinatra from Ruby) and newcomer Lucky also provide a solid start</li></ol><h3>Why Crystal and not some other language?</h3><p>Nothing else puts all of these ingredients together (compile-time macros, static typing, C-like speed, Ruby-like syntax, gem-like package ecosystem, native binary compilation, fibers, and cross-platform support). In this regard, Crystal is at least as deserving of attention as Rust, which has seen a massive amount of popularity lately and is the closest language to Crystal in terms of the role it is meant to fill as a fast C++ replacement with high level language features and syntax. I don’t think Crystal will or should replace Rust (or Ruby for that matter)— that isn’t the point of this article and all three of these languages have their respective places. I do think that Crystal could be the next Rust in terms of popularity, and I think it deserves the attention.</p><h3>And finally, some limitations</h3><p>The five main limitations in the current version of Crystal at the time of writing are:</p><ol><li>Windows support not yet completed (but will be very soon)</li><li><strong>No parallelism</strong> unless you link against C code that does the parallelism (concurrency is fully supported by the fibers model, however). That said Go-style parallelism is coming very soon and is already working in a test branch.</li><li>There are still small breaking changes every once in a while as they have not yet reached an official 1.0. That said there are plenty of companies using Crystal in production.</li><li>Because Crystal is statically compiled, it is i̶m̶p̶o̶s̶s̶i̶b̶l̶e̶ very difficult to have a true REPL, though the Amber team have tackled this issue with the introduction of the amber exec command-line option, which will execute Crystal code in the specified environment, and even allows you to open up nano or your favorite text editor to edit and re-run said code (or pass it as a command line argument).</li></ol><p>Consider using <a href="https://crystal-lang.org/">Crystal</a> for your next project!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aad669d8344f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The myth of software time estimations]]></title>
            <link>https://medium.com/hackernoon/the-myth-of-software-time-estimations-576a7466d91a?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/576a7466d91a</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[kanban]]></category>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[scrum]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Tue, 25 Apr 2017 20:35:12 GMT</pubDate>
            <atom:updated>2017-07-19T11:00:01.758Z</atom:updated>
            <content:encoded><![CDATA[<p>I like to think of software development as navigating through a dark, perilous wilderness. You have no map. If there is a map, it is because someone has already made your idea, so there is no map. The terrain is always uncharted, and always dangerous. You are beset on all sides by total darkness, a black fog-of-war. The only way to advance is to stumble, blindly. You know the general direction you want to move in — heck, you might even be able to see it like a distant mountain on the horizon — but you have no idea what lurks in the darkness between you and your goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zndj68BkFRoRSdZ2.jpg" /><figcaption>The uncharted wilderness of software development. Who knows what horrifying bugs, memory leaks, re-designs, platform switches, unforeseen incompatibilities, production-only behaviors, and unanticipated necessary features lurk there?</figcaption></figure><p>Even if we completely ignore the “human” element at play in the development cycle, <strong>the notion that we could come up with accurate software development time estimations is the quintessential unrealistic expectation — a fool’s errand</strong>. Its intractability comes not from incompetency or from a lack of discipline, but from a deep-seated, fundamental limitation imposed on our reality and codified in the proof of the <a href="https://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis">Church-Turing thesis</a>:</p><blockquote>Given the initial conditions (inputs) and source code of an <strong>arbitrary</strong> program, and given access to unlimited processing and memory resources, it is <strong>impossible</strong> to always predict whether such a program will run forever or eventually halt its execution after some amount of runtime.</blockquote><p>While there are some obvious exceptions in terms of formal methods and <a href="https://en.wikipedia.org/wiki/Formal_methods">programs that are provably correct</a>, the chances are that you haven’t had the time <a href="http://kneuper.de/English/Publications/limits-formal-methods.pdf">or found it practical </a>to implement formal methods and mathematically prove that your program does exactly what it was designed to do in every possible execution state. Even if you have had the time to do this, and you have done it well, up until that very last moment where your program became 100% formally verified, you were wandering around in the dark, reasoning about something that will either run forever without exhibiting any flaws, or will eventually exhibit one or more flaws. In software development, this chaos is normalcy, and wandering around in this unknown, unproven territory where many things could go wrong at any moment<em> simply is</em> the perpetual state of programming.</p><p><strong>If this is the case, then writing and maintaining code can be seen as a fundamentally chaotic activity, subject to sudden, unpredictable gotchas that take up an inordinate amount of time</strong>.</p><p>This, I think, is very consistent with the anecdotes of other developers and project managers I have spoken with, and my own experiences — for any given project, the most time-consuming cards in that project were either<em> vastly underestimated </em>or <em>not anticipated at all</em> when the project was first planned and subjected to time estimation. While it is true, especially with large teams of developers, that you can come up with a decent statistical model for<em> typical</em> behavior, this is not useful, as it is overwhelmingly the <em>unpredictable outliers, </em>rather than the known demons, that will dictate how many weeks, months, or years deadlines get pushed back. Add users, multiple developers, human errors, managerial issues, and shifting markets/requirements to the mix, and this unpredictability only increases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z6elrVxJm7LjfB8B.gif" /><figcaption>A brave project manager tackles time estimations at the beginning of a sprint.</figcaption></figure><p>If we accept the premise that software development time estimation is intractable, quixotic, inaccurate, and a waste of time, then an immediate question follows: why does <a href="https://www.scrumalliance.org/why-scrum">conventional wisdom</a> in the industry regularly point to time estimation as a necessary part of the development cycle?</p><h3>Why do we keep up this charade?</h3><p>There are a number of reasons why perfectly reasonable people might subject themselves to the irrational constraints brought on by development time estimations. First off, it is a fad right now, so there’s that. Another reason is that business requirements, and the business/sales-types who make decisions based on their perception of these requirements like to make promises about the future (especially to investors and potential users), which inevitably involves becoming entangled in some set of unachievable development goals and/or deadlines that when unmet, reflect poorly on the organization as a whole, often more so than if no time-sensitive promises had been made at all. This is especially true at companies where non-technical individuals hold a disproportionate amount of power or influence over the development process, and perhaps don’t fully understand that software development is a fundamentally more difficult, unpredictable activity than are other activities you encounter in the business world.</p><p>Yet another reason is a sort of emperor-with-no-clothes effect — all developers know secretly, I think, that time estimations are utter bullshit, but they see everyone else making estimations, touting them, using them for their projects, and they assume that they themselves are at fault, that they simply aren’t as good as their peers at prophesying the exact time of completion for every task they undertake. In reality, these developers are always significantly low-balling or high-balling their guesses, and when they are exactly right, this is simply luck. <strong>At the end of the day, even the simplest, easiest tasks may contain latent, unpredictable gotchas that will take up weeks of development time.</strong></p><h3>Time estimations considered harmful</h3><p>Development time estimations lead us to cut corners, to design painfully simple software that lacks the architectural complexity it needs to one day tackle the fully-realized version of the problem we want to solve. Since business requirements inevitably undercut even the most brazenly optimistic development timelines, the things we would do given even a little bit more time end up not getting done or even planned. I like to call this <strong>complexity debt</strong> (I prefer this term to the more common “technical debt”, which I think carries the wrong connotation in that it has little to do with the technical ability of the development team). If you find that you are constantly extending a once-basic interface or data model to handle progressively more complex features and use cases, or find yourself wishing that you had a fundamentally different data model, then you are a victim of complexity debt. Given a more relaxed development schedule, you might already be done, because from the beginning your team would have implemented the “proper”, more complex architecture capable of dealing with the intricacies and entanglements that you must now deal with in an ad-hoc, hacked-together fashion.</p><h4>But at organization X the estimations are typically accurate!</h4><p>There is a world where building software is not like wandering through a vast unknown wilderness, but is instead more like a short stroll through a field of daises — but it is a doomed world. I would argue that projects like this, where the estimations are consistently right, and it feels like there is an actual end to development in sight, do in fact exist, but that these aspects are symptomatic of something worrisome and broken on a fundamental level. If something is inherently broken about your product — whether it be in the competency, makeup, or attitude of the engineering team or management, in the technical difficulty (or lack thereof!) of the idea, in a general disconnect between actual and imagined user needs, or by simply not having a tappable market — in any broken situation, systematizing things, whether you use waterfall, scrum, or pure kanban, will only give you one thing: a broken system, in other words, a dead or dying product. If it feels easy, and it feels attainable in a few short sprints, then I would say you are either wrong, or in grave danger of developing something that isn’t ultimately going to work out. If you have a good idea, it should be difficult to develop, and it should feel like exploring new, unknown territory.</p><h3>If time estimations are so bad, what should we use?</h3><p>In general, you should consider using <a href="http://kanbanblog.com/explained/">pure Kanban</a> without time estimations, but first, you should take the time to write out the following sentence, maybe hang it on your office wall, add it to your mission statement, set it as your development Slack room’s status, and tattoo it to your CTO’s forehead:</p><blockquote>As a company policy, we do not provide or deal in software development time estimations of any kind, and we view such a practice as harmful to the overall development process, and to the industry as a whole.</blockquote><p><strong>The key is not to provide these types of estimations in the first place</strong>. Good investors don’t need to know when a feature will be done — rather they just want to know that it is a priority and that it is being worked on — and if they are smart, they will respect you when you highlight the reasons why providing concrete estimations will ultimately decrease the value of their investment (e.g. complexity debt, etc.). You can do all the things you normally do — generate marketing hype, promote your product, tout in-development features — without externalizing specific completion deadlines to the public or even to non-technical management, and in fact, this is what many <a href="https://amazon.com/">successful </a>software <a href="https://stardock.com/">companies</a> already do.</p><h4>What you should do</h4><p>This is not to say that you should completely turn a blind eye to the supposed relative difficulty of various features and bug-fixes — the point is really just to be more up front with everyone about the fact that estimations are just that: fantastical theories, that are subject to potentially dramatic changes as more of the surrounding landscape comes into view, and are in no way a commitment to a particular completion date. <strong>This is why tentative difficulty estimations, completely devoid of any time commitment whatsoever, are the way to go</strong>. You can use such estimations as pointers to identify which parts of a project should be tackled next. That said, difficulty estimations should not be used in isolation, but should instead be used with a combination of other factors including:</p><ul><li>time that has passed since bug was last reported or feature was requested</li><li>number of users experiencing bug or who have requested feature</li><li>the value-add this feature/bug-fix provides to the overall product</li><li>(for bugs) whether the bug has been confirmed/reproduced</li><li>the importance of the user(s) this bug-fix/feature affects</li></ul><p>If you take anything away from this article, at least consider the harm that development time estimations may already be doing to you, your friends, your family, and especially your organization, and consider doing away with time-based estimations, <em>now</em>, for good.</p><figure><a href="http://bit.ly/HackernoonFB"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hqOaABQ7XGPT-OYNgiUBg.png" /></a></figure><figure><a href="https://goo.gl/k7XYbx"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vgw1jkA6hgnvwzTsfMlnpg.png" /></a></figure><figure><a href="https://goo.gl/4ofytp"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKBpq1ruUi0FVK2UM_I4tQ.png" /></a></figure><blockquote><a href="http://bit.ly/Hackernoon">Hacker Noon</a> is how hackers start their afternoons. We’re a part of the <a href="http://bit.ly/atAMIatAMI">@AMI</a> family. We are now <a href="http://bit.ly/hackernoonsubmission">accepting submissions</a> and happy to <a href="/service/mailto:partners@amipublications.com">discuss advertising &amp; sponsorship</a> opportunities.</blockquote><blockquote>If you enjoyed this story, we recommend reading our <a href="http://bit.ly/hackernoonlatestt">latest tech stories</a> and <a href="https://hackernoon.com/trending">trending tech stories</a>. Until next time, don’t take the realities of the world for granted!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35tCjoPcvq6LbB3I6Wegqw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=576a7466d91a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/the-myth-of-software-time-estimations-576a7466d91a">The myth of software time estimations</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing cross-platform C++ is easier in Node.js than it is outside of Node.js]]></title>
            <link>https://medium.com/hackernoon/writing-cross-platform-c-is-easier-in-node-js-than-it-is-outside-of-node-js-a5c214f0cf10?source=rss-d640ab517dbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5c214f0cf10</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[electron]]></category>
            <category><![CDATA[cplusplus]]></category>
            <category><![CDATA[desktop-app]]></category>
            <dc:creator><![CDATA[Sam Johnson]]></dc:creator>
            <pubDate>Fri, 10 Mar 2017 15:35:10 GMT</pubDate>
            <atom:updated>2017-07-17T16:16:55.158Z</atom:updated>
            <content:encoded><![CDATA[<p>Think about it the next time you try to set up a simple C++ project that you want to compile on Linux/Windows/OSX (or god forbid, a desktop app). Just setting up the build environment is a monumental task. Oh so you want a GUI? You’re going to have to use some insane framework like QT, or worse, write your own abstraction of the 3 native GUI APIs yourself. Oh you want to use the same build script on all 3 platforms? Hah!</p><p>Enter Node.js. The node-gyp tool handles native modules, compilation, shelling out to visual studio / GCC, dependencies, binaries, period. All you have to do is write a bindings.gyp file, and write your C++ code like there’s no tomorrow (in whatever IDE you want). That’s it. It’s simple. You can write a huge C++ (or C!) based app, and simply use Node.js as your cross-platform build tool. Hell, you could even write most of your app in JavaScript and just do a few key data structures in C++. If you want a GUI, you can use HTML 5 / CSS3 via Electron, and interact directly with your C++ code. This particular approach even allows for alpha-transparency and many other juicy features you seldom see in cross-platform development:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*j0RCS6dCDeqwfle1knhjEA.png" /><figcaption>An early-development image of FlashSync, a client-side encrypted cloud storage app which uses Electron to achieve cross-platform alpha-translucency and native shell integration on Linux/Windows/OSX. credit: https://durosoft.com</figcaption></figure><p>The chances are you aren’t going to be able to design a framework as GUI-capable as Electron (have you heard of Chrome, it’s kind of a big deal) so this really is the best of the best — HTML 5 / CSS3 / JavaScript for GUI, native shell integration, and the ability to interface with cross-platform C++ code via Node.js and V8. In short, if you are developing a desktop application, or even a cross-platform C++ command line utility or library, and you are not using something in the Node.js stack in 2017, you are doing it wrong.</p><p>For the uninitiated, Electron allows you to build your desktop app in JavaScript using Chrome and Node.js, and generate a native binary — this is how the popular Atom IDE works. See <a href="https://electron.atom.io/">https://electron.atom.io/</a> for more.</p><p>General info on building cross-platform Node.js native modules:<br><a href="https://blog.risingstack.com/writing-native-node-js-modules/">https://blog.risingstack.com/writing-native-node-js-modules/</a></p><p>You will find a great curated list of cross-platform node.js stuff here:<br><a href="https://github.com/bcoe/awesome-cross-platform-nodejs">https://github.com/bcoe/awesome-cross-platform-nodejs</a></p><p>Have fun!</p><figure><a href="http://bit.ly/HackernoonFB"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hqOaABQ7XGPT-OYNgiUBg.png" /></a></figure><figure><a href="https://goo.gl/k7XYbx"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vgw1jkA6hgnvwzTsfMlnpg.png" /></a></figure><figure><a href="https://goo.gl/4ofytp"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKBpq1ruUi0FVK2UM_I4tQ.png" /></a></figure><blockquote><a href="http://bit.ly/Hackernoon">Hacker Noon</a> is how hackers start their afternoons. We’re a part of the <a href="http://bit.ly/atAMIatAMI">@AMI</a> family. We are now <a href="http://bit.ly/hackernoonsubmission">accepting submissions</a> and happy to <a href="/service/mailto:partners@amipublications.com">discuss advertising &amp; sponsorship</a> opportunities.</blockquote><blockquote>If you enjoyed this story, we recommend reading our <a href="http://bit.ly/hackernoonlatestt">latest tech stories</a> and <a href="https://hackernoon.com/trending">trending tech stories</a>. Until next time, don’t take the realities of the world for granted!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35tCjoPcvq6LbB3I6Wegqw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5c214f0cf10" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/writing-cross-platform-c-is-easier-in-node-js-than-it-is-outside-of-node-js-a5c214f0cf10">Writing cross-platform C++ is easier in Node.js than it is outside of Node.js</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>