Bunkobons

← All books

Types and Programming Languages

by Benjamin C. Pierce

Buy on Amazon

Recommended by

"This final book is pretty advanced. It’s about programming language design. The best way to explain it is to draw a parallel between the physical world and programming languages. If you think about the physical world around us—objects, things in nature, etc.—we have come up with mathematics to help us describe what’s happening, in a systematic and logical way. Computer science is the same thing, but for what’s going on inside a computer. And around this idea of computations, you can build type systems. Type systems are the maths we’ve come up with; they help us describe computations or what’s going in a program, what operations are happening. They help us reason about what a program is doing, and often help programmers avoid mistakes when writing code. For example a type system might be able to say: ‘you’re trying to multiply a word by a decimal number, that doesn’t make any sense.’ “You do need a strong grasp of maths, but not the traditional maths people think of ” It’s not a book for beginners, but it’s a good book if you’re interested in the theory behind programming languages. In the first book you’ve learned about the hardware, and in the next books you’ve learned about good code, and then algorithms. Now you can learn about programming languages themselves: how to write one, and how they do what they’re supposed to do. That’s a great question. You do need a strong grasp of maths, but not the traditional maths that people think of. When people think of maths, they think of operations, adding things, doing calculations. The mathematical grasp that you need is more on the logical side: thinking about binary choices—something that’s ‘true’ or ‘false’. This logical way of thinking, which is the way a computer thinks, is also a branch of mathematics. Unfortunately you only study it in undergraduate education, but you encounter it in life in a lot of ways. When you’re doing an online quiz where you follow a flowchart to find what kind of dog you are, you’re using logic to figure out something. That kind of maths is very useful, and that’s what gives you the mind of a programmer. But you have to change your thought process to think of statements in a programming language instead of pictures of dogs! Get the weekly Five Books newsletter There’s definitely improvement at many levels of education. A lot of women are taking my introductory course in computer science, because they recognise that it’s a useful skill to have. In my class we have about 40% women, which is pretty high. Our staff is somewhat large—we have 15 teaching assistants—and the majority of them are actually women. A lot of times, female students will take the course, they’ll love it, they’ll major in computer science, and towards the end they’ll want to give back. And I love that, because they often want to be teaching assistants, and they’re very dedicated and they do a very good job. And because 80% of our staff is female, then that cycle starts: the students taking the class see that the majority of TAs are women, so they think ‘I can do this too!’, and that helps push rates even higher. Of course the push towards general computer science education in high school will definitely help as well. I would say just go for it. Pick a language, stick with it, and learn as much as you can. It doesn’t matter what language, even if you start with a visual language like Scratch, that’s awesome. It starts to get you thinking about computer science, and the logical way that computers think. That’s a huge step towards succeeding in computer science post-secondary school."
Computer Science and Programming · fivebooks.com