Skip to main content
main-content
Top

About this book

Get up and running fast with the basics of programming using Java as an example language. This short book gets you thinking like a programmer in an easy and entertaining way. Modern Programming Made Easy teaches you basic coding principles, including working with lists, sets, arrays, and maps; coding in the object-oriented style; and writing a web application.

This book is language agnostic, but will mainly cover Java, with some references to Groovy, Scala, and JavaScript to give you a broad range of examples to consider. You will get a taste of what modern programming has to offer and set yourself up for further study and growth in your chosen language.

What You'll LearnCode using the functional programming styleBuild and test your codeRead and write from filesDesign user interfacesDeploy your app in the cloud

Who This Book Is For<

Anyone who wants to learn how to code. Whether you're a student, a teacher, looking for a career change, or just a hobbyist, this book is made for you.

Table of Contents

Starting Out

Frontmatter

Chapter 1. Introduction

Abstract
In my experience, learning how to program (in typical computer science classes) can be very difficult. The curriculum tends to be boring, abstract, and unattached to “real world” coding. Owing to how fast technology progresses, computer science classes tend to teach material that is very quickly out of date and out of touch. I believe that teaching programming could be much simpler, and I hope this book achieves that goal.
Adam L. Davis

Chapter 2. Software to Install

Abstract
Before you begin to program, you must install some basic tools.
Adam L. Davis

Chapter 3. The Basics

Abstract
In this chapter, I’ll cover the basic syntax of Java and similar languages.
Adam L. Davis

Glorified Calculator

Frontmatter

Chapter 4. Math

Abstract
(Or Maths, if you prefer.)
Adam L. Davis

Chapter 5. Arrays, Lists, Sets, and Maps

Abstract
So far, I’ve only talked about single values, but in programming, you often have to work with large collections of values. For this, we have many data structures that are built into the language. These are similar for Java, Groovy, Scala, and even JavaScript.
Adam L. Davis

Chapter 6. Conditionals and Loops

Abstract
To rise above the label of calculator, a programming language must have conditional statements and loops.
Adam L. Davis

Chapter 7. Methods

Abstract
A method is a series of statements combined into one block inside a class and given a name. In the Cold War days, these were called sub-routines, and many other languages call them functions. However, the main difference between a method and a function is that a method has to be associated with a class, whereas a function does not.
Adam L. Davis

Polymorphic Spree

Frontmatter

Chapter 8. Inheritance

Abstract
Inheritance is a good way to share functionality between objects. When a class has a parent class, we say it inherits the fields and methods of its parent.
Adam L. Davis

Chapter 9. Design Patterns

Abstract
In object-oriented programming (OOP), design patterns are useful organizations of state and behavior that make your code more readable, testable, and extensible.
Adam L. Davis

Chapter 10. Functional Programming

Abstract
Functional programming (FP) is a programming style that focuses on functions and minimizes changes of state (using immutable data structures). It is closer to expressing solutions mathematically, rather than through step-by-step instructions.
Adam L. Davis

Chapter 11. Refactoring

Abstract
Refactoring means changing code in a way that has no effect on functionality. It is only meant to make the code easier to understand or to prepare for some future addition of functionality For example, sometimes you refactor code to make it easier to test.
Adam L. Davis

Chapter 12. Utilities

Abstract
The java.util package contains many useful classes for everyday programming. Likewise, JavaScript and other languages come with many built-in objects for doing common tasks. I am going to cover a few of these.
Adam L. Davis

Real Life

Frontmatter

Chapter 13. Building

Abstract
The build process is one of compiling the source files of a project and producing a finished product.
Adam L. Davis

Chapter 14. Testing

Abstract
Testing is a very important part of software creation. Without automated tests, it’s very easy for bugs to creep into software.
Adam L. Davis

Chapter 15. Input/Output

Abstract
In Java, the java.io.File class is used to represent files and directories. For example:
Adam L. Davis

Chapter 16. Version Control

Abstract
As soon as people start their programming careers, they are hit with the ton of bricks that is the version control system (VCS).
Adam L. Davis

Chapter 17. The Interweb

Abstract
(Courtesy xkcd: Interblag)
Adam L. Davis

Chapter 18. Swinging Graphics

Abstract
Swing is the Java API for building cross-platform GUIs (graphical user interfaces).
Adam L. Davis

Chapter 19. Creating a Magical User Experience

Abstract
First, you should be aware of the following acronyms:
Adam L. Davis

Chapter 20. Databases

Abstract
Databases are an extremely important component of most software projects.
Adam L. Davis

Chapter 21. Conclusion

Abstract
If you’ve gotten this far, congratulations! You probably know a lot more than when you started (I hope). This book ended up being a lot longer than I initially planned, and, at first, some readers might even have thought, “Hey! That’s not easy!”
Adam L. Davis
Additional information