Exercises for Programmers
eBook - ePub

Exercises for Programmers

57 Challenges to Develop Your Coding Skills

  1. 118 pages
  2. English
  3. ePUB (mobile friendly)
  4. Only available on web
eBook - ePub

Exercises for Programmers

57 Challenges to Develop Your Coding Skills

Book details
Table of contents
Citations

About This Book

One of the best ways to learn a programming language is to use it to solve problems. That's what this book is all about. Instead of questions rooted in theory, this book presents problems you'll encounter in everyday software development. These problems are designed for people learning their first programming language, and they also provide a learning path for experienced developers to learn a new language quickly.

Start with simple input and output programs. Do some currency conversion and figure out how many months it takes to pay off a credit card. Calculate blood alcohol content and determine if it's safe to drive. Replace words in files and filter records, and use web services to display the weather, store data, and show how many people are in space right now. At the end you'll tackle a few larger programs that will help you bring everything together.

Each problem includes constraints and challenges to push you further, but it's up to you to come up with the solutions. And next year, when you want to learn a new programming language or style of programming (perhaps OOP vs. functional), you can work through this book again, using new approaches to solve familiar problems.

Q&A with Brian Hogan, author of Exercises for Programmers

Why did you decide to write this book?

I learned to program when I was in fourth grade. I was struggling with some math problems at the time, and my dad showed me how to write a program to quiz me at math problems. My dad wasn't formally trained, he just knew enough to show me what to do. And so programming, to me, was about solving problems.

But when I got to college, my professors were more interested in doing algorithms and puzzles. I was never great at mentally connecting the dots. But I had one teacher who was very focused on real-world programming; writing programs to solve business problems. And everything clicked.

When I got into the field, I found myself in many situations where I was teaching people to code, and I needed exercises for them to do, so I started looking at the things I had to write at work and simplifying them down. I've written BMI calculators, widgets for web sites that pulled down the weather, URL shorteners, and many other things that can teach programming concepts in context.

So when I became a teacher full-time a few years ago, I began introducing these exercises into my classes for additional practice in order to prepare students for assessments. I saw student performance improve significantly. And I figured that if it worked for me, it would work for everyone.

So this book is for beginners?

Over the years I've had to learn some new programming languages, and I've returned to these programs to get me through that. When I was learning Go a few years ago, I tried these programs. And I just did the same thing this last year with Elixir. I've seen how the "todo list" program has become the way for developers to get their minds around an MVC framework, so I think there's a ton of value in solving known problems with a new language. I also think it's easier to learn a language when you have some goals and direction. When you've never used Swift before, even something as simple as making a mad-lib program can be a great experience.

What's your favorite exercise in this book?

One of the exercises in the book uses an API to show you how many people are in space. The API shows you their names and which spacecraft they are on. First, I think it's awesome we live in a time where people are in space. But also, I think the exercise is interesting and engaging, while still having you work through the concepts of pulling down remote data and formatting it.

What do you hope readers take away from the book?

I think we get better with practice. If you are playing piano and you only go to your lessons, and you never practice in between, you won't be as good as you could be. And I think that is the same with writing code. I think if you go through a degree program and only do the work that's assigned, you won't get as much experience. And I believe that the more languages you explore, the better you'll get at solving problems. So I hope that by reading this book, people will be inspired to practice with the language they know, or even to try a new language.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Exercises for Programmers by Brian P. Hogan in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Algorithms. We have over one million books available in our catalogue for you to explore.

Information

Table of contents

  1. Exercises for Programmers