<?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 Daniel Cavalcante on Medium]]></title>
        <description><![CDATA[Stories by Daniel Cavalcante on Medium]]></description>
        <link>https://medium.com/@danielmc?source=rss-44f3cec31f4f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9w0aQp4QetQy2tjM.</url>
            <title>Stories by Daniel Cavalcante on Medium</title>
            <link>https://medium.com/@danielmc?source=rss-44f3cec31f4f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:06:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danielmc/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[Installing Brave on Arch Linux]]></title>
            <link>https://medium.com/@danielmc/installing-brave-on-arch-linux-4ece7563678e?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ece7563678e</guid>
            <category><![CDATA[braves]]></category>
            <category><![CDATA[web-browser]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[arch]]></category>
            <category><![CDATA[basic-attention-token]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Wed, 02 Jan 2019 00:51:12 GMT</pubDate>
            <atom:updated>2019-01-02T00:51:12.794Z</atom:updated>
            <content:encoded><![CDATA[<p>Either if you care about your privacy or openness of the web, <a href="https://brave.com/">Brave</a> is your browser. It also has interesting ideas for paid digital content, like the<a href="https://basicattentiontoken.org/"> Basic Attention Token (BAT)</a> and the <a href="https://en.wikipedia.org/wiki/Pay_to_surf">pay to surf concept</a>.</p><h3>BrendanEich on Twitter</h3><p>@dcavalcante @firefox @brave Everything we do above baseline tracker-blocking browsing requires user opt-in. Firefox snippets were opt out under long-standing informative / non-commercial model while I was involved. Changing the user model w/o consent is a line Brave will not cross.</p><p>Since the official site doesn’t have installing instructions for Arch Linux, I decided to make this quick guide. The best way to install and keep it updated is via AUR, however the first and most obvious result was flagged outdated on 2018–11–14. So I installed the <a href="https://aur.archlinux.org/packages/brave-bin/">brave-bin package</a> instead:</p><pre>git clone https://aur.archlinux.org/brave-bin.git<br>cd brave-bin<br>makepkg -si</pre><p>Or you can just install the brave-bin package using an AUR helper, if that’s your thing. After installing you’re ready to surf the web in a more secure and faster way. At first its window decoration looked a bit weird (to me at least), but that’s easy to change by clicking the titlebar with the secondary button and then “Use system titlebar and borders”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*w7la2KOALaiBXfiHHQRW2Q.png" /></figure><p>Much better now! Here it is in all its glory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*6I96oXmUJc-TrkwzbW_GCw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ece7563678e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Styling React]]></title>
            <link>https://medium.com/@danielmc/styling-react-f3b0de90616d?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3b0de90616d</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css-in-js]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Thu, 19 Jul 2018 19:04:12 GMT</pubDate>
            <atom:updated>2018-07-19T19:04:12.537Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started learning React about a year ago, its official documentation had an example that used CSS-in-JS which made me squirm a lot more than JSX at first sight. Despite the feel that regular CSS would be better suited for my (how very original) todo app, I decided to play along and see if it would make more sense later on.</p><p>Spoiler alert: it didn’t. After I finished the basics and started adding new features it was becoming even harder to manage. It prompted me to go back and check the docs again to understand why would they advocate such technique, but couldn’t find it anymore. It even <a href="https://reactjs.org/docs/faq-styling.html">claims that plain old CSS is better for performance</a>.</p><p>Before replacing the styling method of my app I decided to unearth what happened with the tutorial I had seen; also if there was any consensus along the React community about it. Googling about it shows that people are very divided about how effective CSS-in-JS really is. Some developers <a href="https://css-tricks.com/the-debate-around-do-we-even-need-css-anymore/">praise its versatility</a>, while others are <a href="https://gomakethings.com/whats-wrong-with-css-in-js/">skeptical of the benefits</a>.</p><h3>Dan Abramov to the rescue</h3><p>Scrolling through my Twitter timeline this post caught my attention:</p><h3>Dan Abramov on Twitter</h3><p>Did you know: CSS classes work perfectly fine in React! If you&#39;ve heard somewhere that in order to use React you have to put CSS into JavaScript, please know it&#39;s not true 🙂 And pass the knowledge along!</p><p>So I decided to ask Dan why they replaced inline styles with pure CSS, claiming it felt like I was digging up remains of war won by the latter. He started by pointing out the confusion about what “inline style” means, since many CSS-in-JS implementations don’t actually use it. And that the “war” metaphor was inappropriate, since there aren’t only two but five or more techniques and neither have really “won” because each has its pros and cons.</p><p>He explained that “the main reason React docs distance themselves from CSS-in-JS is not because it’s objectively bad (some approaches are bad, some are pretty good) but because the community mistakingly associates CSS-in-JS with React. And we don’t want to be arbiters in that debate. So we document the least controversial option.” Also the reason that they removed the example I saw was because (just like I did) people used to see it as an endorsement.</p><p>Now I’m compiling a list of use cases where it makes sense to use CSS-in-JS (like <a href="https://github.com/tuchk4/awesome-css-in-js">this</a>), but I’ll tell you upfront from my own experience that ordinary styles for a regular todo app isn’t one of them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3b0de90616d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Arch Linux install reminders]]></title>
            <link>https://medium.com/@danielmc/quick-arch-linux-install-reminders-fab71bc6eee3?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fab71bc6eee3</guid>
            <category><![CDATA[arch]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Tue, 13 Mar 2018 23:17:26 GMT</pubDate>
            <atom:updated>2018-03-13T23:18:30.895Z</atom:updated>
            <content:encoded><![CDATA[<p>Remember to install and config grub before rebooting:</p><blockquote># grub-install -- target=i386-pc --debug /dev/sda<br># grub-mkconfig -o /mnt/usb/boot/grub/grub.cfg</blockquote><p>Setup network with netctl examples, netctl start to test and then netctl enable to make it persistent. Also remember to install wpa_supplicant before booting out.</p><p>To get a working desktop there’s few caveats:</p><ul><li>Install xorg-server and gpu driver</li><li><em>setxkbmap</em> -model <em>abnt2</em> -layout br -variant <em>abnt2</em></li><li>Weird accents in zsh (.zshrc): export LC_CTYPE=”en_US.UTF-8&quot;</li></ul><p>Critical packages: base-devel openssh vim tmux</p><p>Maybe later I’ll do a slim down version of the commands used for the install.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fab71bc6eee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeBSD reminders for a fresh install]]></title>
            <link>https://medium.com/@danielmc/freebsd-reminders-for-a-fresh-install-2bee65ae8401?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bee65ae8401</guid>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[freebsd]]></category>
            <category><![CDATA[arch]]></category>
            <category><![CDATA[xfce]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 14:39:54 GMT</pubDate>
            <atom:updated>2018-03-12T14:39:54.077Z</atom:updated>
            <content:encoded><![CDATA[<p>After an update in Arch Linux ditched the nvidia-304xx drivers used in an old machine, I decided it was time to ditch Arch for FreeBSD. The nvidia-driver-304 from <a href="https://www.freshports.org/x11/nvidia-driver-304">Fresh Ports</a> was an easy install, but first Linux Binary Compatibility had to be enabled at /etc/rc.conf:</p><blockquote>linux_enable=”YES”</blockquote><p>And start it right away:</p><blockquote># kldload linux64</blockquote><p>This is an old server, but I still like to have wi-fi and a desktop environment ready to use at times. Wifi was surprisingly easy too, just had to use run0 instead of ath0 for my Cisco/Linksys usb card:</p><blockquote>wlans_run0=”wlan0&quot;<br>ifconfig_wlan0=”WPA SYNCDHCP”</blockquote><p>Add the access point to /etc/wpa_supplicant.conf and done! For a desktop I chose xfce, also had to install xorg and enable dbus to run X:</p><blockquote>sysrc dbus_enable=”YES”</blockquote><p>And start it:</p><blockquote># service dbus start</blockquote><p>Now I still have to setup the rest of services and apps it was running as the main home server, so I’ll keep this updated as a reminder for later and others.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bee65ae8401" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Arquivos ocultos no UNIX nasceram como bug que virou feature]]></title>
            <link>https://medium.com/@danielmc/arquivos-ocultos-no-unix-nasceram-como-bug-que-virou-feature-4432601e17fe?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4432601e17fe</guid>
            <category><![CDATA[ken-thompson]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[história]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[dennis-ritchie]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Fri, 23 Jun 2017 23:22:42 GMT</pubDate>
            <atom:updated>2017-06-23T23:22:42.530Z</atom:updated>
            <content:encoded><![CDATA[<p>Hoje aprendi que quando a segunda versão do sistema de arquivos do UNIX estava sendo refeita, introduzindo a navegação hierárquica que usa . (ponto final) para se referir ao diretório atual e .. (dois pontos finais) para o diretório pai, um dos criadores (não se sabe se Ken Thompson ou Dennis Ritchie) introduziu um teste simples no programa ls para esses casos, algo que seria ilustrado tipo:</p><pre>if (filename[0] == &#39;.&#39;) continue;</pre><p>Quando na verdade deveria checar assim:</p><pre>if (strcmp(filename, &quot;.&quot;) == 0 || strcmp(filename, &quot;..&quot;) == 0) continue;</pre><p>Disso surgiram duas consequências não intencionais:</p><ul><li>Os desenvolvedores passaram a usar essa mesma simplificação e introduziram novos bugs, por exemplo pulando a contagem de arquivos que começam com ponto.</li><li>Com isso foi criado o conceito de &quot;arquivos ocultos&quot; (dotfiles), usados pelos desenvolvedores nos arquivos de configuração que passaram a poluir o diretório home por serem &quot;invisíveis&quot; ao ls.</li></ul><p>Fonte: <a href="https://plus.google.com/+RobPikeTheHuman/posts/R58WgWwN9jp">Google+</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4432601e17fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Como formatar código no Medium]]></title>
            <link>https://medium.com/@danielmc/como-formatar-c%C3%B3digo-no-medium-8f0ccd3854c7?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f0ccd3854c7</guid>
            <category><![CDATA[dicas]]></category>
            <category><![CDATA[programação]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[medium-brasil]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Fri, 16 Jun 2017 04:29:44 GMT</pubDate>
            <atom:updated>2017-06-16T04:29:44.142Z</atom:updated>
            <content:encoded><![CDATA[<p>Basta selecionar o texto ou começar um novo parágrafo e usar a combinação:</p><pre>Alt+Cmd+6 (no Mac)</pre><p>ou</p><pre>Alt+Ctrl+6 (no Windows/Linux)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f0ccd3854c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Como instalar o Python 3.5 no FreeBSD]]></title>
            <link>https://medium.com/@danielmc/instalando-python-3-5-no-freebsd-bc3d6ff87e46?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc3d6ff87e46</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[bsd]]></category>
            <category><![CDATA[freebsd]]></category>
            <category><![CDATA[pip]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Fri, 16 Jun 2017 04:22:43 GMT</pubDate>
            <atom:updated>2017-06-16T04:24:22.410Z</atom:updated>
            <content:encoded><![CDATA[<p>Apenas um lembrete rápido de como instalar o Python 3 no FreeBSD 11 (também deve funcionar nas versões anteriores):</p><pre># pkg install python35</pre><p>Ainda não existe um pacote específico para o pip (gerenciador de pacotes do Python), então é necessário instalar com o seguinte comando:</p><pre># python -m ensurepip</pre><p>E para atualizar o pip para última versão:</p><pre># pip3.5 install</pre><p>Fonte: <a href="https://forums.freebsd.org/threads/52702/">https://forums.freebsd.org/threads/52702/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc3d6ff87e46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You can’t delete a post in Medium’s iOS app :(]]></title>
            <link>https://medium.com/@danielmc/you-cant-delete-a-post-in-medium-s-ios-app-733eb9b37b6?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/733eb9b37b6</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-apps]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Fri, 17 Mar 2017 03:21:18 GMT</pubDate>
            <atom:updated>2017-03-17T03:21:18.480Z</atom:updated>
            <content:encoded><![CDATA[<p>You can’t delete a post in Medium’s iOS app :(</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=733eb9b37b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using MS Paint to program in C]]></title>
            <link>https://medium.com/@danielmc/using-ms-paint-to-program-in-c-77b1610a55c9?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/77b1610a55c9</guid>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Thu, 16 Mar 2017 19:54:19 GMT</pubDate>
            <atom:updated>2017-03-17T03:19:18.524Z</atom:updated>
            <content:encoded><![CDATA[<p>Using MS Paint to program in C</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*K1ythYnbFx4i0jveA5PPsA.gif" /></figure><p>This gif of someone picking color values corresponding to ascii codes of a Hello World program is mesmerizing</p><p>Source: <a href="https://www.reddit.com/r/ProgrammerHumor/comments/5zcg1z/coding_in_ms_paint/">Reddit</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77b1610a55c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You can’t publish yet]]></title>
            <link>https://medium.com/@danielmc/you-cant-publish-yet-a106d01f91db?source=rss-44f3cec31f4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a106d01f91db</guid>
            <dc:creator><![CDATA[Daniel Cavalcante]]></dc:creator>
            <pubDate>Thu, 16 Mar 2017 19:50:01 GMT</pubDate>
            <atom:updated>2017-03-16T19:50:01.507Z</atom:updated>
            <content:encoded><![CDATA[<p>We haven&#39;t finished uploading your image.</p><p>Medium won&#39;t let me upload a 4.4mb gif :(</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*ASy8ZVNpemJGttqmY7QRLA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a106d01f91db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>