Books · Coding · Gamification · Play · Teaching

Programming for the Puzzled

Title: Programming for the Puzzled

Author: Srini Devadas
English | ISBN: 0262534304 | 2017 | 272 pages
Programming for the Puzzled: Learn to Program While Solving Puzzles

Learning programming with one of “the coolest applications around”: algorithmic puzzles ranging from scheduling selfie time to verifying the six degrees of separation hypothesis.

This book builds a bridge between the recreational world of algorithmic puzzles (puzzles that can be solved by algorithms) and the pragmatic world of computer programming, teaching readers to program while solving puzzles. Few introductory students want to program for programming’s sake. Puzzles are real-world applications that are attention grabbing, intriguing, and easy to describe.

Each lesson starts with the description of a puzzle. After a failed attempt or two at solving the puzzle, the reader arrives at an Aha! moment – a search strategy, data structure, or mathematical fact – and the solution presents itself. The solution to the puzzle becomes the specification of the code to be written. Readers will thus know what the code is supposed to do before seeing the code itself. This represents a pedagogical philosophy that decouples understanding the functionality of the code from understanding programming language syntax and semantics. Python syntax and semantics required to understand the code are explained as needed for each puzzle.

The Puzzle Approach to Coding Mastery

Programming is a skill that’s easy to start learning. You can head over to a site like Codecademy and get up and running instantly. But once you finish a few introductory courses, it’s not as easy to keep making progress. You need another approach.

How to Get Better at Programming

There are two ways to keep learning a programming language once you have the basics down:

Puzzle

Option #1: Work on a project

The project could be your own project. Or if you have the right kind of job, you could convince your boss to let you work in a new language.

When you’re learning a programming language by working on a project, you should actually care what your program does. Don’t just code for the sake of practice. If you decide to learn Python by writing a Twitter client, then read and post to Twitter using your program. If neither you nor anyone else is going to use your project when it’s done, you should pick a different project.

Option #2: Work on puzzles

Programming puzzles are dreamed up solely for the sake of learning or competition. You write small programs to solve them. Once you’re done with a puzzle solution, you don’t use it for anything. It has no practical purpose.

Projects are a great way to learn programming. Since they involve solving a practical problem, you get to learn about requirements and scope trade-offs. You learn a wider variety of language features than you do with puzzles. You often find yourself maintaining your code over time, so you get to see the consequences of your design choices. Projects are great. Ultimately they’re the reason that you learn programming: so you can write programs that do useful things. But in this post, I’m going to focus on the benefits of working on puzzles.

What is a Programming Puzzle?

The programming puzzles I’m talking about consist of a problem statement, some sample input data, and the corresponding output data. The goal is to come up with an algorithm that takes any input data that meets the requirements explained in the problem statement, and outputs the correct results. A wide variety of puzzles can be expressed using this input text/process/output text format. For example, each input line could be a word, and the output could be all of the anagrams that can be formed by the letters in the word. Or each input line could contain numbers representing temperature and water flow limits, and the output could be the settings required to fill a bathtub as quickly as possible to a particular temperature.

Programming puzzles are often associated with competitive programming, since programming contests are all about solving them. For the purpose of this discussion, I’m talking about using puzzles to learn programming, not necessarily competitive programming. When someone says they’re practicing competitive programming, they usually mean that they’re preparing to compete in events, like Google Code Jam or a TopCoder Single Round Match. Although there are reasons to use that type of preparation, you can also use puzzles for their inherent learning benefits, without worrying about contests and ratings.

Advantages of the Puzzle Learning Approach

Learning a language using programming puzzles has some benefits that are more difficult to achieve using the project approach:

What you learn stays useful longer

Solving programming puzzles requires problem-solving techniques more than knowledge of technical infrastructure, like databases or network routing. The program runtime environment is as simple as it could possibly be: you read from standard input, process the data, and write your answers to standard output. The same approach was used 45 years ago in the first programming competitions. Since you don’t have to deal with environment details, all of your effort can go into problem solving and implementation using core language features.

When you’re learning a language by working on a project, you have a wider variety of topics to cover, and they tend to become obsolete faster. For example, consider a project in which you’re building a mobile app. In addition to the programming language that you’re using, you have to take into account how your app will run on different devices and whether you need to update it when new operating system versions appear. There are plenty of benefits to developing app development skills, but there is also a trade-off that leaves you with less time to develop expertise in a programming language.

You can compare your solution with someone else’s

You can learn a lot from reading someone else’s code. Even better is solving a problem and then comparing it with someone else’s solution to the same problem. While this arrangement is rare in real-world programming, you can do exactly that at puzzle sites that allow you to view others’ solutions. Even for those sites that don’t, you can often find solutions posted online. If you Google a UVa problem number, you’ll generally find numerous solutions. For CodeForces problems, you can find submitted solutions along with the problem. Solutions are helpful for getting you unstuck, and also for picking up new ideas. And since you have spent some time with the problem, it’s easier to understand the code that you’re looking at.

