Learning Math for Programming

When I went to college I had to take math. My degree is actually in Math and Computer Science. Why the math part, you ask? Well, the folks at the school figured that the math will help with a lot of the logic that comes with programming.

Of course, there's also that age old question when you first start learning programming...is there a lot of math involved? The answer is it depends. If you're planning to get a doctorate and do a lot of research, then you'll most likely use a lot of it. However, if you're just working for a company, then chances are you won't need hardly any math*. If you're learning data science then some math is essential in order to gain insights from data or to understand machine learning algorithms.

In this post, we'll go over the most common types of math you may want to be familiar with to get the most out of your programming, and where you can start learning these concepts.

Discrete Math

Discrete math is used quite a bit in programming. Whether it's understanding the theory of how integers work in programming languages or using boolean logic, you've probably come across it before.

Where to Learn

Coursera comes to the rescue here as there may not be too much around discrete math.

Algebra

Yep, even plain old algebra you probably didn't like in high school can be helpful. I actually have an example of this: back when I was doing tax software I needed to use some basic algebra to create a function. Of course, tax software relies heavier on math than most other software, so it's not unusual. Knowing that bit of algebra that I needed, though, really helped when creating the function and I may have had to spend a good bit of time Googling for some help.

Where to Learn

Kahn Academy is well known for their math courses and they definitely have a good algebra one.

For a book, Practical Algebra looks to be a good one to brush back up on your algebra.

Statistics

Statistics is needed for data scientists, not only to help get insights from your data but to also make sure variables that seem correlated to each other actually are statistically significat rather than not. That's not the easiest to do even if you plot your data. Statistics will give you a big advantage in understanding your data and how it can answer any questions you can throw at your data.

Need to see if an A/B test has a significant difference? Then statistical hypothesis testing can be of a great help.

Where to Learn

Coursera has a great intro to data course that has really helped me out in learning some of the basics of statistics. The book they recommend, too, is actually really good.

As for books, I recommend a couple to start with. Practical Statistics is a great introduction. If you want to focus more on the data science side of statistics then Practical Statistics for Data Scientists is a great one to get.

If you want to get a bit advanced, then I definitely recommend Introduction to Statistical Learning. This is mainly for getting deep in the machine learning algorithms, but still is an interesting read. You can also read it for free online instead of getting a physical copy. There's an even more advanced version of this too with The Elements of Statistical Learning, which is also available for free online.

Linear Algebra

Linear algebra is a bit of a niche in programming. The only place I've really seen it used is for machine learning algorithms. Linear algebra, is mainly matrix manipulation.

Where to Learn

Khan Academy has some linear algebra courses that you can take. This is probably the most complete of them I've seen around.

For a book, mostly what you'll see are text books. That's not all bad, but sometimes a more general book is helpful. In that case there's Linear Algebra for Dummies.


While math isn't necessary for programming, I believe it can certainly help with the logic like my university thought. Learning the extra math also made me appreciate it more for what all math can teach us about the world. Also, don't think you're not good at math. This old post from Steve Yegge explains more about the way math is taught in schools and what we can do about it as programmers. You're not bad at math, you just need a better way to learn it.

* Though, depending on the company you work for you may need it. For example, working for a financial institution may involve some knowledge of math.

Best Pluralsight Videos to Help Your Career

Pluralsight has certainly grown over the years. I remember when it first started and it had only courses that were just .NET based and maybe a few others within the Microsoft stack. Now they cover, not only a wide range of development topics, but a big range of creative, admin, and business topics. With that, several videos about how you can get better at your career and as a developer have come up. Here are my favorite courses that I feel give great, actionable advice on how to get better.

Becoming an Outlier: Reprogramming the Developer Mind by Cory House

This is a great course that is very actionable. Cory goes into several things that you can use right after you watch it on how to make yourself an outlier, or an above average developer. Of course, it's going to be some work, but all that work will pay off. I tend to refer to this course when I need a bit of extra motivation to be an outlier.

Play by Play: Crafting a Brand for Growth and Prosperity

The Play by Play is an interesting concept. Usually it's where you follow a developer as they are making an application or doing something similar to their day-to-day programming and they talk through what they're doing and what they're thinking. In this case, it's more of an informal discussion where Troy Hunt and Lars Klint discuss how they update their brand and image to rise above average and help get themselves noticed. They talk about their experiences so you can learn from them and incorporate them into your own career.

Learning To Program - Being A Better Programmer

Programming is mostly a job of learning. Developers are constatly learning new technologies and frameworks. In this course, Iris Classon and Scott Allen help you learn how to learn in terms of programming. Probably the best section is the "Learning Plan" section. You can't really learn that much if you don't have a plan, from going through tutorials, practicing, and retaining what you've done.

