Live data from Hacker News

The Mathematical Hacker

evanmiller.org

101–110 of 135 posts

Re: The Mathematical Hacker

#101
I don't understand what the apprehension is towards learning mathematics. Take it at college (university). Take as much as you can. Take it instead of silly courses like philosophy (for which you can sit in a lecture in your spare time, or look at online videos, or take out a book from the library and read at your own leisure). Just learn the freggin' math and stop bitching about "is it necessary, do I really need it, blah blah blah". It's an IMMENSELY useful subject in just about every branch of human knowledge. It's never a waste of time, perhaps even more so if you're a computer programmer.

Re: The Mathematical Hacker

#102
post #79
post #24

Picking on Fibonacci of all things? The goal of fibonacci and factorial examples are to teach recursion. Both fibonacci and factorial are good starting points for a beginner. It can be followed by discussions of dynamic programming where the student can be introduced to recurrence relations and solving them top-down and bottom-up. EDIT: Adding some background on dynamic programming For dynamic programming, the proble…

I think you sort of answered your own question. Fibonacci and factorial functions have closed forms that can be computed efficiently than implementing the recurrence relation both in terms of clock cycles and developer time. While there are a lot of dynamic programming problems that do not easily reduce to closed form expressions, there are a lot that do. Maybe there are better examples for students to learn that of…

> Fibonacci and factorial functions have closed forms that can be computed efficiently than implementing the recurrence relation both in terms of clock cycles and developer time.

It doesn't matter. The purpose of fibonacci is to understand recursion and dynamic programming. I have never ever encountered a practical problem where I need the value of nth fib. How does it matter it has a closed form and it takes less clock cycles when I almost never need it?

> While there are a lot of dynamic programming problems that do not easily reduce to closed form expressions, there are a lot that do.

The practical dynamic programming problems which have closed form and we need the value and not workout the whole series are rare. Fibonacci is a learning tool, so is factorial. The practical dynamic programming problems viz. longest common subsystem, interleaving, alignment, travelling salesman, matrix multiplication etc either don't have a closed form, or the closed form isn't useful.

"How many ways to change 100 using 1, 5, 10, 20, 50" does have a closed form, but more often than not, if I encounter a practical variant, the closed form is useless as the "how many ways" is not interesting, but the actual combinations are.

> Maybe there are better examples for students to learn that of similar difficultly, but lack closed form solutions. The Fibonacci one still seems useful since you might be on a system that doesn't provide the lgamma function.

The existence of closed form is immaterial. Closed form exists for Fibonacci doesn't affect learning recursion and dynamic programming.

Also, Fibonacci's closed form isn't defined in terms of lgamma.

> However, this sort of knowledge is exactly the kind that, in large enough occurrences, leads to game changers and serious disruption in industries.

I don't have to know the closed form beforehand to find one when I need it.

Re: The Mathematical Hacker

#103
post #100
post #98

Earlier quoted context omitted.

I respectfully beg to differ that "mathematics isn't about numbers or even proofs." Why are the math books on my shelves full of numbers and proofs? What was it I was wasting my time on in graduate school? This sort of definition (really a non-definition) is so vague that it robs mathematics of its character. Is mathematics important merely because many people believe that mathematicians are clever?

Mathematics itself is about structures and operations, properties of mathematical objects (like closedness and completeness) a.s.o. Numbers and proofs are just the tools of mathematics to work with those things.

This description defines abstract algebra and some topology well, but I am an applied mathematician and for me mathematics is about number crunching and stability of this number crunching. Without numbers or numerical structures like polynomials and matrices you'll only have set theory, some parts of algebra and some mathematical logic.

Philosophers of mathematics spent the 20th century what mathematics is all about and they did not settled on any potential definition.

Re: The Mathematical Hacker

#104
post #58

I'm in the Yegge school, so far as I think that the mathematical ignorance and, more generally, anti-intellectualism of our industry is its downfall. We see it in the lack of design sense and the awful code that is produced. VisitorFactory nonsense is something that was invented by people who hated math and wanted to tear programming away from its mathematical/problem-solving roots with a bunch of junk complexity tha…

The part about us being teachers more than engineers or programmers jumped at me. I've long held the belief that code should be written far more for those reading it than for the machine executing it. Your comment builds on that and made me think of this mantra: "The machine executing my code to produce an application is a side-effect. The main purpose of my code is to teach others how I control the machine into prod…

