A retrospective look.
Looking back at the first article I wrote.
As the year winds down, I would like to take a look at where I was when I first started writing for the tech arena. At Flatiron School, where I was a bootcamp student, it was part of the curriculum to write. Speaking about code and writing about code are important to the journey because it helps us pass information along AND it helps us solidify what we learned. Win-win. Let’s take a look at the first article I wrote while in bootcamp.
After completing a Command Line Interface (CLI) application, I wrote an instructional article to help others through a similar project. Here goes:
How to get started:
For me, this was the hardest part of the project.
Factors:
Resources:
Insight:
Scraping help:
I hope that in reading this, you will feel more confident about beginning your CLI project. My target audience are students learning how to scrape and how to build a CLI app. If that does not apply to you, I hope that you can take away some tips on organization!
For me, the hardest part of this project was figuring out how to get started. The first factor that played into my discomfort, and most likely several of you at this stage, was that I had never attempted - or even dreamt of attempting - to create anything from absolute scratch via coding. Needless to say, I experienced my fair share of anxiety. Here’s what I’ve learned: the tools and resources that have gotten you to the point of the CLI project are sufficient enough to get you through the project. Getting to this point, I’m sure, has not been entirely easy. Else, you wouldn’t be reading this, right? However, there is hope.
I would highly recommend the following resources:
Here are some tips to stay organized during the project:
Bonus: this really helped me to understand where to look for the problem when debugging:
Sample error:
Welcome to the Zeitz Museum of Contemporary Art Africa Features (MOCAA) App!
What is your name?
amal
Hi, amal.
The scraping process will commence shortly. Your patience is appreciated.
Traceback (most recent call last):
2: from ./bin/zm_features_run:7:in `<main>'
1: from /home/beloved-edition-9426/temporary/zm_features/lib/zm_features/cli_class.rb:105:in `run'
/home/beloved-edition-9426/temporary/zm_features/lib/zm_features/cli_class.rb:33:in `begin_to_scrape': uninitialized
constant ZMFeatures::CLI::ZMFeaturesScraper (NameError)
To find the problem, work backwards! Look first at the ZMFeaturesScraper, then go up to the next line at the begin_to_scrape method. It is uninitialized. How would I gain access to a method that’s not in my present class? One way to do it would be to require the file that houses the method named there. If you name your elements well, it will help you later on if you run into a problem. Since I see “scrape”, I’ll go to my environment file and make sure the scrape file is required using:
# require_relative “./folder_name/file_name”
For example:
# require_relative "./zm_features/scraper_class"
How to get started:
For me, this was the hardest part of the project.
Factors:
- First project jitters
- Lack of insight as to what to expect, initially.
Resources:
- Cohort lead’s lectures on the subject
- Googling for CLI related blog posts
- The Learn Instruct app(Flatiron School)
Insight:
- Use a notebook to keep track of things
Scraping help:
- Tips and pointers on scraping
- Include sample code from my project
- What I felt was not so clear in the labs (?)
I hope that in reading this, you will feel more confident about beginning your CLI project. My target audience are students learning how to scrape and how to build a CLI app. If that does not apply to you, I hope that you can take away some tips on organization!
For me, the hardest part of this project was figuring out how to get started. The first factor that played into my discomfort, and most likely several of you at this stage, was that I had never attempted - or even dreamt of attempting - to create anything from absolute scratch via coding. Needless to say, I experienced my fair share of anxiety. Here’s what I’ve learned: the tools and resources that have gotten you to the point of the CLI project are sufficient enough to get you through the project. Getting to this point, I’m sure, has not been entirely easy. Else, you wouldn’t be reading this, right? However, there is hope.
I would highly recommend the following resources:
- The Learn Instruct app is a fantastic tool. There, there are many videos - similar to the recorded lectures that are provided in your cohort! This helped me tremendously by providing several approaches to completing the project.
- Watch the video of your cohort lead’s lecture on scraping and any related lectures, such as gems.
- Google is your friend. If you have not already, practice making better searches. One of mine for this project was:
- “CLI project blog scraping Learn” : this is how I discovered the Learn Instruct app.
Here are some tips to stay organized during the project:
- Start by brainstorming. It is very easy to get carried away with the bells and whistles. Take some time to jot down what the bare requirements are, figure out how to complete those first, then add embellishments if you have the time to do so.
- Take notes: I kept a project journal that housed my ideas, processes, questions, and resources. This helps you to keep track of your thought process, which is especially helpful if you get lost in the dense fog of debugging code.
Bonus: this really helped me to understand where to look for the problem when debugging:
Sample error:
Welcome to the Zeitz Museum of Contemporary Art Africa Features (MOCAA) App!
What is your name?
amal
Hi, amal.
The scraping process will commence shortly. Your patience is appreciated.
Traceback (most recent call last):
2: from ./bin/zm_features_run:7:in `<main>'
1: from /home/beloved-edition-9426/temporary/zm_features/lib/zm_features/cli_class.rb:105:in `run'
/home/beloved-edition-9426/temporary/zm_features/lib/zm_features/cli_class.rb:33:in `begin_to_scrape': uninitialized
constant ZMFeatures::CLI::ZMFeaturesScraper (NameError)
To find the problem, work backwards! Look first at the ZMFeaturesScraper, then go up to the next line at the begin_to_scrape method. It is uninitialized. How would I gain access to a method that’s not in my present class? One way to do it would be to require the file that houses the method named there. If you name your elements well, it will help you later on if you run into a problem. Since I see “scrape”, I’ll go to my environment file and make sure the scrape file is required using:
# require_relative “./folder_name/file_name”
For example:
# require_relative "./zm_features/scraper_class"

Thanks for stopping by 🙃️, BYE!