<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Laszlo Balogh</title>
    <description>software developer, engineer, runner, photographer based in Boulder, Colorado</description>
    <link>http://laszlo.thebaloghs.com///</link>
    <atom:link href="http://laszlo.thebaloghs.com///feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Tue, 25 Jul 2017 14:25:00 -0600</pubDate>
    <lastBuildDate>Tue, 25 Jul 2017 14:25:00 -0600</lastBuildDate>
    <generator>Jekyll v3.0.2</generator>
    
      <item>
        <title>Contributing to others&#39; code...</title>
        <description>&lt;p&gt;For our Turing Mod 4 open source contribution, I wanted to really contribute to the Boulder Food Rescue robot code (&lt;a href=&quot;https://github.com/boulder-food-rescue/food-rescue-robot&quot;&gt;Link to GitHub&lt;/a&gt;).&lt;br /&gt;
This is a work I have started a few months earlier. As soon as we started learning Rails, I wanted to be exposed to code written by others and try to get to the level where not only I feel comfortable modifying code written by others, but others are also comfortable merging in my contribution.&lt;/p&gt;

&lt;p&gt;Hasn’t happened yet, but work in progress.
&lt;!--more--&gt;&lt;/p&gt;

&lt;h4 id=&quot;personal-take&quot;&gt;&lt;strong&gt;Personal take:&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Testing being my core interest in software development, I figured what best way there is to get familiar with a codebase, then writing some tests? Not really touching the codebase, but adding code that would “only” exercise it, yet it will force me to go through various sections of the codebase in a very detailed way, so I can write efficient tests.&lt;/p&gt;

&lt;p&gt;I could bring up a long list of reasons why I haven’t been able to stay as strongly engaged as I originally planned, but to save everyone’s time let me focus on outlining my approach here instead. :-)&lt;/p&gt;

&lt;h4 id=&quot;my-process&quot;&gt;&lt;strong&gt;My process:&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;1. Read the documentation:&lt;/strong&gt; let’s understand what details are already available, if there are instructions to create a local set up, are there any other non-obvious, but important details highlighted.&lt;br /&gt;
&lt;strong&gt;2. Follow the documentation to create a local set up:&lt;/strong&gt; I thought I was pretty good at following instructions. I was able to set up a local version and get it up and running, yet I missed an important details: that the &lt;code class=&quot;highlighter-rouge&quot;&gt;database.yml.dist&lt;/code&gt; file that is included in the repo is only for common starting point, everyone should update it based on their own environment, but we should NOT check in the updated and customized &lt;code class=&quot;highlighter-rouge&quot;&gt;database.yml&lt;/code&gt; file. Clearly an error on my part…&lt;br /&gt;
&lt;strong&gt;3. Run tests locally and make sure the results match with everyone else:&lt;/strong&gt; here I saw different results. All existing tests were supposed to pass, yet I had 13 errors. When I reached out for confirming if I have the latest code and confirm other details, we identified that setting up my local environment with &lt;code class=&quot;highlighter-rouge&quot;&gt;SQLite&lt;/code&gt; instead of &lt;code class=&quot;highlighter-rouge&quot;&gt;PostgreSQL&lt;/code&gt; made a difference. All tests were passing and I got the same results once I updated my database configuration. So I will be using &lt;code class=&quot;highlighter-rouge&quot;&gt;PostgreSQL&lt;/code&gt;. :-)&lt;br /&gt;
&lt;strong&gt;4. Let the team know which item I will be working on first (we had a list of features which had no test coverage at all):&lt;/strong&gt; straight forward. I also opened a &lt;code class=&quot;highlighter-rouge&quot;&gt;[WIP]&lt;/code&gt; pull request to get my PR in the queue.&lt;br /&gt;
&lt;strong&gt;5. Review the codebase myself and collect questions:&lt;/strong&gt; I just that and collected a long list of questions. To review them, I met up with the team here in Boulder, CO. Due to a complex database structure, the conversation went slower than expected, but it was definitely very helpful. I walked away with a much better general understanding of how the site is set up and most importantly full confidence in the capabilities of the team members already supporting this effort. Hats off to all the patience and support that the volunteer developers demonstrated!!!&lt;br /&gt;
&lt;strong&gt;6. Ask for confirmation after writing one simple test:&lt;/strong&gt; this step that I thought was going to be simple and straight forward has proved to be a longer chain on conversation both through GitHub as well as through Slack. First I made any rookie mistakes that I never thought I would make. Starting with the previously mentioned “checking in the customized &lt;code class=&quot;highlighter-rouge&quot;&gt;database.yml&lt;/code&gt; file”, through changing a few lines of code, then commenting them out to switch to some other piece that I ended up checking in along with the springkled in commented out code. How messy that is? Come on Laszlo, you can do better!!!&lt;br /&gt;
&lt;strong&gt;7. Adjust based on feedback:&lt;/strong&gt; concluding our first round of conversations, I started focusing on writing a happy path, “simple” test case: volunteer with assignments to schedule an absence. And this is where I am right now.&lt;/p&gt;

&lt;p&gt;…STAY TUNED…&lt;/p&gt;

&lt;h4 id=&quot;going-forward&quot;&gt;&lt;strong&gt;Going forward:&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;My plan is to set aside at least a couple hours each week to dedicate working on this project. That will be the best for everyone involved. It will help me to stay on track with my planned contribution and on the receiving end finally the enthusiastic team that is already working on this project can see some real progress and contribution from me…&lt;/p&gt;

</description>
        <pubDate>Wed, 19 Apr 2017 02:13:38 -0600</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/contributing-to-others-code.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/contributing-to-others-code.html</guid>
        
        <category>programming</category>
        
        <category>code maintenance</category>
        
        <category>open source</category>
        
        
        <category>programming</category>
        
        <category>code maintenance</category>
        
        <category>open source</category>
        
      </item>
    
      <item>
        <title>The feeling of going live: Deploying a Rails application</title>
        <description>&lt;p&gt;Yes, it happened!&lt;/p&gt;

