Live data from Hacker News

The language brain matters more for programming than the math brain? (2020)

massivesci.com

231–240 of 465 posts

Re: The language brain matters more for programming than the math brain? (2020)

#231
post #96

Good code doesn’t just solve a problem, it solves it in a way that’s readable and modular. I think the problem-solving part of coding requires math skills, while the organization part requires writing skills. The organization part affects the problem-solving part, because if you write messy code (that you can’t reread once you forget or extend without rewriting) you’ll quickly get overwhelmed. Writing large math proo…

What do you mean by math? Abstractions or calculations? The effort it takes me to do long division in my head matches the effort it takes me to follow some obtuse spaghetti code. See, I can get good and fast at long division in my head, but I may never understand the fundamental theorem of calculus. Some people are really good at mucking around garbage code (they have no choice, they get paid to), but what part of pr…

I'm thinking of "computation", "intuition", and "organization".

Computation is following an algorithm. e.g. long division or computing a derivative.

Intuition, AKA brilliance, is finding a non-obvious solution. Think "solving an NP problem without brute force"*. e.g. solving an integral (in a form that hasn't already been memorized) or discovering an interesting proof.

Organization is recording information in a way that a) is easy for you to recall later on (and get insights from) and b) is digestible by others**. e.g. explaining how to compute a derivative, solve an integral, or anything else.

