As the course goes on, there is more about the object-orientated approach that you will need to learn and understand before advancing further with programming (noting that in the beginning, you might be just accepting things as they are until you get a full grasp). A simple summary can be found in the Karel the Robot book. As I don’t fully grasp the concept of object-orientated programming yet, I wont try explain it in detail here. Karel the Robot is also an introduction to the world of object-oriented programming. To turn right, you’ll just need to pass three commands of turnLeft() to him which will then put him in the direction you want to go in. At the beginning of the course, Karel is limited. You might ask why there is no turnRight(). PutBeeper() – Puts down a beeper if there is one in his beeper bagīy using these four commands, you can navigate Karel around his world. PickBeeper() – Picks up a beeper if present TurnLeft() – Turns Karel 90 degrees anti-clockwise Move() – Moves Karel 1 space in the direction he is facing When you are first introduced to Karel, he responds to four basic commands: What makes Karel more difficult is the problems that you need to solve. As mentioned, the language of Karel is easy enough to learn.
The whole language used to command Karel is basic enough to learn within a couple of lectures but it has been created in a way to make you easily move on to Java.
Karel the Robot now runs in Java and works in the Eclipse development environment which makes it handy for when you move later on in CS106A to a regular version of Java.Īs Karel starts you off on a simple introduction, it allows you to learn how to extend the capabilities of the robot and make it do more advanced things. His little world doesn’t necessarily need to be little and can be custom built to whatever size and have various walls put around the world. I mentioned in my CS106A lecture notes that Karel lives in a grid and has a few limited capabilities such as being able to move forwards, turn left and carry a bag of beepers as well as pick beepers up and put them down. By cutting back to basics, it allows the simple things to be learned first such as the structure of programming as well as the preciseness of coding. It/he was designed to help beginners learn how to program without all the additional complexities that programming languages bring.
Karel the Robot was created in the 70s by Rich Pattis.