MY EXPERIENCE IN BOOTCAMP SO FAR- HOME SESSION 3
It is those things you most often take for granted that turn out to be important or matter. Well, maybe not all, but today, that was just the case. Except that, I did not exactly take anything for granted, I only underestimated some things.
I had started working on my tasks for the day pretty early with the hope of having time to do other things for the rest of the day. Little did I know that there were some surprises lying in wait for me. I did not know what was laid in store for me to be honest. I started off trying to clear up my todo’s with a simple function on arrays to find the missing number after comparing two arrays. I headed straight for the documentations on arrays to see what commands I could utilize to my advantage. It was so much fun that I decided to go a step further and write my code in a way that was within the specifications but not needed for the test cases given. This further encouraged me to write my own test cases for my newly implemented and refactored code. Easy pizzy right? I sure was feeling like a boss.
On to the next challenge, and this was also on arrays. Checked through it and felt it shouldn’t be too difficult. Implemented the first array and saw that the second and third were same format as the first. What a breeze! This must be my lucky day. The rest is some simple binary search with a few twists here and there, stuff that I am sure my grandma can do. Oh, oh! Wait!!! Is this some set up or some joke? How can I possibly be failing test cases on a binary search? Oh my! It is definitely a set up. Imagine that! This is not the regular binary search they are asking for. It involves the regular with some other high-tech integrations for improving functionality. Now there’s a challenge. How do you even solve this? I doubt if there is a solution for this. “Must be a mistake”, I say to myself. But Andela is not so sloppy as to make such silly mistakes, are they? Probably not. Let’s take a closer look and see if something can be done. Brainwave! What if…the thought is foggy but as I look a little closer with determination to have my code pass all test cases, the thought seems to be forming and taking proper shape. I immediately delve into it to and write down some thoughts before they pass by as some fleeting memories or shafts of inspiration. Great! I think I know how to capture this. As I work on it, it makes some more sense. I test it out on my own tests and it runs well. Now to try out the test cases given. Failing two tests now. How come? Oh, I forgot something. Quick edit and voila, it passes one extra test case. But this last one, is it not actually truly impossible? I struggle, think, edit, test, rewrite code and debug for hours with no head way. Maybe I should just quit this. I still have HTML and CSS to do. But would I come back to this task if I leave it? I really don’t think HTML and CSS would give me much of a headache and I had already started working on those for a while so what remained was some finishing touches. Okay, let me give myself a deadline and if I don’t get this solved by 4pm, then I’d abandon it and know that I’ve done my best in meeting up with the deadline. Resilience pays off as I begin to interpret my code based on the test cases and see the path my code is taking for the given test case and why. “Now that shouldn’t be too hard to fix”, I say to myself. But as I have learned from experience, if your code is running when you first write it, you should be surprised as a programmer. Fingers crossed then as I ‘fix’ my code and proceed to test. Holding my breath, adrenaline pumping, I await the test results…. AND THEN MY SYSTEM CRASHES!!! OMG!!! Okay, just kidding. The code ran with the desired results. So much for extra time to rest and do other things. All the time is gone now, but I have achieved my aim. I can say once again, I came, I saw, I CODED IT!!!