Andela Bootcamp Day 3
When you’re stuck, ask. Just ask.
This was one of the mantras that several of our trainers kept repeating on Day 1 of this bootcamp, and how true it rang today!
I stayed up very late last night, working on a word count function in python (it takes a string, and returns a dictionary with each word matched to the number of times it appears).
At some point, it became very frustrating when I couldn’t get the last test case to pass — the test requires that foreign characters (e.g. Russian letters, the French è, é, ê, ë ‘s) are not separated, not counted as standalone words, but are handled as part of the word they are in.
I spent hours Googling, and implementing complex regex functions, refactoring my code, and yet, that one test kept failing. I had been stuck for hours, and yet the solution was only a slack conversation away.
I finally got round to asking, and the solution? A simple split() function. Why I decided to keep plugging away on a lost cause is beyond me.
This mantra will be what I follow from now to forever. It saves time, saves one massive headaches, and is brilliant at building relationships.
When you’re stuck, just ask.
And that’s it for Day 3. My code eventually passed every test, and it’s been smooth sailing since. Today’s major project was writing a script that runs on the command line, and pulls in data from an API of your choice.
I’m still testing it out, so, see you tomorrow for Day 4!
The Andela journey continues!