<?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 Alberto Schiabel on Medium]]></title>
        <description><![CDATA[Stories by Alberto Schiabel on Medium]]></description>
        <link>https://medium.com/@alberto.schiabel?source=rss-167bbe2ff9ec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*otx0Zf9Wja9KSuWbYYLKzA.jpeg</url>
            <title>Stories by Alberto Schiabel on Medium</title>
            <link>https://medium.com/@alberto.schiabel?source=rss-167bbe2ff9ec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 17:17:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alberto.schiabel/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[How to fix “pod install” error in React Native on Mac M1]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@alberto.schiabel/how-to-fix-pod-install-error-in-react-native-on-mac-m1-5d79dc52f7e8?source=rss-167bbe2ff9ec------2"><img src="https://cdn-images-1.medium.com/max/2600/0*fS0-h2ogluglLFOd" width="4500"></a></p><p class="medium-feed-snippet">Picture this: you&#x2019;ve finally found the time and motivation to build the next billion-dollar app with React Native on your brand-new&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@alberto.schiabel/how-to-fix-pod-install-error-in-react-native-on-mac-m1-5d79dc52f7e8?source=rss-167bbe2ff9ec------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@alberto.schiabel/how-to-fix-pod-install-error-in-react-native-on-mac-m1-5d79dc52f7e8?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d79dc52f7e8</guid>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[m1]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Sat, 05 Feb 2022 00:33:05 GMT</pubDate>
            <atom:updated>2022-07-08T17:34:06.342Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Introducing Pate, my latest Open Source Side project]]></title>
            <link>https://medium.com/hackernoon/introducing-pate-my-latest-open-source-side-project-12da4fccd9fc?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/12da4fccd9fc</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[pate]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Sun, 10 Dec 2017 18:32:29 GMT</pubDate>
            <atom:updated>2017-12-13T19:29:05.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QgHG4lnmEoxbwQFXHEKtzg.jpeg" /></figure><p>If you are interested in Software Engineering, but you think you lack the practical experience to land a meaningful job in the tech industry - even though you’ve studied a lot of Computer Science at the University or in an <a href="https://medium.freecodecamp.org/200-universities-just-launched-560-free-online-courses-heres-the-full-list-d9dd13600b04">alternative way</a> -, you’ll probably want to start working at a side project.<br>Why? Because it can offer you a lot of benefits!</p><p>Here’s a brief list of pros that should give you the idea of why side projects are useful:</p><ul><li>you have the opportunity to learn a lot while enjoying the relax of having <strong>no deadlines</strong></li><li>you can focus on what you like most, or even automate a task that you spend a lot of time on</li><li>you can even give a boost to your tech career, enriching your portfolio with projects different than the hated “<em>Todo lis</em>t” / “<em>Tic tac toe</em>” / “<em>Random abused tutorial project</em>”</li></ul><p>In this article I’d like to offer you an overview of what I did, hoping to inspire someone else to follow the same guidelines.</p><h3><strong>First step: find something broken to fix</strong></h3><p>In my opinion, the best way to get started is to come up with an idea that can help you or somebody else. Usually this is an easy step, and the fact that it shouldn’t take you too long is really important: if you spend too much time on something, without having anything concrete, you’ll probably end up with a lot of code that will never see the light of a release. Start with something that has a well-defined purpose, and maybe expand it after its first release. You don’t necessarily need to create the new Airbnb or Pinterest to be satisfied of your petty project.</p><p>The problem that I’ve (rather successfully) tried to solve is the following: I wanted to be able to find all the files that contained a certain pattern in their content, be it a word, a programming language keyword, or a complicated Regular Expression. I’m pretty certain that this could be easily achieved with tools such as grep and awk, but:</p><ul><li>I don’t really appreciate the jargon this commands imply</li><li>I spend way more time on Windows than on a UNIX like environment such as Ubuntu or Mac OS</li><li>the main point of a side project is to build something on your own</li></ul><h3>Second step: decide what instruments / APIs to use</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Nq1fQSPq9aeoWxn4WFbhg.png" /></figure><p>I spent quite some time with NodeJS, ever since I’ve heard about it at High School. Now that I’ve been working as a Full Stack Developer at <a href="https://brainwise.it/?lang=en">Brainwise.it</a> since Summer 2016, I’ve come to know a lot of tricky aspects of the V8 runtime and Node’s APIs, but I’ve never had the occasion to fiddle with the Stream APIs.</p><p>Since NodeJS is the environment I’m most comfortable with (followed by Golang) and due to the fact that I needed to scan a lot of files, using it as the foundation of my petty project resulted pretty natural to me.</p><p>Also, I kind of suffer the fact that JavaScript lacks typings (using also Golang a lot, I find them fundamental in a great deal of different ways), so I’ve decided to try the latest TypeScript version.</p><h3>Third step: decide the aspect of your application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHOoCVJnIy7-0ncSSHIxmQ.jpeg" /></figure><p>Note that by “aspect” I don’t necessarily need to think about the UI layer. I’m mainly talking about deciding how you want to interact with the app. Should it be a mobile application? Or a web one? Or even a desktop app?<br>To keep things simple and slim, I’ve decided to follow the CLI way. Also, I wanted the terminal UX to be colorful and informative in a clean fashion: command line doesn’t necessarily need to be so grey and retro as we’ve come to expect it.</p><h3>Fourth step: if there’s something you can reuse, reuse it</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AagfZZ8bGOI4iTbLqewg6Q.png" /></figure><p>Since my main focus was handling tons of file scans as fast as possible, I didn’t really want to think about how to render colorful progress output in the CLI or how to filter files via glob patterns as a UNIX shell would do. So I ended up using the following amazing npm packages:</p><ul><li><a href="https://www.npmjs.com/package/chalk">chalk</a>: for rendering cheerful colors in the terminal</li><li><a href="https://www.npmjs.com/package/progress">progress</a>: to provide meaningful output to the user while the app is processing files</li><li><a href="https://www.npmjs.com/package/yargs">yargs</a>: to parse command line options</li><li><a href="https://www.npmjs.com/package/glob">glob</a>: to match file names as a shell would do</li></ul><p><strong>Fifth step: enjoy the realization of your project and profit from what you learn in the process!</strong></p><p>This is the step in which you have to show the world (and potential future colleagues, or even employees) what you’re able to do.</p><p>If I had to sum up which skills I’ve enhanced and what I’ve learnt, it’d be the following:</p><ul><li>if a module’s TypeScript definition hasn’t been posted on <a href="https://github.com/DefinitelyTyped/DefinitelyTyped">DefinitelyTyped</a>, you have to create it yourself. Pro tip: if you extend an open source project, <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/pull/22037">you should contribute back</a></li><li>I learnt how to create generic functions in TypeScript, which are really similar to C++ templates</li><li>I verified personally that if you open a lot of files without closing them you’re going to have a really bad time</li><li>I discovered that in some cases using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce">reduce</a> method on an array is way more efficient than <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Map">map</a> combined with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Filter">filter</a></li><li>I learnt how to create a custom Buffer size while reading a Stream with fs.createReadStream. You have to use the highWaterMark property, which is barely mentioned in the official docs</li><li>I also managed to create a small NodeJS app adjustable enough to be comfortably consumed from both the CLI and another npm module</li></ul><p>Beside that, if you think to eventually publish your repo as a package to npm, please check if the name you chose has already been taken. Mine was. Initially my project was called “Discover”, because you know, its purpose is to discover patterns inside a specific set of files. After acknowledging that somebody else took that name before me, I ended up calling it “Pate”, pronounced like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*JlIO7E3VVqLsP2hdhll6hw.jpeg" /></figure><p>It is reasonably similar to “pattern”, also I was anxious of publishing the project, and when I’m anxious I become hungry.</p><p>You can find Pate on <a href="https://github.com/jkomyno/pate">Github</a> and on the <a href="https://npmjs.com/packages/pate">npm</a> registry. I hope this article was helpful to you, I’ve tried to write it as the post I would have wanted to read before writing this console application. If you have suggestions or comments, please post a response below, and if you liked what you read so far, smash that clap button!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12da4fccd9fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/introducing-pate-my-latest-open-source-side-project-12da4fccd9fc">Introducing Pate, my latest Open Source Side project</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[How to permanently fix “SDK Build Tools is too low for project” error in React Native for Android]]></title>
            <link>https://medium.com/@alberto.schiabel/how-to-permanently-fix-sdk-build-tools-is-too-low-for-project-error-in-react-native-for-android-1a2d245bda18?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a2d245bda18</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Thu, 14 Sep 2017 21:20:09 GMT</pubDate>
            <atom:updated>2017-09-14T21:20:09.722Z</atom:updated>
            <content:encoded><![CDATA[<p>Or: <strong>How not to have your react-native Android project completely messed up every time you add a dependency with yarn</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ppn8hBM1elh0Fw-7eApeGQ.png" /></figure><p>One of the most annoying things that can happen while developing a <a href="http://facebook.github.io/react-native/">React Native</a> app is the dreaded <strong>A problem occurred configuring project ‘:app’ </strong>error, immediately followed by a more specific <strong>The SDK Build Tools revision (xx.x.x) is too low for project ‘:your-react-native-dependency’</strong> message.</p><p>This may occur in a variety of different situations:</p><ul><li>You ran react-native run-android after having updated a specific native dependency;</li><li>You ran the same command after having simply run <a href="https://yarnpkg.com/">yarn</a>, which internally removes every manual update you may have done to the files in the node_modules folder (besides actually updating every dep);</li><li>You tried to link a native module without success (either with react-native link your-react-native-dependency or manually);</li></ul><p>Probably you already know how to fix this manually, but chances are you’re looking for a way to automatize it, not to waste precious minutes every day.</p><p><strong>Well, after this article you’ll know how to deal with it, for good.</strong></p><blockquote>One of the most annoying things that can happen while developing a <a href="http://facebook.github.io/react-native/">React Native</a> app is the dreaded <strong>A problem occurred configuring project ‘:app’ </strong>error, immediately followed by a more specific <strong>The SDK Build Tools revision (xx.x.x) is too low for project ‘:your-react-native-dependency’</strong> message.</blockquote><h3>Manual solution</h3><p>Honestly, I have no intention to waste your time digging into the manual solution, since there are many other tutorials online that do it pretty well (<a href="https://saadibrahim.com/blog/how-to-fix-sdk-build-tools-revision-too-low-error-when-running-react-native-run-android-command/">example</a>), but all of them — at least, everyone of them I’ve managed to find — only offer a temporary solution, which you have to repeat every time you perform one of the steps above, or even worse, propose you to <a href="https://github.com/Microsoft/react-native-code-push/issues/768#issuecomment-289901294">downgrade to an old (and slow) version of gradle</a>,<em> </em>how useful can that be?</p><p>So, let’s delve into the <strong>real solution</strong>.</p><h3>Automatic solution</h3><p>What’s better than a simple script to change all the <em>compileSdkVersion </em>and <em>buildToolsVersion </em>entries in every <em>react-native’s Android</em> dependency of our project? We could write it in <em>JavaScript</em> and then hook it up to the scripts section of our <em>package.json</em>, and then invoke it from npm run or yarn run.</p><p>Well… While that could certainly be a huge step forward, we’d still have to parse the <em>gradle</em> files and edit them without invalidating their sintax. Nope, to solve this issue correctly and in a clean manner, we should leverage the Gradle build tool scripting language directly.</p><p>Gradle’s Project API has a method called <a href="https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#afterEvaluate(org.gradle.api.Action)">afterEvaluate</a> whose description is the following:</p><pre>void afterEvaluate(<a href="http://docs.groovy-lang.org/docs/groovy-2.4.11/html/gapi/groovy/lang/Closure.html?is-external=true">Closure</a> closure)</pre><blockquote>Adds a closure to be called immediately after this project has been evaluated. The project is passed to the closure as a parameter. Such a listener gets notified when the build file belonging to this project has been executed. A parent project may for example add such a listener to its child project. Such a listener can further configure those child projects based on the state of the child projects after their build files have been run.</blockquote><p>You can basically think of it as React’s componentDidMount on steroids.</p><p>The right place to call this method is in your yourReactNativeProject/android/build.gradle file, inside the subprojects {} section.</p><p>Your <em>build.gradle</em> file should look like the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9dc97a9769ea9d656a5ff97a439e8136/href">https://medium.com/media/9dc97a9769ea9d656a5ff97a439e8136/href</a></iframe><p>Now, let’s add the subprojects {} section and invoke our script:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33902198a70a0543e07d03ec97295e7c/href">https://medium.com/media/33902198a70a0543e07d03ec97295e7c/href</a></iframe><p>What did we just write? We basically delegated to Gradle the task of overwriting two particular entries of the ‘<em>android’</em> property of every dep’s <em>build.gradle</em> file: ‘<em>compileSdkVersion</em>’ and ‘<em>buildToolsVersion</em>’.</p><p>(I know, all these files have the same name and extension, it can be quite confusing for newbies).</p><p>You should obtain the following result (more or less) for every native dependency of your React Native Android project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4873830661bce210a921e1a7c4ef66f/href">https://medium.com/media/d4873830661bce210a921e1a7c4ef66f/href</a></iframe><p>That’s it, <strong>simple</strong> as pie. I personally love when a tedious issue can be fixed in a handful of lines of code.</p><p><em>You may also be interested in: </em><a href="https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850"><strong><em>React Native on XCode Beta 8.0: how to fix initial build error</em></strong></a><strong><em>.</em></strong></p><p><em>Some of my open source libraries I’d love to hear feedback about:</em></p><ul><li><a href="https://github.com/jkomyno/react-native-animated-hide-view"><strong><em>https://github.com/jkomyno/react-native-animated-hide-view</em></strong></a></li><li><a href="https://github.com/jkomyno/react-native-animated-checkbox"><strong><em>https://github.com/jkomyno/react-native-animated-checkbox</em></strong></a></li><li><a href="https://github.com/jkomyno/react-native-universal-picker"><strong><em>https://github.com/jkomyno/react-native-universal-picker</em></strong></a></li></ul><p><em>If you liked this tutorial and want to keep learning about React Native tips and tricks, make sure to click the “Follow” button below, and follow me on </em><strong><em>Github </em></strong><em>at </em><a href="https://github.com/jkomyno"><strong><em>@jkomyno</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a2d245bda18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NodeJS in ES6/ES7, how do you do it in production?]]></title>
            <link>https://medium.com/@alberto.schiabel/nodejs-in-es6-es7-how-do-you-do-it-in-production-d897c51c729c?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/d897c51c729c</guid>
            <category><![CDATA[babeljs]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Fri, 14 Oct 2016 14:35:43 GMT</pubDate>
            <atom:updated>2019-01-30T12:17:26.334Z</atom:updated>
            <content:encoded><![CDATA[<p>The newest generations of <strong>JavaScript</strong>, called <em>EcmaScript 6 </em>and <em>EcmaScript 7</em> (but you’re used to refer to them as <strong>ES6</strong>/<strong>ES7</strong>, right?) are a huge improvement in one of the most growing scripting languages.</p><p>I mean, do you remember how not-so-pleasing it was to write old school JavaScript, mocking what now are proper classes and adding quite a lot of boilerplate when what you just needed was returning a value of a function? Now, a lot of front end apps (or even boilerplates such as ) are written in ES6/ES7 by default and then transpiled into <strong>browser-compliant ES5</strong> by <a href="https://babeljs.io/">BabelJS</a>, but what about server programming in <strong>NodeJS</strong>?</p><h3>babel-node</h3><p>Actually, the guys at Babel have built a nice tool which accomplish with need, called <a href="https://babeljs.io/docs/usage/cli/#babel-node">babel-node</a>. <strong>But is it suitable for production environments?</strong> You know, this alert isn’t exactly production-friendly…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*898v-HndOWY-_HiLByL0kw.png" /><figcaption>Is this a “Nope”?</figcaption></figure><blockquote><em>You should not be using babel-node in production. It is unnecessarily heavy, with high memory usage due to the cache being stored in memory. You will also always experience a startup performance penalty as the entire app needs to be compiled on the fly.</em></blockquote><p>Yes, you can actually use it in a production environment, although you definitely need to tweak here and there a little bit. As Babel itself points out, babel-node is not meant to be used in production. “Wait” — you may say — “how come it’s like that?”</p><p>It’s actually pretty simple:</p><ol><li><strong>Transpile </strong>the code first with babel</li><li><strong>Execute </strong>the transpiled code directly with node</li></ol><p>You see, splitting the task in two allows us to avoid the just-in-time transpile overhead.</p><h3>Let’s get to code</h3><p>First of all: move all the NodeJS files you use server-side into a directory, eg. <strong>server.</strong></p><p>Here’s my setup.</p><ul><li><strong>build</strong>: generates the transpiled version of your server file (<em>the -d option indicates the output directory</em>)</li><li><strong>prebuild</strong>: clears the build directory</li><li><strong>start</strong>: executes the transpiled code in production mode</li><li><strong>prestart</strong>: calles the previous defined <em>“build”</em> script</li></ul><pre>&quot;build&quot;: &quot;babel -d ./build ./server&quot;,<br>&quot;prebuild&quot;: &quot;rm -rf build/*&quot;,<br>&quot;start&quot;: &quot;NODE_ENV=production node ./build/index.js&quot;,<br>&quot;prestart&quot;: &quot;npm build&quot;</pre><p>Please <strong>let me know if this was useful to you</strong>. You can find me both on<a href="https://github.com/jkomyno">Github</a> and <a href="https://twitter.com/jkomyno">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d897c51c729c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[npm tricks part 1: Get list of globally installed packages]]></title>
            <link>https://medium.com/@alberto.schiabel/npm-tricks-part-1-get-list-of-globally-installed-packages-39a240347ef0?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/39a240347ef0</guid>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Wed, 28 Sep 2016 12:15:45 GMT</pubDate>
            <atom:updated>2022-07-08T17:33:56.295Z</atom:updated>
            <content:encoded><![CDATA[<p>Quick question: does anybody of you folks know the exact amount of globally installed npm packages in your workstation? Probably not.</p><p>This is especially true for <strong>Node.js</strong>/<strong>npm</strong> newbies, who often try the most popular packages installing them globally, without even defining them in their package.json files; however, this may be useful even for more advanced Node.js developer, who may not know every npm CLI trick.</p><p>So, this is it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/019779fc4ae51ed8d07264b1453bc5da/href">https://medium.com/media/019779fc4ae51ed8d07264b1453bc5da/href</a></iframe><p>Let’s break this line down a little bit, shall we?</p><ul><li><strong><em>npm</em></strong>: the Node package manager command line tool</li><li><strong><em>list -g</em></strong>: display a tree of every package found in the user’s folders (without the <em>-g</em> option it only shows the current directory’s packages)</li><li><strong><em>— depth 0</em></strong><em> /</em><strong><em> — depth=0</em></strong>: avoid including every package’s dependencies in the tree view</li></ul><p>Here’s a sample result:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6a58028e73c6926cc7216c69eb4f889/href">https://medium.com/media/d6a58028e73c6926cc7216c69eb4f889/href</a></iframe><p>Congratulations, you now know how to get a list of all the npm packages you have installed on your machine!</p><p><em>If this article helped you, consider </em><a href="https://medium.com/@alberto.schiabel/subscribe"><strong><em>subscribing</em></strong></a><em> to get my latest tutorials and thoughts about software engineering. If you like to experience Medium yourself, consider supporting me and thousands of other writers by</em><strong><em> </em></strong><a href="https://medium.com/@alberto.schiabel/membership"><strong><em>signing up for a membership</em></strong></a><em>. It only costs</em><strong><em> $5 per month</em></strong><em>, and you get the chance of </em><strong><em>making money with your writing</em></strong><em> as well. You can cancel the membership anytime. By signing up with </em><a href="https://medium.com/@alberto.schiabel/membership"><em>this link</em></a><em>, you’ll support me directly, and it won’t cost you anything more. If you do so, you’ll encourage me to dedicate more time to knowledge sharing, so thank you a lot!</em></p><p>Let’s<strong> get in touch on </strong><a href="https://twitter.com/jkomyno"><strong>Twitter</strong></a><strong>, </strong><a href="https://github.com/jkomyno"><strong>Github</strong></a>,<strong> or </strong><a href="https://linkedin.com/in/alberto-schiabel"><strong>LinkedIn</strong></a><strong>.</strong> My DMs are open, come to say hi 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39a240347ef0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to compile wmic on a modern GNU/Linux system]]></title>
            <link>https://medium.com/@alberto.schiabel/how-to-compile-wmic-on-a-modern-gnu-linux-system-d4b0783bbf64?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4b0783bbf64</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[compilers]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Fri, 16 Sep 2016 09:58:53 GMT</pubDate>
            <atom:updated>2016-09-16T09:58:53.061Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Deprecation </strong>is feared by many coders and software engineers, due to its ability to completely break the build process of an even-not-so-complex application. This is especially annoying if you have the need to compile a certain “old” programs from sources, that you may need for an impelling work task (or even for your personal project).</p><p>This is exactly what happened to me some hours ago, when I crossed the hard path of installing <em>wmic </em>(<strong>Windows Management Instrumentation Command-line</strong>) on a GNU/Linux machine, which I needed for an enterprise application’s backend. Yeah, I know, it may sound strange to use wmic on a non-Microsoft environment, but our test machines run Ubuntu 16.04 and our production environment consists of a set of <em>SUSE Linux Enterprise Server 11</em>, and adding another virtualization layer wasn’t an option.</p><p>First of all, you have to be sure to install the <strong>autoconf </strong>package.<br>For Debian/Ubuntu/etc:</p><pre>$ sudo apt-get install autoconf</pre><p>For Suse:</p><pre># zypper install autoconf</pre><p>The common way of instaling wmic can be resumed in this gist:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f107b11c80b03a61888ea7b951958b41/href">https://medium.com/media/f107b11c80b03a61888ea7b951958b41/href</a></iframe><p>Plain old bash shell right? Right, but if you try to run this script on a not-so-frequently updated system it’ll complain that he couldn’t achieve the installation during the <em>sudo make</em> execution. Here’s the summary of the failed-installation log:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6b467071ae4dd3376500dba2b4c69e2/href">https://medium.com/media/a6b467071ae4dd3376500dba2b4c69e2/href</a></iframe><p>Admit it, everyone hates when build from source fails. So, what’s the source of this failure?</p><p>If you take an accurate look at this part of the log (it’s only 35 rows long, don’t be lazy) you can find this specific line, which gives us the most precious debug info we could have ever desired:</p><pre>Can’t use ‘defined(@array)’ (Maybe you should just omit the defined()?) at ./pidl/pidl line 583.</pre><p>That “<em>pidl</em>” file at “<em>wmi-1.3.14/Samba/source/pidl”</em> is a perl source file which apparently doesn’t seem to have the most standard compliant code. After having googled for quite some time, I found <a href="http://perldoc.perl.org/perldiag.html">this page</a> in the official Perl Language Website. Here’s what I was looking for:</p><blockquote><strong>Can’t use ‘defined(@array)’ (Maybe you should just omit the defined()?)</strong></blockquote><blockquote>(F) defined() is not useful on arrays because it checks for an undefined <em>scalar</em> value. If you want to see if the array is empty, just use if (@array) { # not empty } for example.</blockquote><p>I haven’t ever used Perl, but the instruction at <strong>line 583</strong> of the “pidl” file seemed useless to me, so I just got rid of it and saved.</p><p>The fastest way of doing this simple task is executing the following command on the terminal (this is particularly useful is you are in an <strong>SSH </strong>session):</p><pre>sudo sed -e ‘583d’ pidl &gt; pidl</pre><p>What next? Simply re-execute the prior “sudo make” command and you’re done!</p><p>Please <strong>let me know if this was useful to you</strong>. You can find me both on <a href="https://github.com/jkomyno">Github</a> and <a href="https://twitter.com/jkomyno">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4b0783bbf64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native on XCode Beta 8.0: how to fix initial build error]]></title>
            <link>https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850?source=rss-167bbe2ff9ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0225c649850</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Alberto Schiabel]]></dc:creator>
            <pubDate>Tue, 06 Sep 2016 21:18:14 GMT</pubDate>
            <atom:updated>2016-09-17T08:44:42.836Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://facebook.github.io/react-native/">React Native</a> is nowadays one of the most popular choices for creating cross-platform mobile apps combining the power of <a href="https://facebook.github.io/react/">React</a> and native APIs, and also is a VIP repository on <a href="https://github.com/facebook/react-native/">Github</a> (counting more than <strong>37000 </strong>stars at the moment), but clearly it is still pretty far from the goal of the 1.0.0 version.</p><p>This means that sometimes you developers need to tinker with some parts of the projects generated by the npm package to make it work, but <em>that basically happens with every beta application</em>.</p><p>The latest issues I experienced with React Native took me some time to find a decent solution, and given the fact that many questions on <a href="http://stackoverflow.com/questions/tagged/react-native">StackOverflow</a> are related to this problem, I’ve decided to write the simplest solution I’ve come up with.</p><h3>Environment</h3><p>First things first:</p><ul><li><strong>Mac OS </strong>version: <strong>El Capitan 10.11.6</strong> (you may have problems installing <strong>XCode 8.0.0 Beta</strong> on a lower version)</li><li><strong>node </strong>-v: v6.5.0</li><li><strong>npm </strong>-v: v3.10.3</li><li><strong>react-native-cli</strong> -v: 1.0.0</li><li><strong>react-native</strong>@0.32.0</li></ul><p>Now, this issue (related to a <em>RCTWebSocket</em>’s error inside the “ios” folder in the react native project) exists due to the fact that the newest XCode version adds some default flags before the first compilation, and React Native hasn’t kept up with these latest changes yet. Let’s help the developers then, waiting for an official solution from the React Native Team at Facebook!</p><h3>Project setup</h3><p>Simply run the same ol’ terminal commands:</p><p><strong>$</strong><em> react-native init YourAwesomeProject</em></p><p><strong>$ </strong><em>cd YourAwesomeProject</em></p><p><strong>$ </strong><em>react-native run-ios</em></p><p>Now, here’s the log I had (not that ugly<strong> ** BUILD FAILED ** </strong>at the end):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53dc4843ca95fcb36830309fdb617cb0/href">https://medium.com/media/53dc4843ca95fcb36830309fdb617cb0/href</a></iframe><p>You get the same problem if you try to run your iOS app directly from XCode either.</p><h3>Enough, what’s the solution?</h3><p>Here’s how to fix this annoying problem! Start by opening your project on XCode, then:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3QXlOKp6Kee_OCuePJh9g.png" /><figcaption>Just. Like. That.</figcaption></figure><ul><li>head over to the <strong><em>RTCWebSocket </em></strong>project (in the <em>TARGETS </em>section)and double click it;</li><li>in the build settings tab, select both “<em>All</em>” and “<em>Combined</em>” views</li><li>look for “Apple LLVM 8.0 — Custom compiler flags”</li><li>in the “Other C/C++/Warning flags” subsection just double right click and click, select the list entries and delete them tapping on the “minus” icon (please see the video below)</li><li>click the run button (or press ⌘+R)</li><li>you’re done!</li></ul><p><a href="https://webmshare.com/play/ovaE6">https://webmshare.com/play/ovaE6</a></p><p>Thanks for having taken a look at this article, the first I’ve ever written here on medium.com! You can find me both on <a href="https://github.com/jkomyno">Github</a> and <a href="https://twitter.com/jkomyno">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0225c649850" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>