Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Yeah. I've been writing code as a job for a decade now and have never needed to factor a quadratic equation.

A lot of people never touch algebra again.

Some of us end up touching it a lot.

This is a bit of a tricky thing, in that:

- A whole lot of practitioners have very limited continuous math and deep CS needs, so some of these requirements are artificial barriers to some extent for many jobs.

- But is it reasonable to give them CS degrees without at least basic competence?

- Plus, part of the point of a university education is to round-out students and expose them to many things...



> - But is it reasonable to give them CS degrees without at least basic competence?

Yes, when we truly understand "competence".

A lot of "math" as talked here, is not part of what make a programmer competent FOR programming.

It only make you competent for THAT segments of math.

That is something that many has a hard time understanding: Programming is NOT math. Equally as math is NOT programming.

If you are studying FOR programming/CS, math is ASIDE. Is not the focus.

Similarly, if you are FOR math, programming is ASIDE. Is not the focus.


> A lot of "math" as talked here, is not part of what make a programmer competent FOR programming.

Basic algebra is quite useful. It's reasonable to expect most programmers to be able to do simple algebra when it comes up. There's a whole lot of reasons:

- Analysis of algorithms and work done generally involves manipulating algebraic expressions and factoring.

- Reordering numeric expressions in code means understanding the composition of operations and invertibility.

- A whole lot of work can often be avoided by being able to derive an equivalent expression.

Yes, continuous math isn't "CS math" but it's a reasonable thing to expect a programmer to be competent in.


> Basic algebra is quite useful

Similar, Perform music is too. And learn about accounting. Or law.