Math, programming, and writing each require all skills. The kind of math taught in school (e.g. long division) and your boring jobs are primarily computation. I believe advanced math (e.g. calculus) is primarily intuition; it requires some organization because big theories are broken into smaller steps, but seems to mostly involve smart people "banging their head against the wall" to solve problems that are still quite unclear***. Programming is primarily organization. It requires some intuition (I think this is why some people seemingly can't learn to code), but in contrast to math, most programs can be broken into many relatively-simple features. IMO implementing all the features and interactions between them without creating a buggy, verbose, and unmaintainable codebase is programming's real challenge. Writing is also primarily organization, but finding interesting ideas requires intuition, and worldbuilding requires computation (even in fiction, there must be some coherence or people won't like your work).

> Some people are really good at mucking around garbage code (they have no choice, they get paid to), but what part of programming did they get good at? Obviously, some part of it, but nothing to write home about.

I agree that work you find boring should be avoided, and I also try to avoid working with it. But some people really seem to like working on esoteric code, and I think there are some skills (beyond computation) developed from it, that even apply when working with good code. Building a mental model of a spaghetti codebase involves organization, and if the codebase uses "genius hacks", intuition. Moreover, the same techniques to discern that two code segments in completely different locations are tightly coupled, may also discern that two seemingly-separate ideas have some connection, leading to an "intuitive" discovery. There's an MIT lecture somewhere that describes how a smart student found interesting work in a factory, and I think ended up optimizing the factory; the lesson was that you can gain some amount of knowledge and growth from pretty much any experience, and sometimes there's a lot of opportunity where you'd least expect it.

* Or maybe it is just brute force but people with this skill ("geniuses") do it very fast.

** These are kind of two separate skills but they're similar. Moreover, b) is more important because it's necessary for problems too large for one person to solve, and it implies a).

*** And whatever method solves these problems doesn't seem to be simplification, because many theories and proofs were initially written down very obtuse, then simplified later.

Re: The language brain matters more for programming than the math brain? (2020)

#232
post #78

There is no such thing as a "language brain" or a "math brain" unless you show experimentally that those bunch of neurons can be grouped into two non-overlapping regions dedicated to "language" and "mathematics". Mathematics itself is a human-made formal language that can be bootstrapped from definitions and axioms of logics and set theory, which have to be given in human language first. Experienced mathematicians re…

The other thing I don't like about this framing is the implicit false dichotomy. The best programmers I've met often have strong language and math skills. Poetry is the art of giving different names to the same thing. Mathematics is the art of giving the same name to different things. (Henri Poincaré) It's basically being good at "naming things", in particular abstractions.

> Poetry is the art of giving different names to the same thing.

Did Robert Frost say something like, "all language is poetry?" A chair is the term I learned to describe the object I am currently sitting on while typing this comment. Germans might call the same object a 'Stuhl', the French might call it a 'chaise', etc.. My point being that the object isn't technically any of those words, but rather those words symbolically map to that object.

Re: The language brain matters more for programming than the math brain? (2020)

#233
It's funny that this popsci article instantly succeeded in dividing the HN commenters into math/not-math camps. Porque no los dos?

Programming is the manifestation of thought through the medium of a keyboard and screen. If you are a clear thinker, if you can hold multiple things in your head at once, if you can reason about things and their relations, well, you can be a strong programmer.

It seems wholly unremarkable to me that someone new to Python would not be fazed by it, given it's fundamental basis in words (print, if, etc.) Someone with a background in languages, who can think well enough to explicitly or implicitly pick up the structure of the language, is gonna do just fine. "Oh, so when I see a while, I need to end with a colon" isnt so different from "when I shout, I need to add a ! at the end"

(Java gets a special place in hell for forcing "public static void main" on every beginner.)

Math only really comes into it when you want to reason about things that have a history of being manipulated mathematically, typically for reasons of convenience. You could probably invert a matrix in SNOBOL, but its a lot easier to pull out lists and arrays and linear algebra.

In other words, lets see the follow up paper to this where Python newbies are asked to model the trajectory of a bead on a wire and see how they do.

Re: The language brain matters more for programming than the math brain? (2020)

#234

This totally makes sense to me. I've always been a very good / fast reader, which has been incredibly useful in my programming career. I had a good SAT math score (710) but got a perfect score (800) on the SAT verbal (in the late 90s). I remember when I first started working on my Master's project on wireless sensor networks, my advisor sat me down and said "I think I know a good project for you. I want you to print…

Oh wow, are you me - I had an almost identical SAT experience. Oddly enough compared to another poster in this thread, I love functional programming and Haskell and studying things like dependent types in a programming context has helped me patch up my crappy understanding of "actual math", proofs, etc.

Re: The language brain matters more for programming than the math brain? (2020)

#235
post #79
post #70

As a self taught programmer with a Communication Studies degree, this definitely resonates. The ability to articulate the problem in code is kind of the starting point for most productive development work.

Any experienced programmer will be able to tell what kind of person another programmer is just by the way they write their code. Code written by programmers with humanities backgrounds is easily identifiable as being of bad quality. Kind of like vibe coding meets programming by accident, before vibe coding was really a term. It's a faux pas to even mention this IRL, but good coders know what's up. Those "coders" usua…

This is a high level of bias and generalization about an enormous group of people with varied backgrounds and experiences, not to mention selection bias as you don't know many good coders backgrounds who may in fact be from humanities.

Even if many of the bad coders are those who were in humanities and don't have coding experience because they just entered the field (because once you get it you are no longer a humanities background)

Re: The language brain matters more for programming than the math brain? (2020)

#236

Earlier quoted context omitted.

Most coding doesn't need much of any math past boolean logic and very basic set operations. I'm much more likely to spend my time studying DB and interface schemas to understand how something works than doing a lot of mathy fiddling. Sure, some people write game engines and such, but even much of 3D graphics doesn't need anything more complicated than the first half of a linear algebra course.

> Most coding doesn't need much of any math past boolean logic and very basic set operations Coding IS math. Not "coding uses math", I mean it is math. Mathematicians do not deal in objects, but in relations among objects; they are free to replace some object by others so long as the relations remain unchanged. Content to them is irrelevant; they are interested in form only. - Poincare[0] I don't know how you code, b…

> Coding IS math.

Programming is an expression of logic, which is absolutely mathematics.

But then we also have to think about naming variables and classes, structuring our code so that it is more readable by other developers, and so on. That's less about formal reasoning and more about communication.

There is an engineering aspect to programming (prototyping, architecture, optimization, etc). It's a combination of mathematics and engineering. Software Engineering.

Re: The language brain matters more for programming than the math brain? (2020)

#237

Earlier quoted context omitted.

> I was never told, for example, that matrices are a useful abstraction (shorthand?) for representing linear equations. Congratulations on overcoming the (very weird) choice of whoever taught your intro to linear algebra class.

I'm not sure how to interpret this comment, it could easily be read in multiple ways. (Depends on priors) Regardless, it's a shockingly common occurrence. I'd agree it's not the right way, but it is also a common way. That perspective might define those priors

When growing up, I'm sure my fellow students and I were not the only ones get responses to questions like "Why can't one divide by zero?" or "Why is Pi necessary to compute to area of a circle?" answered like "because that's just how things work" or "because it just is."

I'm not going to sit here and act like I was a star student or anything. I was more of a class clown type. I absolutely hate math and all things math. That was, until I went to college. A switch flipped when I was in a Calculus II class.

Our professor asked, "What is a 100 divided by 0?" People in the class responded with, "You can't divide by 0 because it's undefined." To which our professor responded with, "Why?" Then a student took out a calculator and showed the professor that the answer as indeed undefined. To which he responded with, "Ok, how do you that calculator is correct? Do you just believe it because people told you that dividing by zero is undefined? Ok, the answer is undefined... but why?"

Right then and there, a switch flipped in my brain. I realized that I was basically institutionalized to just not question math and to just accept that things work a certain way "just because." It was at that point I actually started to become interested in math, and it completely changed my outlook on math in a positive manner. I love math now (despite being horrible at it).

Re: The language brain matters more for programming than the math brain? (2020)

#238
The language brain is more important than the math brain for reading the first lesson on how to program in Python. Fixed that for you.

Does answering a quiz on the contents of the first lesson on how to program in Python really encapsulate anything concrete about who will and will not be able to actually program in Python?

I've always been disturbed by the disconnect between "first lessons" on programming languages and how I personally actually learn programming languages. I can't help thinking that the researchers have measured something else other than whether people have learned to program.

Re: The language brain matters more for programming than the math brain? (2020)

#239

Earlier quoted context omitted.

> Most coding doesn't need much of any math past boolean logic and very basic set operations Coding IS math. Not "coding uses math", I mean it is math. Mathematicians do not deal in objects, but in relations among objects; they are free to replace some object by others so long as the relations remain unchanged. Content to them is irrelevant; they are interested in form only. - Poincare[0] I don't know how you code, b…

> Coding IS math. Programming is an expression of logic, which is absolutely mathematics. But then we also have to think about naming variables and classes, structuring our code so that it is more readable by other developers, and so on. That's less about formal reasoning and more about communication. There is an engineering aspect to programming (prototyping, architecture, optimization, etc). It's a combination of m…

Do you think mathematicians don’t have to think about naming variables and structuring proofs?

Re: The language brain matters more for programming than the math brain? (2020)

#240

Earlier quoted context omitted.

Most coding doesn't need much of any math past boolean logic and very basic set operations. I'm much more likely to spend my time studying DB and interface schemas to understand how something works than doing a lot of mathy fiddling. Sure, some people write game engines and such, but even much of 3D graphics doesn't need anything more complicated than the first half of a linear algebra course.

> Most coding doesn't need much of any math past boolean logic and very basic set operations Coding IS math. Not "coding uses math", I mean it is math. Mathematicians do not deal in objects, but in relations among objects; they are free to replace some object by others so long as the relations remain unchanged. Content to them is irrelevant; they are interested in form only. - Poincare[0] I don't know how you code, b…

> Coding IS math.

> Not "coding uses math", I mean it is math.

Arguably writing a novel is math, if you use the right definition of math. But sometimes its more helpful to use more informal definitions that capture what people mean then what is technically accurate.

Post reply on HN