<?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 Kevin Mircovich on Medium]]></title>
        <description><![CDATA[Stories by Kevin Mircovich on Medium]]></description>
        <link>https://medium.com/@kevinmircovich?source=rss-43aa8045b2fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fOdhhY54JE8xDb0K.jpg</url>
            <title>Stories by Kevin Mircovich on Medium</title>
            <link>https://medium.com/@kevinmircovich?source=rss-43aa8045b2fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 07:15:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kevinmircovich/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[Starting a rails project with rspec]]></title>
            <link>https://medium.com/@kevinmircovich/starting-a-rails-project-with-rspec-2690139e821f?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/2690139e821f</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Sat, 25 Jun 2016 23:00:26 GMT</pubDate>
            <atom:updated>2016-06-25T23:00:26.851Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is a step by step guide to creating a rails application with rspec instead of the standard test suite.</p><p>code following a `$` should be implemented in the command line.</p><p>‘…’ implies there is more code surrounding the code shown</p><blockquote><em>$ rails new project_name -T</em></blockquote><p>T skip all the test unit files</p><blockquote>$ cd project_name</blockquote><p>open up your new rails project and add the rspec-rails gem in the test and development group:</p><p>file: /Gemfile</p><blockquote><em>…</em></blockquote><blockquote><em>group :development, :test do<br> gem ‘rspec-rails’<br>end</em></blockquote><blockquote><em>…</em></blockquote><p>now install your dependancies:</p><blockquote><em>$ bundle</em></blockquote><p>Generate spec files:</p><blockquote><em>$ rails g rspec:install</em></blockquote><p>If this command didn’t work you most likely got something like this:</p><blockquote><em>Running via Spring preloader in process 2923</em></blockquote><blockquote><em>Could not find generator ‘rspec:install’. Maybe you meant ‘responders:install’, ‘devise:install’ or ‘serializer’</em></blockquote><blockquote><em>Run `rails generate — help` for more options.</em></blockquote><p>The solution I found for this is to stop Spring and run the command again:</p><blockquote><em>spring stop</em></blockquote><blockquote><em>rails g rspec:install</em></blockquote><p>now that should create the files you need. Now when you generate models spec files are automatically created.</p><p>I do not know what implications this method has on your application but once I research more into spring I’ll come back and update this with what’s going in here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2690139e821f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I want to learn to program, where do I start?]]></title>
            <link>https://medium.com/@kevinmircovich/i-want-to-learn-to-program-where-do-i-start-44792f5e9637?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/44792f5e9637</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Tue, 31 May 2016 23:45:16 GMT</pubDate>
            <atom:updated>2016-05-31T23:45:16.141Z</atom:updated>
            <content:encoded><![CDATA[<p>Here are a list of resources to get started and answers to common questions I’m asked about learning web development / programming:</p><h4>Where to start:</h4><p><em>Learn to use the command line</em>: <a href="https://launchschool.com/books/command_line">https://launchschool.com/books/command_line</a></p><p><em>Learn basic Ruby</em>: <a href="https://launchschool.com/books/ruby">https://launchschool.com/books/ruby</a></p><p><em>Learn basic Ruby again</em>: <a href="https://pine.fm/LearnToProgram/">https://pine.fm/LearnToProgram/</a></p><p><em>Learn to use binding.pry</em>: <a href="https://github.com/mirc89/pry-example/blob/master/index.rb">https://github.com/mirc89/pry-example/blob/master/index.rb</a></p><p><em>Learn Object Oriented Ruby</em>: <a href="https://launchschool.com/books/oo_ruby">https://launchschool.com/books/oo_ruby</a></p><p>At this point you should be able to use your command line, a text editor, write scripts, run them using the command line, and pry into the code to run commands in the middle of the script.</p><h4>What now:</h4><p>This is where your learning will become more project driven and this will take you and any direction (learning more front end, how to use apis, read files, ect). Here are some benchmarks you can aim towards when doing projects:</p><ul><li>Can you build command line applications like tick-tack-toe.</li><li>Learn to read a file programmatically and out put the text differently (sorted, organized, manipulated, grouped). Then make that script object oriented. Can you out put a new file? Make object out of the contents: Contacts that have email and phone number read from a csv.</li><li>Learn to scrape a webpage. Find a website with some information and use Nokogiri (or another library) to fetch a webpage’s content and extract the data you want. Can create objects with the data you scraped and do something with it (output in the terminal, organize the info, etc.).</li><li>Make a command line application that is integrated with an API. Make API calls based on user input. Note: For this you’ll need to <a href="https://github.com/mirc89/making-requests-with-ruby/blob/master/index.rb">require http</a>. After you have some fun with that, actually learn what HTTP is.</li></ul><h4>Other FAQ:</h4><p><em>Does it matter what language I learn first?</em></p><p>No. Most people will say Ruby because it’s friendly and easy to learn. You can’t go wrong with what language you learn first. You WILL learn more than one language eventually. If I was starting over with what I know now I would chose between Ruby, Python, and Javascript. If you are just starting out with programming, pick one and go with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44792f5e9637" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modular JQuery]]></title>
            <link>https://medium.com/@kevinmircovich/modular-jquery-4f2d3392acab?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f2d3392acab</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Mon, 30 May 2016 18:07:09 GMT</pubDate>
            <atom:updated>2016-05-30T18:07:09.091Z</atom:updated>
            <content:encoded><![CDATA[<p>This is my break through from writing spaghetti jquery to modular jquery.</p><p>I made a simple web application with two versions on the same front end. One one version has js un-organized and another with modular functions, separation of responsibilities, and no global variables.</p><p>I then build an api in node and express to post + get data and also a script to read my js and paste it on the page where you’re looking at the example. So if you serve this application you will see the code that is making the application work. The UI/UX are exactly the same and the js has exactly the same result, yet the code is WAY more developer friendly and easy to change.</p><p>Here is the repo: <a href="https://github.com/mirc89/modular-jquery">https://github.com/mirc89/modular-jquery</a></p><p>You can see the difference in readability immediately. The modular code is more lines of code but way easier to write, read, and change.</p><p><strong>Non Modular Code:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WTbOis3AtQHmAYIm8rCYXg.png" /></figure><p>Modular Code:</p><p><a href="https://github.com/mirc89/modular-jquery/blob/master/modular/scripts.js">mirc89/modular-jquery</a></p><p>jQuery just became a lot easier to use, if it wan’t easy enough already…</p><p>Source of Inspiratio to learn modular js: <a href="https://www.youtube.com/watch?v=jDhDvnlbr4Q&amp;index=5&amp;list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f">https://www.youtube.com/watch?v=jDhDvnlbr4Q&amp;index=5&amp;list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f2d3392acab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Production Rails Application on Linux Server]]></title>
            <link>https://medium.com/@kevinmircovich/setting-up-linux-server-9777b315fa41?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/9777b315fa41</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[unicorns]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Thu, 26 May 2016 08:19:34 GMT</pubDate>
            <atom:updated>2016-05-26T08:26:54.886Z</atom:updated>
            <content:encoded><![CDATA[<p>These are the guides I use (in order) to set up a server on digitalocean.</p><p><strong>STEP 1: Set up users</strong></p><p>source: <a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04">https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04</a></p><p>ssh as root and change my password with:</p><blockquote><em>ssh root@</em><strong>ip_address_of_server</strong></blockquote><blockquote><em>passwd</em></blockquote><p>then create a new user (called demo) and give sudo permission:</p><blockquote><em>adduser </em><strong>demo</strong></blockquote><blockquote><em>gpasswd -a </em><strong>demo</strong><em> sudo</em></blockquote><p>Give my user a password:</p><blockquote><em>passwd </em><strong>demo</strong></blockquote><p>Continue through the rest of the guide as my new user. Exit and ssh as that user:</p><blockquote><em>exit</em></blockquote><blockquote><em>ssh </em><strong>demo</strong><em>@</em><strong>ip_address_of_server</strong></blockquote><p><strong>STEP 2: Install rbenv, Ruby, Rails, and Node</strong></p><p>source: <a href="https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04">https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04</a></p><p><strong>STEP 3: Install Postgres and create db</strong></p><blockquote><em>sudo apt-get install postgresql postgresql-contrib libpq-dev</em></blockquote><blockquote><em>sudo -u postgres createuser -s </em><strong>pgusername</strong></blockquote><blockquote><em>sudo -u postgres psql</em></blockquote><blockquote><em>\password </em><strong>pgusername</strong></blockquote><blockquote>\q</blockquote><p><strong>STEP 4: Clone app onto server</strong></p><p>On the server go to home/user_name/ and create a bare git repo:</p><blockquote><em>cd</em></blockquote><blockquote><em>mkdir </em><strong>app_name</strong><em>_repo</em></blockquote><blockquote><em>cd </em><strong>app_name</strong><em>_repo</em></blockquote><blockquote><em>git — bare init</em></blockquote><blockquote><em>pwd</em></blockquote><blockquote><em>exit</em></blockquote><p>go to the app’s root directory on your <strong>local machine</strong> and push it up to the path that was returned when running pwd above (/home/demo/app_name_repo)</p><blockquote><em>git remote add production </em><strong>demo</strong><em>@</em><strong><em>server_ip_address</em></strong><em>:/home/demo/</em><strong>app_name</strong><em>_repo</em></blockquote><blockquote><em>git push production master</em></blockquote><p>ssh back to your server as the user you created and clone the repo that you pushed to.</p><blockquote><em>ssh </em><strong>demo</strong><em>@</em><strong>server_ip_address</strong></blockquote><blockquote><em>git clone /home/</em><strong>demo</strong><em>/</em><strong>app_name</strong><em>_repo </em><strong>app_name</strong></blockquote><p><strong>STEP 5: Configure app for production</strong></p><p>On your local machine edit the Gemfile and config/database.yml:</p><p>Gemfile:</p><blockquote><em>group :production do</em></blockquote><blockquote><em>gem ‘unicorn’</em></blockquote><blockquote><em>end</em></blockquote><p>config/database.yml:</p><blockquote><em>default: &amp;default<br> adapter: postgresql<br> encoding: unicode<br> pool: 5<br> host: localhost</em></blockquote><blockquote><em>development:<br> &lt;&lt;: *default<br> database: </em><strong>app_name</strong><em>_development</em></blockquote><blockquote><em># Warning: The database defined as “test” will be erased and<br># re-generated from your development database when you run “rake”.<br># Do not set this db to the same as development or production.<br>test:<br> &lt;&lt;: *default<br> database: </em><strong>app_name</strong><em>_test</em></blockquote><blockquote><em>production:<br> &lt;&lt;: *default<br> database: </em><strong>app_name</strong><em>_production<br> username: </em><strong>pgusername</strong><em><br> password: &lt;%= ENV[‘APP_DATABASE_PASSWORD’] %&gt;</em></blockquote><p>Push up the changes to your server’s repo and pull those changes into you app’s directory on the server.</p><blockquote><em>git add .</em></blockquote><blockquote><em>git commit -m “config db and added unicorn to gemfile”</em></blockquote><blockquote><em>git push production master</em></blockquote><p>ssh back into the server as your user</p><blockquote><em>ssh </em><strong>demo</strong><em>@</em><strong>server_ip_address</strong></blockquote><blockquote><em>cd </em><strong>app_name</strong></blockquote><blockquote><em>git pull origin master</em></blockquote><blockquote><em>bundle</em></blockquote><p>set env variables with .rbenv-vars:</p><blockquote><em>cd ~/.rbenv/plugins</em></blockquote><blockquote><em>git clone </em><a href="https://github.com/sstephenson/rbenv-vars.git"><em>https://github.com/sstephenson/rbenv-vars.git</em></a></blockquote><blockquote><em>cd ~demo</em></blockquote><blockquote><em>cd app_name</em></blockquote><blockquote><em>rake secret</em></blockquote><p>Open this file:</p><blockquote><em>nano .rbenv-vars</em></blockquote><p>take the output of rake secret and add it to the file along with your database password:</p><blockquote><em>SECRET_KEY_BASE=the_key_generated_from_above</em></blockquote><blockquote><em>APP_DATABASE_PASSWORD=password_created_earlier_for_postgres</em></blockquote><p>exit and save the file.</p><p>export variables with this line:</p><blockquote><em>rbenv vars</em></blockquote><p><strong>STEP 6: Run rake tasks for production</strong></p><blockquote><em>RAILS_ENV=production rake db:create</em></blockquote><blockquote><em>RAILS_ENV=production rake db:migrate</em></blockquote><blockquote><em>RAILS_ENV=production rake assets:precompile</em></blockquote><p><strong>STEP 6: Test app in production</strong></p><p>Run rails server in production and visit the url to make sure it is working</p><blockquote><em>RAILS_ENV=production rails server — binding=</em><strong>server_ip_address</strong></blockquote><p>visit the url it outputs and make sure your app shows up. If there are problems rendering the app, errors will be logged where you started the server and you can debug from there.</p><p><strong>STEP 7: Unicorn</strong></p><p><strong>Source</strong>: <a href="https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04">https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04</a> <strong>section: </strong><em>Configure Unicorn</em></p><p>create a unicorn file in config:</p><blockquote><em>nano config/unicorn.rb</em></blockquote><p>fill it with this contents:</p><pre># set path to application<br>app_dir = File.expand_path(&quot;../..&quot;, __FILE__)<br>shared_dir = &quot;#{app_dir}/shared&quot;<br>working_directory app_dir<br><br><br># Set unicorn options<br>worker_processes 2<br>preload_app true<br>timeout 30<br><br># Set up socket location<br>listen &quot;#{shared_dir}/sockets/unicorn.sock&quot;, :backlog =&gt; 64<br><br># Logging<br>stderr_path &quot;#{shared_dir}/log/unicorn.stderr.log&quot;<br>stdout_path &quot;#{shared_dir}/log/unicorn.stdout.log&quot;<br><br># Set master PID location<br>pid &quot;#{shared_dir}/pids/unicorn.pid&quot;</pre><p>create the directories for logs:</p><blockquote><em>mkdir -p shared/pids shared/sockets shared/log</em></blockquote><p>Create a script for initializing:</p><blockquote><em>sudo nano /etc/init.d/unicorn_</em><strong>app_name</strong></blockquote><p>paste this script changing the variables for USER and APP_NAME:</p><pre>#!/bin/sh<br><br>### BEGIN INIT INFO<br># Provides:          unicorn<br># Required-Start:    $all<br># Required-Stop:     $all<br># Default-Start:     2 3 4 5<br># Default-Stop:      0 1 6<br># Short-Description: starts the unicorn app server<br># Description:       starts unicorn using start-stop-daemon<br>### END INIT INFO<br><br>set -e<br><br>USAGE=&quot;Usage: $0 &lt;start|stop|restart|upgrade|rotate|force-stop&gt;&quot;<br><br># app settings<br>USER=&quot;<strong><em>demo</em></strong>&quot;<br>APP_NAME=&quot;<strong><em>app_name</em></strong>&quot;<br>APP_ROOT=&quot;/home/$USER/$APP_NAME&quot;<br>ENV=&quot;production&quot;<br><br># environment settings<br>PATH=&quot;/home/$USER/.rbenv/shims:/home/$USER/.rbenv/bin:$PATH&quot;<br>CMD=&quot;cd $APP_ROOT &amp;&amp; bundle exec unicorn -c config/unicorn.rb -E $ENV -D&quot;<br>PID=&quot;$APP_ROOT/shared/pids/unicorn.pid&quot;<br>OLD_PID=&quot;$PID.oldbin&quot;<br><br># make sure the app exists<br>cd $APP_ROOT || exit 1<br><br>sig () {<br>  test -s &quot;$PID&quot; &amp;&amp; kill -$1 `cat $PID`<br>}<br><br>oldsig () {<br>  test -s $OLD_PID &amp;&amp; kill -$1 `cat $OLD_PID`<br>}<br><br>case $1 in<br>  start)<br>    sig 0 &amp;&amp; echo &gt;&amp;2 &quot;Already running&quot; &amp;&amp; exit 0<br>    echo &quot;Starting $APP_NAME&quot;<br>    su - $USER -c &quot;$CMD&quot;<br>    ;;<br>  stop)<br>    echo &quot;Stopping $APP_NAME&quot;<br>    sig QUIT &amp;&amp; exit 0<br>    echo &gt;&amp;2 &quot;Not running&quot;<br>    ;;<br>  force-stop)<br>    echo &quot;Force stopping $APP_NAME&quot;<br>    sig TERM &amp;&amp; exit 0<br>    echo &gt;&amp;2 &quot;Not running&quot;<br>    ;;<br>  restart|reload|upgrade)<br>    sig USR2 &amp;&amp; echo &quot;reloaded $APP_NAME&quot; &amp;&amp; exit 0<br>    echo &gt;&amp;2 &quot;Couldn&#39;t reload, starting &#39;$CMD&#39; instead&quot;<br>    $CMD<br>    ;;<br>  rotate)<br>    sig USR1 &amp;&amp; echo rotated logs OK &amp;&amp; exit 0<br>    echo &gt;&amp;2 &quot;Couldn&#39;t rotate logs&quot; &amp;&amp; exit 1<br>    ;;<br>  *)<br>    echo &gt;&amp;2 $USAGE<br>    exit 1<br>    ;;<br>esac</pre><blockquote><em>update the scripts permissions:</em></blockquote><blockquote><em>sudo chmod 755 /etc/init.d/unicorn_</em><strong>app_name</strong></blockquote><blockquote><em>sudo update-rc.d unicorn_</em><strong>app_name</strong><em> defaults</em></blockquote><p>boot up Unicorn:</p><blockquote><em>sudo service unicorn_</em><strong>app_name</strong> <em>start</em></blockquote><p><strong>STEP 8: Nginx</strong></p><p>source: <a href="https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04">https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04</a> section: Install and Configure Nginx</p><p>Install Nginx:</p><blockquote><em>sudo apt-get install nginx</em></blockquote><blockquote><em>sudo nano /etc/nginx/sites-available/default</em></blockquote><p>replace contents of file with the code below; make sure to change the variables:</p><pre>upstream app {<br>    # Path to Unicorn SOCK file, as defined previously<br>    server unix:/home/<strong><em>demo</em></strong>/<strong><em>app_name</em></strong>/shared/sockets/unicorn.sock fail_timeout=0;<br>}<br><br>server {<br>    listen 80;<br>    server_name localhost;<br><br>    root /home/<strong><em>demo</em></strong>/<strong><em>app_name</em></strong>/public;<br><br>    try_files $uri/index.html $uri @app;<br><br>    location @app {<br>        proxy_pass http://app;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header Host $http_host;<br>        proxy_redirect off;<br>    }<br><br>    error_page 500 502 503 504 /500.html;<br>    client_max_body_size 4G;<br>    keepalive_timeout 10;<br>}</pre><p>restart nginx:</p><blockquote><em>sudo service nginx restart</em></blockquote><p>visit your application at <a href="http://server_public_ip/">http://</a><strong><em>server_ip_address</em></strong> and pray everything is going to be alright.</p><p><strong>Ongoing: Use this workflow for pushing up changes:</strong></p><p>local machine:</p><p>git push production master</p><p>ssh to your server and change directories into your app. Pull in changes from the repo, add any variables to rbenv-var if necessary, run rake commands on production, and restart unicorn:</p><p>from root dir in production app:</p><blockquote><em>git pull origin master</em></blockquote><blockquote><em>RAILS_ENV=production rake db:migrate</em></blockquote><blockquote><em>RAILS_ENV=production rake assets:precompile</em></blockquote><blockquote><em>sudo service unicorn_app_name restart</em></blockquote><p><strong>EXTRA: Set up Domain Name</strong></p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean">How To Set Up a Host Name with DigitalOcean | DigitalOcean</a></p><p><strong>SECURITY: Add some shit</strong></p><p>Postgres:</p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-secure-postgresql-on-an-ubuntu-vps">How To Secure PostgreSQL on an Ubuntu VPS | DigitalOcean</a></p><p>Tomcat:</p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-encrypt-tomcat-8-connections-with-apache-or-nginx-on-ubuntu-16-04">How To Encrypt Tomcat 8 Connections with Apache or Nginx on Ubuntu 16.04 | DigitalOcean</a></p><p>Basic Firewall:</p><p><a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04">Initial Server Setup with Ubuntu 16.04 | DigitalOcean</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9777b315fa41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PG::ConnectionBad: could not connect to server: No such file or directory]]></title>
            <link>https://medium.com/@kevinmircovich/pg-connectionbad-could-not-connect-to-server-no-such-file-or-directory-da18a3764a0a?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/da18a3764a0a</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[error]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Fri, 29 Jan 2016 00:34:56 GMT</pubDate>
            <atom:updated>2016-01-29T00:34:56.330Z</atom:updated>
            <content:encoded><![CDATA[<p>PG::ConnectionBad: could not connect to server: No such file or directory</p><pre>rake aborted!</pre><pre>PG::ConnectionBad: could not connect to server: No such file or directory</pre><pre>Is the server running locally and accepting</pre><pre>connections on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432”?</pre><p>I ran into this issue recently when running rake db commands on a new rails project with a postgres db.</p><p><strong>Solution:</strong></p><p>Add the below line of code to your <em>config/database.yml </em>file.</p><pre>default: &amp;default</pre><pre>  host: localhost</pre><p><strong>What happened?</strong></p><p>From what I understand my application has a tunnel connecting to my postgres database. The connection originally was through my linux system though what’s needed is a SSH tunnel to the database host.</p><p><em>More details here:</em></p><p><a href="https://support.cloud.engineyard.com/hc/en-us/articles/205408088-Access-Your-Database-Remotely-Through-an-SSH-Tunnel#topic1">https://support.cloud.engineyard.com/hc/en-us/articles/205408088-Access-Your-Database-Remotely-Through-an-SSH-Tunnel#topic1</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da18a3764a0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Asana for your software project]]></title>
            <link>https://medium.com/@kevinmircovich/using-asana-for-your-software-project-ea5d92fd31a7?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea5d92fd31a7</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Thu, 28 Jan 2016 15:33:17 GMT</pubDate>
            <atom:updated>2016-01-29T04:40:13.695Z</atom:updated>
            <content:encoded><![CDATA[<p>When making a new software project there is a lot of moving parts. I usually find myself keeping many things at the top of my head to go back to later. This isn’t effective because the project will get bigger and the little todos &amp; bugs will build up, and parts that you planned on going back to will get left behind.</p><p>Asana the perfect productivity and organization tool for launching up a project. It’s a project management software that is dynamic and easy to collaborate on. It’s great to use for collaborative projects but specifically software projects because things change non stop and asana makes it easy to change anything. Used correctly you can collaborate with speed and never leave a bug or feature behind. Here are some tricks and habits you can use to get the most out of asana.</p><p><strong>Create a section for wild dream features</strong></p><p>This is a place to dump any and every idea you’ve ever had, period. No thinking through required. If you had an idea for a super cool contextual notification system based on solar activity for your find a Dj site, throw it in there. This is a place to not only store ideas to reference later but it puts the entire team in an ongoing state of ideation that results in some pretty cool features to add when it’s the right time.</p><p><strong>Organize your bugs by priority and most importantly, log the small ones!</strong></p><p>Have three different bug sections separated by priority. There is High Priority for bugs that are braking core functionality. Medium Priority would be filled with any bugs that cause a lot of friction with the usability and is noticeable and frustrating to a user. Low Priority is where there is bad UX or UI that’s not entirely noticeable to your user. These bugs tend to be very small and easy to correct. An example might be that a button’s css isn’t doing the cool wavy effect when you were creating a form, or the carousel text can use some shadow when you were making the carousel. DO NOT fix these bugs as you see them. The name of the game is to keep making progress. A little fix might seem quick and easy but it will either take longer than expected or sidetrack you from what you were working on in the first place. If you put it here it won’t get left behind and you can focus on the task at hand.</p><p><strong>Assign tasks as you get to them, not when you create them</strong></p><p>The flexibility of asana is what makes it so great. Don’t assign tasks to people as you create them. Assign tasks as you get near them or started on a task similar. An unnoticed feature that asana is the ability for anyone to assign a task to anyone. Encourage your teammates to assign tasks to each other if it’s related to what that person’s job is. This is typically good for a small team with management responsibility spread out. This may not be the best route to take for a large team.</p><p>Start with your MVP and pull a feature out one at a time into its own category. As you get tasks done and your todo list gets short, reference back to your features list and see what feature adds the most value to your core value proposition. If it’s a big feature brake it into smaller chunks, each capable of being shipped. Put this feature in its own category at the top level of your tasks directory and keep working.</p><p><strong>Put resources you find for a feature as a comment in that feature</strong></p><p>If you know your partner Kevin is responsible for 2 factor auth and you stumble across an amazing article or resource called ‘the best way to create 2 auth,’ do not email it to Kevin. Do not slack it to Kevin. Don’t even go to Kevin’s desk and say “check out this article on 2 auth this could be used for you.” It will not be useful unless he was searching for it in that exact moment. Kevin is working on something else and he is not going to worry about 2 auth until he is doing 2 auth. The best place to put any resources, articles, or suggestions is in the comment of the task that it’s for. That way Kevin has it at the time he is focused on it.</p><p>So those are some tips and tricks that made asana worthwhile for me. Be sure to do what fits your team’s needs and keep moving forward.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea5d92fd31a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Randomness In Programming]]></title>
            <link>https://medium.com/@kevinmircovich/a-random-blogpost-3d3c54236464?source=rss-43aa8045b2fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d3c54236464</guid>
            <category><![CDATA[randomness]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Kevin Mircovich]]></dc:creator>
            <pubDate>Wed, 13 Jan 2016 14:18:49 GMT</pubDate>
            <atom:updated>2016-02-13T20:19:21.391Z</atom:updated>
            <content:encoded><![CDATA[<p>We learn to trust the abstractions that we use for programing and sometimes don’t think twice about what’s happening on a lower level. One function that I use very often and can’t wrap my head around is the random method. You take in a collection of things and out comes a result that is supposedly random; and we are happy with that. Because it is unpredictable to the user does not mean it it’s truly random, it’s just enough for us to accept. So my first question is what is happening underneath random functions and is that truly random? If not, how can we make a function that is truly random?</p><p>The random function, just like any other program, is a set of procedures that gives you a result. That means someone wrote the instructions for that method to make a selection. Computer programs by nature are deterministic, so how can it be possible to write a program that isn’t. This issue can be (almost) solved by using an implementation-dependent algorithm; an algorithm that is dependent on a factor (variable) determined at the time of implementation (running the program). Ruby for example will ‘seed’ their algorithm using a combination of numbers from your machine like the time, process id, and a sequence number (if your machine doesn’t have a <a href="https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator">cryptographic provider</a> supplying a number to seed). This will make the algorithm produce results seemingly undetermined.</p><p>With an algorithm that is unique by a seed that is even more unique we can get closer and closer to true randomness, but it is important to note that this still isn’t true randomness. The more complex the seed the exponentially closer we get to random, but it will never truly be random, only <a href="https://en.wikipedia.org/wiki/Pseudorandomness">pseudo-random</a>. To get as close as we can to random we need to generate a seed from a source that is completely dynamic, unique, and unpredictable. Atmospheric noise is the considered the best source for something unique and undetermined and Random.org uses it to generate what they claim as true randomness. To call that true randomness is up to the fact of whether the universe itself is <a href="https://www.random.org/randomness/">deterministic or chaotic system</a>. If the universe functions procedurally and everything is determined based on the circumstances, then atmospheric noise is generating randomness just like our timestamp is, just more complex. That would mean every source available to us would only get us infinitely closer to true randomness, but not truly random. If the universe is a chaotic system and atmospheric noise is undetermined and unique at every given moment in time, then we got ourselves a random generator.</p><p>Resources of my insanity:</p><ul><li><a href="http://stackoverflow.com/questions/20109006/how-does-math-random-work-in-javascript?answertab=votes#tab-top">http://stackoverflow.com/questions/20109006/how-does-math-random-work-in-javascript?answertab=votes#tab-top</a></li><li><a href="https://en.wikipedia.org/wiki/Mersenne_Twister">https://en.wikipedia.org/wiki/Mersenne_Twiste</a>r</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random</a></li><li><a href="https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator">https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator</a></li><li><a href="https://en.wikipedia.org/wiki/Deterministic_system">https://en.wikipedia.org/wiki/Deterministic_system</a></li><li><a href="http://ruby-doc.org/core-2.2.0/Random.html#method-c-srand">http://ruby-doc.org/core-2.2.0/Random.html#method-c-srand</a></li><li><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb931357(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/bb931357(v=vs.85).aspx</a></li><li><a href="https://en.wikipedia.org/wiki/Pseudorandomness">https://en.wikipedia.org/wiki/Pseudorandomness</a></li><li><a href="https://www.random.org/randomness/">https://www.random.org/randomness/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d3c54236464" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>