Image for post
Image for post
Docker’s whale mascot, affectionately named “Moby Dick”.

Last fall I had the opportunity to do part time work for a startup while being mentored a more experienced software engineer. At the time I had rudimentary coding ability but had virtually no exposure to what software development in production entails. I hadn’t been working with him for long before he instructed me to install Docker on my computer and familiarize myself with containers. Having no prior knowledge of what containers do or more importantly - why we use them, I treated this step in my education as a section to skim over before getting to the more important and interesting material. …


Image for post
Image for post
“Frankly, my dear, I don’t give public access to variables contained in my lexical scope.”

This week I was reading a very informative post titled “Master the JavaScript Interview: What is a Closure?” by Eric Elliot. The title of the post drew me in, but one point in particular seized my attention. Eric refers to a hypothetical interview question in which interviewees are asked “What is a closure?”. He explains that not knowing the answer to this question is a serious red flag, going as far to say the following: “If you can’t answer this question, you’re a junior developer. I don’t care how long you’ve been coding.”


Image for post
Image for post
https://movieweb.com

I’ve been studying almost nothing but the Ruby language for the past five weeks, yet somehow a basic concept like time and the way Ruby uses it has eluded my understanding until the present date. This brief post aims to introduce and simplify the Time class of Ruby. This is by no means a deep dive, but rather an attempt to help you get started.

The Time class is described in the Ruby documentation as being “Stored internally as the number of seconds with fraction since the Epoch, January 1, 1970 00:00 UTC”. I think this is one of the reasons the Time class can initially be confusing. The Epoch that the documentation is referring to is the Unix Epoch, linked here for further reading. What readers of this post need to know is that the Time class calculates object values based off of seconds. …


The Problem:

Last week I was working on a project (found here for those interested) that is designed to demonstrate the use of ActiveRecord in modeling Many to Many relationships in Ruby. A main feature of my end product is an info page output in terminal that allows users to get a brief summary of a company that meets their search parameters. Before implementing a formatting method, this was the output in OSX terminal:

Image for post
Image for post
*Almost* literally unreadable.

Obviously, I wasn’t happy that one of my main features had “business” being truncated into “busine” and “ss”. After a brief foray into Google, I decided to create a simple method of my own to force clean word wrapping in long strings. Because my project handled long-form input strings from a database with 5000+ entries, I couldn’t manually edit each string. …

Eli Lauffenburger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store