Don't try FP in industry!

I'd like to tell a story. I'm an engineer working in the embedded world on compilers and simulators. Bored by the conservative approach to technology that I saw in companies, I started to learn Haskell/OCaml few years ago. It has been a valuable experience, especially for types.

Then, I tried to build a small product. I selected OCaml for practical reasons. I wrote a part of a binary translator. The reuse is great, and the code is amazingly short..

I then explained what I had done to my team. But during a discussion with my boss, I was told that "exotic languages are very similar to exotic holiday locations. You pay a premium to go there, but the only thing that is sure is that you will come back. Quite often, the only tangible trace of your stay is what you let in the hotel bin: an empty bottle of water and some papers. Please rewrite your stuff in C."

My conclusion is -- (1) I won't ever go on holiday with my boss and (2) I'm on the job market :)

Anybody who had a better experience?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It Isn't Always Like That

IIRC there was a presentation on the use of ML in embedded systems at this year's CUFP. I think it was the talk by Lal George. You'll find other success stories in the archives of CUFP and in experience reports at ICFP.

Not restricted to FP

Having had very bad experiences with Perl (newbies creating horrible code, Perl's "guru" using their own lingo making their code unmaintainable) , I suggested once going to Ruby, this was rejected as "more people knows Perl than Ruby, so use Perl".

But each time I have to use Perl, I'm always disgusted by how poor this language is, even though I make sure to create code that a beginner could understand..
At a glance, it takes me twice the time to write Perl than it would in a sane programming language (Ruby, Python)..

Strategic forgiveness requests

It sounds as though you attempted to apply the advice often attributed to Grace Hopper, "It's easier to ask forgiveness than it is to get permission". But it helps to have some sense of how your management is likely to perceive your solution ahead of time — blindsiding them with something totally unexpected and unfamiliar is unlikely to have a high success rate. "FP" is not the issue here.

It helps to think about it from your boss's perspective: he probably doesn't know anything about OCaml; he wonders how he'll manage to find and interview a replacement if you leave; he's concerned about how you'll fit in with the rest of your team if you start using a different language; whether your systems will integrate with existing tools and processes; and on and on.

For any hope of succeeding with an unusual technology choice under those circumstances, you need to neutralize the objections, or at least have laid some groundwork for that, before providing the solution. To do that, you first need to know what the specific objections are, so you need to have discussed it with your boss in some form.

This kind of thing is why good salespeople get paid so well: overcoming people's objections isn't always easy to do, and for something as "radical" as replacing C, it may not be possible, depending on the organization and circumstances.

One way to do it is to look for niche applications where the advantages of a quick and clean solution outweigh the risks. Prototyping is one promising area: a good FP prototype can be like an executable specification, and can often be developed very quickly. And there's always a possibility that management will be amenable to turning the prototype into the live system once they've had time to develop a comfort factor with the technology.

That said, you also have to remember that a big factor driving conservatism about language choice is what management are already familiar with. If you're dealing with a technical manager who spent a career programming in C before becoming a manager, that knowledge is part of their managerial skillset, and they're unlikely to be enthusiastic about the idea of employees using something they're entirely unfamiliar with.

As a good hacker...

... you should know it is not possible to debug without the context.

The one you've extracted from my post (which is 10 lines only) is totally wrong. I'd ask you not to picture me as a young nerd trying to sell his week-end hacking to his boss. Thanks.

I made my homework and built my case for using OCaml in our product. I was only posting to share my boss' answer which was interesting. That's it.

You might share more of the story, then...

...respecting any confidentiality agreements you have with your (soon to be ex?) employer.

But, agreeing with the poster above--I doubt that this was either about "FP" or "industry" as wholes. Your boss may have objected just as strenuously had you used, say, Smalltalk for the application. And not all organizations are reluctant to try new things.

What sort of work are you doing, BTW? Outside a few particular application domains or the need to maintain compatibility with a legacy codebase, the use of C strikes me as a bit...antiquated. :) (To put it another way, there are plenty of other "boss safe", nobody-will-fire-me-for-using-this languages out there that might be a better fit for what you want to do than C; without using "exotic" things like O'Caml, that make a PHB shirk in terror).

In that case,

In that case, the description was misleading. It clearly implies that you coded first, and explained later (e.g. "I then explained what I had done to my team."). Anyone responding can only go on what was posted. It also might have helped if the headline had been less overstated.

[P.S. I apologize for any offense caused by my original comment, though.]

cheat?

Will your OCaml compiler emit C code?

Industry...

... seems to be dominated by people who lack training in theoretical (or indeed any) Computer Science. Very few programmers (let alone managers) actually took "real" computer science courses at university, or indeed even software engineering courses. Not all of them (they're human!) come with any awareness of the work of those who went before. In such circumstances, is it surprising that pockets of industry are reactionary?

The order of forgiveness/permission seems less relevant than the blind hostility to modern computer science. It's certainly not universal, but it's also not rare, and I suspect it can't always be alleviated by management-management techniques...

The cruellest irony is that it is self-perpetuating: if it's easiest to hire someone who has, eg, no real understanding of this or that technique, then there's a strong incentive to avoid using this or that technique. And since much training is on the job, there grows up no general acceptance or knowledge of this or that technique.

Thus the trained are held hostage to a general shortage of training.

(And it might not help if, as I suspect, many Computer Science departments are distinctly unambitious in what they teach their undergraduates...)

Your boss sounds like an idiot

If I were you, I would start looking for a new job. I would be furious if my boss reacted to my hard work learning and using a potentially valuable new technology with a stupid-ass analogy to "exotic holiday locations" by someone who clearly hasn't got a clue why I did what I did the way I did and apparently doesn't want to know.

Of course, maybe it wasn't your boss who made the stupid comment, in which case reassign the blame accordingly.

Agreed

Agreed. I would have understood any objections my boss might had have about this work. But his comment was clearly about feelings, as opposed to a careful and balanced analysis of the technology. I was very surprised, and I still wonder from where such a root cause for FP can originate, that's why I was sharing.

Btw, yes, I'm looking for another job :)

Tomorrow, the world

In 1980, I was an intern at a major corporation, and was asked to port a protocol testing framework to the main corporate machines. It was in regular use, but the person who wrote it had used an exotic language on an exotic operating system and then left the company. Fortunately, I had had a bit of experience with the language and system at university, so it was easier for me than for anyone with a permanent job there. In later years I sometimes wondered how long it took before they moved it back... because the exotic language was C, and the exotic OS was Unix.

Help, I've been hacked

The URL in my browser says "lambda-the-ultimate.org" but clearly I've landed on "slashdot.org." Oh, and a trojan is replacing words. E.g. "Linux" and "Windows" have become "OCaml" and "C."

But I think I can decode it. I'm pretty sure this is what the actual slashdot posting says:

* You Can't Use Linux in Industry *

I tried to use Linux at my work but my boss said we have to use Windows because Linux is too exotic

-- Sometimes you can use Linux

-- Not just Linux! My boss won't let me use FreeBSD

-- Maybe your boss had an expectation for Windows and doesn't have the staff to support Linux or the resources to train the staff
----- Don't judge me

-- Industry is full of bosses who aren't real sysadmins

-- Maybe you could cheat and use ReactOS

-- Your boss is an idiot
----- Agreed - he was being emotional about Linux

-- Reminds me of the time I tried to introduce Windows into a Novell shop

OK

that was funny :-)

Sure I can help..

..and add the line referring to your 'contribution' into your 'summary' of our thoughts. See below.

The URL in my browser says "lambda-the-ultimate.org" but clearly I've landed on "slashdot.org." Oh, and a trojan is replacing words. E.g. "Linux" and "Windows" have become "OCaml" and "C."

But I think I can decode it. I'm pretty sure this is what the actual slashdot posting says:

* You Can't Use Linux in Industry *

I tried to use Linux at my work but my boss said we have to use Windows because Linux is too exotic

-- Sometimes you can use Linux

-- Not just Linux! My boss won't let me use FreeBSD

-- Maybe your boss had an expectation for Windows and doesn't have the staff to support Linux or the resources to train the staff
----- Don't judge me

-- Industry is full of bosses who aren't real sysadmins

-- Maybe you could cheat and use ReactOS

-- Your boss is an idiot
----- Agreed - he was being emotional about Linux

-- Reminds me of the time I tried to introduce Windows into a Novell shop

-- I, Ivy James, assistant processor at the MIT (replace with whatever your credentials are), I have nothing to say about the topic, as I'm not interested. So I will use this occasion to show these nerds (and of course the LtU community, that's the point) that I'm intelligent and proficient in the use of second order knowledge, as opposed to the common, immediate, descriptive and irreflexive first order knowledge that these coders are into. Wow, my post is written now. I feel sooo good! The initial story looks like common stuff, and it is now clear to everybody that it is not a LtU-grade material that people like I (and my peers, reading this forum, again, that's the point) expect here. Goooooood!
(Strange though, because what I've done is just use a comparison. How easy it is to destroy people's immediate discussion/interest and life by introducing raw skepticism. I will read Schopenhauer! I will read Husserl! I will the use the power of internet to tell the world I deserve a better place, and that the coders/nerds should vanish from my sight).

Last line doesn't work...

...not concise enough (i.e. too bloated).

Besides, it amounts to an ad hominem attack - which is strictly forbidden on LtU.

I agree with Chris. This is

I agree with Chris. This is not the type of discourse acceptable on LtU.

have a higher order appreciation

I think the mocking post can be read as pointed satire of the sort that helps simply to show the obverse side of the same coin the topic poster has raised.

Hmm..

.. Seems someone figured out how to pluck your strings. Not sure an mocking retort was the appropriate response to a bit of humor (or help). Did you make this thread for a reason, or just to get all bunched up when someone responded with something other than sympathy (ie. Anton / James)?

[Admin]

Please end this thread.

please

Please put "[admin] Please end this thread" in the subject next time and/or also don't then follow up with an additional post. Otherwise, people like me embarrass themselves by reading the "please end" after already extending the thread with a reply your later comment.

-t

No harm done, but I'll try

No harm done, but I'll try to remember to be more careful in the future.