Skip to main content

100 Days Of Code: Retrospective on CS50, 2016 - 2018 Mario

Image from https://www.brilliant-books.net/sites/brilliant-books.net/files/puzzles.jpg

I started the edX CS50 class (taught at Yale and Harvard in person) near Christmas in 2016. I thought, given that it was a introductory course, there would be a few issues with the problems, but that I could figure it out on my own, and get it completed. I did it with a Microsoft class, therefore this should be the same. I was so wrong!

The first few classes taught me that not everything covered in the problem set was covered in the class, and some of the places I got stuck were mentioned in passing, or so it seemed. Which, learning in near-isolation at that point, wasn't helpful in the least. At this point, I was not 'out there' in the social media for the class, nor - when I did join - did I appreciate my feed going from 20 messages a day to 500. So that was out - I figured I'd fight through this on my own.

The best thing about the first few lessons? Having the online IDE (Cloud9, for those of you who are curious), and its set of debugging tools, and the helpful adjustments they had made to make it easy to understand. The worst was trying to move from BASIC: I had to learn that the statements that the VIC-20 computer would take, and translate them to C.

Break - no - I quit!

A few of the problems weren't an issue, but as the weeks went on, I found myself taking three weeks to do the problem sets. I was running into issues that didn't seem to even come into consideration in either the lectures, nor the walk-through. Having no one to ask that would explain, with patience, where I was going wrong made me less and less willing to work on them. And the times I went to the class question areas, I looked in vain for someone else that had that issue - was I the only one that didn't have this working?

I was thankful, mostly, when the submission process moved to GitHub (since this is such a huge part of many workflows), but stopped submitting my responses, due to their anti-plagiarism statements: if you have over a thousand students in person taking a class each year, plus an unknown number of online students, you can't expect a unique solution from each and every one of them - more so if you are going to compare over multiple years. 

So, I stopped doing them. Other than a nagging feeling of "I should finish," I was fine with this.

I started another course (for a later post), and due to reading an article about podcasts, found an outstanding community in a Slack channel. (lady-leet on GitHub has a list of community Slack channels, if you want to explore - or start one! - in your area) that not only welcomed me, but was willing to answer questions, both by those that had survived the course, but those that were using the language currently.

This answered so many questions! And created its own issue - why were some of the concepts that they talked about not even mentioned in a introductory class? 


After wrestling with this, and seeing the same issues in other classes on topics other than C, I decided that it isn't the fault of the class - but I was going to work on it again, in 2017. I went to fetch the code I had written before, and they asked if I planned on finishing the class. Okay, okay. I'll finish it.

So, a new GitHub repository with the publicly-accessible problems I'd already done, and foregoing, for right now, the rest of the C lessons - I was ready to restart. 

The first lecture back was on Python, and this was at least somewhat familiar to me. I had done a few, small Python exercises, so the language wasn't totally unfamiliar to me. Looking at the problems, and the examples in the lecture gave me that old, welcome feeling of "I can do this!"

Which lasted about 10 minutes into the first problem. The problem was to take a number between 1 and 23, and build a reverse pyramid, a la Mario. I had several hours of attempts at this in the week leading up to starting the 100 Days, and was ready to give up and go back to fast food.

One of the first things I was told, "Comment every step you need to do." Thank you, everyone who told me this. Making sure that I had thought through this, in the language 'flow', saved my sanity.

Then was told, by many, to make sure I had working code before trying to make it perfect. I still struggle with this - time being at a premium, I want to get it done and working, and still be refined. This isn't possible right now, and I have a sticky note to remind me of this on my monitor.

(and slightly worried - this is the longest quiet spell in the house in weeks)

The Sweet Taste of Success

So, with these two tools in hand, I went back to Mario. I got it kind of working - it would print out the correct number of hash signs, but separated by an odd hash, and no spaces. ARGH! I tried to fix it - I'd put up with the counts being shown in the print, if it would just work! they could be removed easily - but no luck. 

Okay, can I get it to print a left-justified pyramid? 

A couple attempts at this, and broke it completely - nothing printed.

Finally gave up, and asked on Slack. Two of the wonderful folk there jumped in, and looked at the code. I had specifically asked why it wasn't printing: they were generous enough to answer only that part of it. Okay - try suggestions..I have print! I'm back to where I was!!

This actually felt like a win. 

One of the members of the Slack is in a different time zone than I, so we talked a bit while he was awake. I got reminded that this is learning - not being sent out for public consumption. Thomas gave me several suggestions, and I promised I would work on it the next day, and share results. 

I had no idea if the program was printing the space after the has symbols, so I changed that to something I could see. This may have been the magic item - I was able to see that it wasn't - no wonder things weren't working! Okay, I now had both Tom (my wonderful mentor) and Thomas to make sure I got this done. I got pseduo-code and ideas from both of them, each on a different section, and tried again.

Okay, this is closer - I have spaces and hashes at the same count each line. And a few moments later, had it working. Save  it! Then go back, and remove the symbol for the space, so it looks 'right'. 

Thanks to having people that were willing to give me concepts in small doses (even if it felt to me like I had to be spoon-fed them), I finally made it, and was off to the next challenge: two cipher programs.

Popular posts from this blog

30 Days of Postman - for Testers!

  https://www.pexels.com/photo/white-and-brown-cat-lying-beside-a-laptop-and-toys-5468268/ Photo by Karolina Grabowska from Pexels   Working with developer- focused tools can be a challenge for some testers: we may know what the words mean, but haven't used those skills recently enough to make the tasks simple. Or we may not have ever used them, other than at a quick glance to make sure that what we are getting matches what it should be sending. And some give results that require us to go find another team member to help interpret the results. Being a more-independent tester has always been one of my goals - being able to use the tools that are common in the team, and be able to do at least basic tasks that support my tests with them. Our team used Postman for many of the API tasks that we had, so exploring this tool was a natural fit. There are alternatives it there, both graphical and command line, so feel free to explore! The items that you can do, and tools that ...

Thanks Giving 2018

http://thriveology.com/wp-content/uploads/2017/11/ThankfulGrateful.jpg It is that season for we Americans: a time to look back at the past year, and count our blessings.  Thanksgiving has come to mean different things then while I was growing up - the focus is no longer on what has gone right, but what wrongs were (and, in some cases continue to be) done. I try and focus on what I can do to minimize the wrong, and accept that the past has happened. And then the fun begins - finding all the things to be thankful for! Things have been rocky, at points this year, I'm still unemployed for money, and have had some serious personal issues arise and be dealt with. But, all in all, I think the bad is outweighed by the good.  This has been a year of changes: not only have I given up on trying to go back to the way things used to be, I have moved forward - supported, encouraged, and occasionally pulled - into a future that I just now am starting to feel I deserve. I sti...

Where Is It? Part 1 - Inputs

Photo by Pixabay from Pexels     I am job-searching, and running into some coding challenges. Most of them are simple - some seem to want one-line solutions that require two cups of coffee and a half-hour to figure out what they want. Others are far above where my skills lie, and these I give a try for, and learn. And then there are the ones that offer, seemingly randomly, a challenge - within my skills (or at least my research skills) - that could be used as part of a larger project that I want to work on. This was the case last week, when I tried for a position that was a bit above what I felt I could do comfortably. The challenge was to let someone enter items, and then give back their location. In a language I am just familiar enough to be a danger to myself in. Happily, and thinking forward about how I could use this as a part of a larger program that would  use something like this to interact with the user. And also, this is command line, and thinking of how to s...