HOWDOI Ask for Help?

Ijeoma N. Akamnonu
4 min readJan 14, 2021

The Extensive-effort-free Version

Photo by Roman Kraft on Unsplash

When working with Python have you ever been stuck on something you didn’t know how to do? Like, how to make a list or data frame? How to create a new directory? Or maybe even how to do Machine Learning, but you did want to start the arduous journey of searching on Google? Well, Python has your back and quite a tool for you! It’s called howdoi.

HOWDOI

What is it?

The howdoi module in Python is one that allows us to quickly ask Python how to do something programming related. What do I mean? Think back to all the times you needed to know how to do something basic or otherwise and turned to the lovely Google. How quickly did you get your solution? How many tabs did you have to open, then not close because you never know if that information will be helpful in the future? How many BLOGS did you have to read? Try not to cry thinking about it, it’s okay, I have the ultimate lazy-friendly solution for you right here. Just ask howdoi for what you need.

How does it do what it does?

It actually goes to Google for you! Yes, howdoi will do it’s very best to answer your question for you by scraping the web for the top answers from StackOverflow. However, as you probably already know from experience, StackOverflow doesn’t always give the best answers to help with your specific situation, so as such, answers from howdoi are not guaranteed to always be what you are looking for. That being said, it is still an amazing tool to use when you are feeling particularly reluctant to leave your terminal and start scraping the web yourself for information.

How do I do that too?

First you’ll need to install the module in your preferred console.

Then ask away!

Examples

How to format in python:

how to create a tuple
how to drop nan values

How to perform statistics tests:

how to perform a Chi-Squared test

Even how to do Unsupervised Learning: notice the overview of Machine Learning that preludes the answer to our question. Pretty neat!

how to do unsupervised learning

However, it’s not perfect. As I mentioned before, howdoi does it’s best to give you a useful answer, but as you can see, the answer below wouldn’t be very helpful to someone that doesn’t know how to do a dot product.

how to do a dot product

Sometimes you’ll just have to Google it and simply skip over StackOverflow.

More Efficiency

Now that life is simpler and you’re comfortable, you realize that typing howdoi or, unfortunately, howdio (as I have already done countless times already), can get redundant and annoying. Once again, Python has got you covered. You can give the module a shorter name or alias that comes more easily to your finger tips to call and command howdoi in the same manner. Check it out.

calling “howdoi” module “hdi”

So instead of typing “howdoi” before every question I have, I can just type “hdi” and my answer will be presented just the same as the former. In addition, for this particular command, notice -c and -n 5. These two parameters indicate you would like the “hdi” command to output 5 colored responses.

Two/five answers captured in color for how to find Euclidian Distance
Five/five answers for how to commit to GitHub

--

--

Ijeoma N. Akamnonu

Plain and simply looking to make a surprisingly impactful impression