Do I Need to Be Good At Math to Learn Programming?

Frequently asked question. My immediate response is no. I’m sure it shortens the learning curve, however.

The good news is, if you suck at math, learning to program can change that which then does help you become a better programmer.

That’s certainly been the case with me. In high school, I sank from Algebra to Basic Algebra to Remedial Math and then kinda failed out of just about everything my sophomore year. I hated math. Why? Because math class sucked. Why? Because the struggle seemed to have neither end nor hope. As an adult, Star Trek and other fun stuff made me a big astronomy and space geek. I wanted to learn about space travel. It took a single question (and answer) for geometry and physics to have a context in which I could understand them so they made sense. I’m no Stephen Hawking, but trading fear for joy is a big deal to me.

What’s unfortunate for millions and millions of students for decades and decades is their question, “When am I ever going to use this?” is met with blank stares.

Using D3 to create data visualizations has helped me learn algebra. Again, having a practical use for something makes it much easier to learn.

My two recent project challenges and “learning issues” were (please forgive and ignore the lingo):

  • Understanding how to create “padding” or “margins” around an SVG–the black area in the above image containing the above graph, title, and legend (I put those in quotes because they are, in this context, figures of speech and not the padding or margins you may be used to using in HTML and CSS) especially when it came time to use those numbers with scales–the rules for telling data how to accurately display in given dimensions (if that’s gobbledygook, don’t worry about it — just know it was already difficult before the Masters of D3 I was learning from explained it like it was child’s play).
  • Getting the above twenty metal bands to display neatly and in rows. As it turns out, an SVG isn’t like a DIV or TD which can force contents to wrap.

What Made the Math Easy To Learn

I had a practical application. Something I could picture. A context for the numbers and equations in the algorithm (algorithm: a series of steps to solve a problem or complete a task — holy cow! doesn’t sound so mysterious or difficult now, does it?) instead of a bunch of numbers and stuff that I was expected to blindly memorize.

Math is a language. Imagine you’re in Cooking Class and the teacher speaks a foreign language and you’re not allowed to see the ingredients or the process. Then the teacher tells you you’re stupid because you don’t get it. So you get sent to Basic Cooking which is no easier. In fact, it’s worse because none of the other students really want to be there and they feel crummy, too. So you get sent down to Remedial Food which is even worse because the teacher hates their job and the students are all hoodlums.

It doesn’t have to be that way. The teacher could provide examples, real-life application, and show you the utensils, kitchenware, ingredients, and explain why you’re doing what you’re doing.

When you’re programming, you know why you need to know something. You know what you don’t know. Fortunately, if you’re building some type of User Interface or data visualization, you can see the results of your mistakes — see how that thing is too big or too far to the left or the pie is all burned on top? — so mistakes are often learning treasures.

Full Disclosure: So you don’t get discouraged or needlessly frustrated, know that sometimes the best of us can’t figure out why something doesn’t work. For hours. Then someone walking by will say, “you know you forgot a semicolon there, right?” and you wasted hours without learning anything other than, yes, you’re an idiot sometimes. We are all idiots sometimes–but not as much as you might think you are.

Full Disclosure Part 2: Sometimes you can’t figure out why something does work. You can waste just as many hours on that, too. Don’t. Move on. Go learn something else. Or go outside for recess and play with others. You need that.

thrash.png
Approximately one year of popularity data for Mortification, Deliverance, Overkill, Living Sacrifice, Cannibal Corpse*, Pantera, Slayer, Megadeth, Testament, Metallica, Kreator, Gwar, Anthrax, Vengeance Rising, Seventh Angel, Celtic Frost, Venom, Death Angel, Sodom, and Exodus.

Behold:

myMath.png

Advertisements

“More Popular Than Jesus” – John Lennon

Hopefully, the post title won’t get me the same backlash it got Lennon.

I am currently tracking approximately 146 artists using the Spotify Web API using the popularity endpoint for artists, albums, and tracks to do ridiculously interesting things like write this blog post and, eventually, soon … do crazy cool interactive data visualization stuff.

topTen
The Top 10 (of 146)

Something I noticed immediate upon sorting all of them according to popularity is this: Christian artists are the least popular. Not like on average but … they’re all at the bottom.

bottom.png
The Bottom 28 (of 146) contains only one “secular” artist.

If you don’t count Johnny Cash, Bob Dylan, or Alice Cooper as “Christian,” I have 42 Christian artists.

Of the bottom 50 artists, 40 of them are Christian artists.

The highest Christian artist is DC Talk with a popularity score of 48.

Then, down below Sodom and Gwar, Stryper shows up with 46 popularity.

Just below Stryper is Venom with 46.

To say Slayer is #50 on the list (with 67 popularity) is a bit misleading because many of the artists have the same popularity score but I thought it worth mentioning.

I’m sure there are many artists “below” them in Spotify’s massive database and, if I’m honest, it makes sense that such niche artists would fall below much more mainstream artists but … it still struck me as … odd … and … sad.