Hacker Newsnew | past | comments | ask | show | jobs | submit | more throwawayjava's commentslogin

> Does anybody else think functional programming is just one end of the either/or fallacy?

I think viewing this as a fallacy is a bit of a straw man. There are very few people who believe in a "Right Way (TM)" to write programs (although those people are probably over-represented in the comments section of online news posts about functional programming).

> Maybe a trap for contemplative people?

FP is hardly unique in this regard. Were you around in the 1990s? Recall that the OOP crowd got pretty philosophical there for a while, with elaborate treatises on software organized around some obscure book about architecture. ;-)

> The ultimate goal of software is to build something useful.

It's worth noting that the ultimate goal of functional programming (as a research field) goes beyond building software; (typed) lambda calculi are an entire alternative model for studying computation. The science of computation has many applications beyond software development.


I think you're right that if FP is a trap at one end of the fallacy, pure OOP exists at the other.

Interesting point about software having uses outside of programming a machine to do tasks. I can see an appeal there.


> I think you're right that if FP is a trap at one end of the fallacy, pure OOP exists at the other.

I disagree; what spectrum are those on opposite ends of? Encapsulation, polymorphism, and inheritance are entirely compatible with FP, and immutability is entirely compatible with OOP. Functions and objects are equivalent. Most mainstream OO culture is centred around procedural programming, but it's the procedural parts that oppose a functional style, not the OO parts.


> I disagree; what spectrum are those on opposite ends of?

I also am not entirely sold on funfunfun's characterization, but if you think of this in terms of cultural hangups that cause excesses rather than concrete technical contributions then it makes some sense.

The excesses of OOP culture are distinctly different from the excesses of Functional culture.

OOP in excess looks like software architecture books with quotes from Alexander and FLW, programming as artform, etc.

Functional in excess looks like really bad descriptions of category theory promulgated by writers who couldn't tell you what group theory is good for.

So if we want to characterize these ways of programming in terms of what harmful excess looks like, then they are on sort of opposite sides of a spectrum. Where one side considers programming pure art and the other pure logic.

I'm still not sold that this is a good model of reality. But if you focus on excesses rather than useful insights, I can see what funfunfun is saying. I think.


> [0] http://evonomics.com/why-garbage-men-should-earn-more-than-b....

This article compares "teachers, police officers, nurses, farmers" to "lawyers and bankers", claiming that the latter make much more money than the former.

In general, that's not actually true.

* Nurses make good money. E.g., NPs and PAs make six figures even in smaller cities with low CoLs. It's not hedge fund money, but then, 90% of people who work in banking don't make hedge-fund money either. Also, 90k in a small city is pretty comparable to 200k in Manhattan.

* Comparing teachers and police officers to hedge fund guys is weird. A couple of more apt comparisons:

- At the lower end of the salary scale: Teacher/police officer vs bank teller. The teacher/police officer make more.

- At the higher end of the salary scale: Education or law enforcement consultant/vendor/leader vs. hedge fund guy.

* Farming is also extremely lucrative -- the owner of a large farm can easily make out much better than the owner of a community bank. And the largest farming companies are just as powerful and profitable as the largest banks.

Even the title of the article -- why garbagemen should make more than bankers -- succumbs to this fallacy. Most bank workers are tellers and other low-level employees who ARE making a bit less (or not much more) than garbagemen!


> This article compares "teachers, police officers, nurses, farmers" to "lawyers and bankers", claiming that the latter make much more money than the former.

> In general, that's not actually true.

Please do cursory searches for data to backup what you imagine to be true.

> Nurses make good money.

On average, no. There's the eventual objection about what "compensation" means versus "salary", but moving the bar introduces a number of other variables. Keep it simple, as per the article. Feel free to goole nursing salary - not counting the issue of registered nurses acting as sergeants for teams of nursing assistants who perform the vast majority of the care, they are arguably underpaid (and assistants are shamefully underpaid). This disturbing feudal system is mirrored across multiple industries.

> Comparing teachers and police officers to hedge fund guys is weird

Weird is a strange way of saying "accurate".

> Education or law enforcement consultant/vendor/leader

Whatever that means. Making some other unclear comparison serves what purpose? Law enforcement entry pay is less/parity with a teacher, but is less than a federal worker at the post office in salary and definitely in other benefits.

