- ruby 14
- mindset 12
- software dev 10
- ruby on rails 9
- life lessons 7
- health 7
- tech 5
- management 5
- branding 4
- linux 4
- sql 4
- skills 3
- experiences 3
- web development 3
- career 3
- profiles 2
- docker 2
- craft 2
- design 1
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.
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. Sounds like the same old crap you hear from self-help books. However, I admire a good analogy that sticks in my head and this is one of those. This analogy 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.
It’s okay to give up on a dream. Nikita, what are you talking about man? I thought you had to persevere, fight, and never give up. That’s true if you feel strongly about that dream. Are you fooling yourself?
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.
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
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.
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.
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.”
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!”
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.
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 email@example.com or firstname.lastname@example.org is a bad idea. Skip the stereotypes.
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.
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.
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.
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.
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.
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.