Want Sweet Deals? Join our Mailing List

Kotlin from Scratch

A Project-Based Introduction for the Intrepid Programmer

Faisal Islam

Clear

Learn to code in Kotlin by starting from scratch and gradually building skills to tackle a wide range of fun and challenging problems.

Description

Download Chapter 4: Solving Mathematical Problems with Code

Kotlin isn’t just for building Android apps. As you’ll learn in Kotlin from Scratch, it’s also a general programming language for crafting both elegant and efficient code.

With the aid of 37 hands-on projects, you’ll move quickly through the language basics while building your problem-solving skills, even tackling advanced concepts like fractals, dynamic systems, and nature-inspired algorithms. You’ll explore the way Kotlin handles variables, control structures, functions, classes, and data structures, and you’ll learn to create visualizations using Kotlin and the JavaFX graphics library. Then you’ll build increasingly sophisticated apps to practice what you’ve learned while tackling challenges from math and science to algorithms and optimization.

As you progress through the book, you will:

  • Simulate physical systems, like the intricate dance of binary stars
  • Implement the classic Hill cipher for encryption and decryption
  • Generate beautiful fractals with recursive algorithms
  • Program classic computer science algorithms for sorting and searching
  • Solve the infamous Berlin52 traveling salesman problem

Expand your language repertoire and improve your computational thinking with Kotlin from Scratch.

DETAILS

November 2024, 432 pp.
ISBN-13: 9781718503526

TABLE OF CONTENTS

Acknowledgments
Introduction
PART I: PROGRAMMING FUNDAMENTALS
Chapter 1: Kotlin Basics
Chapter 2: Arrays, Collections, and Classes
Chapter 3: Visualizing with JavaFX
PART II: APPLICATIONS IN MATH AND SCIENCE
Chapter 4: Solving Mathematical Problems with Code
Chapter 5: Modeling and Simulation
PART III: RECURSION, SORTING, AND SEARCHING
Chapter 6: Recursive Functions and Fractals
Chapter 7: Sorting and Searching
PART IV: OPTIMIZATION WITH NATURE-INSPIRED ALGORITHMS
Chapter 8: The Genetic Algorithm
Chapter 9: Agent-Based Algorithms
Afterword
Appendix
Index

View the Copyright page
View the detailed Table of Contents
View the Index

AUTHOR BIO

Faisal Islam is a manager, educator, developer, and author of both fiction and nonfiction. With over two decades of coding experience in languages such as C, Java, Python, and Kotlin, he thrives on solving complex real-world challenges. Faisal’s background in engineering and economics equips him with a unique perspective, allowing him to apply computational thinking, modeling, simulation, and optimization techniques effectively.

Beyond his technical pursuits, Faisal is an advocate for STEM education, particularly among young learners. His passion lies in inspiring the next generation of coders. In his spare time, Faisal enjoys photography, sci-fi novels, and travelling with his family.

REVIEWS

“Do you want to have fun . . . and learn programming with Kotlin in one book? Faisal Islam wrote that perfect book for you! [F]ocused on a lot of practical examples from the world . . . a good foundation for further advanced topics.”
— Matthias Schenk, Kotlin software engineer & craftsman, @Finanzguru

You Might Also Like

Newsletter Subscription

We’ll send you sweet deals on upcoming books and let you know when new books are released. We’ll never sell, give away, or use your personal information for nefarious purposes. Choose the categories you’re interested in (check as many as you’d like):