> the largest farming companies are just as powerful and profitable as the largest banks.

Google 'largest banks', and assume annual profit to be about 10-20% of their assets. Over 94% of farms in the US are family owned, so I don't know what you think you mean by farming companies. I don't need to guess, I know that there isn't a single farming-related company one that comes close to the banks in terms of profits, assets, or valuation.

The world isn't in the state you believe it is.


Here's the review of Registered Nurse from US News Best Jobs. Salary infor is based on BLS data.

https://money.usnews.com/careers/best-jobs/registered-nurse

The median salary for a nurse, nationally, is $68,450, which isn't high. The median salary (again nationally) for a software developer is $100,080.

If you drill down to best paying cities, though Registered Nurse is a well paid job. In San Francisco, for instance, the median salary for a Registered Nurse is $136,610.

https://money.usnews.com/careers/best-jobs/registered-nurse/...

According to BLS stats, that's actually higher than the median salary for software developers in San Jose (the highest paying place, at $133,010) and certainly higher than San Francisco ($122,420).

There's a lot to dig into here, in terms of data, so I don't want to come off as claiming that the stats above are conclusive.

First, nursing is a tough job, and deserves to be paid well, If it is, that's great, and if it isn't, that's a problem. I also don't have any problem whatsoever with registered nurses getting paid more than software developers.

I actually think software developer is often a more stressful, dreary, and dis-spiriting job than many people here on HN believe. I work for a university, and I definitely have cold sweat moments when I worry about lost data, broken processes, and security breaches. And a lot of what I do is wading through legacy code with a fine toothed comb. I believe a lot of dev work is like this.