&lt;p&gt;Every once in a while we have to pause, look back and try to be proud of what we have acoomplished. On my bus ride this morning, I am doing just that. For others, I might be the crazy person, who opened his laptop, only to wonder around, look through the window, seemingly lost in the views of the mountains to the West. But in my head thoughts are running around: I have now two projects live on the internet.
&lt;!--more--&gt;
So far none of our work was accessible by others. At most we ran applications on our laptops. Other than through &lt;code class=&quot;highlighter-rouge&quot;&gt;localhost&lt;/code&gt;, nobody could see what we have been working on. That is changing now, given that we just deployed our first two applications to &lt;a href=&quot;https://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt; this week. Wohoooo!&lt;/p&gt;

&lt;p&gt;This is definitely one thing to be proud of, however this is not the real source of my pride. Not to discredit others’ efforts, but nowadays with all the online tutorials avaialble, lot of people could hack something together and push it to the internet. So why do I feel so proud, then? Here are the two main reasons:&lt;br /&gt;
&lt;strong&gt;1. I know exactly why and how my application works:&lt;/strong&gt;&lt;br /&gt;
This is a huge difference from any implementation where one would just Google and hack the details together. In the weeks prior we were building our applications the hard way: without &lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Rails&lt;/a&gt; building much of the code framework for us. It was long hours of coding well spent!&lt;br /&gt;
&lt;strong&gt;2. Making progress:&lt;/strong&gt;&lt;br /&gt;
My second rails app &lt;a href=&quot;https://floating-journey-48927.herokuapp.com/&quot;&gt;Job Tracker&lt;/a&gt; works much better than the first one. I am not saying this second one is perfect. I wish I could. But the fact is that it is a much stronger implementation than my first one and that is a momentum I will try to build on.&lt;/p&gt;

&lt;p&gt;I still have a long list of potential improvements for &lt;a href=&quot;https://floating-journey-48927.herokuapp.com/&quot;&gt;Job Tracker&lt;/a&gt;, including:&lt;br /&gt;
- refactoring all controllers to avoid long methods,&lt;br /&gt;
- making sure all ActiveRecord methods are called from the models,&lt;br /&gt;
- increasing test coverage to cover corner cases and confirm all page details,&lt;br /&gt;
- further simplifying test setup with factory girl,&lt;br /&gt;
just to mention a few…&lt;/p&gt;

&lt;p&gt;Starting from now on, I will have a &lt;a href=&quot;http://laszlo.thebaloghs.com/projects/&quot;&gt;Projects&lt;/a&gt; page capturing what I will be working on and serving also as my online portfolio. Please don’t hesitate to share any constructive comments regarding any of the projects as well as how to make the Project Portfolio page better. Thank you! :-)&lt;/p&gt;

</description>
        <pubDate>Tue, 20 Dec 2016 01:13:38 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/deploying-rails-application.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/deploying-rails-application.html</guid>
        
        <category>programming</category>
        
        <category>rails</category>
        
        <category>heroku</category>
        
        <category>ruby</category>
        
        <category>deploy</category>
        
        <category>live</category>
        
        <category>site</category>
        
        <category>application</category>
        
        
        <category>programming</category>
        
        <category>rails</category>
        
        <category>heroku</category>
        
        <category>ruby</category>
        
      </item>
    
      <item>
        <title>Jekyll blog post: which files are changing?</title>
        <description>&lt;p&gt;I have been working with &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; to update content on my site for a little bit more than a month. By now the overall design is set, so the only update right now is pretty much limited to new blog posts. Might be a new page in the near future, but that would trigger a very similar change list.&lt;/p&gt;

&lt;p&gt;My current choice of FTP client does not offer a feature to identify the list of files which changed and I just simply don’t want to copy the entire site content to the server every time I create a blog post, I wanted to summarize the list of files, which are changing every time we create a new blog post with &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;.&lt;br /&gt;
&lt;!--more--&gt;
Though the list of files might differ based on the overall design of the page, so for this post I used the template of my site as a reference.&lt;br /&gt;
&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-12-jekyll-site-folder-structure.jpg&quot; alt=&quot;Jekyll site general folder strucutre&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Since the site is a structure of static webpages, once we make a change and run the &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll build&lt;/code&gt; command in our terminal, we will get a new set of files in our &lt;code class=&quot;highlighter-rouge&quot;&gt;_site&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; has a nice feature: launch your local webserver with the &lt;code class=&quot;highlighter-rouge&quot;&gt;--watch&lt;/code&gt; option as &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve --watch&lt;/code&gt; and it is automatically serve the updated content for your whenever you visit your site through &lt;code class=&quot;highlighter-rouge&quot;&gt;localhost:4000&lt;/code&gt;. For our blog post update it will also allow us to check in our browser how the new blog post will look like, without messing with the content on the server.&lt;br /&gt;
&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-12-jekyll-serve-watch-updates.jpg&quot; alt=&quot;Jekyll serve --watch example&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once we are happy with the blog post and it is ready to be published for the world to see, all updated content will be waiting in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_site&lt;/code&gt; folder. For an average blog post (like the one you are reading right now) here is what is involved from a content point of view:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Written in &lt;code class=&quot;highlighter-rouge&quot;&gt;markdown&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;It has categories assigned&lt;/li&gt;
  &lt;li&gt;It has tags added&lt;/li&gt;
  &lt;li&gt;It includes a few images for illustration purposes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Based on this list of post content details, here is an overview of files and their location which will be updated by &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;.&lt;/p&gt;

