Time Matters

Life is Short


Training for fencing summer Nationals in Dallas

Before starting this job, I never quite understood why my programmer friends always wanted the latest computer - the faster the better. I also never understood why it was so important to shorten or abbreviate commands such as rails server to rails s. Does typing an extra five characters really matter that much?

This week flew by with impressive speed. This entire week I was either waitressing at the restaurant or sitting in front of a computer, learning or implementing Ruby. And honestly, I feel as if I didn’t have enough time in the day to get everything done that I wanted to get done just at Quottly alone. one minute I wrapped my head around Regular Expressions and the next I notice that two hours have gone by in a blink of an eye! When you sit in front of the computer, working with code, it’s as if you get stuck into a flow, where for you, time stands still; a minute could be a day or a day could be a minute. When time moves so quickly, every second counts. Every minute that you wait for the computer to load the server takes a good ten minutes off of your day depending on how often you load the server. And then add other factors like playing around with ‘byebug’ or writing long strings and methods, every character takes a fraction of a second which adds. By the end of the week, the time that was wasted by a slow computer or taking time to type out an entire command could easily add up to half a day. You know what can be accomplished in half a day? A lot. A lot of learning can be accomplished in half a day.

Read on →

Making Mistakes With the DataBase

Everyday I am learning something new

Today, I learned about databases and migrations. It seems like such a big thing for many intro books to gloss over but gloss over it they do. And there might be good reason to, it’s complicated stuff! Even now as I type this I am not quite sure what databases are or how migrations work. However, I do know that naming conventions with Ruby is a tricky business and I learned that lesson the hard way today.

Working on MobiDick, I decided to create a personal bookshelf which I decided to name ‘Pershelf’, a nice, easy, and explanatory name (or so I thought). I ran

$ bin/rails generate scaffold Pershelf

$ bin/rails db: migrate

Everything so far okay. I modified the app/controllers/concerns/current_pershelf.rb folder and continued to the next step;

$ bin/rails generate scaffold LineItem book:references pershelve:belongs_to

$ bin/rails db:migrate

Read on →

Dealing With Db:seed Issues

Dealing with db:seed issues

Today I added some information into the seeds.rb file and ran $ bin/rails db:seed and then $ ran bin/rails s. To my horror, all the information that I had had was gone! No errors showed up on local host and I felt at a loss since my understanding of databases is so limited. Thankfully with the help of my co-worker, we figured out a solution.

Here’s what I learned:

If an error occurs with $ bin/rails db:seed, the error can be silent and not appear either on your console or on local host. It’s almost like asking Rails what’s wrong and she replies wistfully - nothing - but you know something is wrong. So you go ask Ruby by going into the Rails console and start running some tests;

$ rails c

$ Book.all
...Book Load (0.2ms) SELECT "books".* FROM "books" => #<ActiveRecord::Relation []>

Read on →

What Went Wrong With Postgres

The Beginnings

A couple of days ago I started at my job working for the up and coming ventured back Quottly! It’s a starting intern position and I am incredibly excited to for them. For me it’s more than just a job, it means progress and growth from when I started a little over a year ago with my first ever programming book. I remember opening the first few pages of that programming book while there was some down time at my waitressing job. A customer has just turned my day from okay to miserable with a few nasty comments and I remembered the book that had been given to me by my good friend James when I had shown some interest in what he did for a living. I had at first taken it a little skeptically, thinking that someone like me could/would never learn to program, that it was already too late for me to start. But after glaring at the customer who had just left I was ready to try to do anything to get out of ever waiting another table again. If there was one thing I knew, it was that I had way too little patience and too much pride to wait on tables for the rest of my life.

Sixth months later I quit my waitressing job to focus on programming and to live life as a broke college student. Seven months later I got hired as a Developer Intern at Quottly, working for the same friend who had given me the book in the first place. I had often come to Quottly’s office to work on self-teaching programming books that James had given me or that I had downloaded from various sites after working hours. I would stay up until late at night and would drink copious amounts of coffee until I had learned just enough to get started. Now that my foot is in the door I am hoping that nothing will hold me back!

That enthusiastic attitude that I had my first day nearly died earlier today once faced with the task of setting up. What is it about setting up the workspace that always takes me forever? In the very beginning, it was issues with Git, then it was issues with Rails servers, and today, it was an issue with postgres.

Read on →

Setting Up Jekyll on Github Project Page

How to set up pre-made Jekyll theme to your created Github Project Pages

Like most projects I begin, I immediately faced programming trouble and daunting challenges that made me second-guess my original enthusiasm for coding and for life in general.