It’s useful preparation for technical interviews

Many companies prefer to use programming puzzles rather than technology-specific questions when interviewing candidates. This is a controversial topic that generates a lot of debate among programmers. Nevertheless, preparing for or at least tolerating these types of interviews gives you a wider range of jobs to choose from. For a summary of why these types of coding interviews are used, see Proving That You Can Juggle Code.

You can take advantage of gamification

Gamification is only slightly less controversial than coding interviews, but once again it can be useful if you can put aside any aversion you may have towards it. When you’re working on a project, you have to supply your own motivation. Programming puzzle sites, on the other hand, often come with badges and leaderboards. If you treat these as games, you can find yourself practicing regularly and making progress on your learning.

Where to Find Programming Puzzles

Even if you’re not interested in participating in competitions, contest sites are a good source of puzzles. UVa Online Judge and SPOJ have a large collection from many years of competitions. TopCoder, Codeforces, and CodeChef hold regular contests, so they are continually adding to their problem archives. Project Euler is a popular site with hundreds of problems. One thing to keep in mind though: they have more of a math emphasis than other sites. Unless you have a strong math background, you’ll probably end up studying more math than programming if you choose that one. My current preference is UVa Online Judge, as I’ll explain below.

How to Use Programming Puzzles

You’ll get some learning benefit from solving puzzles even with no particular study system. But the process known as deliberate practice is the most efficient way to get better at a complex skill like programming. One of the principles that distinguishes deliberate practice from regular practice is metacognition, or thinking about thinking. Rather than just solving puzzles, take the time to evaluate yourself as you work through each step of the solution. The best way to do this is to make notes as you work through the problems. When you encounter a difficulty, make a note of it so you remember to think about it later and look for ways to improve.

With programming practice, one of the most common challenges you’ll encounter early on is remembering syntax. An effective way to tackle this problem is to maintain a source file that you update whenever you need to look something up in the language documentation. This file helps solidify your language knowledge, and provides snippets of code that you can use as you solve other puzzles. You can find my version of this file on GitHub. As noted above, programming puzzles don’t draw on all of the features of a language. By maintaining a code reference, you can focus on the subset of the language that is most useful for puzzle solving.

Project 462

I’m trying out all of the ideas in this post as part of an experiment I’m calling Project 462. The number refers to the 462 starred problems on uHunt, a companion site to UVa Online Judge. If you want to try out the puzzle approach to coding mastery, uHunt is a reasonable place to get started. It provides a friendly interface to the UVa OJ problems, and a way to keep track of your progress.

One caveat: UVa OJ only supports C, C++, Java, and Pascal. If you want to use a different programming language, then another popular option is SPOJ, which supports over 45 languages.

Following Along

I post here every week on topics related to programming, learning techniques, and the programming puzzle approach. If you’re interested, you can follow along. I’m @RedGreenCode on Twitter, and you can find other ways to follow me on the RedGreenCode home page.

Advertisements
Books · Coding · Computer Science · Emerging Trends · Programming · Teaching

Connected Code

Title: Connected Code

Author: Yasmin B Kafai
English | July 18th, 2014 | ISBN: 026252967X | 200 pages

Connected Code: Why Children Need to Learn Programming
Why every child needs to learn to code: the shift from “computational thinking” to computational participation.

Coding, once considered an arcane craft practiced by solitary techies, is now recognized by educators and theorists as a crucial skill, even a new literacy, for all children. Programming is often promoted in K-12 schools as a way to encourage “computational thinking” – which has now become the umbrella term for understanding what computer science has to contribute to reasoning and communicating in an ever-increasingly digital world.

In Connected Code, Yasmin Kafai and Quinn Burke argue that although computational thinking represents an excellent starting point, the broader conception of “computational participation” better captures the twenty-first-century reality. Computational participation moves beyond the individual to focus on wider social networks and a DIY culture of digital “making.”

Kafai and Burke describe contemporary examples of computational participation: students who code not for the sake of coding but to create games, stories, and animations to share; the emergence of youth programming communities; the practices and ethical challenges of remixing (rather than starting from scratch); and the move beyond stationary screens to programmable toys, tools, and textiles.

Books · Coding · Educational Philosophy · Emerging Trends · Primary · Routledge · Teaching

Creating a Coding Generation in Primary School

Creating the Coding Generation in Primary Schools

Title: Creating a Coding Generation in Primary School

Author: Steve Humble
Routledge | English | Oct 2017 | ISBN-10: 1138681180 | 238 pages


by Steve Humble (Editor)

Steve Humble sets out the what, why and how of coding. Written by industry innovators and experts, and shows how you can bring the world of coding to your primary school practice.