"Our design of this introductory computer-science subject reflects two major concerns. First, we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute. Second, we believe that the essential material to be addressed by a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, nor even the mathematical analysis of algorithms and the foundations of computing, but rather the techniques used to control the intellectual complexity of large software systems." -- SICP

From here http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-7.html , second paragraph. The second part also responds to the original topic.

Re: The Mathematical Hacker

#105
You can talk and argue all you want. But the fact is, many many successful systems have been built, and are being built, by programmers who couldn't care less about mathematics. Many of those couldn't care less about programming, either, to be honest. We here who are reading such discussions are the elite of programming, and also the small percentage of programmers who actually care about our craft. Let's not forget that most don't - and it's not a problem, the world still works.

Re: The Mathematical Hacker

#106
post #36

Earlier quoted context omitted.

When one first encounters factorials, it often is the case that one uses them to calculate ratios of factorials, the simplest bing n!/(n-1)! = n. This example is a natural one to think about recursively. The comparable examples for sums would be the difference of two sums ... and this is rarely done (except perhaps in the case of proofs of the sum of integers from 1 to n, etc.)

n(n+1)/2 also exists as a simple direct method of summing a series of 1..n. There's no similar (obvious) shortcut for n! (I don't count lgamma as obvious...)

And n(n+1)/2 was only obvious to Euler!

Re: The Mathematical Hacker

#107
I think it's possible to come into programming from lots of other disciplines, one example is Philosophy. Reading code is quite similar to doing argument analysis.

I think it's also easy to stare oneself blind on low-level stuff. We need people that have higher skills in the domain that the code should solve that can code. Having coders in one camp and then the "product owners" in another camp leads to solutions that doesn't work for either group.

Re: The Mathematical Hacker

#108
post #103
post #100

Earlier quoted context omitted.

Mathematics itself is about structures and operations, properties of mathematical objects (like closedness and completeness) a.s.o. Numbers and proofs are just the tools of mathematics to work with those things.

This description defines abstract algebra and some topology well, but I am an applied mathematician and for me mathematics is about number crunching and stability of this number crunching. Without numbers or numerical structures like polynomials and matrices you'll only have set theory, some parts of algebra and some mathematical logic. Philosophers of mathematics spent the 20th century what mathematics is all about…

Philosophers of mathematics spent the 20th century what mathematics is all about and they did not settled on any potential definition.

Ok, I have to disagree with you here. What Godel established is that there's no complete axiom system. Every mathematical formalism will have statements P for which neither P nor ~P can be proven. This was not an unexpected result. What makes Godel's Incompleteness Theorem awesome is that it proved incompleteness, which few people thought possible.

Same with Turing and the Halting Problem. Almost no one actually believed that such a program (that could determine, algorithmically, if a program halted) existed. If one did, it would blow open all of mathematics. Turing proved, in a very elegant way, that it didn't.

What 20th-century mathematicians agree upon is that mathematical statements aren't "true" or "false" in an absolute, platonic sense, but that they are products of the axiom systems that generate them.

Whether the Axiom of Choice or Continuum Hypothesis are "true" is meaningless. These aren't mathematical "controversies" that have people yelling at each other saying that the other is wrong. They're axioms about infinity (specifically, uncountable infinity) that, although they have no physical correlates (you can't actually Banach-Tarski an orange) are logically independent of the "obvious" axioms. What logically independent means is that neither L nor ~L will generate a contradiction, and therefore neither has any absolute high ground.

Most mathematicians use AoC and CH for typical mathematics, but there are alternative mathematical worlds in which they don't hold, and those are interesting in their own right.

Re: The Mathematical Hacker

#109
"Rather, mathematics is a tool for understanding phenomena in the world: the motion of the planets, the patterns in data, the perception of color, or any of a myriad things in the world that might be understood better by manipulating equations."

^---So true.

Re: The Mathematical Hacker

#110
post #96
post #61

Earlier quoted context omitted.

> A good network programmer should have at least passing knowledge about graph theory (the network is a graph), queueing theory (how else are you going to size your buffers?), and also some statistics (given these numbers, how much bandwidth will be taken by resends? How much data can we send per hour? How many 9s do we get for 'probability that a messages is handled within 10 seconds'?) Partial differential equation…

I am in love with Feynman. He's so captivating.

I love him, too.
Post reply on HN