News for hackers. Stuff that matters.
Re:The Two Cultures of Mathematics (2000) [pdf] by josephg on Monday April 26, 2021 @03:18AM (#26940114)
I wrote a blog post a few years ago[1] making a similar claim about computer science. I said there’s 3 main camps of programmers:

- People who enjoy programming because it’s mathematically beautiful (eg Haskell programmers)

- People who enjoy programming because they like reasoning about machines, and like mechanical sympathy (eg C programmers)

- And people who like programming because it can solve real problems for their users.

I got pushback here and elsewhere that lots of people fit into multiple camps - which makes sense. Maybe they’re better described as an ecology of values. But I also think there’s something real here. I worked in a consulting shop a few years ago and my boss came back from some front end development conference gushing about a talk he’d seen that I had to watch. The talk was a layman’s description of FP’s immutability approach applied to react. My boss had never heard of immutability before because it had never come up in front end web development circles. There’s lots of opportunities for our software to improve by cross contaminating all our best ideas.

[1] https://josephg.com/blog/3-tribes/

Re:The Two Cultures of Mathematics (2000) [pdf] by kebman on Monday April 26, 2021 @04:34AM (#26940501)
I like C-like programming languages, and I like to solve real world problems for my users. So two camps, I guess. Moreover I was always that annoying kid in class who would ask the teacher, “but what use is that?” Often the teacher couldn't even answer this very simple question, and every time that happened it left me really unmotivated to learn. The epiphany came in Upper Secondary school when a math teacher shushed the other pupils and actually took his time to tell me what {insert abstract math topic here} was actually good for. This changed a lot for me, but as far as grades go, it was already too late. Though at least it left me interested enough to research some things on my spare time, so when I finally came to the university, I almost couldn't believe my own eyes when I started to get good grades on (for me) pretty advanced math topics. I obviously still have a pretty big disadvantage in mathematics, but researching things that require stuff like abstract algebra and calculus is now much less of a hurdle for me.
Re:The Two Cultures of Mathematics (2000) [pdf] by Karrot_Kream on Monday April 26, 2021 @06:10AM (#26940988)
Fantastic! Thanks for this. The FP vs non-FP split has always just felt like a less rigorous version of the "analysis vs algebra" or "problem-solving vs theoretical" discussion and I'm glad I'm not alone in thinking this.

This is also what rubs me the wrong way about the simplistic level with which FP languages (like Haskell or Scala+monads) are either cargo culted or hated. The truth is, the two perspectives really go hand-in-hand, and we're all the worse for not realizing this.

Re:The Two Cultures of Mathematics (2000) [pdf] by ukj on Monday April 26, 2021 @09:06AM (#26942101)
All notations (programming or Mathematical) are just different ways of expressing computations.

All notations have trade-offs at the level of semantics making certain operations more difficult to express (what programmers refer to as 'the expression problem')

That's the entire shpiel of reification/first-class citizenships/semantics of programming languages.

Instead of getting into fanboi-ism of 'my language is better than your language' perhaps approach the problem from first principles (design): what is "IT" that you want to talk about, reason, express and manipulate in your program?

That dictates the sort of language you need to solve the problem that you are trying to solve.

https://en.wikipedia.org/wiki/First-class_citizen https://en.wikipedia.org/wiki/Reification_(computer_science)

Re:The Two Cultures of Mathematics (2000) [pdf] by Kalium on Monday April 26, 2021 @08:07AM (#26941646)
In my opinion, the FP/IP split is fueled in no small part by a wildly divergent set of vocabularies. A dozen different <greek letter> transforms are inscrutable to anyone who has not spent much time studying Lambda calculus, and the concept of a monad is famously difficult to explain.

You wind up with two camps that cannot communicate. It's often made worse by the functional programmers - who are mostly also imperative programmers - doing a poor job of enabling translation.

Re:The Two Cultures of Mathematics (2000) [pdf] by 29athrowaway on Monday April 26, 2021 @03:28AM (#26940167)
And people that do not care about any of those things and just want a paycheck, or to be promoted so that they do not have to code anymore (95% of developers worldwide).

Unfortunately the people that get excited building things is outnumbered by the people that is just in this for the money.

Re:The Two Cultures of Mathematics (2000) [pdf] by brokenkebab on Monday April 26, 2021 @04:16AM (#26940415)
>Unfortunately the people that get excited building things is outnumbered by the people that is just in this for the money.

I don't think there's a reason to be sad about it. There are plenty of e.g. maintenance jobs in the industry, and people who are passionate about programming may not be the best fit for this niche - it's boring, and sometimes you feel the urge to re-invent a few wheels even in detriment to actual business needs. For not-so-passionate however it's a good place - minimize efforts while having good salary.

Re:The Two Cultures of Mathematics (2000) [pdf] by GoblinSlayer on Monday April 26, 2021 @07:10AM (#26941303)
There's no real difference, if your sole interest is a paycheck, any programming is boring.
Re:The Two Cultures of Mathematics (2000) [pdf] by brokenkebab on Monday April 26, 2021 @08:33AM (#26941814)
Yep. Does it contradict to what I wrote though?
Re:The Two Cultures of Mathematics (2000) [pdf] by GoblinSlayer on Wednesday April 28, 2021 @11:43AM (#26970665)
Your post is formulated as if there's difference.
Re:The Two Cultures of Mathematics (2000) [pdf] by brokenkebab on Saturday May 01, 2021 @09:52AM (#27006316)
I don't think so.
Re:The Two Cultures of Mathematics (2000) [pdf] by josephg on Monday April 26, 2021 @03:45AM (#26940269)
I'd love to see actual numbers on this. Its not 95% - but all of our intuitions will be a bit wrong because people cluster in workplaces based on personal values. So no matter what you're like, you'll end up working with people similar to yourself.

I wouldn't be surprised if people who just program for a paycheck are the majority of employees in many offices. I know they're a tiny minority in a lot of the places I've worked at. That's not a boast or a coincidence - humans cluster in tribes based on shared values. I don't consider myself part of the same community as people who show up to work to close jira tickets and collect a paycheck.

Re:The Two Cultures of Mathematics (2000) [pdf] by 6gvONxR4sf7o on Monday April 26, 2021 @03:53AM (#26940314)
> I'm not sure it makes sense to describe people who love programming and people who just do it for a paycheck as truly being in the same field.

This is why I keep my mouth shut IRL about just wanting the paycheck. I'd imagine a lot more than a tiny minority of people are just there for the job where you've worked. We just keep our mouths shut because the passionate folks judge us paycheckers.

Re:The Two Cultures of Mathematics (2000) [pdf] by eru on Monday April 26, 2021 @05:21AM (#26940731)
It's fine to optimize for the paycheck first and foremost.

But while you are at your job anyway, might as well make it slightly less of a drudgery while you are at it.

(Eg I quite like functional programming. Both because I like the style of thinking, but also because I don't trust myself nor anyone else with code; and eg a heavy emphasis on immutability means that I'm less likely to get woken up in the middle of the night with some production problem.)

Re:The Two Cultures of Mathematics (2000) [pdf] by 6gvONxR4sf7o on Monday April 26, 2021 @12:06PM (#26944133)
I have a ton of coworkers who try to make their job more interesting by trying the most interesting tools instead of the best tools for the job. They have less drudgery, but more stress from not hitting deadlines as reliably. Meanwhile I'll embrace the drudgery and do the boring thing, stay less stressed because get it done more quickly and reliably because I chose the right tool, and got promoted really high.

Taking a mercenary attitude towards work works just fine for me, and keeps me overall happier.

Per your example, I like FP and immutability for the same reasons (won't get paged as much), and I'm always reading to stay up on my game, but it's still just work. If you worked with me, you'd probably think I live and breath this stuff as a passion because I put so much time in to stay so much on top of the tools available. But I hate programming. Hell, you might even say my hate of it drives mastery in the same way your passion drives your mastery. To me, it's just a tool by which to automate things I do care about (and retire younger than I could in other roles).

Re:The Two Cultures of Mathematics (2000) [pdf] by eru on Thursday April 29, 2021 @03:58AM (#26978512)
I think we mostly agree.

About FP and immutability specifically:

You don't have to go full on and re-write everything in Haskell. Small scale decisions can already make your life easier without much disruption. Eg if you are using Python, by default stick your information in frozen dataclasses, and only deviate from that with good reason.

Another thing I have a minor passion for is to as much as possible handle corner cases in the main line of the code.

Eg instead of having a big 'if' at the start of your function to handle an empty list and return early, try to make sure that the main logic can deal with empty lists just fine.

After all, the simpler your control flow, the easier it is to get code coverage in tests and production.

(I mention `and production', because in practice, lots of code is battle-hardened instead of sufficiently tested.)

Re:The Two Cultures of Mathematics (2000) [pdf] by gryn on Monday April 26, 2021 @09:08AM (#26942114)
that feels like a false dichotomy, you can be both.

you were passionate, found a job that claimed to match your passion and later found out otherwise. rinse and repeat multiple times, and there you go.

soon you started to be paycheck only at your day job and passionate off hours in your free time.

Re:The Two Cultures of Mathematics (2000) [pdf] by 29athrowaway on Monday April 26, 2021 @11:09AM (#26943316)
Yes, you can make money pursuing your passion. But the point is that there are a majority of people that are not interested in programming and have no passion.

Their real passion is a having a band, or hiking, traveling, etc. And programming is just a way to fund those activities.

Others feel that programming is something that unimportant people do because they feel entitled to become managers. But why would a person like to work for a person they can't learn anything from? a person that looks down on their job? Noone wants a manager like that.

Re:The Two Cultures of Mathematics (2000) [pdf] by bluetomcat on Monday April 26, 2021 @04:38AM (#26940525)
Those 3 categories fall into the broader category of "enthusiastic programmers" which aren't the majority from my experience. Most people want to leave the office knowing that they have made some progress with their assigned work, knowing that they haven't screwed anything generally and being able to sleep at night.

The thing about being "enthusiastic" is that certain cultures and organizations wouldn't at all recognise it and an otherwise enthusiastic programmer can easily become a drudge when the business requirements are just some company-specific internal rules changing all the time.

Re:The Two Cultures of Mathematics (2000) [pdf] by eru on Monday April 26, 2021 @05:18AM (#26940712)
> [...] an otherwise enthusiastic programmer can easily become a drudge when the business requirements are just some company-specific internal rules changing all the time.

It's not even that: you can take company internal rule changes and make it 'fun'. Or at least as fun as anything else.

It's perhaps more the attitude of the organization. Both the wider organization and their software making department(s).

Re:The Two Cultures of Mathematics (2000) [pdf] by ukj on Monday April 26, 2021 @08:59AM (#26942042)
The trivial way to unify all camps is to view it from the lens of expressionism/self-expression.

Mathematicians want to express equational reasoning/identities.

Computer scientists want to express computations.

Translation/bridging the gap will be a whole lot easier when both camps answered the trivial 'Why?' question which contextualises the reason for doing whatever it is that you are doing.

People without shared goals have the tendency to speak right past each other.

Re:The Two Cultures of Mathematics (2000) [pdf] by enriquto on Monday April 26, 2021 @07:11AM (#26941308)
> wrote a blog post a few years ago[1]

I thoroughly enjoyed your post at the time!

One thing that I disliked, though, was the inaccurate caricaturing of people on camp 2. For example:

> Low level languages are often better than high level languages because you can be more explicit about what the computer will do when it executes your code. (Thus you have more room to optimize).

My concern is the last parenthesis. I am squarely on camp 2, but I'm almost never concerned for optimization. I want my code to be very explicit because I want to understand clearly what it does (thus I hate C++ and other untoward abstractions). Thus clarity is the main motivation, not efficiency as you put it.

Re:The Two Cultures of Mathematics (2000) [pdf] by nicoburns on Monday April 26, 2021 @07:29AM (#26941397)
Perhaps you are a detail-oriented person? I've met quite a lot of people who - like you it seems (although perhaps you disagree) - find things that are low-level and procedural to be clearest. Such people often like languages like C and Go where this style is encouraged.

On the other hand, I tend to think in terms of abstractions. And thus find things much clearer when they are based on high level abstractions (things like map and filter, RAII, pattern matching, etc). And I like languages like Rust and TypeScript where I can express those. If I read a for-loop, I have to translate it into a more abstract higher-level function in my head to understand what it's doing anyway.

Re:The Two Cultures of Mathematics (2000) [pdf] by enriquto on Monday April 26, 2021 @07:43AM (#26941478)
i think it may be that. When I see some code like this in C++:

    y = f(x);
I'm extremely terrified to what is going on. It is like looking into an abyss. Is this code calling a function named "f" with argument "x"? If so, there may be several different functions "f" depending on the type of "x". Maybe none of them has the same type as "x", but there are some conversions that may happen and lead to that. Or maybe "f" is not even a function, but it is an object that has overloaded the parenthesis operator? And then, what happens to the result, whatever type it has. Is it calling a copy constructor (over some inheritance chain)? Is the assignment operator overloaded? If running this line results in an execution error, I'm totally lost as to where to find the problem.

On the contrary, in C, the same line says explicitly what code is executed, without need for further context. If the code compiles, there is a single visible definition of a function named "f" and this is the code that is called.

I read much more code than I write. But code with lots of abstractions, like C++ with objects or templates, however elegant was to write, is a disgusting chore to analyze, understand and eventually fix (because the abstractions always fail). On the other hand, analyzing C code is pretty straightforward, even if it was a bit more verbose to write.

Re:The Two Cultures of Mathematics (2000) [pdf] by paunstefan on Monday April 26, 2021 @01:54PM (#26945629)
It sounds more like you have a problem with C++ and some of it's features, like function overloading and its move semantics, which I agree can be confusing and they always turned me away from C++, I just prefered C because it's straightforward. But then I tried Rust and I saw that it's not the abstractions that are confusing, it's C++.
Re:The Two Cultures of Mathematics (2000) [pdf] by Karrot_Kream on Monday April 26, 2021 @05:11PM (#26948191)
> i think it may be that. When I see some code like this in C++

Indeed and I think this is the root of all the internet shouting on abstraction-heavy languages vs procedural/"simple" languages. A lot of folks that think in abstraction find it tedious and unsafe to deal with detail-oriented languages, while folks who are more detail-oriented find the abstraction disorienting and unsafe in their own way. Given that one group can't do away with another group, I hope we can all learn to work together.

Re:The Two Cultures of Mathematics (2000) [pdf] by jerf on Monday April 26, 2021 @02:21PM (#26946027)
"I got pushback here and elsewhere that lots of people fit into multiple camps - which makes sense."

People do fit into multiple camps... however, the camps definitely exist.

One of the several reasons I didn't go into academia, and one of the bigger ones overall, is that I could tell I wanted to split the difference between the "practicals" and the "mathematicians". And while this may not have been impossible, it was certainly at the very least a "high risk" move, because you end up with the support of neither camp, and there aren't enough people in the middle to make up for it.

Re:The Two Cultures of Mathematics (2000) [pdf] by throwaway17_17 on Monday April 26, 2021 @03:36AM (#26940218)
I remember reading one of threads on your post here. The level of depth that the commenters went into regarding every possible permutation and exception to the broad classification were astounding.
Re:The Two Cultures of Mathematics (2000) [pdf] by globular-toast on Monday April 26, 2021 @05:45AM (#26940834)
For me, these are three different hats that I keep on my hatstand. I like them all. The dream is to wear all three at once and get paid for it. But, in practice, I'm always wearing hat 3 when I'm getting paid and, if I'm lucky, I can put on one of the other two for a while too. However, I have worked with many people who appear to never switch hats.
Re:The Two Cultures of Mathematics (2000) [pdf] by tarsinge on Monday April 26, 2021 @04:14AM (#26940406)
Interesting. I am definitely of the third kind since I'm a kid. But with the years I've come to appreciate mathematics (maybe FP was a gateway), and machines through wanting more real world connection, learning electronics and building physical things. Totally agree with your conclusion, no matter the path, all these aspects are important.
Re:The Two Cultures of Mathematics (2000) [pdf] by pjmlp on Monday April 26, 2021 @08:01AM (#26941607)
I belong to the camp that enjoys programing in a beautiful way and has experiemented languages that are capable of achieving mechanical sympathy without having to deal with C.
Re:The Two Cultures of Mathematics (2000) [pdf] by colour on Monday April 26, 2021 @07:31AM (#26941411)
You bluntly imply that j.blow wouldn't perish from using unity, but offloading to monopolies is really just a race to the bottom.
Re:The Two Cultures of Mathematics (2000) [pdf] by quickthrower2 on Monday April 26, 2021 @04:15AM (#26940412)
I’m a multi camper as I studied maths but originally got into programming as a creative pursuit. Guess us multis are going to pipe up!
Re:The Two Cultures of Mathematics (2000) [pdf] by stared on Monday April 26, 2021 @06:31AM (#26941090)
The camp 3 is called "professional programmers". I mean:

- sometimes a practical problem benefits greatly from a well-designed high-level abstraction,

- sometimes a practical problem strictly requires low-level optimization.

And yes, it is totally fine to have one's inclination in general, pursue them to any level in their free time, or in some (but not all) academic research. Yet, if a professional software engineer consistently favours one of these motivations over adding value to the product, usually there are frictions in the workplace.

I guess you all know "let's rewrite it to Haskell" people, or ones using their favourite paradigm for everything, and against everyone. Or ones that squeeze 20% performance in a place of code that does not matter at all for the end user experience.

Re:The Two Cultures of Mathematics (2000) [pdf] by msla on Monday April 26, 2021 @08:08AM (#26941653)
Anyone getting paid to program is professional.

We need to disabuse ourselves of the notion that "professional" implies any kind of quality, or that the people who program without being paid money are doing a bad job of it, for that matter.