<?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 Leonardo Ribeiro on Medium]]></title>
        <description><![CDATA[Stories by Leonardo Ribeiro on Medium]]></description>
        <link>https://medium.com/@leocoding?source=rss-f4d97fec0b95------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9bIkPah2CQp4LOPuWOpk9w.jpeg</url>
            <title>Stories by Leonardo Ribeiro on Medium</title>
            <link>https://medium.com/@leocoding?source=rss-f4d97fec0b95------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:50:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leocoding/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[Tricky issues by working with CSV files]]></title>
            <link>https://medium.com/@leocoding/tricky-issues-by-working-with-csv-files-5334008d9326?source=rss-f4d97fec0b95------2</link>
            <guid isPermaLink="false">https://medium.com/p/5334008d9326</guid>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[programming-tips]]></category>
            <category><![CDATA[csv]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[problems]]></category>
            <dc:creator><![CDATA[Leonardo Ribeiro]]></dc:creator>
            <pubDate>Thu, 31 May 2018 15:10:12 GMT</pubDate>
            <atom:updated>2018-05-31T15:18:13.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7JSwGWVbf11RxDQaC6qBw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/TsXmzTc1gDk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ethan Haddox</a> on <a href="https://unsplash.com/search/photos/hurt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Did you already worked with CSV files? If yes, probably you didn&#39;t end up on a nirvana status where everything worked fine. You end up, of course, on our ass savior, wonderful, so loved <a href="https://stackoverflow.com/">stackoverflow</a>.</p><p>After working A LOT with csv files recently, I think I had all the possible problems and bugs that I could have with it and that&#39;s why I felt the need to create this post. I really don&#39;t want anyone to pass through what I&#39;ve passed.</p><p>Here I will post the possible problems and solutions by working with CSV files, so you can easily solve it and not make your manager/boss/whatever angry because you&#39;re taking so long to just finish a task with a CSV file.</p><p>So let&#39;s get started:</p><h3>Encoding</h3><p>You&#39;ll face problems with encoding in your csv depending on what OS it was generated and with what tool it was generated. Usually, if you generate a csv file from a old MS Excel on a mac, it will generate a __western__ encode so you&#39;ll have to convert it to utf-8 or whatever encode you&#39;re using.</p><p>If you&#39;re working with MySQL and wants to import a CSV file directly in the database, make sure all tables are utf-8 with utf8_unicode_ci as collate. You can easily do that like so:</p><pre>ALTER TABLE t CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;</pre><h3>Column Separator</h3><p>By working with CSV files you has this GREAT standard of variation of column separator based on your location or OS configuration or app you&#39;re using to generate the CSV file. It could be a comma, a semi-colon, a dot, a dollar sign and so on. For instance, usually in USA the way it&#39;s exported has a a comma as column separator, so it should look like this:</p><pre>column1,column2,column3<br>value1,value2,value3<br>value1,value2,value3</pre><p>BUUUUUT…it would be very differente on Brazil (where I live 🇧🇷), like so:</p><pre>column1;column2;column3<br>value1;value2;value3<br>value1;value2;value3</pre><p>So be ready to treat issues like that.</p><h3>Line Separator</h3><p>This was, by far, the more tricky problem that I&#39;ve faced. I mean, it&#39;s easy to solve, but it&#39;s hard to find out.</p><p>If you use some script to load CSV files directly into you db and you see that the script completed successfully but without affected lines, obviously it means that nothing was imported. Why?</p><p>In MySQL for instance when you use <strong>LOAD DATA [LOCAL] INFILE</strong> you have to pass the path to the file and a few other parameters like this:</p><pre><strong>LOAD DATA LOCAL INFILE<br> </strong>&#39;/path/to/the/file.csv&#39;<br><strong>INTO TABLE </strong>your_table<br><strong>FIELDS TERMINATED BY </strong>&#39;,&#39;<br><strong>ENCLOSED BY </strong>&#39;&quot;&#39;<br><strong>ESCAPED BY </strong>&#39;&quot;&#39; <br><strong>LINES TERMINATED BY </strong>&#39;\n&#39; # ⚠️ the awesome mother hacker of my life<br><strong>IGNORE </strong>1 <strong>LINES</strong></pre><p>It will not work if:</p><ul><li>You&#39;re using a old excel version on your mac</li><li>You&#39;re using windows</li><li>You&#39;re using other app to generate the csv which not separate end lines with \n</li></ul><p>And here&#39;s what happens as MySQL documentation tells:</p><blockquote>If you have generated the text file on a Windows system, you might have to use LINES TERMINATED BY &#39;\r\n&#39; to read the file properly, because Windows programs typically use two characters as a line terminator. Some programs, such as <strong>WordPad</strong>, might use \r as a line terminator when writing files. To read such files, use LINES TERMINATED BY &#39;\r&#39;.</blockquote><p>And another problem about it happens if your client change the version of the old excel to a new one on the mac, for instance which will change \r to \n when exporting the CSV which will cause you changing the script.</p><h3>That&#39;s all folks!</h3><p>If you found it helpful, show the love with claps and sharing.<br>If you have anything to add here, please let me know.</p><p>Twitter: <a href="https://twitter.com/leodsgn">@leodsgn</a><br>Linkedin: <a href="https://linkedin.com/in/leoribeirodsgn">@leoribeirodsgn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5334008d9326" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why drinking coffee with other developers matter]]></title>
            <link>https://medium.com/@leocoding/why-drinking-coffee-with-other-developers-matter-2d8bafa866f2?source=rss-f4d97fec0b95------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d8bafa866f2</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Leonardo Ribeiro]]></dc:creator>
            <pubDate>Mon, 25 Dec 2017 23:40:11 GMT</pubDate>
            <atom:updated>2017-12-26T01:16:51.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tISz4KJSGbe5qy0pvq_UoA.jpeg" /><figcaption><a href="https://www.pexels.com/photo/adult-agreement-beard-beverage-541522/">https://www.pexels.com/photo/adult-agreement-beard-beverage-541522/</a></figcaption></figure><p>One of the greatest things about software develoment industry is that we can freely sit down with fellow developers and have a cup of coffe, sending them some DM on tweeter, and so on. That not might seem like a big deal, but actually it is!</p><p>We work in an industry with open source software, open standards, open information, open learning, open (almost) everything. The tools that we use daily are changing so fast, but the reason why we keep working in this industry is because of this freedom to have so many open ways to work, as well.</p><p>If we compare this industry with some other fields we can easily find people that don&#39;t have this kind of freedom to just take a cup of coffee with each other, share knowledge and tricks to solve simple problems, unless it&#39;s paid.</p><p>Now, take a look at the web. We thrieve on sharing knowledge. We publish blogs, record video tutorials, podcasts, create open source repositories, contribute to other people&#39;s projects for free, answer questions on stack overflow, distribut codepens, all for others to learn the things that we already know. Sitting down and taking a cup of coffee and discussing your views on current web practices and new frameworks is the most basic way about how we share knowledge and how we grow up together in this industry.</p><p>So whenever you have the chance invite your associate/co-worker out for a cup of coffee. It&#39;s not only acceptable, but a valuable practice. These coffees can lead to learning new things that you couldn&#39;t even imagine exists or even helping you to improve your abilities. It also can help you to find new connections, new jobs and a new great friend.</p><p>Of course you don&#39;t have to limit yourself to just cup of coffee, but also tea, beer, a lunch or even a ride. I personally learnt a lot in a ride with a friend while we were going to another city near from mine to open a company. With just 2 hours of talk I&#39;ve improved my way to code in a more professional way.</p><p>With a lot of these talks with lot&#39;s of friends (also developers) I was able to get better as a professional developer and was able to get a remote job that pays me well which also gave me the chance to meet people from other countries. So now I have the opportunity to learn more and more. This way the perspective that I have is that I don&#39;t have limits to grow and I strongly believe that neither you have.</p><p>The tips that I leave here now is that you should keep your mind open as the web to seize the opportunities to connect and share what you have with others and also get knowledge from others. Take a chance and call your co-workers or other professionals that you know to drink a cup of coffe. I&#39;m sure that you&#39;ll always have the opportunity to learn something new.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d8bafa866f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The evolution of customer service]]></title>
            <link>https://medium.com/@leocoding/the-evolution-of-customer-service-336a6be051d3?source=rss-f4d97fec0b95------2</link>
            <guid isPermaLink="false">https://medium.com/p/336a6be051d3</guid>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[customer-experience]]></category>
            <dc:creator><![CDATA[Leonardo Ribeiro]]></dc:creator>
            <pubDate>Tue, 14 Mar 2017 23:46:56 GMT</pubDate>
            <atom:updated>2017-03-15T13:23:14.010Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oo4yTQu1gLbu95MvKNlcUQ.jpeg" /><figcaption><a href="https://unsplash.com/photos/98Elr-LIvD8">Courtesy of Zachary Nelson — Unsplash</a></figcaption></figure><p>I remember when I was younger and listened to people saying that <em>foo software </em>didn&#39;t work and <em>bar software </em>didn&#39;t work as well. I remember people saying that when they tried to talk with the customer service about these softwares they were just put on hold, waiting to talk with the owner of the software to solve their problems. They just lost some years of their lives on that, holding phones waiting…</p><p>Things are a little different now, with better customer services using high tech to better understand user&#39;s needs.</p><p>One of the stories that I&#39;ve most appreciated is the Zappos customer service. When a customer, just to &quot;test&quot; the &quot;best customer service around the world&quot;, called to Zappos telling that he wanted a Pizza. Then, the CS just said that they didn&#39;t sell pizza, but they could call a pizza store to ask the pizza for that customer.</p><h3>This is one of the best customer services around the world! ( a link for more <a href="http://www.infinitcontact.com/blog/zappos-stories-that-will-change-the-way-you-look-at-customer-service/">here</a>).</h3><p>What now? How does actual companies should understand user&#39;s needs? How should they provide a better customer service?</p><p>Here is how: <strong>PUT THE CUSTOMER INSIDE YOUR BUSINESS.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FGmdFiZtdJtQty%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Famy-poehler-paul-rudd-they-came-together-GmdFiZtdJtQty&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FGmdFiZtdJtQty%2F200.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="266" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e43ff0835202e1aa063bcf69f36a6fc/href">https://medium.com/media/2e43ff0835202e1aa063bcf69f36a6fc/href</a></iframe><p>Yup!</p><p>You&#39;re building products for your customers, right? <strong>So you should ask them what and how they really want it!</strong></p><h3>Stop building things and putting it through your customer&#39;s throat.</h3><p>Here&#39;s a exemple:</p><p>I was trying out a tool called <a href="https://gitshowcase.com/">GitShowcase</a> to build a portfolio, then I noticed that it could be better with some improvements, so I gave a feedback with some suggestions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDmU_rybHMWzSfiSm5quBA.png" /></figure><p>After just 3 days, I received a email from the guys that built it that made me feel an important part of the company. I just felt that <em>I was part of the team </em>(even not being).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uTisUZifPPU5D36VSp88A.png" /></figure><p>Just a simple e-mail made me feel happy, because they listened to me and and I was not just a possible customer. I had a need (having an awesome portfolio), but they also had and recognized it from a simple guy like me.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FLYDNZAzOqrez6%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Freaction-happy-applause-LYDNZAzOqrez6&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FLYDNZAzOqrez6%2F200.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="398" frameborder="0" scrolling="no"><a href="https://medium.com/media/f66f6c85e25e106650b7134b88415fda/href">https://medium.com/media/f66f6c85e25e106650b7134b88415fda/href</a></iframe><h4><strong>Conclusion</strong></h4><p>Please, stop forcing people to use what you have, that’s boring and nobody needs it. Start building things that people actually need and wanna use.</p><p>FINALLY, REMEMBER the most important, The real boss are your customers! So include your customer in your company, ask them for feedback and listen to what they have to say. Justify yourself if you think their feedback is not a good idea (in a good way) or let them know that you loved their opinion and put it to work.</p><p>Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=336a6be051d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>