&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Folder name&lt;/th&gt;
    &lt;th&gt;Content description&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/&lt;/td&gt;
    &lt;td&gt;index.html is the site&#39;s Home page. I have a link on it taking visitors to excerpt of blog posts, so this is definitely going to be updated.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/&lt;/td&gt;
    &lt;td&gt;feed.xml is updated to reflect the latest post. Tools which collect updates from sites (such as RSS feed readers, automated newsletter delivery services, etc.) rely on the content of this file.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/&lt;/td&gt;
    &lt;td&gt;sitemap.xml is updated to reflect the latest file structure of the site.post. Online tools, such as Google&#39;s search engine utilize this file to properly index the content of a site.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/blog&lt;/td&gt;
    &lt;td&gt;New HTML file that is the new blog post&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/categories&lt;/td&gt;
    &lt;td&gt;index.html updated with the latest blog post added to the selected category/categories&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/images/posts&lt;/td&gt;
    &lt;td&gt;My choice to collect all images which I used in any blog post. This can be whatever folder your hear desire...&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;/tags&lt;/td&gt;
    &lt;td&gt;index.html updated with the latest blog post added to the selected tag(s)&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;This list will definitely grow in case you add custom JS, CSS, update already existing blog posts, pages. For now, happy blogging and let me know how your site updates are going. :-)&lt;/p&gt;

</description>
        <pubDate>Mon, 12 Dec 2016 01:11:46 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/file-changes-with-jekyll-blog-post.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/file-changes-with-jekyll-blog-post.html</guid>
        
        <category>programming</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
        <category>blog</category>
        
        <category>post</category>
        
        <category>file</category>
        
        <category>list</category>
        
        <category>update</category>
        
        
        <category>programming</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
        <category>blog</category>
        
        <category>post</category>
        
      </item>
    
      <item>
        <title>ActiveRecord association extensions</title>
        <description>&lt;p&gt;Hello from after Mod2 project submission!&lt;/p&gt;

&lt;p&gt;We just finished our first project within Mod2. As referred to previously, it was the &lt;strong&gt;Bike-Share&lt;/strong&gt; project where we were tasked to develop a web application that utilized a database populated from San Francisco’s bike share service data with stations, trips and weather details and provuded access to content of the base. However access to the databse content wasn’t only through standard routes &lt;code class=&quot;highlighter-rouge&quot;&gt;index&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;new&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;show&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;edit&lt;/code&gt;, our implementation also included a dashboard functionality.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;It’s been quite an effort and in the process leading up to our project review on Thursday, I learnt a ton! Looking back: it is just simply amazing how much one can learn in a single week. Wow. This alone makes me very excited just thinking about what I can still learn here at &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since &lt;strong&gt;again&lt;/strong&gt; I’ve learnt a lot and just as after previous projects I feel I am that much smarter again, I thought I would share here something that just cliked during this project and what I really think is a cool feature.&lt;/p&gt;