But, as I have heard many times, patience is a virtue and one that I am sorely lacking. Not only do I consider programming a learning experience, but also as a way to learn how to instill problem solving techniques and practice self-restraint of letting my frustration and anger get the better of me.

So here is the problem I faced today; setting up a custom domain name for my Github Project Page and setting up a Jekyll theme to go along with it. Sounds easy right? I thought so too, but of course I found almost every wrong avenue to implement this…

Read on →

Learning About Variable Scope

Hardcore Parcour

After going through three tutorial books on Ruby, Sinatra, and Ruby on Rails (one each respectively) I still struggled with my first kata from Code Wars. Code Wars (give a brief description)

The name of the kata is Stringy Strings and it has very straightforward instructions;

write me a function stringy that takes a size and returns a string of alternating ‘1s’ and ‘0s’.

the string should start with a 1.

a string with size 6 should return :‘101010’.

with size 4 should return : ‘1010’.

with size 12 should return : ‘101010101010’.

The size will always be positive and will only use whole numbers

I have to admit, I was at quite a loss - a feeling that was incredibly frustrating.

Read on →

First Glimpse of the Amazon

Dream Come True


Photo Credits to Charlotte Newell

Ever since I was young, I had dreamed about going to the Amazon. Something about the river always made me imagine of adventure - of trekking through the jungle in search of a lost city. My grandfather used to buy me National Geographic magazines when I first learned to read and I remember staring at the pictures and cutting out the ones of the Amazon to tape up all over my wall, to the frustration of my parents. As I got older, My room was covered with world maps, each map marked with circles of where I would someday travel, always a big black line tracing the Amazon.

And there it was. The Amazon.

The section we were flying over was winding, brown, and languid, stretching as far as the eye could see with nothing but tropical canopy to match.

Read on →

From Lima to the Amazon

Virtual cats become dangerous

I am almost a week into my trip in Peru and I have yet to write a blog post about it! I never know how to start, should I write about reccommendations of where to go? Or should I just focus solely on Ruby and make a few mentions about Peru. I guess a blend of the two would be best. Then there’s the struggle of finding time to write. My travel partner and I are always on the go, whether we’re exploring Lima or trying new food.


Ruins of Huaca Pucllana - ancient, pre-incan ruins which exist in the middle of Miraflores. It is a singularly odd experience to stand on ruins dating back to the first century C.E. while surrounded by high rise banks and apartments (Charlotte Newell)

The first five days we were in Lima, the capital city of Peru. I had packed for a full on winter with long underwear, fleece layers, wool socks, etc. only to find myself sweating in long pants and a T-shirt by noon. The weather is noticeably different from my hometown in Naples, Florida. Instead of constant sun, Lima has constant cloud cover. Clouds that loom low over the city and make it impossible to determine if it’s raining or if you’re constantly walking around in damp, ground-level clouds.

Read on →

Boolean Values

Fundamentals of Ones and Zeros

Thanks to a friend of mine, I’ve recently been doing a lot of Kata on Codewars. If you’ve never done katas on Codewars before, I would highly, highly, highly recommend it. It’s a great site where your competitive nature can get the best of you as you compete with other friends for ‘honor’. There are eight levels of difficulty and each kata is a creative coding problem that you solve for honor points. The beginner’s level, level 8, is a good overview of incredibly basic coding concepts. Once you enter your solution you are able to see how others solved the same kata.

–> http://www.codewars.com

My username is dukeran if you want to add me!

special note: if the same solution was posted by more than two people then I will not site the code.

After going through Chris Pine’s Learn to Program book, here is the solution I came up with:

1
2
3
4
5
6
7
def boolean_to_string(b)
          if b == true
"true"
          else b == false
"false"
  end
end

This is a straightforward code which works just fine but doesn’t utilize the fundamental concept of Boolean values.

Read on →

Upcoming Trip to South America

How I coped with leaving my family and beginning my 2 month trip exploring South America - through code!

And so it has begun! My friend Charlotte and I have boarded our flight for Lima, the capital of Peru. Saying goodbye to my family and extended family brought tears to my eyes.


My own cat picture

I couldn’t help but feel bittersweet as we drove out of my driveway towards the airport, leaving my family waving at the doorstep of the house. Going on big trips is always bittersweet for me, I always hate saying goodbye to those I love but at the same time I can’t wait for another adventure to begin. For me, there is nothing like new sites to see and new experiences to be had, all the while meeting new and interesting people.

Like most other people on the internet, I’m obsessed with my cat. She is my pride and joy, even if she can be a bit peevish sometimes. I swear, with the rate of cat pictures being uploaded daily, the percentage of Mr. Whiskers pictures might surpass the amount of porn to be found on the web.

Read on →