Slashdot Mirror


You Don't Have To Be Good At Math To Learn To Code

HughPickens.com writes: Olga Khazan writes in The Atlantic that learning to program involves a lot of Googling, logic, and trial-and-error—but almost nothing beyond fourth-grade arithmetic. Victoria Fine explains how she taught herself how to code despite hating math. Her secret? Lots and lots of Googling. "Like any good Google query, a successful answer depended on asking the right question. "How do I make a website red" was not nearly as successful a question as "CSS color values HEX red" combined with "CSS background color." I spent a lot of time learning to Google like a pro. I carefully learned the vocabulary of HTML so I knew what I was talking about when I asked the Internet for answers." According to Khazan while it's true that some types of code look a little like equations, you don't really have to solve them, just know where they go and what they do. "In most cases you can see that the hard maths (the physical and geometry) is either done by a computer or has been done by someone else. While the calculations do happen and are essential to the successful running of the program, the programmer does not need to know how they are done." Khazan says that in order to figure out what your program should say, you're going to need some basic logic skills and you'll need to be skilled at copying and pasting things from online repositories and tweaking them slightly. "But humanities majors, fresh off writing reams of term papers, are probably more talented at that than math majors are."

25 of 616 comments (clear)

  1. Programming by fyngyrz · · Score: 5, Insightful

    Programming -- I don't think that word means what she think it means.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Programming by ColdWetDog · · Score: 4, Interesting

      Indeed, she thinks that 'script kiddy' = 'coder'.

      Possibly true for very small values of 'coder'.

      --
      Faster! Faster! Faster would be better!
    2. Re: Programming by ShanghaiBill · · Score: 5, Insightful

      Math is necessary for more advanced programming.

      Linear algebra (matrices) and trig are essential for doing 3D graphics. Calculus and differential equations are need for doing simulations of physical processes. Otherwise, programming is not very mathematical. Web coding just requires enough arithmetic to do the layout, and most business programming doesn't even need that.

    3. Re: Programming by geoskd · · Score: 4, Insightful

      Web design these days is less and less about programming, and more and more about aesthetic and design. It has become so much so that the programming parts of it are largely unnecessary to be relatively successful.

      That having been said, almost no one considers a web designer to be a programmer. There is minimal overlap, but the tasks for which one would need a programmer are largely beyond a web designer, and visa-versa.

      --
      I wish I had a good sig, but all the good ones are copyrighted
    4. Re: Programming by Anonymous Coward · · Score: 5, Insightful

      You're totally wrong. Only complete idiots or actual cryptographers roll their own.

    5. Re: Programming by Chalnoth · · Score: 4, Interesting

      Sort of. Many specific math classes aren't necessary, but most advanced programming has very close similarities to math. For example, graphs are used extensively in a wide variety of more involved coding, and graph manipulations are pretty mathematical. The thinking processes underlying most other algorithms are extremely closely-related to the thinking processes required for math.

      Also, if you're going to be doing any sort of mathematical calculation using code, there's no way you're going to be capable of properly debugging the code if you don't understand the math.

      I guess I like that she's saying that you can code even if math scares you, but all this says to me is that she had crap math teachers. If you can do a decent job of coding, you can learn math. It's just a question of finding the right learning methods.

    6. Re: Programming by Anonymous Coward · · Score: 5, Insightful

      math is the manipulation of symbols in a formal language.

      coding is the manipulation of symbols in a formal language.

      they are the exact same thing. If you can do one well, you can do the other well. Most people can't do either very well.

    7. Re: Programming by Chalnoth · · Score: 4, Interesting

      Not necessarily just about care. Many people can get pretty bad anxiety about math due to the way they were taught. Especially if they just fall behind a little bit at one point, because math tends to build on previous things, it can become really difficult to catch up. All they need is one bad class and they may never make up for that deficit, with the way education in the US is currently structured.

    8. Re: Programming by Darinbob · · Score: 5, Insightful

      A lot of this just pushes all the buttons for me. My pet peeves with modern society are with the morons who revel in their own ignorance. There used to be a time when learning stuff was considered important. Even the president of companies would feel the need to learn what their company was about, how their product was made, how it worked, etc. Today ignorance is celebrated. Morons can go on the internet and say "I can code without knowing math", which sort of implies that people who do learn things are wasting their time. Cretins advocate that college can be skipped as a waste of time. Even those in college whine like kindergarteners that stuff is too hard or irrelevant to their future career behind a help desk.

      Ignorance should never be treated as a virtue. And yet that is what is happening and this original post proves that this attitude is still alive.

    9. Re: Programming by guestapoo · · Score: 4, Interesting

      My experience base on reading different maths textbooks:

      USA:
      Books aim at advanced students, (not all but almost) are likely encyclopedia. It's not that the material is hard, but the structure of the books is hard to follow, or not explain very well.
      Books for novice, for the masses, the "introduction/dummy" type. To describe this type of book: wordy and dumb. Endless explanations of trivial things, and strip, dump down necessary, important one to make it 'easy'. Beside of that, some 'favorite' authors like to write useless jokes in textbooks (It may be good thing if they do it when they lecture in a class)

      Soviet/European (mostly Soviet textbooks): maths books should be.
      Also, Soviet textbooks for novice are drastically different from USA ones. They use highschool level maths to explain advanced maths. The books are almost black and white, no jokes inside, but interesting read.

    10. Re:Programming by Wycliffe · · Score: 5, Insightful

      Because of this: how she taught herself how to code

      She didn't teach herself to code. She taught herself how to cobble together a website.
      Yes, you can cobble together a website with minimal coding skills by using already created widgets but what if you want a widget that doesn't exist yet?
      If you want to cobble together a website, there are plenty of programs like wordpress that require no coding skills at all.
      True programming doesn't require math as much as it requires you to be able to understand how to take small pieces like if statements and arrays and
      create something with it. I can explain if statements and a flow chart to someone in 10 minutes but the hard part of programming is being about to see
      how you can combine several thousand of those if statements to do something like generate an image. Being able to imagine the end product and plot
      a course to get there through several thousand steps using rudimentary blocks is what makes programming hard. Building a webpage is not programming.

    11. Re:Programming by crioca · · Score: 5, Informative

      But even then: if you don't understand how the encryption works, how do you know what method to use for encrypting the passwords on your website. Should you just take someone's word for it? (Answer: no. And yet that's how bcrypt became popular.)

      As someone who works in the infosec industry, the fact this comment is rated +5 Informative fills me with panic. Yes, you should absolutely take someone else's word for it, specifically you should take NIST's word for it. Because unless you're one of a handful of the most knowledgeable people in the world, you don't know enough about cryptography to judge the merits of a cryptographic hash algorithm.

  2. Take it from me by John+Allsup · · Score: 4, Insightful

    As an obsessive pure mathematician who is obsessed with twisted forms of coding minimalism to stave off boredom and so on, and who did his PhD in arithmetic.

    1. You learn to count from 1 to 100 so well it is effortless.
    2. You do so in a way that is fun (e.g. snakes and ladders).
    3. You learn to code.
    4. When your coding problems require mathematics, you look it up in a book.

    Crucially, if you do it this way, you will have motivation to learn the hard maths. Really, motivation does seriously make a difference here.

    --
    John_Chalisque
  3. You know there's a problem... by Anonymous Coward · · Score: 4, Insightful

    ...when you need to google the hex representation of 'red'. *much* better to understand the encoding, and it certainly isn't hard or requires tricky math. it's literally RRGGBB

  4. Learning to program by Googling + Trial & Erro by ahbond · · Score: 5, Insightful

    This is why so much poor software exists in the world. I can only imagine what nightmare code is being generated by such efforts. Yes, anyone can code, just as anyone can build a house. Whether or not the house collapses immediately, whether it has any real value, or by any other measure still depends on the skill of the builder, just as in software. Garbage in -> Garbage out, applies to the code as well as the data. -AB

  5. Interesting by Moridineas · · Score: 5, Interesting

    I spoke to a computer science professor about 2–3 years ago who said he had noticed a curious thing over the last few years. The students in his classes didn't seem interested--or even willing to--in solving programming problems. They just expected to be able to come in, download this framework and that framework, find a solution to a tricky problem on Stackoverflow (or wherever), and maybe write some really rudimentary code to just glue the bits together. Many of the "old " assignments--implement three different sorting algorithms and compare their properties just seemed totally archaic to his students--why would you ever want to actually write a sorting algorithm? After all, somebody out there has already done it better, and that's nothing you would ever need to do as real programmer.

    The professor was somewhat alarmed by this, but not totally in disaster mode, because it was probably true that MOST of his students would never need to write a sorting algorithm. Most of his students would never need to implement an algorithm that draws a circle, etc. But still--this was computer science--not community college.

    The writer here seems to fall squarely into this class of learner. Honestly, the first thing this article made me think of was that awful Barbie learns programming book where Barbie gets some other people to write the code for a program she designed, thereby becoming a real computer programmer. Maybe the book wasn't that far off the mark after all...

  6. They have it backwards... by mark-t · · Score: 4, Insightful

    You don't need to be good at math to learn to code...... but as programming at its core *is* mathematics, learning math will almost certainly help you to write better code.

  7. It's true by Anonymous Coward · · Score: 5, Insightful

    I've been writing software for more than 20 years at this point. While yes, if you're doing anything involving creating algorithms or computer graphics/gaming you will likely need higher level math, the average programmer (making websites, making desktop business apps) does not need to learn anything more than basic mathematics.

    It irritates me when I hear elitist coders or hiring managers harp on about the need to be a PhD Mathematician on the side while also being an expert in coding. Just as you don't need Picasso painting your bathroom, you don't need a rocket scientist to code your shitty business app.

    1. Re:It's true by thinkwaitfast · · Score: 4, Interesting

      I can only count one job out of about 2 dozen in thirty years where I had to multiply vectors. And this includes a few NASA subcontracts that I've been on.

  8. Not according to HR by Billly+Gates · · Score: 4, Funny

    These resumes from India all have 10 years of programming experience in html 5 and everyone of them have a degree in mathematics or cs! It is time Americans also had such backgrounds or we can't find enough qualified workers to do differential equations for Adobe Dreamweaver

  9. If you need math, learn it. If not... by Tenebrousedge · · Score: 5, Insightful

    And there's a shit ton of CRUD apps that people want written that don't need anything of the sort. There's a world between high-performance computing and the most superficial use of a computer. Excel macros spring to mind, as an example. We can also draw a line between simple computation and more complex mathematics -- simple calculations are absolutely the computer's job.

    To answer your "So what?": useful shit can be done even without having learned everything that you did. What useful purpose does elitism serve?

    --
    Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
  10. math talent, not math knowledge. SQL is algebra by raymorris · · Score: 5, Insightful

    The author doesn't seem to understand what math IS, how and why programming IS math. The author writes that you don't do a lot of algebra and such in typical web pages. Does your PHP script use SQL? That's algebra, relational algebra. It's not that you need to remember mathematical formulas; it's that have a half decent design for your software, you need mathematical THINKING. If your high school algebra homework was wrong, your sql is probably wrong too.

    The author likes to copy and paste a lot. Yeah, I've seen a lot of that kind of code, mostly while rewriting it to work properly.
    Programmers with a clue #include, they don't copy-paste.

    It's not that you need to write the tangent function from scratch, and purely from memory. It's realizing that tangent() SHOULD be a function, which you should call from libmath. The author managed to copy-paste code that computes a tangent into the middle of the onclick() handler. That's Doing It Wrong.

  11. Hey, I do that! by Anonymous Coward · · Score: 5, Interesting

    Math is a tool like a hammer or a screw driver. A carpenter typically does not love their tools, but they sure know which one to use with a nail or a screw.

    Math is being taught wrong. Most math teachers love their subject and do not understand why the students do not also love the subject, when they provide no practical use. Practical uses are many, such as amortization, 3D physics accurate simulation, and robotics.

    For example, I teach typical HIGH SCHOOL students bubble sort, then merge sort using recursion in GCC. We then create a list of 1,000,000 fake names using "rig", and temporarily replace the /usr/bin/sort program with our own, discussing the big O.

    The students typically enjoy these assignments as they begin to understand the GNU tools, and have a practical use for both math and logic. The problem solving process and application of new concepts are valuable whether or not students will ever write a sort program again in their lives.

  12. Programming by jgotts · · Score: 4, Insightful

    Based upon my three decades of programming experience, programming at rare times may require you to brush up on what you learned in engineering school, but essentially your degree is mostly a worthless piece of paper in terms of career usefulness. I've used much less than 5% of what I learned there, and probably more like less than 1%. My most useful class was software engineering, because it touched on the non-technical aspects of being a programmer.

    There are small subsets of programmers that use geometry and calculus, but even if we only remember the basics those types of programmers don't need to worry about nit picky details because we all use libraries. You'd be absolutely foolish to open up a calculus book and write your own library function, unless you're doing something extremely novel. Novel is bad when you are trying to write maintainable code.

    What is useful to you as a programmer is to understand what big O notation is. It's advanced math beyond calculus, but it always seemed like common sense to me. If you have to do n^2 operations for every n, that's worse than having to do n operations. In 30 years I've never had to worry about little o or logarithms. Google gets specific in interview questions about all of these notations, but I'm telling you what is actually useful.

    What is not useful to you is mastery of the syntactical details of any language. Try to program as if you're writing English. Write software in such a way that you could be doing it in any language. Write software that the next person can read, instantly understand, and begin modifying.

    Programming isn't purely doing Google searches. What I spend most of my time on is seeing how the software I'm working on already solves a problem and to use as similar techniques as possible, so that the next person who works on it will encounter consistency. Every change I make I make for a reason, and I understand every change I make well enough to explain it to my mom.

    Another way of looking at it is the technical interview is almost completely useless. You can ace a technical interview and write the shittiest code I've ever seen. You can perform average on an interview and write the cleanest code I've ever seen. If anything, detailed technical knowledge should count against you. The next person to maintain your code might not know every trivial little feature of the language you're using and has no admiration for your cleverness.

    Write software like Hemingway, not Thomas Hardy, and don't sweat the math.

  13. Often aren't "math guys" but "arithmetic guys" by mx+b · · Score: 4, Interesting

    Certainly, not every programmer with a strong background in math is like this. But I've worked with people who are proud of their math ability, and who would be the first to tell you how critical math is to programming, who write terrible code ... They pride themselves on their "uncommon" ability to keep lots and lots abstract details "in their heads," and in their "analytical" skills.

    Throughout elementary, middle, high school and even into college (dependent a bit on major), we tell kids that "math" is learning your times tables, balancing a checkbook, and basically arithmetic skills. There's some algebra thrown in there in high school but for the most part, most people think of math as doing arithmetic. I'll give you an example. My mother says "You're so good at math!" whenever she's baking cookies and asks me how much flour to use if she wants to double the recipe and she typically uses 1/3 cup of flour. This isn't unusual; I heard this all through my life, from family, friends and even teachers.

    Mathematics, however, is really just logical thinking. It is the art of logical reasoning about problems. Often applied to numbers, sure, but it doesn't have to be, or at least not in a concrete sense. It's more about reasoning about patterns, abstracting different types of problems (realizing that two problems you thought were different are actually the same type of problem!) There are whole college courses in mathematics I took back in the day where not a single number was written on the board. It was all symbols and functions and proving properties of things (meaning: what can I logically conclude about something based on this list of facts?). Being good at math really means being good at reasoning about problems, abstract away the difficulty, and notice patterns.

    I think the disconnect is that there is a healthy population of people running around that declare themselves "good at math" because everyone they know (family friends teachers) tells them they are good at math... because they did arithmetic and basic algebra well. The end. I've met several people like that. Doing those things at a high school level is more about memorization (think: memorizing times tables, memorizing "FOIL" method for multiplying polynomials, memorizing quadratic formula, etc.) than logical reasoning. You might get a taste of that in high school geometry if you're lucky, but honestly even that seems to mostly be "memorize this proof about geometry" without really building logical reasoning skills that can be applied to other problems. You just do it for the sake of doing it, from the students' perspective.

    The people that are "good at math" you meet that suck at programming are likely the people that fall into this category. They were great at K-12 math classes because they can memorize and hold a lot in their head, and they probably learned programming by the same method -- look at code (in a book, google search, whatever) and memorize the code. They memorize what functions do what, and how to throw things together, but they never really internalized that abstraction and problem solving that a true mathematical mind has. So they never really learned how the code goes together, or why one pattern is better than another. They just memorized an approach that worked in the past. I've seen a lot of that too unfortunately.

    A real college level course in mathematics is really eye-opening (likewise, I think physics majors and a few others also experience this), and I think that ability to reason abstractly really does make a huge difference in how you approach problems. Even if you never directly use your math classes at your job, having gone through those classes permanently change how you think about and approach problems, and I think that is a huge benefit. It's a shame most people -- even the ones "good at math" -- never take one of those classes.