&lt;p&gt;Our project relied very heavily on large data sets, which were stored in various tables within our database. In order to get the necessary data out of our database, we had to set up the necessary associations in our models, so that we could utilized the necessary ActiveRecord quiries. That is when I learnt about &lt;code class=&quot;highlighter-rouge&quot;&gt;Association Extension&lt;/code&gt;. If you rather explore it and read it for yourself, simply go to the &lt;a href=&quot;http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html&quot;&gt;ActiveRecord::Associations::ClassMethods documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For reference, this is how our data was structured within our database (used &lt;a href=&quot;http://ondras.zarovi.cz/sql/demo/&quot;&gt;SQL demo from Ondras Zarovi’s site&lt;/a&gt;):
&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-09-bike-share-database-tables.jpg&quot; alt=&quot;Bike-Share database table associations&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s go through my favorite part here using our &lt;code class=&quot;highlighter-rouge&quot;&gt;stations&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;trips&lt;/code&gt; tables. In this case, each &lt;code class=&quot;highlighter-rouge&quot;&gt;trip&lt;/code&gt; had a &lt;code class=&quot;highlighter-rouge&quot;&gt;start_station_id&lt;/code&gt; (unique &lt;code class=&quot;highlighter-rouge&quot;&gt;id&lt;/code&gt; of the station where the trip started) and an &lt;code class=&quot;highlighter-rouge&quot;&gt;end_station_id&lt;/code&gt; (unique &lt;code class=&quot;highlighter-rouge&quot;&gt;id&lt;/code&gt; of the station where the trip ended).&lt;/p&gt;

&lt;p&gt;We set up the &lt;code class=&quot;highlighter-rouge&quot;&gt;has_many&lt;/code&gt; association in our &lt;code class=&quot;highlighter-rouge&quot;&gt;station&lt;/code&gt; model to be able to find all trips which started at a particular station through &lt;code class=&quot;highlighter-rouge&quot;&gt;start_trips&lt;/code&gt; and to find all trips which ended at a particular station through &lt;code class=&quot;highlighter-rouge&quot;&gt;end_trips&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Station&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt; 

  &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:start_trips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;class_name: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Trip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;ss&quot;&gt;foreign_key: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;start_station_id&quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:end_trips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;ss&quot;&gt;class_name: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Trip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;ss&quot;&gt;foreign_key: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;end_station_id&quot;&lt;/span&gt;
  
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Before diving in deeper, a simple example as to how &lt;code class=&quot;highlighter-rouge&quot;&gt;association extension&lt;/code&gt; differs from &lt;code class=&quot;highlighter-rouge&quot;&gt;class methods&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;instance methods&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;From coding point of view here is a list where setting up the &lt;code class=&quot;highlighter-rouge&quot;&gt;association extension&lt;/code&gt; differs from &lt;code class=&quot;highlighter-rouge&quot;&gt;class methods&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;instance methods&lt;/code&gt;:&lt;br /&gt;
&lt;strong&gt;1. Definition:&lt;/strong&gt; within a &lt;code class=&quot;highlighter-rouge&quot;&gt;do...end&lt;/code&gt; block attached to the association definition (see example below)&lt;br /&gt;
&lt;strong&gt;2. Calling:&lt;/strong&gt; append to the association call, just like any other ActiveRecord methods you would use&lt;br /&gt;
&lt;strong&gt;3. Reference:&lt;/strong&gt; since this extension is within a block that belongs to an association, using output of that association is readily avaialble for the extension method, no need to call it (ee code example later in this post)&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Station&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt; 

  &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:start_trips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;ss&quot;&gt;class_name: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Trip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;ss&quot;&gt;foreign_key: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;start_station_id&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;say_hello&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;Hello from the association block!&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;say_hello&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;Hello from the model!&quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;How would we call these methods? Since our &lt;code class=&quot;highlighter-rouge&quot;&gt;stations&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;trips&lt;/code&gt; tables are already populated with data, for simplicity here, I use &lt;code class=&quot;highlighter-rouge&quot;&gt;Station.first&lt;/code&gt; as our &lt;code class=&quot;highlighter-rouge&quot;&gt;station object&lt;/code&gt; to call our methods on.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-09-bike-share-say-hello-examples.jpg&quot; alt=&quot;ActiveRecord method call examples - Say Hello&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So far not much value add moving &lt;code class=&quot;highlighter-rouge&quot;&gt;say_hello&lt;/code&gt; and make it an &lt;code class=&quot;highlighter-rouge&quot;&gt;association extension&lt;/code&gt;. Let’s take a look at an actual feature request that we had to implement so we can see how different the code would be in that case.&lt;br /&gt;
For this next example, I picked a feature to look up the date when the most trips started at any given station.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Station&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt; 

  &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:start_trips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;class_name: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Trip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;ss&quot;&gt;foreign_key: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;start_station_id&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;date_of_highest_count&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:start_date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;count_start_date DESC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:start_date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_s&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;date_of_highest_count_of_trips_started&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;start_trips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:start_date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;count_start_date DESC&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:start_date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;to_s&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Then once more let’s jump over to our &lt;a href=&quot;https://rubygems.org/gems/tux/versions/0.3.0&quot;&gt;Tux&lt;/a&gt; console to see what this implementation offers:
&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-09-bike-share-code-examples.jpg&quot; alt=&quot;ActiveRecord association extension method call example&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Though both the &lt;code class=&quot;highlighter-rouge&quot;&gt;date_of_highest_count&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;date_of_highest_count_of_trips_started&lt;/code&gt; methods deliver the same results, but at this point I prefer the association extension implementation for the following reasons:&lt;br /&gt;
1. Don’t need to call &lt;code class=&quot;highlighter-rouge&quot;&gt;start_trips&lt;/code&gt; when I write the code for the &lt;code class=&quot;highlighter-rouge&quot;&gt;date_of_highest_count&lt;/code&gt; method&lt;br /&gt;
2. Better separation of functionality: by appending &lt;code class=&quot;highlighter-rouge&quot;&gt;date_of_highest_count&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;start_trips&lt;/code&gt; I know that by calling &lt;code class=&quot;highlighter-rouge&quot;&gt;date_of_highest_count&lt;/code&gt;,  my search for the date is within the list of trips started at this station.&lt;/p&gt;

&lt;p&gt;What do you think? What is your preferred way of implementation?&lt;/p&gt;

</description>
        <pubDate>Fri, 09 Dec 2016 11:48:48 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/activerecord-association-extension.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/activerecord-association-extension.html</guid>
        
        <category>programming</category>
        
        <category>activerecord</category>
        
        <category>association</category>
        
        <category>database</category>
        
        <category>web</category>
        
        <category>application</category>
        
        <category>extension</category>
        
        
        <category>programming</category>
        
        <category>activerecord</category>
        
        <category>association</category>
        
        <category>database</category>
        
        <category>web</category>
        
        <category>application</category>
        
        <category>extension</category>
        
      </item>
    
      <item>
        <title>How to add our own task to Rakefile</title>
        <description>&lt;p&gt;This post would not have been possible, have &lt;a href=&quot;https://github.com/Robbie-Smith&quot;&gt;Robbie&lt;/a&gt; not shared the initial details to set us to the right direction. Thank you Robbie!&lt;/p&gt;

&lt;p&gt;Still just started on our Mod2 project &lt;strong&gt;Bike share&lt;/strong&gt; and as we were tackling one challenge after another, we came across the requirement to import data into our database tables from external CSV files.
The requirement called for updating our seed file and as it is we tried to implement it as a new &lt;code class=&quot;highlighter-rouge&quot;&gt;rake task&lt;/code&gt;.
&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;For reference, here is our folder structure. We had to work with two files: &lt;code class=&quot;highlighter-rouge&quot;&gt;seeds.rb&lt;/code&gt; and our &lt;code class=&quot;highlighter-rouge&quot;&gt;Rakefile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-04-bike-share-folder-structure.jpg&quot; alt=&quot;Project folder structure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Starting with an empty &lt;code class=&quot;highlighter-rouge&quot;&gt;Stations&lt;/code&gt; table within our database, we were expting to be able to load all 70 rows from our CSV file and set up the framework to load later on much larger datasets from other CSV files. We used a tool &lt;code class=&quot;highlighter-rouge&quot;&gt;tux&lt;/code&gt; to check database table content as manual verification of our steps.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-04-table-empty.jpg&quot; alt=&quot;Empty database table&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In order to implement the import functionality, we needed two things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Add our own &lt;code class=&quot;highlighter-rouge&quot;&gt;import_csv&lt;/code&gt; method into our &lt;code class=&quot;highlighter-rouge&quot;&gt;seeds.rb&lt;/code&gt; file&lt;/li&gt;
  &lt;li&gt;Create a task in our &lt;code class=&quot;highlighter-rouge&quot;&gt;Rakefile&lt;/code&gt; and link it to the method in our &lt;code class=&quot;highlighter-rouge&quot;&gt;seeds.rb&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Creating our method in&lt;/strong&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;seeds.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A few key details we had to pay attention on here:&lt;br /&gt;
  * make sure to &lt;strong&gt;require&lt;/strong&gt; all dependencies, such as &lt;code class=&quot;highlighter-rouge&quot;&gt;CSV&lt;/code&gt; and our models&lt;br /&gt;
  * define our &lt;code class=&quot;highlighter-rouge&quot;&gt;method&lt;/code&gt; as we would in any &lt;code class=&quot;highlighter-rouge&quot;&gt;Ruby&lt;/code&gt; class&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;require &#39;csv&#39;
require_relative &#39;../app/models/station&#39;
require_relative &#39;../app/models/city&#39;

def import_station_csv
  # CODE TO PARSE INFORMATION FROM THE CSV FILE
  # AND
  # WRITE IT TO THE DATABASE Table

  puts &quot;Imported Stations to Table.&quot; # Our short message in the terminal
end
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Link our new method from the&lt;/strong&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;Rakefile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We had to define a new task by adding the following piece of code with paying attention to the following key details:&lt;br /&gt;
  * Create the appropriate link to our &lt;code class=&quot;highlighter-rouge&quot;&gt;seeds.rb&lt;/code&gt; file through &lt;code class=&quot;highlighter-rouge&quot;&gt;require_relative&lt;/code&gt;&lt;br /&gt;
  * Add &lt;code class=&quot;highlighter-rouge&quot;&gt;desc&lt;/code&gt; so our new task will have its own description in the task list (see screenshot later in this post)&lt;br /&gt;
  * Define our Rakefile task name through &lt;code class=&quot;highlighter-rouge&quot;&gt;task&lt;/code&gt;, we called it &lt;code class=&quot;highlighter-rouge&quot;&gt;import_csv&lt;/code&gt;&lt;br /&gt;
  * Call our CSV file import method, in this particular case &lt;code class=&quot;highlighter-rouge&quot;&gt;import_station_csv&lt;/code&gt;
  * Adding our new task under &lt;code class=&quot;highlighter-rouge&quot;&gt;namespace :db&lt;/code&gt; would make our task to be called as &lt;code class=&quot;highlighter-rouge&quot;&gt;rake db:import_csv&lt;/code&gt;. Defining our new task outside of this &lt;code class=&quot;highlighter-rouge&quot;&gt;namespace&lt;/code&gt; would make it avaialble as &lt;code class=&quot;highlighter-rouge&quot;&gt;rake import_csv&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;namespace :db do
  require_relative &quot;db/seeds&quot;
  desc &quot;Import CSV to table&quot;
  task :import_csv =&amp;gt; :environment do
    import_station_csv
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;In order to confirm that our new task is available with all other rake tasks, called &lt;code class=&quot;highlighter-rouge&quot;&gt;rake --task&lt;/code&gt; in our terminal:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-04-rake-task-list-updated.jpg&quot; alt=&quot;List rake tasks in terminal&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Only two more steps left:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Run our new rake task: &lt;code class=&quot;highlighter-rouge&quot;&gt;rake db:import_csv&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Confirm through &lt;code class=&quot;highlighter-rouge&quot;&gt;tux&lt;/code&gt; that our database table &lt;code class=&quot;highlighter-rouge&quot;&gt;Stations&lt;/code&gt; have been successfully updated with all 70 entries&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com//images/posts/2016-12-04-table-successfully-updated.jpg&quot; alt=&quot;Run our own rake task and confirm result with tux&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Many thanks again for &lt;a href=&quot;https://github.com/Robbie-Smith&quot;&gt;Robbie&lt;/a&gt; for setting us to the right direction and for my project team to work through the implementation!&lt;/p&gt;

&lt;p&gt;Keep on coding!!! :-)&lt;/p&gt;