It is packed with a range of inspirational ideas for the cross-curricular teaching of coding, from demystifying algebra in maths, to teaching music, to designing digital storytelling, as well as an insight into the global movement of free coding clubs for young people such as CoderDojo and Girls Learning Code.

Key topics explored include:

  • what we mean by ‘coding’
  • understanding and teaching computational thinking
  • building pupils’ passion for and confidence with technologies
  • artificial intelligence systems
  • how gender impacts on coding
  • STEM learning and Computer Science
  • using Minecraft to improve pupil engagement
  • fun projects using a Raspberry Pi.
  • Designed to be read from cover to cover or dipped into for ideas and advice, offers
  • all teachers a deeper knowledge and understanding of coding that will help them
  • support and inspire the coding generation. It is cool to code!
Books · Coding · Educational Philosophy · Emerging Trends · STEM · Teaching

Girls Who Code

Title: Girls Who Code

Author: Reshma Saujani

2017 | ISBN: 042528753X | English | 176 pages
Girls Who Code: Learn to Code and Change the World

Part how-to, part girl-empowerment, and all fun, from the leader of the movement championed by Sheryl Sandberg, Malala Yousafzai, and John Legend.

Since 2012, the organization Girls Who Code has taught computing skills to and inspired over 40,000 girls across America. Now its founder, Reshma Saujani, wants to inspire you to be a girl who codes! Bursting with dynamic artwork, down-to-earth explanations of coding principles, and real-life stories of girls and women working at places like Pixar and NASA, this graphically animated book shows what a huge role computer science plays in our lives and how much fun it can be. No matter your interest”sports, the arts, baking, student government, social justice”coding can help you do what you love and make your dreams come true. Whether youre a girl whos never coded before, a girl who codes, or a parent raising one, this entertaining book, printed in bold two-color and featuring art on every page, will have you itching to create your own apps, games, and robots to make the world a better place.

Books · Coding · Educational Philosophy · Teaching

Designing Professional Development for Teachers of Science and Mathematics

Title: Designing Professional Development for Teachers of Science and Mathematics

Authors: Susan Loucks-Horsley, Katherine E. Stiles
2010 | ISBN-10: 1412963605, 1412974143 | 424 pages

This expanded edition of one of the most widely cited resources in the field of professional learning for mathematics and science Designing Professional Development for Teachers of Science and Mathematicseducators demonstrates how to design professional development for teachers that is directly linked to improving student learning. Presenting an updated professional development (PD) planning framework, the third edition of the bestseller reflects current research on PD design, underscores how beliefs and local factors can influence the PD design, illustrates a wide range of PD strategies, and emphasizes the importance of:
Continuous programme monitoring
Combining strategies to address diverse needs
Building cultures that sustain learning
An inspiring blend of theory and practical wisdom, Designing Professional Development for Teachers of Science and Mathematics remains a highly regarded reference for improving professional practise and student achievement.

Coding · Math · Online · Teaching

Scratch for Mathematics

Scratch for Mathematics
Author: SJ Withers
2017 | English | ASIN: B071V3PCVN | 169 pages


This book describes and explains the arithmetic, mathematics and data components of the Scratch Interactive Development Environment (IDE). These components are little used, but could provide a useful tool for a teacher of mathematics, a primary school teacher, a teacher at Key Stage 3 or home educator looking for new ways to engage a learner. It introduces basic programming skills and an understanding of the mathematics specific code blocks in Scratch. It also provides a way of working with mathematics which is visual and can be engaging. This book also provides examples of the way Scratch can be applied for common arithmetic and mathematics problems such as calculating percentages, testing arithmetic knowledge and applying Pythagoras Theorem amongst others. This book is not a course in mathematics, but it does explain how Scratch can be used as a tool for learning arithmetic and mathematics.

Books · Coding · Higher Ed · Software · Uncategorized

Software Reading Techniques

Title: Software Reading Techniques: Twenty Techniques for More Effective Software Review and Inspection

Author: Yang-ming Zhu
English | ISBN: 1484223454 | 2016 | 148 pages


This concise book teaches software professionals and software engineering students the full set of twenty software reading techniques to enhance their effectiveness in reviewing and inspecting software artifacts such as requirements specifications, designs, code files, and usability.
Software review and inspection is the best practice in software development whose purpose is to detect and fix problems early. Software professionals are trained to write software but not read and analyze software written by peers. As a result, individual reading skills vary widely. Because the effectiveness of software review and inspection is highly dependent on individual reading skills, differential outcomes among software readers vary by a factor of ten. Software Reading Techniques is designed to close that gap.
Dr Yang‐Ming Zhu’s depth of experience as a software architect, team leader, and scientist make him singularly well-equipped to bring software readers up to speed on all the techniques and tips for optimizing the effectiveness and efficiency of their software review and inspection skills.

