Stack Overflow is bae.
I could end my blog post right there. Enough said!
In all seriousness though, Stack Overflow has proven to be an extremely useful resource for when I'm totally stuck on a programming-related problem. If you don't know about it, do yourself a favor and get acquainted now!
Most recently, I have been learning about authentication with Rails. In particular, I've been learning about helpful gems such as Omniauth, which allows a user to sign into my application with their Facebook account information, for example! This is great because Facebook is a big company, and has spent a lot of money protecting its users' information. As someone who knows nothing about security, I don't have to waste my time and money reinventing the wheel. It's also convenient for my user to just use an account they already have, instead of going through the ropes of creating a new one just for my app. Omniauth allows me to hand over the task of securing my users' passwords and information, to the companies that already know what they're doing such as: Facebook, Twitter, Google, Github, etc. If their systems get hacked into, it's their problem! However, I had quite a few issues getting this gem to actually work.
Instead of routing my user to sign in with their Facebook credentials, I received an error code about my parameter_app_id despite following the gem's instructions. What's great about Stack Overflow is that you can copy and paste errors right into their database, or type in any question really, and you'll often see several other users who've already been there and done that. The most popular (and usually correct) answer will be the top answer displayed under the question, and it will also have a green check mark displayed on the side, verified by it being the solution for x amount of other people. Below is an example:
Even though I exported my app's keys and password, I still couldn't get Omniauth working. So with the help of Stack Overflow, I discovered another gem called dotenv. After installing the gem, I created a .env file and added my app's credentials there. Then, to hide this information from people who may view my code on github, I added that file to my .gitignore, which I also consulted Stack Overflow for.
So basically, Stack Overflow and I have started a beautiful relationship that I can tell will probably last forever! #teamstackoverflow Thank you for existing.