We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.
To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure [email protected]
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Once you can program competently, in at least one language, at the level of a first programming course, what next? This chapter discusses many options for improving your skills.
This chapter is about how to showcase your skills to best advantage in a programming exam, so that you gain as many marks as possible. It covers the types of programming exam, how to prepare, and how to manage your time in an exam.
This chapter addresses how you can approach an early programming exercise. What do you need to know, and to have available, before you can start? How can you make some progress, even if you do not immediately know how to complete the exercise? What should you do if you get confused?
Few things are more frustrating than constructing a program that is almost correct, only to lose it at the last minute through a mistake. This chapter discusses manual processes for undoing mistaken edits and for saving your best program so far, and how to take the next step to using a version-control system or configuration management system. It also covers how to manage code that you have written that is not useful right now, but may be so later.
This chapter discusses the most fundamental aspects of programming language theory, to help you situate the language you are learning in the landscape of all programming languages. It covers compilation versus interpretation, different approaches to type systems, structuring mechanisms, and the importance of finding a reputable body of code in your language to use as a model.
To be considered good, a program needs to do what it is supposed to do. The next most important property is that it should be clearly understandable by a human reader, because that is necessary when you want to improve it in any way. More controversial is the question of whether a good program must be concise. As a student you will naturally want to get high marks. Finally, anyone who writes programs needs to be aware of ethics.
This chapter is about how to showcase your skills to their best advantage in coursework. What are markers looking for in each kind of coursework, and how can you make sure you get as many marks as possible?
This chapter explains who the book is for – broadly, anyone learning to program, especially in early programming courses at university or college – and explains its approach.
This chapter is about how to tell whether your program is correct. It discusses systematic testing, and how this can be automated, e.g. using a unit testing framework such as JUnit. It covers what tests you should have, and when you should write them, mentioning Test-Driven Development, an approach to programming in which you write the tests before you write the code that is to be tested. Finally it discusses property-based testing, commonly used in Haskell. In this approach you specify and test something about the relationship between the inputs and outputs of your program, and that relationship is tested on many randomly-chosen input examples.
This chapter discusses how, and why, to write your program in a way which is as easy as possible for another human to understand. For example, we discuss how to use comments, choose informative names, lay out your code clearly, and structure it so that it does not resemble spaghetti.
A key choice is where you will build your program: in a basic editor, a more sophisticated editor, or an integrated development environment. This chapter discusses how to make this choice and get the most out of your chosen tool.
Writing a program that does what you want is a great achievement – but this is only the first life-stage of a successful program. This chapter discusses how you can improve your program so that it will be more maintainable and more efficient, without breaking it in the process. We discuss how to improve your own skills, e.g. using katas.
Sometimes your program has some specific problem, or bug: perhaps it fails to compile, or perhaps there is a situation in which it does not do what you want. This chapter helps you approach this difficult situation systematically: localising, understanding and removing the bug, and finally, taking action to reduce your chance of introducing a similar bug again. It discusses common problems, including non-termination and null pointer exceptions, and helpful techniques such as cardboard debugging and defensive programming.
Most students, at some stage, need help. Perhaps you are stuck on some specific point, or perhaps you feel generally confused. This chapter helps you to sort out what your problem is, and make a plan to fix it. When, and how, should you approach someone else – on your course, or on the wider internet – for help?
Learning to program isn't just learning the details of a programming language: to become a good programmer you have to become expert at debugging, testing, writing clear code and generally unsticking yourself when you get stuck, while to do well in a programming course you have to learn to score highly in coursework and exams. Featuring tips, stories and explanations of key terms, this book teaches these skills explicitly. Examples in Python, Java and Haskell are included, helping you to gain transferable programming skills whichever language you are learning. Intended for students in Higher or Further Education studying early programming courses, it will help you succeed in, and get the most out of, your course, and support you in developing the software engineering habits that lead to good programs.
Python is today's fastest growing programming language. This engaging and refreshingly different guide breaks down the skills into clear step-by-step chunks and explains the theory using brief easy-to-understand language. Rather than bamboozling readers with pages of mind-numbing technical jargon, this book includes 150 practical challenges, putting the power in the reader's hands. Through creating programs to solve these challenges the reader will quickly progress from mastering the basics to confidently using subroutines, a graphical user interface, and linking to external text, csv and SQL files. This book is perfect for anyone who wants to learn how to program with Python. In particular, students starting out in computer science and teachers who want to improve their confidence in Python will find here a set of ready-made challenges for classroom use.