But IS still "aside". Sometimes, here in THIS function, I need to apply to algebra. But that is not the majority of the tasks, neither, learn algebra help me much about the whole endeavor (maybe only if I'm building an algebra library).

> but it's a reasonable thing to expect a programmer to be competent in.

Any person too?, maybe. I heard identical arguments in other fields. No joking, even in a law firm.

Curiously, by people that probably are better at THAT that the actual problem they have, in their niches, where -despite not be my job- I could have better idea...


> But that is not the majority of the tasks, neither, learn algebra help me much about the whole endeavor (maybe only if I'm building an algebra library).

Sorry-- I completely and totally disagree with you. The core things I learned about mathematical structure in algebra classes have informed my entire programming career: pure functions, commutativity and associativity, factoring and composition. Both discrete and continuous math are necessary to be a computer scientist. Yes, you may be able to do some things without them... but you're going to be limited.

> Any person too?, maybe. I heard identical arguments in other fields. No joking, even in a law firm.

Algebra is basically required for a secondary education at this point, let alone college. Yes, it has broad applicability. Even in law: we expect many lawyers to be competent at calculations that are best addressed with algebra.


If you want to learn to program go to a bootcamp or a 2 year college program. A degree in CS should be about much more than programming.


> A degree in CS should be about much more than programming.

Sure, but CS is still about "Computing", not algebra or calculus!


We're basically talking about machines that are the embodiment of applied mathematics. Yes, a lot is discrete, but a lot is very well approximated with algebra and algebra is an important tool to have at hand when tackling discrete math.


To be clear, this course was exclusively "CS for NON CS/math majors." If you were in CS, you were not allowed to take it.

They also offer a lot of "math for non mathies" courses, which would have been a great place to teach quadratics.


Yes, but I doubt you had write code to factor a quadratic equation because it's a solved problem and you have libs that will do it for you.

Imagine if you had been given an exercise of such a low level nature for every single topic you might touch in IT in the future. You would have had to code a function to do UTF8 decoding, JPEG rendering, TCP/IP error correction, font rasterization, ray tracing, PEG parsing, an USB driver, data diffing, model training, etc.

Also, you don't learn much about programming by creating a function to factor a quadratic equation. You seldom learn about types, side effects, algo complexity, or even about collections, iteration, branching, memory, debugging, etc.

You just learn to badly translate a very specific, narrow problem to the language you use.


> Yes, but I doubt you had write code to factor a quadratic equation because it's a solved problem and you have libs that will do it for you.

Actually, I have, because I've done a fair bit of embedded development and "toss this massive lib on" is not always a reasonable solution. Inferring the structure of plant in controls is often a polynomial factoring problem and it's not something that one tosses Singular or FLINT at on small hardware. But aside from that...

Factoring a quadratic by hand is something I expect a CS major to know how to do, because they might very well be doing algebraic manipulation to develop solutions to real world problems.

And someone who knows how to factor a quadratic by hand knows a number of formulaic (suboptimal) steps to perform it-- the exact kind of things that's easiest to translate to code before you have gotten into that mindset of explicit thinking.

So--- declare and manipulate variables to do the quadratic formula. OK, what if we want to confine ourselves to integers, what can we do? Can we loop and search solutions in some meaningful way like a human would?

It's a completely reasonable space to explore as an early programming problem for someone who's familiar with it.

I'm teaching a secondary student to program right now. In his core math class he's doing a lot of trig. In turn, we're doing a whole lot of exercises like "make these dots chase the other dot using atan2 and sin/cos".


> Actually, I have, because I've done a fair bit of embedded development

Can't argue there :)

> Factoring a quadratic by hand is something I expect a CS major to know how to do

Agreed, I'm more concern about teaching programming while asking such a task. Once you have solid foundation, you can have valuable insights by doing this exercise about float based maths, moving variables around, naming things, translating maths to code. But before that, I think it would hinder learning.

> And someone who knows how to factor a quadratic by hand knows a number of formulaic (suboptimal) steps to perform it-- the exact kind of things that's easiest to translate to code before you have gotten into that mindset of explicit thinking.

I disagree, because it takes 2 abstracts things and mix them together. It's a harsh first step. As a teacher, I get better results when I map coding to some concrete reality first. Later on, yes, you can mix.

> I'm teaching a secondary student to program right now. In his core math class he's doing a lot of trig. In turn, we're doing a whole lot of exercises like "make these dots chase the other dot using atan2 and sin/cos".

This is what I'm talking about. I have terrible results with those for anybody who doesn't really love maths. But creating small games and analysis the text of their favorite song are instant hits.


> This is what I'm talking about. I have terrible results with those for anybody who doesn't really love maths. But creating small games and analysis the text of their favorite song are instant hits.

He def doesn't love math. But he just finished the swarm thing and it's awesome.


I can't think of a single time I've needed to implement a linked list but knowing how to do it is still useful.

A quick search tells me that factoring quadratic equations is covered around grade 8 or 9. I'm guessing that the instructor assumed that everyone would have enough math to know how to do this or quickly refresh their memory so they could focus on the programming aspects and not the problem solving.


> Yes, but I doubt you had write code to factor a quadratic equation because it's a solved problem and you have libs that will do it for you.

It is not totally unreasonable to expect students in an intro to CS course to have some basic competency in algebra (university dependent). Giving them a problem in a domain they're already familiar with (or that where familiarity can be expected) lets them, in theory, focus on the algorithm/data structure side without having to also be taught the domain. Most of the exercises in a first CS course are solved with libraries (standard in some languages, or 3rd party in others). That doesn't mean it's not useful for developing the knowledge the course is aiming for.

Do you also think we shouldn't teach arithmetic and should only teach using calculators? (You may, actually, I know people who think that way.)


No, but I do think an intro to programming should be done without math. You can mix them later, once the students know what's up.


It's silly to make a universal statement like that, that's why I qualified it in my own. Whether or not math should be present in the assignments depends on the university and the background of its students. MIT's SICP could use calculus in its course because the students were either also in calculus or had already taken calculus when they got to the course. It was expected in their situation. Waterluvian, helpfully, clarified that the course they were talking about was for non-CS majors, so whether or not a basic algebra concept is appropriate would depend on the background of those non-CS majors. Are they all STEM majors or 99% STEM majors? Then you can assume they know algebra. Are there more humanities and arts majors? Then you can't, or shouldn't.

Besides, most intro to CS courses also include basic algorithm analysis (that may not be true for the non-major version of the course) which means the course will require the use of at least arithmetic, probably some algebra, and some basic calculus. So why not write programs that make use of math when you're already assuming the students are competent in basic math?

At least at the universities I was familiar with, a non-major first CS/programming course was generally targeted to STEM, but not CS, majors, so again familiarity with algebra would be a reasonable assumption (at GT, these were taken by the various engineering majors and used Matlab as the language of instruction, I think they previously offered Fortran).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: