My Journey With Coding
A little bit about me. I was a simple man who didn’t know what to do with his life since leaving college disliking his major in marketing. I was a dog walker who played the game of soccer almost everyday with people from different towns. I asked myself what I wanted to do and what would bring me joy while creating a career, nothing really came to mind. A family member during a Mother’s day gathering then told me about coding, I wasn’t a person who thought they could do any of that stuff at all, I doubted myself because I’ve had no real software experience and couldn’t write a single line of code. With some inspiration by him, I looked into coding, looked into a bunch of different firms and schools to find Flatiron School. I took their bootcamp prep and here was one of their more tougher labs they had us do, the Deli Counter, which was something that took me about a few weeks to complete and fully understand. I even took trips to NYC all the way to bowling green at the school itself for help by some really cool students who were already in the program. When I finally understood what I was doing, it was time to prepare to explain to someone else and write code while being part of a technical interview.
So how I started this was the easiest way! Just creating an array named KatzDeli and starting off with a function that I named TakeANumber with two arguments that push in a customer into my array and then have it return that customers name within a string along with their number within the line. That crosses out part 1 of the coding lab.
Next, we had to create a function with an if statement that if no one is on the line, I have to state it within a string. If someone were to be on the line, we would then call them out of the line using their name at the order using the argument I were given as katzDeliLine holding the array of people. Creating a function, I checked to see within the if statement is true then the function would return that nobody is on line. The else statement would then return with back ticks that we’re currently serving someone using shift().
Now for the hardest one which stumped me for so long and was the most important part of the whole lab. I had to write two if statements within a function! Something that at the time, didn’t know that was even possible, I just thought it was going to break the entire file. What was needed was we needed to create an index and have it set to 0 because when it comes to coding languages, we start at 0, not 1. After setting the index I then have to create he first if statement and have it set to the argument to see if the line is 0 I must return a string saying the line is empty. Now with the second if statement I then had to compare the index of i. The argument had to be greater than the index in order to return a string of people that were in line. I had to set i < line.length to make sure it counts if anyone is on the line.
To summarize it all I’ll now repost the questions that were asked and then the solution right after to make it visibly easier to understand the questions that were asked and answered.
The code for each one:
Looking back at my journey and this being the first real challenge I had to face in order to get into the school i’ve found to love so much was incredible, scary, eye opening and grand. This being one of my more prouder moments in not just code but life to overcome challenges like these is what makes me feel good about being a software developer. I just hope that anyone who reads this finds the strength to pursue on what they want to do, if you wanna code go for it! I was just some kid who was a dog walker who became a Software Developer. Take those challenges. Thank you for reading one of my more personal technical coding blogs.