Get Involved!

One of the best things to do while being a programmer is to, well, get involved. There are a ton of ways to get invovled and this course details those ways. From the usual getting into open source projects to participating in local user groups. Why get involved? Getting involved will help your personal brand, which the first two courses go into much deeper. Getting involved gets you known around the community. Getting involved with the local community lets you meet people easier and, who knows, you could be talking with a member of the community you meet and come up with the next innovation in programming.

The Future of Technology Careers

Programming is a very dyanmic career. The reason developers are always learning is that new technologies and frameworks are always coming out for us to learn. One of those will become very popular and you would need to get up-to-speed quite quickly to meet the needs of a client or employer. This course was done in 2015 and predicts quite a few things that are still emerging, such as virtual reality, big data or data science, and artificial intelligence.

UPDATE: Dan Appleman just released an awesome new course on keeping up with technology. It's done very well and goes well with the other courses in this post.


PluralSight definitely offers a lot and new courses are added each day. While I wish they offered more in terms of exercises or projects, they are top notch in terms of video tutorials. The ones I highlighted in this post are great to help you use the other more techical courses that they offer. I hope you get as much out of these courses as much as I have!

10 Sites Where You Can Get Programming Practice

Watching and reading programming tutorials are great! They give a curated view of a concept or new technology that may take hours longer to understand than going at it alone. However, much like math, programming is not a spectator sport. You need to practice in order to better understand the programming concept or technology in a real program.

There are a lot of ways one can do this, though, without having to fully set up an environment for each language or framework you want to learn.

Here are 10 sites that you can use to start learning new languages and other programming concepts.

Code Wars

Code Wars profile view.

Code Wars profile view.

This is one of my favorite sites to go to, especially when I want some practice with a new language. They have most of the common languages already supported with a few more in beta so most likely you can get some practice in here.

All of the "katas", as they call the challenges, have always been challenging for me. Plus seeing other people's solutions I'm sure to learn something new.

Hacker Rank

hacker-rank.JPG

Hacker Rank is another code challenge site, but a tad bit different. They also have competitions throughout the year where you can participate and see how you rank among other competitors. I've also seen some companies use this site as a first pass for interviewing candidates.

The nice thing about this site is that it pretty much emphasizes algorithms and data structures, which I consider two things that you could get the most out of if you practice it.

Top Coder

TopCoder compete login page.

TopCoder compete login page.

TopCoder is similar to HackerRank, but you can actually get paid for the challenges you compete in. This is a good way to see how you compare with other developers in the challenges and to challenge yourself to get better at certain types of programming, such as data structures, math, and string manipulations.

Kaggle

Kaggle is more suited for data scientists, but it's a place where you can find data to play around with. They also host their own competitions that can pay out.

You don't need to use this for data science, though. Since they offer a lot of data sets you can use them in for other applications as well. Want to create a web app with some of the data? Go for it!

Project Euler

Project Euler is probably one of the first sites with programming challenges and puzzles. This site is composed of mathematical problems that you can solve in code and the further you go the harder the math problems.

Rosalind

Very similar to Project Euler, Rosalind gives challenges in regards to problems in bioinformatics. These challenges may be considsered a bit better since they solve more real world problems than just arbitrary math problems in Project Euler.

Screeps

This is a fun one, especially if you are really interested in game programming. This site gives you the opportunity to code exercises as part of a Real Time Strategy game with JavaScript. Game programming is a totally different beast than doing web sites or any other business applications as it's a different way of thinking and experience that goes with it. This is especially great to get started with some game programming when you don't necessarily have a project of your own to work on.

CodeChef

CodeChef is similar to TopCoder where they host several competitions and you can get paid for completing them. CodeChef holds those competitions monthly so you'll always have a chance to see how you stand against other programmers. There are definitely plenty of problems to practice before going into a competition and they are all ranked from easy to hard.

CodingGame

CodinGame is fairly similar to how Code Wars works, but the challenges are a bit more of a game. They are more turn based so with each "turn" you get new input and you must give new output based off of it. Similar to Screeps above, the challenges are like mini games you help code. When you run your test cases you can see your code in action as the game is being played, so you get some instant, and visual, feedback to how your code performs.

Up For Grabs

Ok, so this isn't much of an exercise site, but I feel that it's important enough to mention in this post. Why? Working on open source projects is one of the best things you can do as a developer, and this site helps make it easy. A lot of projects have been creating an "up-for-grabs" label on GitHub to let newer contributors get into their projects a lot easier by fixing easier bugs. Doing these will help you become a regular contributor to the project which will have more real world experience than doing other algorithmic or mathematical exercises.

