clip_image001

Welcome to Coding Corner-this is a regular column about computing and coding in the classroom. Written by Dan Aldred (@Dan_Aldred) who is well worth a follow on Twitter and also has a great new website that has some brilliant ‘How to’ programming guides http://itecdigital.weebly.com/. Dan’s article is about using programming to solve the Rubiks cube!

Before the last half term break I brought my Rubric’s Cube into school. I left it on my desk and instantly several students wanted to play with it. Interestingly, they all knew what one was and knew what the objective of the Cube was.

However, they did not know how to solve it

The next day one student had been out and bought one, at that time the German exchanged students had also arrived and to the amazement of the class, one of them solved the Cube. Other students began to show the student how to complete it. The students discovered the key to this was the use of algorithms.

 

An algorithm is defined as, a procedure or formula for solving a problem.

There are approximately 10 algorithms required to solve the puzzle, depending on the starting position. It took the student about two weeks to learn and memorise them. He has now purchased the Nano cube, a 2 x 2 sized Rubik’s cube!

Last week I attempted to learn how to solve a Rubik’s Cube, and I was surprised at how similar the processing of remembering and understanding the algorithms is to the process of remembering and understanding code.

The first algorithm is simple and easy to use,this is the same when you begin programming, (Table 1) you remember the simple code very easily. The more advance algorithms around step 5 take time to master, around 2 to 3 days, I still have to refer back sometimes to check the correct orientation. This is like the more challenging code. However, after a while, what you find is that you began to understand what the algorithm is doing. This enabled me to check my moves and predict a mistake or correct an error. This sounds such a minor thing, but it is empowering being able to look at the cube and understand that if you twist a side that way then the cube will be incorrect and so forth.

Once you have learnt the algorithms they allow you to make sense of the Cube and understand it.The impressive element is that after a while they dissolve into the background and you just see the Cube, its ability and the solution. The student described as it like riding a bike, you never forget it. Very few individuals could look at the cube and understand it. This is similar to a program, no one looks at the screen and sees the code, you see the final product, a game, an interface. Very few individuals can look at a program and understand how it works, this is the illusion that a good programs creates. Unless of course you understand the language.

The cubes are also great for group learning, now several student have purchased cubes and with no teacher input, learnt how to solve them

Table 1: Rubik’s Cube / Coding Comparison

Cube

Programming language

Algorithm

Program code

Advanced algorithm

Program functions

Ability to recognise errors

Functional error free program

Embedded second nature understanding of the algorithm

Freedom to program what you want

Completed cube

Completed program

If you are interested in solving the Cube these videos are helpful,

Part one is here

http://www.youtube.com/watch?v=HsQIoPyfQzM

Part two is here

http://www.youtube.com/watch?v=IW_BBp3FPMQ&feature=relmfu

And if you really want scary try this?

http://www.youtube.com/watch?v=hOilnrGrKsY&feature=related

Now try writing a computer program to solve the Cube for you!

http://www.wrongway.org/cube/solve.html

It took me about two weeks to Master the Cube, now I am looking at single handed solving!

clip_image004

Dan Aldred is a teacher of Computing and Head of IT. He is also a member of the school extended leadership team and teacher learning group.  He’s interested in how technology and software move learning forward.

Written by Julian S Wood - www.ideasfactory.me/about/"rel="author"
About me
UK Primary School Future Learning Technologist.I am into Experience and Fun Based Learning.I use web tools to stimulate writing. I've been Playing and Learning since 1970. Have some fabulous ideas now & again.. Check out my about.me profile!
Click Here to View All Nominated Educators
My LinkedIn Profile

To see my LinkedIn profile, click here:

Julian S Wood
edublogs-nominated-bestindivtweeter-150x150
Subscribe
Email subscription to blog
Map
Privacy Policy
Privacy Policy - www.ideasfactory.me

Privacy Policy for www.ideasfactory.me

If you require any more information or have any questions about our privacy policy, please feel free to contact us by email at skyblue_jules@talk21.com.

At www.ideasfactory.me, the privacy of our visitors is of extreme importance to us. This privacy policy document outlines the types of personal information is received and collected by www.ideasfactory.me and how it is used.

Log Files
Like many other Web sites, www.ideasfactory.me makes use of log files. The information inside the log files includes internet protocol ( IP ) addresses, type of browser, Internet Service Provider ( ISP ), date/time stamp, referring/exit pages, and number of clicks to analyze trends, administer the site, track users movement around the site, and gather demographic information. IP addresses, and other such information are not linked to any information that is personally identifiable.

Cookies and Web Beacons
www.ideasfactory.me does not use cookies.

DoubleClick DART Cookie

.:: Google, as a third party vendor, uses cookies to serve ads on www.ideasfactory.me.
.:: Google's use of the DART cookie enables it to serve ads to your users based on their visit to www.ideasfactory.me and other sites on the Internet.
.:: Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at the following URL - http://www.google.com/privacy_ads.html

Some of our advertising partners may use cookies and web beacons on our site. Our advertising partners include
Google Adsense

These third-party ad servers or ad networks use technology to the advertisements and links that appear on www.ideasfactory.me send directly to your browsers. They automatically receive your IP address when this occurs. Other technologies ( such as cookies, JavaScript, or Web Beacons ) may also be used by the third-party ad networks to measure the effectiveness of their advertisements and / or to personalize the advertising content that you see.

www.ideasfactory.me has no access to or control over these cookies that are used by third-party advertisers.

You should consult the respective privacy policies of these third-party ad servers for more detailed information on their practices as well as for instructions about how to opt-out of certain practices. www.ideasfactory.me's privacy policy does not apply to, and we cannot control the activities of, such other advertisers or web sites.

If you wish to disable cookies, you may do so through your individual browser options. More detailed information about cookie management with specific web browsers can be found at the browsers' respective websites.