</description>
        <pubDate>Sat, 03 Dec 2016 23:21:03 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/how-to-add-own-task-to-rakefile.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/how-to-add-own-task-to-rakefile.html</guid>
        
        <category>programming</category>
        
        <category>setup</category>
        
        <category>rake</category>
        
        <category>rakefile</category>
        
        <category>tux</category>
        
        <category>ruby</category>
        
        <category>mac</category>
        
        <category>osx</category>
        
        
        <category>programming</category>
        
        <category>rake</category>
        
        <category>Rakefile</category>
        
        <category>ruby</category>
        
        <category>mac</category>
        
        <category>osx</category>
        
      </item>
    
      <item>
        <title>When postgres install fails...</title>
        <description>&lt;p&gt;Started working on our first project in Mod2. Building interface to present various forms of &lt;a href=&quot;https://www.kaggle.com/benhamner/sf-bay-area-bike-share&quot;&gt;data from SF Bay area bike share service&lt;/a&gt; that we download from &lt;a href=&quot;https://www.kaggle.com/&quot;&gt;Kaggle&lt;/a&gt;. But first things first: we needed to make sure our development environment is up and running. That is where the first problem came…
&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;On previous projects in Mod1, we pretty much worked in Ruby and other than a handful of useful gems (pry, minitest), there was not much we had to make sure were working, let alone up and running.&lt;/p&gt;

&lt;p&gt;In Mod2, very different: webserver, database, all is preared to accomodate a test environment as well, so more things to juggle. Expecting the straight forward execution of &lt;code class=&quot;highlighter-rouge&quot;&gt;bundle&lt;/code&gt; came to a surprising halt with the error message&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;An error occurred while installing pg (0.19.0), and Bundler cannot continue. Make sure that gem install pg -v &#39;0.19.0&#39; succeeds before bundling.

&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Looks simple enough.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com/images/posts/postgres-install-error.jpg&quot; alt=&quot;Postgres gem install error&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Except when tried to run &lt;code class=&quot;highlighter-rouge&quot;&gt;gem install pg -v &#39;0.19.0&#39;&lt;/code&gt; still no luck. No panic! Google is your friend! :-)&lt;/p&gt;

