News for hackers. Stuff that matters.
Re:The Functional Programming Hiring Problem by kccqzy on Sunday June 09, 2024 @06:39PM (#40628205)
This is just a hiring problem, not related to functional programming. I agree with the basic premise of the article however: depending on the financial condition of the company, hiring people who are overly attached to or obsessed with a single technology probably isn't a good idea. But that's of course not exclusive to functional programming. Right now you will find plenty of people obsessed with Rust (not a functional language) who don't care about the business goals and only want to write Rust. A few years ago it was Go. Before that it was Node.js. A few more years ago it was Ruby on Rails.
Re:The Functional Programming Hiring Problem by bri3d on Sunday June 09, 2024 @06:47PM (#40628250)
This - I’ve had this same experience in both the FP, middle ground (Kotlin, Scala, etc.) and Rust space. It’s not FP, it’s that some engineers are interested in business goals and others are interested in conceptual goals. Those who are interested in conceptual goals gravitate towards conceptually interesting paradigms. Those who are interested in business goals gravitate towards business goals. It’s not mutually exclusive; I’ve met Scala and Rust obsessed engineers who also deliver; and Java engineers who can’t see past the next AbstractProxyFactory. But if I were forced to stereotype, new paradigms come with people who are more interested in the concepts than the goal (yes, I know FP isn’t new, blah blah, professionally speaking…)
Re:The Functional Programming Hiring Problem by jt2190 on Sunday June 09, 2024 @07:00PM (#40628325)
While there’s some truth to “there are programmers obsessed with every language”, functional programming encourages a higher level of correctness, and this can lead to over-analysis and premature optimization if one is not careful. Yes, the additional correctness can be a real benefit, but only if the correctness is correct, and that really depends on the business. If the business comes back every week with “you know, actually we want…” you didn’t get a lot of benefits from the extra analysis.

Couple that with other challenges of running a niche stack in production and it can be quite a burden. Experienced, pragmatic developers will have techniques for managing this even in a functional language, but again, pragmatic may require compromise that doesn’t sit well with the purist.

Re:The Functional Programming Hiring Problem by snapdaddy on Sunday June 09, 2024 @07:56PM (#40628634)
I acknowledge that there are passionate users of most programming languages, but I also 100% agree that the FP crowd are something different. I feel like most other languages have some nuance at least; if you're writing transpilers or kernel modules then hell yes, Rust makes sense. If, however, you are trying to churn out a web-based store-front, maybe don't look towards Rust.

But with FP, it seems like it is always the answer. And it's even better if your Operating System can be immutable too. And your build scripts. And, even if it take 10 times as long to write, at least we will be confident that it's type safe at the end.

Re:The Functional Programming Hiring Problem by dboreham on Sunday June 09, 2024 @06:43PM (#40628228)
For the casual reader: Rust is one of the most functional of the not-totally-functional languages.
Re:The Functional Programming Hiring Problem by CrimsonCape on Sunday June 09, 2024 @07:08PM (#40628372)
For the casual reader, if you think Rust is a casual way to play with functional programming, you will encounter the lifetimes booby trap.

It's almost always better to 'play' in a language that abstracts everything away except for the problem domain. Not like Rust, which introduces multiple complex language domains to learn before you can play wih your target domain.

Re:The Functional Programming Hiring Problem by lmm on Sunday June 09, 2024 @06:45PM (#40628236)
Not sure if this was a deliberate bait to demonstrate the problem, but Rust is a functional language in the modern sense (it has most of ML's features).
Re:The Functional Programming Hiring Problem by jballanc on Sunday June 09, 2024 @08:57PM (#40629003)
This is why one of my favorite series of questions to pull out during an interview are:

What is your favorite programming language/library/technology?

What do you hate about it?

Anyone that jumps to answer the first but struggles to answer the second is likely not someone you want to hire.

Re:The Functional Programming Hiring Problem by iLemming on Sunday June 09, 2024 @10:04PM (#40629439)
This is the very first thing I do when picking up a new tech - language, framework, library, tool. After initial familiarization with the basics - Wikipedia/Readme-Intro, I would google "Why does X sucks", and try to avoid becoming overly enamored with it too quickly, and strive to maintain a level-headed perspective.
Re:The Functional Programming Hiring Problem by BeetleB on Sunday June 09, 2024 @09:28PM (#40629222)
Ok. For anyone struggling with the second, the answers should be:

Lack of libraries.

Lack of good tools.

Re:The Functional Programming Hiring Problem by Const-me on Monday June 10, 2024 @03:28AM (#40631099)
My favourite languages are C# and C++, and sometimes I interview developers to work with them. Saying these languages are lacking libraries or good tools is unreasonable.
Re:The Functional Programming Hiring Problem by BeetleB on Monday June 10, 2024 @04:55PM (#40638961)
True, but it's trivial to come up with things to dislike in C++ :-)
Re:The Functional Programming Hiring Problem by Const-me on Monday June 10, 2024 @06:09PM (#40639781)
Great point on C++, but it’s harder for C#. The language and ecosystem are IMO pretty good.

I only hate that Microsoft stopped shipping modern .NET runtime with Windows. A few annoying things though, like the recent push towards AOT compilation (IMO strictly worse that JIT), and the lack of a good first-party cross platform GUI frameworks (for example Microsoft could compile d2d1.dll with DXVK, reimplement dwrite.dll API on top of FreeType / HarfBuzz, and copy-paste UWP).

Re:The Functional Programming Hiring Problem by CrimsonCape on Thursday June 13, 2024 @03:38PM (#40673683)
What I dislike about C# is how much effort is needed to get a minimal environment. Rust and Python make simple code compilation quick and easy.

Let's assume I want to use a C# script .csx file. The CSX filetype seems to be Microsoft's flavor of attempting to "make it simple". I write a hello world. Now what do I do with the .csx?

I have no idea how to compile that with modern dot net.

It appears csi.exe would have been the answer, but now Roslyn seems to be the current best practice. No idea what to do though

Re:The Functional Programming Hiring Problem by neonsunset on Thursday June 13, 2024 @03:55PM (#40673929)
I'm not sure where you are coming from in terms of difficulty of setting it up, it's just

    - sudo apt install dotnet-sdk-8.0 / brew install dotnet-sdk
    - dotnet new console -o {folder} --aot
    - dotnet run -c Release
    - optionally dotnet publish -o .
If you want to use it as a scripting language, you do `dotnet tool install -g dotnet-script` and use it normally[0]. Keep in mind that C# is not designed for this, but it will work (at the cost of first uncached script launch costing extra - it is a compiled language after all, but that's a niche scenario anyway).

[0]: https://github.com/dotnet-script/dotnet-script?tab=readme-ov...

Re:The Functional Programming Hiring Problem by CrimsonCape on Thursday June 13, 2024 @04:44PM (#40674508)
Thanks, I will look into the github repo. Although I think it's a bit confusing, since the steps you describe above lead to a requirement for the .net 8 runtime which leads to the following licensing information. It's not clear how to proceed with C# development as an open source language. I thought maybe it could be done by cloning Roslyn (MIT license) from github.

Do I need to accept the below licenses to develop a C# app? I'm not asking you specifically, just that I don't care to try and understand if I can even use the language without accepting any of the below, (anything not MIT or Apache)

License information for .NET on Windows

The Windows distribution of .NET contains files that are provided under multiple licenses. This information is provided to help you understand the license terms that apply to your use. By using any or all of these files you agree to their associated license terms.

The following binaries are licensed with the Windows SDK License:

api-ms-. (used by .NET runtime, .NET 6 and earlier) ucrtbase.dll (used by .NET runtime, .NET 6 and earlier) D3DCompiler_47_cor3.dll (used by WPF)

The following binaries are licensed with the .NET Library License

Microsoft.DiaSymReader.Native.{x86|amd64|arm|arm64}.dll (used by .NET runtime and SDK) PresentationNative_cor3.dll (used by WPF) wpfgfx_cor3.dll (used by WPF) The following binaries are licensed with the Microsoft Visual C++ Runtime Software License:

vcruntime140_cor3.dll (used by WPF)

All other binaries and files are licensed with the MIT license

This document is provided for informative purposes only, and is not itself a license.

Re:The Functional Programming Hiring Problem by neonsunset on Thursday June 13, 2024 @05:03PM (#40674757)
I'm still as confused. Where do people even find those? Are you sure you are not intentionally misinterpreting information? Because it does seem so.

In any case: https://github.com/dotnet/dotnet/blob/main/LICENSE.TXT

Re:The Functional Programming Hiring Problem by CrimsonCape on Thursday June 13, 2024 @06:08PM (#40675379)
I followed your instructions, ran dotnet build, and attempted to run the debug build .exe.

I got a message "You must install .NET to run this application."

So I followed the link[0] given as part of the CLI output which led to the .Net Runtime installer. Inside the installer it stated "By clicking install, you must agree to the following terms" and a link[1] was part of the terms I must agree to.

[0]https://aka.ms/dotnet-core-applaunch?missing_runtime=true&ar...

[1]https://github.com/dotnet/core/blob/main/license-information...

I would prefer not to accept non-MIT terms...

Re:The Functional Programming Hiring Problem by neonsunset on Thursday June 13, 2024 @06:25PM (#40675532)
If text comprehension presents a significant challenge, you may want to consider other avenue of activity, over programming.

To those who are reading the thread, you are welcome to verify other claims made by the account I am responding to, which were proven by other participants false. This is a cheap trolling attempt and I think my response is the more polite way to share disappointment over this fact.

Re:The Functional Programming Hiring Problem by CrimsonCape on Friday June 14, 2024 @02:37PM (#40683609)
No need for personal attacks. I still stand by my opinion. Without a project template, you would be in the dark to set up a project. .sln files and .proj files are arcane and I might be dumb for not being able to create these by hand but I think most people would agree it is arcane hidden XML and a pain.

I need to reorganize the generated project template because it's not actually up to common standards of what a project directory should look like. As a newbie I would never know that I need to find David Fowler's gist[0] to have a project that makes sense.

Good luck trying to change the default .bin folder without aid from a third party's script or Visual Studio.

It's not obvious how to create a project settings JSON file. There are entire paid video workshops for this task alone. This kind of code should be pre-generated in the template.

This is all stuff that should be handled before a user even touches the environment.

[0]https://gist.github.com/davidfowl/ed7564297c61fe9ab814

Re:The Functional Programming Hiring Problem by neonsunset on Friday June 14, 2024 @04:55PM (#40685028)
It seems you're interested in proving your world view rather than finding (easily available) solutions to your problems (the whole argument was pure hypocrisy - you're asking about native dependencies that ship with OS, that isn't MIT, instead of using e.g. Linux, if that's what you care about). You did not even follow the initial easy steps to set up a project or did not look up basic CLI commands like dotnet new or dotnet sln to easily manage whatever you're working with (it's easier than Go and similar to Rust's cargo).

I have never seen a programmer struggle this much, failing to follow basic list of steps and ending up at the strange links from google, so my point in the previous reply continues to be relevant. Hell, an acquaintance of mine managed to get NativeAOT compilation working on the second try despite exotic NixOS setup and having zero experience with .NET beforehand.

And mind you, my first job was first level of customer support, so there were a fair share of users that misread the messages, and this case is like one of those bad ones. And, you know, the users who have a problem usually at least make an attempt to understand, as they are invested in solving it. But because you are invested in the opposite, no amount of explanation will help.

Note to readers: do not follow the structure at the link, it's outdated and refers to personal template preferred by David Fowler, you don't need all of that and it was also created during the days of .NET Core 1.

There are two main "project manifest"-like files that .NET uses: .csproj (or .fsproj and similar) to declare projects, and .sln to group multiple projects together. Those are managed with `dotnet new {templateName}` and `dotnet new sln` then `dotnet sln add/remove {path/to/project}`. Everything else is optional.