Why C# is Still Worth Learning Today

These days with all the programming rage is JavaScript and related web frameworks or data science with Python or R, C# isn't as popular as it used to be. Of course, that makes sense. Programming languages come and go as languages and compilers are evolving. However, I think C# is still a good language not only to learn but to master.

With the recent release of StackOverflow Trends we can see how popular tags have been on the platform. Considering how popular and influential StackOverflow is in terms of getting help, this data is worthwhile to look at.

Here's a look at the current list of popular languages according to TIOBE index (we'll talk more about this further down this post).

That's a lot to gather in one chart, so let's break it down a bit.

From this graph, C# was very much used due to the amount of questions on StackOverflow back around 2009.

Sure, it has steadily gone down in time and will probably continue to decrease. But think, all of those companies who picked up C# and .NET back when it was much bigger...they need to support those applications. Some may decide to rewrite them depending on their budget and what kind of experience their current developers have, but I'm sure C# will continue to run a lot of those applications in the future.

This reminds me of the current state of Cobol. A HackerRank post mentions an interesting statistic about Cobol:

70-80% of all business transactions worldwide are written in COBOL today

That's a lot of businesses still running Cobol! I believe it'll be the same with C#.

Every year for the past few years StackOverflow has conducted a big developer survey. What they find there can be very interesting!

Here's the most popular technologies of 2016:

https://insights.stackoverflow.com/survey/2016#technology-most-popular-technologies

https://insights.stackoverflow.com/survey/2016#technology-most-popular-technologies

Most popular doesn't always mean that developers enjoy working with it, does it? In terms of C#, it seems developers still enjoy it!

https://insights.stackoverflow.com/survey/2016#technology-most-loved-dreaded-and-wanted

https://insights.stackoverflow.com/survey/2016#technology-most-loved-dreaded-and-wanted

C# is here to stay

Developers still ejoy working with it, but what about the industry itself? All of the data presented so far was from StackOverflow which was derived from surveys, where people can lie if they want, or from their own data with tags, which just means people ask a lot of questions about it. The TIOBE index mentioned earlier gathers a lot more data. Here's their list of the top five languages:

Source: www.tiobe.com

Source: www.tiobe.com

Still impressive to be in the top five and I don't see it getting below that very much in the near future.


With all the debate about what will be next to learn to keep you on the edge in terms of development, a good solid understanding in C# is still a contender. Not bleeding edge, of course, unless you're getting alpha of the newest C# versions to try out new language features.

C# is a great languge to learn from since the tooling is great and there is no shortage of tutorials and courses for it.

Book Review: Coders at Work

There are quite a lot of interviews with software developers out there. Though, I doubt there are many that feature such an array of accomplished developers as Coders at Work does. In this book, there are quite a few words of wisdom from developers who have been through the tough bugs and the long projects.

 
 

When I first got this book, most of the names I didn't recognize. In fact, there were only just a couple I did recognize by name - Donald Knuth and Douglas Crockford.

It was very interesting getting to know the other programmers in this book. Perhaps the most interesting reading in it, I felt, was the blurbs that introduce each person. Telling what they accomplished, what they're currently working on, and a sentence or two of what they talk about in the interview. The most fascinating thing is learning how each individual person being interviewed contributed to the world of computer science.

There were quite a few take aways from this book that may be applicable to everyday work. The biggest of these, though, is that most of the people being interviewed, when asking about how they debug a program, still use the very reliable print statement. In fact, there's this MIT open courseware lecture on debugging that just goes over exactly that!

Here are a few other items of note that I learned while reading this book:

Jamie Zawinski gives advice to not be afraid of what you don't know and that it's ok to ask someone who does about it.

Joshua Bloch says that it's important to know what you're trying to build before you get started. He suggested a talk he gave a quite a while ago now - How to Design a Good API and Why it Matters.

Joe Armstrong has a few nice pieces of advice.

  • He gives a really good debugging technique for finding errors which is that all errors will be three statements before or after the last place you changed the program.
  • He mentions that documentation tells you what the code is supposed to do. "Just read the code" will tell you what it does. Sometimes they aren't the same thing.
  • He mentions a nice talk by Richard Hamming, "You and Your Research", that has a lot of advice such as...

If you don't do good stuff, in good areas, it doesn't matter what you do.

Simon Peyton Jones mentions an interesting paper on "Why Functional Programming Matters". Which has been turned into a talk!

Ken Thompson knew for a long time that working 60, 80, or even 100 hours a week will definitely generate burnout. External deadlines also definitely generate stress.


There's a ton more to learn from this book. From here you can step into the shoes of programming greats and learn the lessons they have learned.