Another factor is that nursing requires a specific set of coursework and a specific set of credentials. In software development, we have no such requirement - you can read a book on "PHP & MySql" (or don't read it) and call yourself a software developer. Then again, actually majoring in CS (or a related field) at a reputable university is challenging, and passing the coding interview at a place like google is also challenging (challenging for me, I failed to get through, some people here on HN will say it was trivially easy for them).

Is the job more flexible? As a developer, I can go off and grab a cup of coffee more or less whenever I want, but shifting my schedule to part time, or working three very long schedules, or leaving the field for a while and coming back where I left off - all things that I discovered would be more useful than "coffee flexibility" when I acquired a mortgage and school aged kids and a spouse who also has a full time job, honestly, I don't think that software developer offers as much.

Burnout may be common. Age discrimination? (or what I like to call "Age related employment issues, since I don't think it has to be discrimination per se that makes it tougher to be a developer as you get older)?

Pay? I don't know if the BLS data includes highly variable pay such as stock options. I think it's based on tax returns, so it does include some variable pay, but may not capture it all.

There are just so many factors, it's hard to draw very strong conclusions.

I am comfortable, however, saying that the data does not clearly support the notion that in the Bay Area, registered nurses are underpaid. I'd say the data moderately supports the contention that registered nurses are well paid (again, in the bay area and a few other high cost areas).


It's also worth noting that "median salaries in software engineering" samples heavily from places with higher CoL, whereas healthcare numbers tend to be more representative of the national picture (because not everyone can fly to SF for healthcare, but software jobs are more concentrated in a few expensive places).

Concretely, average SE salaries in flyover states are pretty comparable to average RN salaries in flyover states.


I agree, that's a very good point. If one profession's median salary is higher, but employment is overwhelmingly concentrated in a high cost area, then it's possible that the profession with the lower median salary on a national basis has higher median pay on a cost of living adjusted basis.

I doubt it goes quite this far for software development and nursing, but it may be a factor.


> Please do cursory searches for data to backup what you imagine to be true.

This is pretty off-putting, especially given a few glaring factual errors in your own post.

>> Nurses make good money.

> On average, no.

NP average annual salary: 95,523 USD

PA average annual salary: 98,180 USD

RN average annual salary: 67,490 USD

IDK what "good money" means, but ALL of these are paid much better than average for their respective levels of education. And certainly, beat out e.g. what a fresh BA/BS would make at a place like Edward Jones or Bank of America. Hell, my first SE job offers were lower than the RN average, and I certainly felt like that was "good money"!

>> Comparing teachers and police officers to hedge fund guys is weird

> Weird is a strange way of saying "accurate".

Again, offputting.

Quants at hedge funds often have Ph.D.s in hard sciences from top universities. Comparing across vastly different pedigrees is no representative.

Why not compare apples to apples?

>> Education or law enforcement consultant/vendor/leader

> Whatever that means.

Yes again, offputting.

What I meant is this.

Leader: Superintendents rarely make less than $150,000 and make up to $N00,000 which, especially with CoL adjustments, is often better pay than the 200,000+ salary ranges typical for quants at hedge funds.

Vendor: And those are just the public sector jobs. A LOT of money is made in selling education products. Do you really think the CEO of Pearson is living in the poor house?

Just like literal bankers (people who sit in banks) are a very small fragment of what we think of as "banking", literal teachers are a very small fragment of people employed in education and literal police officers are a very small fragment of people employed in law enforcement.

> Google 'largest banks', and assume annual profit to be about 10-20% of their assets. Over 94% of farms in the US are family owned, so I don't know what you think you mean by farming companies. I don't need to guess, I know that there isn't a single farming-related company one that comes close to the banks in terms of profits, assets, or valuation.

This is super offputting because you're taking on an extremely condescending tone and haven't even bothered to do the research yourself.

Cargill, for example, is family owned and pulls in 114.7 _B_illion in revenue. (For reference, BoA, America's largest bank, pulls down 87.352 Billion in revenue.)

"Family owned" doesn't mean what you think it means in American farming. Many "family owned" argi businesses (including actual farms) are really freaking huge operations.

> This disturbing feudal system is mirrored across multiple industries.

Wait. This is literally exactly the point I was trying to make in my original comment. The feudal system also exists in banking and in lawyerings, and the top rung of the education hierarchy is doing extremely well while the lowest rung of banking or lawyering is barely scraping by. Maybe if you'd engaged politely with me instead of getting pissed off...


> This is pretty off-putting, especially given a few glaring factual errors in your own post.

Ironic, given you started with none. I standby the response, as appropriate commentary.

> IDK what "good money" means,

I don't know either, but that's irrelevant to the topical subject of comparison (not equivocating over 10% here or there in difference).

> Again, offputting.

That is often the case, when you are demonstrably wrong and have to deal with the realization.

> This is super offputting because you're taking on an extremely condescending tone and haven't even bothered to do the research yourself.

The income of Cargill offset by costs is not 114 billion. That's just gross. It has a fraction of that income as opposed to the incomparable bank nets.

> Wait. This is literally exactly the point I was trying to make in my original comment.

You failed and started with talking about how blue collar workers are fine and comparisons to white collar management is unfair, which is frustratingly disingenuous. Good luck with whatever.


> Ironic, given you started with none.

You said nurses don't make good money. I think 100k is good money. Better money than most people in the banking and legal industries make, that's for sure.

> The income of Cargill offset by costs is not 114 billion. That's just gross. It has a fraction of that income as opposed to the incomparable bank nets.

Cargill has higher revenues than the largest bank in America.

Cargill has larger assets than most US banks.

Cargill had higher profits last year/quarter than most US banks, even big household names.

You "guessed" that wasn't the case. You were wrong.

>> Wait. This is literally exactly the point I was trying to make in my original comment.

> You failed and started with talking about how blue collar workers are fine and comparisons to white collar management is unfair, which is frustratingly disingenuous. Good luck with whatever.

The word management wasn't even mentioned once in my original post. I mentioned banking and law.

What I was pointing out was that low-paying jobs exist in every industry, and there are plenty of people in nominally low-paying industries who do very well (e.g., nurses RN and up) as well as many people in nominally high-paying industries who do not (e.g., bank tellers, low-level financial advisors, accountants).

(BTW, you should consider re-reading the end of the article that we're discussing. The conclusion to that article is quite literally that the exemplar discussed by the article -- NYC garbagemen -- are doing fine. So fine that people who get the job feel like they won the lottery.)


> why shouldn't they be forced to take on some of their own upkeep?

Because taking away someone's freedoms is a serious thing. There should be a high economic cost to society for imprisoning people; it serves as a structural disincentive to over-use of prison.

Perhaps the morality of over-using prison should serve as a sufficient deterrent for society, but the facts demonstrate that this is not the case.

America's very serious incarceration problem needs economic disincentives because the status quo proves that this country is apparently not sufficiently motivated by morality.

And even if you don't accept this argument, it still does not follow that we should under-pay prisoners. We should at the very least pay prisoners market rates and then charge them for the true cost of their incarceration. E.g.,

National average salary for firefighters: $49,330 PLUS (good) health benefits.

National average total cost of incarceration: $31,000 INCLUDING (terrible) health care. And keep in mind that a well-behaved prisoner in a low or medium security facility -- likely the case for those allowed on firefighting crews -- will cost substantially less than the amortized per-prisoner cost.

So even if inmates should "earn their keep", the state is still pocketing on the order of 5 figures per year. Worse still, IMO that money would go a lot further preventing recidivism than any amount of rehabilitation or work ethic.


It's a real shame you are being down-voted.

Before forming an opinion on the role that "Rehabilitation" should play in parole hearings, HN readers should talk with (or at least read about) someone who has been through that process. Even when the intent is sincere, the implementation in American prisons can be downright draconian. "Rehabilitation" means learning what you are supposed to say/do and saying/doing it in a convincing way. Including, e.g., believing in God [1].

Rehabilitation makes sense in the abstract, but its implementation often boils down to "learn how to lie convincingly about your true beliefs", sometimes even about beliefs that are explicitly enshrined in our constitution. Which is pretty much the opposite of what we should be going for.

Now consider the case where the intent is not sincere; e.g., the case of a prison chaplain or guard who was rubbed the wrong way by a particular prisoner's personality. Rehabilitation is effusive and basically boils down to "anyone have anything negative to share with the parole board?"

And all of this without considering civil disobedience. E.g., should MLK Jr. have stayed in jail until he publicly denounced his own Letter from a Birmingham Jail?

Must drug offenders publicly profess their undying allegiance to status quo drug scheduling laws before earning their freedom?

IMO we should always allow for the possibility that criminality and morality are not intrinsically linked. And the modern practice of considering rehabilitation in parole hearings too often runs counter to tht belief.

--

[1] http://www.kcur.org/post/court-says-atheist-inmate-s-religio...


I don't think most people here arguing for a more rehabilitation-based prison system think it works perfectly or even good in the US. But on the other hand the US prison system has more inmates per capita than any other, so clearly something in either the legal system or the prison system has gone wrong.

Reform is needed, and IMO more punishment and less opportunity after exit will probably not help.


Advocating for shorter prison sentences is not the same thing as wanting to change the philosophical underpinning of the justice system to rehabilitation instead of retribution. I think a lot of people are confusing the two.

I do think some of the sentencing in the US is too high. But also that people deserve punishment for their crimes.


> Nobody should be in prison longer than their rehabilitation takes and the focus of their stay should 100% be rehabilitation.

1. "Rehabilitation" -- the actual implementation, not the abstract idea -- is insidious. How can anyone ever know for sure whether someone is truly rehabilitated? Especially given that prisons don't typically attract that best and brightest of the medical profession.

If you've ever talked to someone who spent time in prison, you'll realize that "rehabilitation" in US prisons mostly means "parrot what they tell you to say and don't be stupid enough to seriously engage. Just. Repeat. Your. Lines."

E.g., claiming you have no spiritual belief can result in denied parole [1]. Too often, "rehabilitation" is just short-hand for "brainwashing". In those cases, bodily punishment without the pretense of "rehabilitation" is actually a far kinder and just system.

Far from truly fixing the underlying problem, modern rehabilitation often amounts to an exercise in honing one's inner psychopath: lie without remorse or guilt, and lie well enough that you don't get caught, or be denied parole on the basis of your lack of religious faith.

2. What do we do with people who cannot be rehabilitated, but whose crimes do not justify a lifetime prison sentence?

3. what do we do about criminals who are very unlikely to re-offend but are not rehabilitated? I.e., what is the purpose of rehabilitation? A common answer is "limiting future damage to society". But this justification fails to explain why we should jail a bank robber who managed to hide $1 billion on a remote island and who we honestly believe will be happy living off of that $1 billion on some remote island in peace for the rest of his life.

4. What about people who commit heinous crimes but are easy to rehabilitate (e.g., due to a treatable mental illness)? How do we deal with vindictive families of victims who might want to take justice into their own hands?

Prison sentences serve many purposes: rehabilitation, protection of society, punishment, and a disincentive for criminal activity.

Rehabilitation is certainly the most in-line with enlightenment values (but can become draconian in the case where the crime is relatively small but rehabilitation proves impossible, or in the case where rehabilitation means "learn how to lie about your inner self").

And I will certainly agree that the US prison system does not come even remotely close to striking a good balance between these multiple purposes. But the other roles are also important, and "rehabilitation" isn't always all it's cracked up to be.

[1] http://www.kcur.org/post/court-says-atheist-inmate-s-religio...


> but China has recently taken up a very potent type of hybrid economic development, where free-market startup-culture is encouraged, but guided and pruned by the government.

I don't think the USA gets enough credit for inventing this hybrid economic development system. Good examples include:

* Military computing -> Intel, IBM, etc. -> Moore's law

* DARPA cash -> early networking/PC projects at universities -> hacker/hobbyist culture -> Microsoft and Apple

* Gov't really emphasized "finding information" in CS the 1990's -> NSF grants at Stanford -> Google.

* The Human Genome Project -> Illumina, Solexa, etc. -> Moore's law-shaped cost curve for sequencing

And less R&D heavy examples like the national railways and the interstate highway system.

This pattern continues today. Self-driving cars started as several decades of NSF-funded research projects that turned into a DARPA-funded competition a decade-ish ago that turned into an industry-funded goal rush today.


Google and Apple and Microsoft and Facebook and Amazon are each American companies who do business in Europe. I, as European, get very little out of that though because they dodge taxes.


> But for other consensuses, for example evolution, any individual person can readily explain how it works to a anyone else.

The greenhouse gas hypothesis is readily explainable to elementary school children. Explaining the actual mechanisms is, obviously, far more complicated.

But the same is true for evolution. Origin of the Species pre-dated the discovery of DNA by nearly 100 years. Even a not particularly bright Biology undergraduate has a better understanding of evolution than a hypothetical re-animated Darwin.

A thorough explanation of our best knowledge about evolution requires a graduate-level course in genetics (and a few other things). A thorough explanation of our best knowledge about climate science requires a graduate-level course in mathematical modeling (and a few other things).

> It sounds like no one responding to me actually understands how climate models work. How do they work?

I've actually implemented toy versions of some of these models so that I could have a better understanding of the relationship between computer models and raw data. I have a graduate-level understanding of ODEs, PDEs, and numerical analysis, but was still in pretty far over my head.

My take-away form that experience: unless you have the time to devote to getting (the equivalent of) a PhD in climate science, you likely don't understand these models well enough to comment on them.

So I actually do think it's just objectively true that:

> Only specialists are qualified to even enter the debate.

Which, as you note, is a serious problem. But the way I see it, each citizen has three options:

1. Get a Ph.D. in climate science.

2. Superficially engage with climate science.

3a. Trust that people who spend a lot of time studying these probably have well-informed opinions (an appeal to an appropriate authority).

3b. Trust some other authority (e.g., the PR experts working for conservative senators and fossil fuel companies, who are admittedly better communicators).

Obviously, option 1 is ideal.

Option 2 isn't necessarily better than Option 3a. How do you know what you don't know? How do you know when you come to a terrible conclusion based upon a misinterpretation of data?

Let's take me as an example. When experimenting with these models, I'd often find surprising results. But then I'd ask a climate science friend only to find that I had made some subtle but in fact ridiculous mistake. And they'd be able to explain to me what that mistake was, because I have lots of experience with ODEs/PDEs and enough experience reading scientific literature that I could read the papers/datasets that used to justify their assertion that I had chosen an unrealistic value for some parameter or another. And enough experience with statistical modeling that I could apply some common "validation" tricks and notice that I could reproduce some of the critiques of my mistakes.

How do you do that if you don't have a Ph.D.-level understanding of dynamical systems, plenty of programming experience, AND a climate science Ph.D. friend? Not to mention no family and plenty of free time...

That leaves Options 3 -- both appeals to authority. However, not all appeals to authority are equally fallacious. Listening to a quack pot cult leader and listening to a trained nurse are both appeals to authority; however, only a fool would believe these are equally inadvisable.

If you don't have the time to seriously engage with modern science, is trusting your own judgment really more advisable than listening to experts? I don't think the answer is quite as clear cut as you make it out to be. When I see arguments like yours, that Emerson quote always comes to mind: "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines."

I.e., just because you avoided a "logical fallacy" doesn't mean that your mode of reasoning is more likely to result in Truth. See also: the millions of "proofs" that Sqrt[2] is rational. On this question, the person who listens to the blind authority of the mathematician has a strictly better route to truth than the person who believes their own mistaken reasoning despite (or, more typically, to spite) expert testimony.

I submit the same is even more likely to be true for more complicated issues, such as climate science or evolution.


> There won't be a war, by the way. I honestly think we're past the point as a species where superpowers duke it out in such a literal fashion.

Although I agree with you, it's worth noting that this sentiment is not a new one. There were plenty of people who believed that WWI marked the end of war, at least in Europe.

Even after WWII, Pax Americana (in Western Europe) was not an inevitability. Today's relative stability in that part of the world was the result of enormous investments in intentional policy. As well as a fair bit of luck.

> Military might today is usually directed from superpowers to third-world countries, but that's a topic for another day

This sentence is a bit of a tautology [1]. But in any case, it's worth remembering that those incursions always find their way back home. Consider the most recent wars. The European migrant crisis has its roots in the most recent wars in Iraq and Afghanistan. Furthermore, the USA will eventually feel the economic impact of those two wars. The fact that [2] could happen while the USA ran up enormous deficits (completely unrelated to that growth) is deeply worrying; what will happen in even a slightly less dynamic domestic economy?

> China's influence and dominance will happen through the private sector, ironically.

This view of the world also has a time-honored tradition. Thomas Jefferson was an early proponent of the view that national power flows from economic might rather than hard power. It's worth noting that the policies he actually implemented while in office diverged substantially from his ideological beliefs.

I agree with you about what the future of conflict between the US and China will most likely look like. I think most people do. The question is how you hedge that bet: is the alternative military&economic peace (because military conflict is unimaginable)? Or, is the alternative military conflict on top of the existing economic conflict?

I think the latter is more likely.

--

[1] https://en.wikipedia.org/wiki/Third_World

[2] http://ritholtz.com/wp-content/uploads/2016/09/virtually-768...


Maybe. Part of my concern is that America's superiority complex will prevent those at the top from doing anything about it; just continuing to push ahead as normal with the presumption that we'll win.

However, I have some friends who work in the government, and conversations with them have given me a small source of hope: the government may feel like it mostly consists of the clowns we see in the news every day, but the reality is that it's made up of a massive collection of American citizens, many of whom are extremely competent at their jobs and whose priorities are simply to keep things working well for everyone. They do incredibly thorough planning for contingencies that allow us to do things like weather natural disasters (that's the department one of my friends works in), etc. So much complexity and knowhow and effort goes into simply keeping this whole thing moving at all, and part of me hopes that there are people somewhere in there who are are thinking through all this stuff, who know what they're doing, and who have a plan.


Highest federal tax rate by year, 1918 - 2017: https://bradfordtaxinstitute.com/LibRepository/235f37bd-612d...

The bulk of the interstate highway system was built between 1960 and 1980.


And tax deductions were much higher then than now. Nobody actually paid those rates.

The percentage of GDP collected as income taxes is about the same then as it is now. In fact, the top 1% paid less of the total taxes during the New Deal than now.[1]

[1]http://www.slate.com/blogs/moneybox/2017/08/07/the_history_o...


All-to-real scenario: you pay $X in gas taxes and use Road XYZ every day. Unfortunately, Road XYZ is constantly jammed and full of pot holes because all the gas tax cash is funding an extremely under-used fancy new highway connecting Nowheresville, USA to SlightlyLessNowheresville, USA. Why? Because the general assemblymen from Nowheresville and SlightlyLessNowheresville are senior members of the transportation committee.

> I always wondered why public roads would opt for awful toll plaza back-ups over increasing the gas tax.

Open-road tolling with a combination of transceivers and a "pay online later" solves this problem. Toll plazas (and the people who work them) are entirely unnecessary.


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

Search: