To compare these 2 groups, we will have 4 arrays that have values, some truthy and others falsy. Our goal is to find whether an array has all truthy elements or not. Here they are!
There are 3 kinds of for loops…
Working together is fun, but, at the same time, it is a hard work! As software engineer, it is a significant job for us to have different programs work together well in our app. In this post, I want to help those who plan to use the possible latest versions of Rails and Bootstrap at this point (3/28/2021): Rails 6.1.3 & Bootstrap 5.0.0.beta2. There must be several working ways, and here is the one I set.
One of the most important parts in using templates in Ruby-Sinatra combination (or even Ruby-on-Rails) is how to use the
yield keyword effectively.
Below is most likely your barebone folder structure when you create a Ruby-Sinatra web app:
| |- controllers
| |- models
| |- views
| |- migrate
You have your
application_controller.rb file in the
controllers folder and your
.erb view files under
views directory. Let’s say you have the basic controller and
show.erb. See the codes here:
# (assuming that you already have Gemfile…
If you are a software engineer (or at least a student in the field) and have your blog account on Medium.com, then chances are that you probably feel what I have felt quite a long time. WE NEED BETTER CODE SNIPPETS!
Here is what you might be doing for your code snippets (more like blocks), by using triple backticks (```):
class AppController < Sinatra::Base
get "/" do
It is hard to know well about your
self, not just in philosophy, but also in programming. I found it real while I was doing my Ruby CLI app project. Here’s how that happened.
My app is a simple introducer of any country of a user’s choice. To accomplish this goal I have 2 model classes and 2 scraper classes:
My First Mile Blog Post! The theme? The reason I decided to study Software Engineering. It has been a more-than-two-year-old consideration: to enter, or not to enter.
Back when people could hug each other and eat together at restaurants, during the winter of 2018, my family and I moved to NYC. I needed to find a job to support my family and wanted to try in a new field. Specifically, I wanted to find a career in Software Engineering. In order to pursue this career path, I completed a couple of online courses including a Web Developer Bootcamp. However, the…
Blessed beyond description...