X Close

Digital Education team blog

Home

Ideas and reflections from UCL's Digital Education team

Menu

Live blog as an edX CS50x student – Part 2

By Matt Jenner, on 11 November 2012

This is the second blog post in a series of unknown length! Part 1 can be found here. 

In this post I will summarise [ramble] my next steps into the world of learning via a MOOC (massive online open course to you) from Harvard.

First of all, I am so typical. I came onto edX in a view to being excited, interested and wrapped up in the idea of going back to do computer science. So obviously the next thing that happened was that I went back to my life, and didn’t put enough into my online course. This instantly highlights a few things:

  1. Motivation is key to [my] learning
  2. Time on task is crucial
  3. Procrastination is easy

So, with that said, I’d like to spend a little time working out why I’m struggling to put ‘effort’ into my learning for CS50x…

(tiny update: Problem Set 1  -finished & submitted)

One strand of thought is based on the assumed theories and philosophies of learning from afar. It was previously noted that teachers could transmit information to students via representation, such as the use of text or multimedia. The learner then stores that information. It could be argued, and it was by many, that this isn’t enough of an explanation for learning, or teaching. Even when considering external factors such as the context of the student, such as their environment  circumstances and affective state. A second, more developed and agreed upon strand is that of constructivist principles for learning. This can be summarised to say that learners are actively (key word!) constructing internal representations by interacting and engaging with the content and subject. Quite simply  to move from the knowledge dumping mentality, one must be in an environment which includes interaction and, well for me, action – at this stage.

So it’s with these thoughts that I reflect on edX – and what I’ve done so far. I find the recorded lectures a tad boring. I did, however, enjoy working on the problem sets. So instead of working through this course weekly, as intended, I feel confident enough to work just through the problem sets. You may think this translates to the lazy but ambitious student who thinks they know enough to pass, and so just sits out the lectures for the exam. Well, you’re partly right, but I also want to take a different track with this course, to see if I end up going back to the lectures later. Also, the problem sets are enjoyable, I have to make things, carve out programming assignments where I can choose to learn on-demand.

Problem Set 1

Getting my appliance ready and making Hello World wasn’t too challenging:

Problem Set 1-hello world, my appliance seems to work!

So, I was glad I got my work laptop into a state where I’m in the Harvard environment without big changes. For those who noticed, it’s actually Fedora running in a virtual machine (and the kind people at Harvard set up the whole environment for us to work in – which saves a lot of ‘what was that command to do do that thing again?’ questions.

After welcoming the world to myself (it’s slightly introspective, the world isn’t watching) I coded (copied) the example apples program:

Problem set 1 – the apples application asks you how many apples you have. Then it steals one. The world is not fair.

After that, we do some proper work. The first part of the problem set 1 is to build Mario’s pyramid. You know, the one where he runs up it to get the flag for the first level. But we’re making it in text – and luckily we don’t need to worry about clouds, pipes or enemies. Phew.

Learning by doing

I must admit, I am still enamoured to the approaches in CS50 – even if  I am getting further and further behind the class, and learning rather slowly. For this exercise  I watched the Problem Set 1 Walkthrough video – it helps as they have example code and show the theory of how to solve the problem. At no point is the code given, but they do show a working example of what to create. The nice part is the product you make doesn’t follow rules, you’re free to code as you like – as long as it works, and passes their tests. I don’t want to give away the code, that’s unfair, but here’s what I [finally] managed to make on my Sunday’s efforts:

Problem set 1 – Mario is checked, working and can build pyramids in text up to 23 lines high

What do you see here?

make mario – this compiles the code into an executable, all code is compiled before anyone can use it.

check50 2012/pset1/mario mario.c – this uploads and then automatically checks the code I wrote against the CS50 staff’s expected response

the green 🙂 text confirms that whatever I wrote, passes their tests (and may even work!)

./mario – this runs the executable, and I’m prompted for an input.  I give it 6 and we see the 6-high pyramid made of spaces and hashes

I enter IDK for the next example (internet speed for ‘I Don’ t Know’) and I get a prompt to retry – entering 1 makes a very small pyramid.

That’s all it does, but it was a good three hours to get there!

Greedy application

In addition to the above,  I spent some more time on this later in the day and got through the Greedy application. Simply put, you have to make a program which asks for your change, and it tells you how many american coins it’ll give you. It works on the principle that it’s best to give fewest, largest coins possible. Again, no source code – but here’s some evidence of it working.

Problem set 1 – Greedy – a program to count the coins given in change. I was glad to see my simply interpretation of this problem worked.

Lessons learned

Programming in many languages is a good thing to practice, however I can’t help but feel two things coming from this part:

  1. Children should be learning this in school as a core competency
  2. Learning takes time, but doing it hands-on is productive. When I had problems I would search the huge discussion forums – all my questions had already been answered, I just had to find the answers.

Next

I have to make another program that converts money tendered in a shop into the smallest amount of coins possible for the change required. (sweet – I did this quickly, see above). It might take me a while, but I’m going to try and keep up!  I’ll update this post when I do, as I may just blog once per problem set (to save this blog turning into my own personal waste ground).

For more information, or to take part, sign up at www.edx.org

Leave a Reply