&lt;p&gt;I came accross a discussion on the well-known site &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;stackoverflow&lt;/a&gt; with &lt;a href=&quot;http://stackoverflow.com/questions/19262312/installing-pg-gem-on-os-x-failure-to-build-native-extension&quot;&gt;the solution to my issue&lt;/a&gt;. If you don’t want to read through the entire conversation, here is a list of steps that helped to solve my issue:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew update

brew install postgresql

gem install pg
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com/images/posts/bundle-postgres-install-successful.jpg&quot; alt=&quot;Confirm gem pg install through bundle&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then to be sure run &lt;code class=&quot;highlighter-rouge&quot;&gt;bundle&lt;/code&gt; to confirm &lt;code class=&quot;highlighter-rouge&quot;&gt;pg 0.19.0&lt;/code&gt; has been installed correctly. Now on to the next step…&lt;/p&gt;

</description>
        <pubDate>Fri, 02 Dec 2016 13:49:30 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/postgres-install-fails.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/postgres-install-fails.html</guid>
        
        <category>programming</category>
        
        <category>setup</category>
        
        <category>postgres</category>
        
        <category>ruby</category>
        
        <category>mac</category>
        
        <category>osx</category>
        
        
        <category>programming</category>
        
        <category>postgres</category>
        
        <category>ruby</category>
        
        <category>mac</category>
        
        <category>osx</category>
        
      </item>
    
      <item>
        <title>Life after Wordpress: Jekyll update</title>
        <description>&lt;p&gt;Greetings!&lt;br /&gt;
Finally the updated site is up and running! &lt;!--more--&gt;Have you signed up for email updates already? If not yet, here is your chance…&lt;/p&gt;

&lt;p class=&quot;text-center&quot;&gt;
  &lt;a class=&quot;btn text-center&quot; href=&quot;http://eepurl.com/bcgihX&quot; target=&quot;_blank&quot;&gt;Sign up for email updates&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;One less thing… :-)&lt;/p&gt;