What You’ll Learn

  • Software review and inspection procedures and reading skills
  • Traditional and modern advanced reading techniques applicable to almost all software artifacts
  • Specific reading techniques for software requirements specification, software design, and code

Who This Book Is For
Software Reading Techniques is for all software professionals and software engineering students and researchers.

Books · Coding · Computer Science · DK

Kids Coding with DK Books

Title: Computer Coding for Kids

Author: Carol Vorderman
English | 2014 | ISBN: 140934701X | 224 pages


A simple visual guide to get kids computer coding in no time

Computer coding is firmly back on the agenda as a key skill for children to start learning. Computer Coding for Kids is a unique step-by-step guide, perfect for kids interested in computer programming and how computers work. Now available with text that lights up as you read along and playful images and sounds.

Avoiding computer jargon, this book guides children through creating computer programs starting with the very basics. Computer Coding for Kids is the only programming book that teaches both Scratch and Python programming languages, with illustrated, simple, step-by-step explanations that make the complex art of computer programming clear for the complete beginner. Starting with simple explanations of programming basics, it progresses to more advanced projects where children can build their own games.

Computer Coding for Kids is ideal for kids looking to take your first steps into programming or those that are already interested and hungry to learn more.

Help Your Kids with Computer CodingTitle: Help Your Kids with Computer Coding

DK Publishing, English | ISBN: 146541956X | 2014 } 224 pages


With over 1.4 million computing jobs predicted by 2020, computer programming is one of the fastest-growing industries to date. Parents who want to keep their kids up-to-date and prepared for the future will want to read Help Your Kids with Computer Coding.

This unique guide is full of fun exercises and helpful tips that will help children learn all aspects of coding. Step-by-step explanations make the complex art of programming clear, teaching the basics of Scratch and Python, and eventually progressing to projects where children can build their own games. Help Your Kids with Computer Coding is perfect for kids looking to take their first steps into programming or for those already interested and excited to learn more.

Note: All the books presented in this blog. Include the original cover and review provided by the publisher. This information is used to accurately promote and show respect for these resources, the authors and the publishers.

Coding · Computer Science · Primary · Teaching

Kids Coding

Title: Adventures in Coding

Authors: Chris Minnick, Eva Holland

Adventures in Coding

ISBN: 1119232686 | 2016 | True PDF | 320 pages | 34 MB
Learn to code the fun way with nine real projects for true beginners

Adventures in Coding is written specifically for young people who want to learn how to code, but don’t know where to begin. No experience? No problem! This book starts from the very beginning to take you from newbie to app-builder in no time. You’ll ‘learn by doing’ as you build projects designed to help you master fundamental programming skills”and you’ll have a great time doing it. These skills form the foundation of any programmer’s tool set, and you’ll continue to use them as you graduate to other devices and more difficult projects. Each chapter includes a video to help clear up any confusion and make sure you really understand, so you can keep programming your way through every single project without hitting major roadblocks. If you’re ready to start designing your own program, this book will help you get started today.

More and more kids are learning to code, and many schools offer basic programming classes as part of the regular curriculum. This book is structured like a class, starting with the basics and building skill upon skill, making it both a perfect accompaniment to formal instruction and an ideal guide for self-study.

– Learn the basic programming skills you’ll use everywhere
– Build nine fun projects from super-basic to pretty challenging
– Build the skills you need to create bigger and better apps
– Watch video tutorials for extra help and explanations

How many times have you played with an app only to find yourself wishing it had this or that feature? If you learn how to code, you can be the creator of the next big app! But it all starts with that first small project. Adventures in Coding provides all the information you need, so let’s get coding!

Title: Kids Coding with Scratch

MP4 | Video: AVC 1280×720 | Audio: AAC 44KHz 2ch | Duration: 2 Hours | 385 MB
Genre: eLearning | Language: English

Kids Coding with Scratch

A step by step guide for kids to learn their first programming skills

SCRATCH is a programming language designed for children who want to learn about computer programming. It was created with the purpose of teaching them the concepts of programming at an early age and helps develop their creative abilities that are needed to invent their own stories, animations, music, games and more. The best part of learning to program using SCRATCH is that it’s not necessary to write code, you only need to be familiar with the blocks or instructions in the Scratch tool. These blocks; which have default behaviors assigned to them, can be selected, dragged and assembled to create full programs, presentation and games.

Step by step exercises.
Targeted for kids ages 8 through 16 but it can be used for anyone wanting to learn computer programming.
Explained using easy to follow instructions.
Designed for kids to follow but they may require some parental assistance if any issues are encountered.
Recommended for parents who want to teach the fundamentals of visual programming to their children.

Note: All the books presented in this blog. Include the original cover and review provided by the publisher. This information is used to accurately promote and show respect for these resources, the authors and the publishers.