Paul Orland

Author
+ Follow
since Mar 24, 2021
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Paul Orland

Yep!  This book should help you build simple physics-based games.  It won't make you an expert game developer, but it will teach a lot of the math ideas you need to understand a 2D or 3D game engine.

-Paul
4 years ago
Hello, you're asking about Math for Programmers, yes?  Your title seems to indicate so, but the link in your post points to another book it seems.

Anyway, Math for Programmers is a book for programmers who are looking to engage or re-engage with mathematical ideas in calculus and linear algebra.  It is not a traditional book on math because it covers a bunch of loosely related topics, and doesn't use proofs or derivations; instead it uses computer code.  If you are looking to strengthen your math skills before diving into some quantitative programming discipline like machine learning, it could be a great book for you.

-Paul
4 years ago
Thanks, Henri!

Henri Kalalo wrote:In your opinion, if you had to pick one out of all, what math skill do you consider essential for programmers?



The most important math skill is working with functions!  I like functional programming, so I have a bias, but I think function abstraction (e.g. defining a new function to encapsulate some computation) and function composition (applying multiple functions to a piece of data in order) are the most important ideas in programming and they come directly from math.

I use functions throughout the book to introduce basically every concept.  A linear transformation is a function that takes vectors and outputs vectors.   The derivative and integral are "functions" in calculus that take functions as inputs and return functions as outputs.  Machine learning training algorithms are often functions that take in a data set and output some function that can predict something about future data points.  Functions are everywhere! I can't say enough good things about functions!  
4 years ago
Hey, fun question! (Though this is not something covered in Math for Programmers... perhaps a future book!)

The power set of a set is the set of all of its subsets; it is a set of sets.  Sets by their nature don't come with orders.    It sounds like this is asking for all possible lists of length <= n whose entries are taken from some set.  This is related to cartesian products and cartesian power sets more so than ordinary power sets.

Here's an example.  If S is the set of possible values, like {4,5,6,7} then there's one singleton list for every element of S: [4], [5], [6], [7]

The cartesian product S x S is the set of all ordered pairs taken from the list, consisting of [4,4], [4,5], [4,6], [4,7], [5,4], [5,5], ... and so on (there are 4*4 = 16 of these)

The cartesian product S x S x S is the set of all ordered triples of elements of S, so [4,4,4], [4,4,5], and so on...

We also write S^n to be the n-fold cartesian product, so the cartesian product of n copies of S which looks like S x S x S x ... x S.  This is the set of all ordered n-tuples of elements of S.  For example, S^2 = S x S and S^4 = S x S x S x S, the set of all ordered 4-tuples.  S^0 contains a 0-tuple of elements of S, i.e. an empty list.  (I'm not sure how to write superscripts in this forum but, S^n is written like S to the nth power, indicating that it's a repeated product).

If you want, say, all possible lists of length <= 4 what you want to do is take the union of the carteisan powers S^0, S^1, S^2, S^3, and S^4, as in the combination of all elements of these sets.  This is

So, the point is, this problem looks expressible in terms of set terminology, but perhaps not using the power set.  Here's a Python solution, where the first function computes the nth cartesian power of a list elts of inputs, and then the second function computes their union

4 years ago
Hi!  I'm delighted to hear you're considering Math for Programmers to train your new engineers.  This is exactly the use case I had in mind when I sat down to write this book.

Some topics include: 2D and 3D linear transformations, including matrix representations.  Numerical differentiation and integration (but no fancy algorithms), Euler's method to simulate a physics engine.  Then gradient descent for optimization and regression.

At a minimum, the book should help your new engineers gain some confidence on linear algebra and spatial reasoning, especially if they are coming from non-mathy programming domains.

Best,
Paul
4 years ago
Hi Alex,

I don't have a CS degree, but I have got a job at Microsoft, started my own software company, and now written this book on programming.  I have of course had varying degrees of success at these endeavors, and sometimes still feel like an impostor, but the point is that you can do a lot without a CS degree.  

There's also the fact that "success" is subjective.  What I can say with a lot of confidence is that (with some work!) you can make a living off of programming without a CS degree.

-Paul
4 years ago
Willy,

I've answered this question a few different ways, but maybe a simple answer is that I've designed this book to be as approachable as possible.  You basically need to have some comfort working with equations, variables, and functions and you should be able to get off the ground.  Feel free to reach out to me if you have any questions as you get started!

-Paul
4 years ago
Hi Greg, thanks for your interest!  

I do mention financial trading as an application in the introduction, but didn't get to write a chapter on it!  This is partially because I know very little about this, and I didn't want to mislead anyone on their financial decisions .  However, you should be able to read chapters 14-16 and get some good ideas for how you might apply machine learning to make decisions about investments.

I use Jupyter for all my code examples.  You can find my complete notebooks with all code from the book on my GitHub.  Jupyter notebooks are great for doing mathematical/data analysis, because they allow you to re-run small parts of your program and fix computations until you get it right.  They also allow you to put graphs inline, which is not possible in the terminal!

Of course, if you're building some production software system (like a program to trade stocks for you) you probably will want to write a standalone program/script rather than a notebook.

-Paul

4 years ago
Hi Mike,

This book is not math for computer science -- a lot of the math you meet in a CS degree is about how to analyze programs, rather than how to write them.

My book, Math for Programmers, focuses on some of the common math that goes into real-world software applications.  It won't teach you how to figure out the time or space complexity of an algorithm, etc., but it will teach you how to make 3D graphics, a real-time video game with a simple physics engine, and some simple machine learning programs.

While it's not math for CS, I think it should help you improve your math skills and be more comfortable with whatever math you meet down the road!

Thanks for your interest
-Paul
4 years ago
Great question, and thanks for your interest!  You'll be fine to read this book if you know how to program in a high level language, and have solid high school level math skills -- manipulating equations, using variables / solving for a variable, functions, etc.  You don't need to remember almost any specifics from high school like solving linear equations or trig functions.  I've tried to make it as accessible as possible, thinking of the average math background of professional programmers I've worked with.
4 years ago
Hi Sharma!  

1.) Yeah, the prerequisite is basically high school algebra and geometry.  You should be comfortable with variables, working with equations, etc. as well as basic formulas like the area of a triangle or rectangle, the number pi, and so on.   The book doesn't assume you remember specific algebra topics like systems of linear equations, quadratic equations, or trigonometric functions -- these are all reviewed when they are introduced.

2.) It is about math, but there's a good amount of physics included as well.  This is to provide some interesting and intuitive applications of calculus, which could be somewhat dry otherwise.

3.) The code in the book is in Python.  The math content is pretty conceptual, and instead of writing down proofs for new math we introduce, we instead write programs that make the concepts concrete.

4 years ago
Thanks! Great to hear from some happy readers 😁

Since this likely won’t be my last book on math and programming... any topics you particularly liked?  Anything else you would have wanted to see?
4 years ago
Hi, I'm Paul Orland and I'll be doing a promo for my book "Math for Programmers" on CodeRanch from April 6 to April 9.   Looking forward to seeing you there!

-Paul

4 years ago