&lt;p&gt;Originally I started on a quest to rebuild my personal website on a new platform, stepping away from a Wordpress-based implementation. I decided that I will rebuild the site based on &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;. To read more about my thought process, jump to my other post: &lt;a href=&quot;http://laszlo.thebaloghs.com/blog/how-i-roll.html&quot;&gt;How I roll&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are still with this post, then here is a short update of how the updated site compares to the previous version.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Key functionality to support:
    &lt;ul&gt;
      &lt;li&gt;Accomodate simple blog =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt; (&lt;a href=&quot;http://laszlo.thebaloghs.com/#blog&quot;&gt;Link to blog&lt;/a&gt;)&lt;/li&gt;
      &lt;li&gt;Showcase photography portfolio =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt; (&lt;a href=&quot;http://laszlo.thebaloghs.com/photography/index.html&quot;&gt;Link to Photography page&lt;/a&gt;)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Manage content =&amp;gt; &lt;strong&gt;NR: there was no specific goal here&lt;/strong&gt;&lt;br /&gt;
  Currently to push myself to get more familiar with &lt;a href=&quot;https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet&quot;&gt;Markdown language&lt;/a&gt;, I type the blog posts using markdown. When needed, I mix up HTML and markdown in a single document, add JS as necessary. Definitely a great way to get more comfortable with a broader range of tools. So far making progress…&lt;/li&gt;
  &lt;li&gt;Dynamic vs Static content =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt;&lt;br /&gt;
  The content I am hosting, the structure of static pages is perfect.&lt;/li&gt;
  &lt;li&gt;Users =&amp;gt; &lt;strong&gt;NR: there was no specific goal here&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;How complicate to work with and/or learn =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt;
  As I mentioned above under point point 2, so far any technical skills needed, I was able to cover, no concern there. I also expect the more I advance with my studies at &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt;, the less of a concern this will be.&lt;/li&gt;
  &lt;li&gt;General page load =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt;
  See later in this post more details on this. Definitely &lt;strong&gt;significant improvement!!!&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Site design simplicity/complexity =&amp;gt; &lt;strong&gt;Accomplished&lt;/strong&gt;
  I am very happy with the latest theme that I pick up for this site. I ended up customizing it a tiny bit, but the general design what the theme already included is what you see throughout this site. How do you like it? Personally I like it a lot! Feel free to share links in the comment section below to other sites with similar simple designs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As promised, here is some more detail about the general page load improvement. Main page load time was floating &lt;strong&gt;around 6 seconds&lt;/strong&gt; with the old Wordpress-based implementation. With the current static page structure, the main page load time is &lt;strong&gt;less then one second&lt;/strong&gt; most of the time.&lt;/p&gt;

&lt;p&gt;I used a handful of sites to prepare reports about the pages. Besides the page load speed, Jekyll takes care of a lot of the document structure details which were missing or improperly set up with the Wordpress theme I used previously. That is definitely an added bonus here. Without posting all the screenshots from all the test sites, here is a pair from one of them. This shows very well the difference between the old and new design.&lt;/p&gt;

&lt;p&gt;Old implementation test result:
&lt;img src=&quot;http://laszlo.thebaloghs.com/images/posts/website_test_result_old.jpg&quot; alt=&quot;website-speed-old&quot; /&gt;&lt;/p&gt;

&lt;p&gt;New implementation test result:
&lt;img src=&quot;http://laszlo.thebaloghs.com/images/posts/website_test_result_new.jpg&quot; alt=&quot;website-speed-new&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Overall I am very happy with the results.&lt;/p&gt;

&lt;p&gt;One detail I am still trying to get a better handle on is updating the content on the server side: The FTP client I have been using does not offer feature of syncing the updated content between my computer (local development environment) and the server (production environment). Fortunately there is not many files which are changes once Jekyll rebuilds the site, but long term having a file structure sync solution would be very helpful and necessary to save time. Any suggestions are more than welcome. :-)&lt;/p&gt;

</description>
        <pubDate>Thu, 01 Dec 2016 15:40:18 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/life-after-wordpress-jekyll-update.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/life-after-wordpress-jekyll-update.html</guid>
        
        <category>website</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
        <category>wordpress</category>
        
        <category>comparison</category>
        
        
        <category>website</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
      </item>
    
      <item>
        <title>Welcome to Turing</title>
        <description>&lt;p&gt;As I am only two days away from starting Mod2 at &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing School of Software and Design&lt;/a&gt;, I figured I add a post here with a few thoughts that I think might be useful for others who will start Mod1 in the future.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;There are plenty of sources of good words, suggestions, advice and information. For this reason I will try to offer a summary of my unique perspective. I want to highlight what I think helped me and could have helped even more have I spent more time with prior to joining &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But before I would get started, here is an initial list of sources of information that is available to you already prior to joining &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt;. If you haven’t been aware of any of these, let your contact know or feel free to reach out to me and I would be happy to set you to the right direction.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Turing website:&lt;/strong&gt; &lt;a href=&quot;https://www.turing.io/&quot;&gt;turing.io&lt;/a&gt;. Very obvious… :-)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Info night:&lt;/strong&gt; Usually held on-site. You will receive plenty of details during this session and there are always people there to ask questions. Not only from Turing staff, but current and maybe even former Turing students as well.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Turing handbook:&lt;/strong&gt; Make sure you read it through and familiar with its content. You will spend seven months of your life in this environment, so it is good to read it through at least once&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Turing student advice:&lt;/strong&gt; You would receive it from Turing staff. It is a list of suggestions, advice collected by previous Mod1 students. Maybe not all those points will be applicable for all new students, but in general they are all spot on as every single one of them is based on recent experience with the program.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Prework guide:&lt;/strong&gt; You will be contacted by your assigned prework guide, which is awesome. As you work your way through the prework assignment, you might have questions about that content or about Turing in general. Your prework guide will be a useful source of information.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since from these various sources you are already going to receive plenty of input, here is my own list based on my specific situation. Some items might still be applicable to you as well:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Becoming a MAC person:&lt;/strong&gt; I have always been a Windows user mainly driven by the fact that in the corporate world that has been the OS of choice. Don’t underestimate the burden of switching to a brand new OS and computer system. If you can, make sure you pick up your laptop as soon as it is avaialble and get familiar with your new working environment. It is very frustrating, when you need to spend time googling how to do simple things, such as
    &lt;ul&gt;
      &lt;li&gt;how to install and remove applications,&lt;/li&gt;
      &lt;li&gt;finding, viewing and editing various content types,&lt;/li&gt;
      &lt;li&gt;delete instead of backspace,&lt;/li&gt;
      &lt;li&gt;general interface of the computer: touchpad for example and how you can use it efficiently,&lt;/li&gt;
      &lt;li&gt;adding and removing new drives,&lt;/li&gt;
      &lt;li&gt;if you had an NTFS formatted backup drive, how to write to it,&lt;/li&gt;
      &lt;li&gt;etc…&lt;br /&gt;
&lt;img src=&quot;https://www.intego.com/mac-security-blog/wp-content/uploads/2012/11/windows-to-mac-header.jpg&quot; alt=&quot;windows-to-mac&quot; /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Prepare the family:&lt;/strong&gt; This point is more to someone who will be joining &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt; as a parent. As soon as you are accepted to the program, start preparing your kids. Especially if they are old enough to have meaningful conversations. In our experience repetition (drills if you wish…hehehe) is the key here. The more you bring this up to your children in various situation, the better off you will be later on. Simple things, such as the family will not be going out for dinner that often. Or Santa might not bring that many presents and it will not be because you behaved bad. Kids will eventually understand it, but it will take time. Why not start those conversations early on and set their expectation? Kids will even show their own way of appreciating the heads up and they can also help in their own way: “I will put this toy back to the shelf, so we can save money because Daddy/Mommy doesn’t have a job…” Kids are smart! Being less materialistic: make sure you hear plenty of times that you will not be spending that much time at home and with them in general. And that will not be because you don’t love them. Let me know how it goes!&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Drills:&lt;/strong&gt; There is a very good reason they exist and there is a very good reaon they are called “drills”. Do them whenever you can. Even if you go back doing drills of a subject only weeks after you learnt about, still do the drills. There is never enough repetition you can do to become a better programmer. At least in my opinion. Drills helped me a lot to get more familiar with basic concepts and avoid googling them when I had to work on projects.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Help others:&lt;/strong&gt; This is a great thing for obvious reasons with the extra benefit of helping yourself while hepling others.
    &lt;ul&gt;
      &lt;li&gt;Troubleshoot code: You will see others’ code that is likely not working and it will help you to improve your troubleshooting skills working on something you have never seen previously.&lt;/li&gt;
      &lt;li&gt;Strenghten your knowledge: It is one thing to know and understand something, but it is a whole new thing explaining it to others. It will help you to confirm that you really know the topic or will help you to identify that your knowledge is not as rock solid as you thought it would be.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Don’t be afraid of the empty code editor screen:&lt;/strong&gt; You will hear this mentioned by Jeff countless times: if you get stuck, just delete all your code and start again. Sounds simple, yet turned out to be a challenge for me to really practice it. I got caught up in the “&lt;em&gt;my precious code, how could I delete it&lt;/em&gt;” endless circle.&lt;br /&gt;
With all honesty that “&lt;em&gt;precious code&lt;/em&gt;” was non functional and I was stuck for way too long trying to make it work.&lt;br /&gt;
The first eye opener came, when on my first paired project, after we spent close to an hour trying to resolve an issue together, we decided to try troubleshooting on our own. I tried to make the already existing code work, while my project partner ended up resolving it by following Jeff’s advice: rewriting that method from scratch.&lt;br /&gt;
On my next paired project, I ended up taking a leap of faith and in a similar situation, I was the one who followed Jeff advice, while my project partner tried to make the already existing code work. Again rewriting from scratch took us to the next step.&lt;br /&gt;
So please, have confidence in yourself, delete what is disfunctional and don’t be afraid to start all over again!&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Opening up as an introvert:&lt;/strong&gt; If you are an introvert person, just like me, first you will find the significant community involvement at &lt;a href=&quot;https://www.turing.io/&quot;&gt;Turing&lt;/a&gt; overwhelming. But it will also help you in a way. Soon you will also recognize that there is really no other way than going forward.&lt;br /&gt;
That being said, make sure you try to participate in everything that is available to you. That will help you to get to know other people whom otherwise you would not talk to because you are a very reserved person.&lt;br /&gt;
This is actually a topic that would warrant its own blog post, but for now let’s just leave it with sharing with the summary of my experience: as much as it has been an effort for me to open up and talk to others about all kinds of topics, I see the benefit as well. Not only the personal effort that goes into it.&lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Tue, 26 Jan 2016 05:38:42 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/welcome-to-turing.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/welcome-to-turing.html</guid>
        
        <category>turing</category>
        
        
        <category>turing</category>
        
      </item>
    
      <item>
        <title>Thankful</title>
        <description>&lt;p&gt;With the turkey already partially eaten, the leftovers carefully packed to provide reliable food supplies for the next two weeks, I did a quick math for the first eleven months of this year.&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://laszlo.thebaloghs.com/images/posts/2016_Thanksgiving_turkey_JFLMTCO.jpg&quot; alt=&quot;turkey&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Wow, what a year this has been! Again!&lt;/p&gt;

&lt;p&gt;Of course I am thankful for our family and our friends and for our life in general. If I pause here for a second, based on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Thanksgiving&quot;&gt;Wikipedia description of what Thankgiving is about&lt;/a&gt; these days would be&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Prayers of thanks and special thanksgiving ceremonies…&lt;br /&gt;
…after harvests and at other times.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Therefore trying to be more specific for this year (2016) I have to say that I am very thankful for the unique experiences this year has brought to us.&lt;/p&gt;

&lt;p&gt;Experiences are never really mentioned. Experiences seems to be completely underrated in the general public’s mind. Yet they are the “things” we will have with us independent of how many material possessions we have and if we are up or down.&lt;/p&gt;

&lt;p&gt;For this reason alone I think experiences are extremely important. Especially that nowadays it seems having new experiences are becoming almost luxuries: afforded the opportunity of exploring things beyond one’s daily fight for basic necessities is beyond reach for many.&lt;/p&gt;

&lt;p&gt;Fortunately we had our fair share of new experiences this year. And for that I am extremely thankful.&lt;/p&gt;

&lt;p&gt;Happy Thanksgiving!&lt;/p&gt;

</description>
        <pubDate>Mon, 25 Jan 2016 01:48:03 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/thankful2016.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/thankful2016.html</guid>
        
        <category>thoughts</category>
        
        
        <category>thoughts</category>
        
      </item>
    
      <item>
        <title>And this how I roll...</title>
        <description>&lt;p&gt;After using &lt;a href=&quot;https://wordpress.com/&quot;&gt;Wordpress&lt;/a&gt; for a while, I tried to look for something simpler, something with much less overhead for my site.
As I am in the middle of learning programming in Ruby, when I found &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, I was very much into giving it a try.
It also means that this post that you are reading right now is nothing more than a static HTML page, generated by a simple &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll build&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So far I love it.&lt;/strong&gt;&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;Everybody has their own wish list. For my search I had a few very simple things to consider:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;What purpose should a new framework serve for my website?&lt;br /&gt;
Though the list might grow, but currently here it is:
    &lt;ul&gt;
      &lt;li&gt;A simple blog where I can share thought every once in a while about anything (mainly topic around programming, running, photography, travel sprinkled with some random thoughts…)&lt;/li&gt;
      &lt;li&gt;Showcasing a photography portfolio&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Not a huge list by any means…&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;How to manage content?
In my case currently I am in full control of content, hosting and anything else that comes between you seeing this page in your browser and the thoughts in my head. I don’t have an army of editors and other site contributors whose access to the site would have to be managed and any changes I will make, I will make it locally on my computer (development and test environment if you wish…) and upload to the server only after passing all evaluations.
For this reason a solution that requires some technical or even programming know-how is perfectly fine.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Dynamic vs Static content
My content is static. I hope it will change in the future, but for now a few static pages are perfectly OK.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Users
Since currently I am the only one need access updating the site, there is no need to manage user database&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;How complicated will it be to learn/work with?
I am already picking up Ruby and diving deeper and deeper into web development, so I feel comfortable with what &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; had to offer.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;General page load
To be as fast as possible. I think we can all agree that nowadays nobody has the patience to wait for websites to load… 
For this one key detail that is important is the number of items need to be processed to generate the content let it be
    &lt;ul&gt;
      &lt;li&gt;any kind of magic on the server side&lt;br /&gt;
&lt;strong&gt;AND / OR&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;actions your browser need to take.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Site design simplicity/complexity&lt;br /&gt;
I wanted to switch to a very simplistic design, so I will not need complex templates/themes that somebody developed with the intention to fit a wide variety of needs and therefore complex and covers a more features than I will really need in the foreseeable future.
I am not saying all wordpress themes are evil. They are all good for the purpose they were built: serving needs of a larger audience. For now, I wanted to focus on loading my content as fast as possible and present it in a minimalist design.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To be continued…&lt;/p&gt;

</description>
        <pubDate>Fri, 08 Jan 2016 08:04:23 -0700</pubDate>
        <link>http://laszlo.thebaloghs.com///blog/how-i-roll.html</link>
        <guid isPermaLink="true">http://laszlo.thebaloghs.com///blog/how-i-roll.html</guid>
        
        <category>hello</category>
        
        <category>website</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
        
        <category>website</category>
        
        <category>jekyll</category>
        
        <category>ruby</category>
        
      </item>
    
  </channel>
</rss>
