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

Major Milestone Monday

After lots of hard work, I have D3 not only working with my database but have album art to go with the albums. It took me a while — even after I got the album covers to appear — to get the covers to display where I wanted them. I had to do math a lot. Still not “done,” but this is a big, big deal. This is my #BadAssTakeover.

I have cron jobs that regularly reach out to Spotify and store the popularity of artists, albums, and tracks. Here is a sampling of the bar graphs I can now do. Albums are in chronological order and the numbers are the popularity scores as of Sunday, April 22, 2018. Their popularity scores are relative to all albums on Spotify but I don’t know how they work … I don’t know if an album’s popularity takes into consideration the tracks’ popularity.

Click all images for full size

Alice Cooper

aliceCooper_01

Alice has tons of compilations which is frustrating for multiple reasons. He’s one of the artists that makes me think a vertical graph might be better.

aliceCooper_02

David Bowie

davidBowie_01

As you might expect, Bowie has a ton of albums even without compilations.

davidBowie_02

I’m not sure what the albums without art are … their titles are visible in a sortable table on a different page but I’m busy at the moment …

Bride

I chose them as a sample for a couple reasons. One, they have relatively few albums and two, they were played last night on IntenseRadio during The Great Scott Diversion.

bride

Deliverance

I really don’t like Deliverance but a lot of people do and they have a new album out.

deliverance

Iron Maiden

I feel like I should like Iron Maiden more than I do. Today was a bad Iron Maiden day for me. I’ve been trying to find a relatively inexpensive used copy of Live After Death (on vinyl) and finally found one at a local used record shop but they wouldn’t sell it to me because it wasn’t priced yet. How do I know it was relatively inexpensive if it wasn’t priced yet? The cover was in horrible condition.

ironMaiden

Led Zeppelin

I chose them because I wanted to show some really tall columns … all that “gray space” in the screen shots is how high up the columns could go.

ledZeppelin

Led Zeppelin is another reason my recent … I’ve started buying records again — for the first time in over 30 years — and it’s a lot less fun than I thought it would be.

Meat Loaf

meatLoaf

I think all those blank spaces are compilations. He’s like Alice that way. Ew.

Mortification

Mortification, like Deliverance, are in my database because I wanted a health selection of thrash and black metal and similar artists to compare to each other.

mortification

One Bad Pig

Because I love them.

oneBadPig

They only have four albums which is sad. Well, they’ve also got a demo and a live album but those aren’t on Spotify.

Resurrection Band/Rez Band/Rez/Resurrection Band

rez

For some reason, there’s at least one … wait … it does say Resurrection Band … I thought Ampendectomy was a Glenn Kaiser solo album. Can you believe Lament isn’t their most popular album? People are dumb.