<?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 Maciej Biłas on Medium]]></title>
        <description><![CDATA[Stories by Maciej Biłas on Medium]]></description>
        <link>https://medium.com/@maciejb?source=rss-a92e76345eaa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Epks52ITbLrQTbLNgyoU5A.jpeg</url>
            <title>Stories by Maciej Biłas on Medium</title>
            <link>https://medium.com/@maciejb?source=rss-a92e76345eaa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 18:07:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maciejb/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[Where to start learning programming]]></title>
            <link>https://medium.com/@maciejb/where-to-start-learning-programming-fc3685415529?source=rss-a92e76345eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc3685415529</guid>
            <dc:creator><![CDATA[Maciej Biłas]]></dc:creator>
            <pubDate>Sat, 21 Feb 2015 14:46:04 GMT</pubDate>
            <atom:updated>2015-02-21T14:46:04.758Z</atom:updated>
            <content:encoded><![CDATA[<p>A few of my friends, all in their late 20-ties with careers in diverse, but mostly nontechnical fields, recently asked how they could start learning programming on their own. They have different motivations: some want to use it at work, others feel they want to understand what the whole <em>programming thing </em>is about.</p><p>I started programming when I was in primary school and the joy of solving ever more challenging problems (some more, some less meaningful) that were at hand was what drove me into becoming a software engineer. Not only solving these, but being in <a href="http://www.ted.com/talks/mihaly_csikszentmihalyi_on_flow"><em>the flow</em></a><em> </em>is a gratification in itself. So start simple: <a href="http://arduino.cc/en/Tutorial/Blink?from=Tutorial.BlinkingLED">a blinking LED connected to an Arduino</a>, <a href="http://maciejb.me/2014/04/22/waw-bike-racks/">plotting some data</a> you always wanted to visualize, <a href="https://developer.android.com/training/basics/firstapp/index.html?hl=it">displaying <em>Hello, World</em> on your Android phone</a>. Then find what motivates you and learn, practice and enjoy!</p><p>Below are some sites that might help you get started. I haven’t tested the material therein myself, but I found them to be <a href="https://twitter.com/headius/status/453178547121553408">recommended</a> over and over again. Do evaluate yourself which works best for you:</p><ul><li><a href="http://www.codecademy.com/">codecademy</a> provides courses for Python, Ruby, JavaScript and PHP and a web-based editor for writing your code</li><li><a href="https://www.udacity.com/course/cs101">Udacity CS101</a> — introduction into Computer programming. You’ll be programming in Python.</li><li><a href="https://www.khanacademy.org/computing/cs">Khan Academy Computer programming courses</a> — learn programming by learning JavaScript</li></ul><p>As it’s usually hard to be stay motivated throughout a lengthy online course you participate in while staying at home you might want to consider contacting local groups that organize workshops and create communities of programming adepts like you. If you’re in Poland there is a handful of options (mind that most of these are in Polish):</p><ul><li><a href="http://geekgirlscarrots.pl/">Geek Girls Carrots</a> — an awesome girls community around new technologies, IT. They organize, among others, beginner Python and Django workshops. Men are also welcome at meetups and workshops.</li><li><a href="http://www.coderslab.pl/">Coder’s Lab</a></li><li><a href="http://jinkubator.pl/">JInkubator</a> in Warsaw [pl] — biweekly intermediate level Java-related presentations</li><li><a href="http://devmeetings.pl/">devmeetings.pl</a> — (rather) advanced JavaScript and iOS workshops</li><li><a href="http://railsgirls.com/warsaw">Rails Girls Warsaw</a> — <a href="http://rubyonrails.org/">Ruby on Rails</a> for girls. In Warsaw.</li></ul><p>Good luck!</p><p><em>Originally published at </em><a href="http://maciejb.me/2014/04/28/where-to-start-learning-programming/"><em>maciejb.me</em></a><em> on April 28, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc3685415529" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A CSV Parser. Moving from Scala Parser Combinators to Parboiled2]]></title>
            <link>https://medium.com/@maciejb/a-csv-parser-moving-from-scala-parser-combinators-to-parboiled2-ebe96836e605?source=rss-a92e76345eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebe96836e605</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[scala]]></category>
            <dc:creator><![CDATA[Maciej Biłas]]></dc:creator>
            <pubDate>Fri, 11 Jul 2014 15:47:55 GMT</pubDate>
            <atom:updated>2016-06-03T16:19:27.710Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://tools.ietf.org/html/rfc4180">CSVs</a> are an ubiquitous format for all sorts of tabular data. I assume that every major programming language ecosystem has a handful of libraries handling both parsing and writing them. In Scala you can quickly turn to StackOverflow to find a <a href="http://stackoverflow.com/questions/5063022/use-scala-parser-combinator-to-parse-csv-files">30 lines long CSV parser</a> based on the <a href="https://github.com/scala/scala-parser-combinators">Scala Parser Combinators library</a>. In this short blog post I will show a <a href="http://parboiled2.org/">Parboiled2</a>-based a version of this parser and compare the performance of the two.</p><p>Parboiled2 is a lightweight parser generator based on Scala Macros. It compiles the defined grammar rules into JVM bytecode. It has a similar syntax as Scala Parser Combinators. If you want to know more about the project and the rule DSL I’d recommend you checking out it’s <a href="https://github.com/sirthias/parboiled2/blob/master/README.rst">README file</a> or the related <a href="http://www.parleys.com/play/53a7d2d1e4b0543940d9e56d/chapter0/about">ScalaDays 2014 talk</a>.</p><p>Below is a <em>gist</em> showing the CSV (actually, you can use an arbitrary delimiter, but for simplicity’s sake I’ll keep using the word <a href="http://en.wikipedia.org/wiki/Comma-separated_values"><em>CSV</em></a>) parser definition:</p><p>It’s structure is roughly the same as that of the parser from StackOverflow.</p><h3>(Quick) performance comparison</h3><p>I was expecting the performance differences to be large I didn’t do a thorough benchmark. Both parsers are started on the same JVM, I did not do any VM tuning nor minimize the OS noise. The performance differences, as you will see are so large that getting the exact numbers did not make much sense.</p><p>For testing the I took a 1k and 10k-row samples of <a href="http://grouplens.org/datasets/movielens/">the MovieLens dataset</a>. The data is in a form of 4 element integer tuples. It was converted to a comma-separated format.</p><p>The tests were ran using <a href="http://scalameter.github.io/">ScalaMeter’</a>s <a href="http://scalameter.github.io/home/gettingstarted/0.5/simplemicrobenchmark/">Quickbenchmark</a>. It handles running a warmup phase and delivers aggregate results of multiple benchmark runs. The aggregate method chosen was <em>min</em> — the shortest out of 10 runs. All tests were performed on an late 2013 15′ Retina MacBook Pro running a Haswell quad-core 2.6GHz CPU (i7–4960HQ) on Oracle’s Java 8 (1.8.0).</p><p>The code for the benchmark is <a href="https://github.com/maciej/csv-perf">available on github</a>.</p><h3>The results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*UX6ftHVatN5gYbnI." /></figure><p>The chart above presents lines parsed per millisecond (the larger bar the better).</p><p>The Parboiled2-based parser is up to <em>500 times</em> more performant than the Parser Combinators one. However if we split the input on new line characters before parsing it with the <em>PC</em> parser the speedup factor is around 8 and is independent of the input size. However I suspect it would degrade if the input file had more columns.</p><p>Although this is a very small benchmark it’s reasonable to assume the performance differences would be similar for other parsers.</p><p><em>Originally published at </em><a href="https://maciejb.me/2014/07/11/a-csv-parser-moving-from-scala-parser-combinators-to-parboiled2/"><em>maciejb.me</em></a><em> on July 11, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebe96836e605" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adventures with Python: Warsaw’s bike parkings]]></title>
            <link>https://medium.com/@maciejb/adventures-with-python-warsaws-bike-parkings-ebe3b19098fa?source=rss-a92e76345eaa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebe3b19098fa</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Maciej Biłas]]></dc:creator>
            <pubDate>Tue, 22 Apr 2014 11:00:55 GMT</pubDate>
            <atom:updated>2016-06-03T16:21:10.279Z</atom:updated>
            <content:encoded><![CDATA[<p>Python has always been a language I wanted to improve in. Mostly because of its data tools. Also being an active bicycle commuter I to grab data from a <a href="http://stojaki.waw.pl/">crowd-sourced Warsaw’s bicycle parking location aggregator</a>. Once scrapped the dataset is straightforward: <em>lat-lng</em> <em>coordinates</em>, <em>number of racks</em> at a given location, its <em>address</em> and some additional data.</p><p><em>At this point I should warn you, dear reader, that unlike in my previous blog posts there are no code snippets here and I write about very basic stuff.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*zbNLU0yKi_oImriL." /></figure><p>Warsaw is divided into <a href="http://en.wikipedia.org/wiki/Warszawa#Districts">18 districts</a> (or <em>suburbs</em>).</p><p>Asking how many racks are in each of those districts already gave me an opportunity to experiment with Python’s ecosystem. Here are some useful tools I’ve discovered:</p><ul><li><a href="http://toblerity.org/shapely/">Shapely</a> for all geo operations. I’ve used it to determine if a point (rack location) is within a polygon (suburb boundaries)</li><li><a href="http://lxml.de/">lxml</a> — a great XML library. Used for mangling <a href="http://www.openstreetmap.org/relation/3509824#map=11/52.2331/21.0615">OpenStreetMap</a> data. I used OSM for obtaining the district boundaries.</li><li><a href="http://pandas.pydata.org/">pandas</a> — the starting-point for data analysis in Python.</li><li><a href="http://ipython.org/notebook.html">IPython Notebook</a> — Python in your web browser</li><li><a href="https://www.mapbox.com/tilemill/">TileMill</a> (unrelated to Python) — a desktop app (OSX/Win/Ubuntu) for styling and displaying map data. Supports input in GeoJSON, CSV and Shapefiles among others</li></ul><p>Here are the results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*fWwOeQNk6j8AuBv3." /></figure><p>Śródmieście (<em>downtown</em>) unsurprisingly has the most racks (764), Ursynów (490), Praga Południe (416) and Mokotów (402) are next. Sadly, in the centrally located Żoliborz (65) and Wola (100) it is the hardest to safely park your bike.</p><p>The code is published <a href="https://github.com/maciej/waw-bike-racks">on GitHub</a>. Also check out the <a href="http://nbviewer.ipython.org/github/maciej/waw-bike-racks/blob/5104b9ae618c3120fc29ee95a72b32266493e2a2/Stojaki.ipynb">IPython Notebook for this blog</a>.</p><p>What’s next? I’ve started reading <a href="http://shop.oreilly.com/product/0636920023784.do#">Python for Data Analysis</a> from O’Reilly. As there are a few other Warsaw datasets I might just use them for practicing what learn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/0*Mx-x96ZskOEN0AbT." /></figure><p><em>The city cycle transport official </em><a href="https://www.facebook.com/photo.php?fbid=624114464324022&amp;set=a.405942952807842.89648.400889316646539&amp;type=1&amp;stream_ref=10"><em>recently announced (pl)</em></a><em> which districts will be setting up new bike racks. Perhaps it’s a good idea to check the numbers and put some pressure on the less active districts (Żoliborz or Wola).</em></p><p><em>Originally published at </em><a href="https://maciejb.me/2014/04/22/waw-bike-racks/"><em>maciejb.me</em></a><em> on April 22, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebe3b19098fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>