- ruby 15
- mindset 13
- software dev 12
- ruby on rails 11
- career 11
- tech 9
- life lessons 8
- health 8
- management 6
- branding 5
- parenting 5
- web development 4
- linux 4
- sql 4
- skills 3
- experiences 3
- craft 3
- profiles 2
- docker 2
- design 1
I like using Typhoeus for making API calls in Ruby on Rails because the interface is simple. Here’s how I use it.
I had to come up with a way to extract video metadata for work. I found Mediainfo to be a great fit.
When I mix multiple projects in the same Ruby environment, I end up with different versions of the same gem.
This is the article I wish I had when I started software development with Ruby.
It took me a while to comprehend how objects worked in Ruby. If I had to explain it to my younger self again, here’s how I would do it.
Bottom Line — Specify a ruby version and RVM will automatically switch when you open different projects.
I wanted to show a link in a Rails application based on whether a person was
I needed car data for a Ruby on Rails project. I found a GitHub repository where someone generously shared 14,000 rows of car model, makes, and year.
Sometimes I need to make changes to a Ruby on Rails table in production.
If you open IRB (interactive ruby) and type in the following expression
2 + 3, you’ll get
5. If you reverse that with
3 + 2, you’ll still get
You’re going to need a text editor to write Ruby. Although there are many options I prefer using a dedicated Ruby IDE such as RubyMine because it comes with debugging and autocomplete.
Bottom Line — You’ll need a Ruby version manager if you plan on working with Ruby and Rails.
It’s hard enough to learn a new programming language by itself and it’s miserable when you run into avoidable system errors.
I’m not the best at anything and that’s a strength.
Bottom Line — Worried about being replaced? If you stack your above average skills, they’ll be worth more than the value of a single highly valued skill. Here are examples where stacked skills helped me overcome fierce competition.
This analogy is about putting important things first. This is a good analogy that sticks in my head. It comes from Stephen Covey.
Bottom Line — You don’t need to be as ambitious as Bill Gates to have a worthwhile life.
When I heard Ronnie Coleman — an eight time Mr. Olympia Champion — utter these words, I was dumbfounded by the profoundness in one single sentence.
Bottom Line — I look at my knuckles often to remind myself that this hard moment — It too, shall pass.
Bottom Line — I initially failed physics. Here’s how I made my come back and ended up teaching physics to others.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
Only losers give up on their dreams, right? Common wisdom says to persevere, fight, and to never give up on your dreams. But what if the dream you have is someone else’s or no longer makes sense to you?
While visiting Mexico in May 2016, I found out that a normal work week consists of 6 working days at 8 hours per day. In the US and Europe, we typically have 5 working days, 8 hours per day. I might be spoiled but sometimes two days are not enough. Imagine only having 1 day off. Imagine not having any days off. It’s nerve-racking unless your full-time work is what you feel strongly about. If it’s not, then do you have enough time to engage with projects that you feel destined to do? That’s where freedom of time is an important asset.
I was driving to work on I-25 and a realization hit me as I was switching lanes. I noticed that during my 25 mile drive, I’ll switch lanes several times before arriving at the destination. You probably do the same thing. So what? It can teach us a thing or two about looking at life. Let’s look at some scenarios.
I went to Mexico in May 2016. One of my best friends was getting married, and I went down to attend the ceremony and also to get away and relax for a week. I booked an all inclusive resort that was really a dream to stay at. All inclusive includes breakfast, lunch, dinner, and entertainment. Everything is done for you; you are there to relax.
Bottom Line — If you give yourself 3 weeks to do a project, you’ll start it on the last day and finish it in a few hours. That’s Parkinson’s Law.
The problem happens when several pull requests are merged into main and they aren’t deployed to production right away. A developer comes along and merges their pull request and deploys the main branch to production assuming only their changes were merged.
At times I forget to commit my changes until days later. I prefer these commits show an accurate commit date of when the work was actually done.
I’ve written crappy commit messages in the past and I’ve picked up a few tricks over time that help me write helpful descriptions.
Document your code so that the next poor developer that has to extend it or fix it will be thankful you did.
I lost significant productivity by relying mostly on the mouse rather than the keyboard. A few days ago, I took a few hours to ‘sharpen the saw’ and find out how other people use RubyMine (IntelliJ IDE) in their workflows.
Why do we strive to write DRY (do not repeat yourself) code but fail to apply that technique in communications?
Bottom Line - Don’t involve the reviewer prematurely in product management / feature iterations.
Bottom Line - Don’t waste the reviewer’s time. Don’t make them over-think about things you should have provided ahead of time in the pull request description.
When I setup a new development environment, I’ll commit my code to GitHub but the green boxes won’t show my contribution for that day.
I finished Pragmatic Studio’s Rails I course and it gave me the skills to build a CRUD Rails app from scratch. That speaks volumes about how great this course truly is.
Doing Test Driven Development (TDD) and learning Ruby simultaneously is a problem for brand new developers.
ruby on rails
Is there a Linux package that you want to use in Heroku? In my case, I wanted to use MediaInfo which required an apt package installation. Typically this would be an
apt install mediainfo command on a Linux machine. But how do you do this in Heroku?
All modern browsers have Inspect Element. When I’m working on a Rails page that loads a lot of partials, it’s a pain to hunt down where those partials are located. I wish I had Inspect Element for Rails views.
If you import data into a Rails project manually, you’ll see that the primary key count in Rails might be off. For example, running
User.last doesn’t show the last row in the User table.
Once you have Redis set up as a Rails cache backend for your project, here’s how you can explore it in the Rails console.
We have a project and a project can have many tasks. Let’s say we have a task form where a user can specify the project the task belongs to. How do you pass the project foreign key through Rails strong params?
I use Pry on a daily basis while writing / debugging code. I want to show you how to go beyond a simple breakpoint with pry. I’ll show you how I use it to learn about unfamiliar code and how to debug code.
I can’t be the only one who occasionally tries to start
rails server and gets:
Forms are a huge part of a dynamic website. It’s through forms that you take user input and do something with it. It’s worth taking time to understand how to build different types of forms with rails.
I had a problem where fonts were loading fine in development environment but were failing to load in staging / production.
Using HAML in Rails views is great because its more succinct than ERB.
All the jobs I’ve held as a petroleum engineer came from direct referrals. After I was laid off from my first job, I filled out a boatload of online applications to work at oil and gas companies.
I think the advice — the first to give a number loses — doesn’t make sense. Better said — It’s nuanced.
Twelve engineers agreed on a tech stack. Two engineers are fiercely fighting against it. Is the fight worth it?
The longer you’re in your career the more you realize how nauseating the following advice is:
- Give it your 110%
- Give it your best
When I worked in Oil and Gas, I saw guys in their early-60s forced to retire after getting laid off due to downturns.
As a software developer — you should know competitive salaries in the industry or else you might end up underpaid (sometimes severely). Having salary data will also help you ask for market-rate raises.
But what if they think I’m stupid? Guess what — They don’t expect much from you right now anyway.
I was defeated before I even started interviewing. I gave myself a junior software developer title. The defeat was self-imposed.
Bottom line — Manage your time and priorities. If you don’t, someone else will and you won’t like it. Keep your work public and visible within your team. Resist doing hidden work at the expense of your priorities. You ain’t gonna get credit for it.
Bottom Line - Ask for feedback after your rejection. Find the common threads, fix them, and get better at the interview game.
Bottom Line — With a video background, I could move around and other people can be behind me without being seen on video.
I used to be a Windows guy. I had to switch over to Mac for software development. I disliked iOS. It took about a year of installing the right apps and getting used to the Mac.
Although I can write in Russian, I do not know the Russian keyboard fluently. It takes forever to type in Russian. What if it didn’t have to be that way?
I tried to create bootable usb drives and all three attempts failed. When I went to reformat the drives, windows did not recognize them.
Plain old bash works but oh-my-zsh color codes folders from files. It also has git integration and shows what git branch you’re on.
Bottom Line — using a VPN is great for online privacy. Hosting it on a VPS ensures your IP won’t be blacklisted. It’s easy to setup with an automated script.
Post Updated on October 2020.
Bottom Line — Your powerpoint file doesn’t need to be 100 megabytes. You can quickly batch compress images within it to a reasonable size.
Bottom Line — Pug makes HTML tags look a lot less messy.
Bottom Line — “Don’t be that person who uploads a 10mb thumbnail image. Compress it!”
Bottom Line — Find an online forum for your industry and decide whether the degree is worth your time. You won’t get the whole picture about your industry on a college campus.
A turkey was chatting with a bull.
Bottom Line — Life is easier when you have a solid credit history. Start building it sooner rather than later. Here’s how to do it.
It’s easier to sit in one spot rather than get up and do something different. That one spot is familiar and it is safe. A soldier friend of mine told me that during his time in the military, his unit would move locations as often as every 48 hours. His unit lived and breathed with the ability to change their location often.
Bottom Line — Here’s what I learned about lending money and how to minimize the chances of getting screwed.
Gist: I bought 3 cars for people in 2 years. It might be pretty but it’s going to cost you an arm and a leg in repairs. Research and get a dependable vehicle.
Bottom Line — Handstand progress is not linear. Neither are learning other skills in life. I don’t want it to be that way but that is the way it is.
Bottom Line — There is no perfect time to call someone. When you think about calling that person, just call them and stop over thinking it.
Do not disturb means calls are ignored (except starred contacts). Text messages and alerts are silenced.
Bottom Line — Our generation will have a record number of those who will be hard of hearing. It’ll be our own fault. Use ear plugs!
Bottom Line — Cold showers will jolt you out of a funky mood. I take them from time to time.
I stumbled upon a really great video that went into describing how the Navy Seals train their troops to handle high stress situations. They have a unique approach which is focused on exposing the soldiers to fearful situations, and having them react in a sensible matter. I highly recommend watching the video below, but if you’re short on time, I’ll summarize some of the things I got out of it:
Bottom Line — Tired of using triple blade blades? You don’t have to. Here’s how you can shave just like your grandfather did.
Bottom Line — Close your eyes and pace a known room. My mind stops thinking and relaxes.
Over time, I’ve noticed that if I go to sleep closer to 10:30 pm, and sleep until 6:00 am (7.5 hours total), I wake up feeling refreshed in the morning. If I go to bed closer to 12 am, and sleep until 7:30 am, I have a harder time waking up and have a greater propensity to continue sleeping. The total time spent sleeping stays the same at 7.5 hours, but the time intervals change. Let’s take a closer look.
Bottom Line — Get f.lux / night mode on your PC / tablet / smartphone.”
Story time — I saw hundreds of thousands of dollars thrown away on a prematurely acquired software product that was eventually killed off.
It’s been close to three years since I moved away from full-time product management.
Here’s exactly how I submitted my PDUs to PMI to renew my PMP (Project Management Professional) certificate in 2020.
Bottom Line — 5 year roadmaps are as successful as fast weight loss programs.
Bottom Line — You don’t need to spend money on courses to renew your PMP certification. Here’s exactly how to do it on the cheap.
Bottom Line — I took the PMP exam in 2015. Not much changed today in the exam world in 2020. Here are all the strategies I used to pass the exam. Here’s what I would teach my younger self.
You’re exchanging phone numbers. You have to repeat your phone number and your name and name. Why not simply have the other person scan a QR code that automatically imports your contact info.
Bottom Line — My blog is meant for writing. A Jekyll static site allows me to write with ease and avoid friction I experienced with WordPress.
Bottom Line — Speaking skills will greatly amplify your other skills. Here are examples from my life and the lives of others.
Bottom Line — With a custom domain, you have a better chance of ending up on the first page of search engines instead of your facebook page.
Bottom Line — Using firstname.lastname@example.org or email@example.com is a bad idea. Skip the stereotypes.
While you can ask parents around you about their parenthood experiences, you’ll seldom hear the raw truth. You won’t hear things like — I don’t know if I’d do it again. Or how about — my life has never been the same and I’m depressed. Or how about — it caused my divorce. You’ll mostly hear It’s hard but oh my god, it’s worth it.
I write this as a Dad with a newborn that is about two months old.
Taking care of a newborn child is difficult. It’s way harder than I imagined. There’s no off switch. There’s no clocking out.
Several parents told me things that I found to be false after having my kid. Let’s explore.
After watching my few week-old newborn for 7 hours, I was drained. I’m not going to sugarcoat it — I was going through hell as he was fussing, crying, and intermittently sleeping.
I got stuck when trying to install the mediainfo package through
apt install mediainfo. Using buildpacks failed and the solution was to use heroku-buildpack-apt.
To know how the internet works, we looked at how the HTTP protocol worked. Let’s take a look at the two parts of HTTP: Request and Response.
The internet is made up of millions of interconnected computers that send and receive messages. That’s it.
I recently stumbled on this technique where you can load JQuery for ANY page and write JQuery commands right in the browser console. This is great for debugging and exploration.
Have you ssh’d into a production server and had no idea what to do next? For example, I ssh’d into a production Rails server but didn’t know how to access Rails console. It wasn’t straight forward. I was met with a black screen and a white cursor.
When I run
docker ps to look at docker containers, the results are typically wrapped and are hard
to read due to too many displayed columns.
NCDU is my primary tool for figuring out what is taking up space on my Linux servers and Mac machine.
Becoming a software developer forced me to learn the command line interface. At first, I strongly resisted. Coming from windows GUI — the command line looked like an ugly remnant of 1980s computing.
When I set a table column to decimal, I tend to forget the difference between precision and scale.
I had to run a query on a Postgresql database in production and export the data to a CSV file. I couldn’t use Postico.
Here’s why you might want to do this:
Bottom Line - Practice SQL by solving real problems.
Bottom Line — Imposter syndrome will kill your self-confidence in your craft. The solution is to teach your craft. Teach through writing or video work. You don’t have to be an expert to begin.
Bottom Line — Ideas come to my head randomly. If I don’t jot them down, I forget them. I use a voice recorder app to collect them and transcribe them later. That’s how I generate creative ideas and reduce the stress of having to remember a lot.
Bottom Line — Speaking and presenting is an underrated skill. Toastmasters is a cheap and effective way to work on it. It will greatly enhance your other skills.
After switching from petroleum engineering to software development, I have folks ask whether they should do the same.
Bottom Line — My heart wasn’t in it. The cyclical downturns got old. I jumped to software. No regrets about starting with petroleum engineering.
I went to MuckFest MS 2018 5K obstacle course in Denver. It was my third time running it. A friend, my girlfriend, and I went together and were part of a bigger team of at least 20 people that started the run at 9 am.
The code you write today will be killed off in the future. You are not the code you write.
The problem is sitting down to write and thinking I have nothing original to say. You start a blog and a few weeks later you forget about it. Someone told you that original thought is a prerequisite for creative work.
Ira Glass is the producer of the radio and television series “The American Life”. His take on bridging the gap between taste and ability deeply resonated with my own journey with writing.
Often I’ll have a boolean value passed in as a string. This means an
if statement will have to look like this:
Fedor “The Last Emperor” Emelianenko is a Russian MMA fighter. There’s no doubt he’s a great fighter, but that’s just one piece that makes up his total package.
I watched Scarface (1983) several years ago and thought that it was just a violent action movie. I didn’t give it a second thought and was satisfied with just watching it once. I saw it on Netflix and decided to give it another chance. This time around, the movie had a deeper meaning to me and it wasn’t about the violence and the 1980’s drug wave, but it was instead a deeper look into human nature. I’m not sure if that was the intention that Brian De Palma and Oliver Stone had when making this movie, but this is what I felt.
Did you know you could launch multiple small websites from the same server and keep them isolated from each other? Plus, you could link them to multiple domain names / subdomains and apply free SSL / TLS from Let’s Encrypt.
Most VPN setups assume that the entire server will be dedicated to the VPN. By using docker containers, I can run a vpn and other applications all on one single server.
Bottom Line — Content begs for easy readability. Think about if your text size is too small and therefore hard to read for the average reader.