Michael Vanier: LFM and LFSP
paulgraham.com
paulgraham.com
As for the distinction between LFM and LFSP itself, I believe it's fundamental -- or rather, the distinction between M and SP is fundamental. It explains important facts about the software industry that can't be explained any other way ("if X is so good then how come blah blah blah"). I think M vs. SP is fundamental because of a demographic fact: the population of SP is an order of magnitude smaller (at least) than the population of M. Combine that with the economic fact that the demand for software exceeds the supply of SP, and our world begins to make some sense.
The only thing I'd change is that the terms "smart people" and "masses" are too judgmental. What we mean by "SP" is people with a high tolerance for abstraction. There are many individuals in M (i.e. who have a low tolerance for abstraction) who are plenty smart. Still, this is a venial flaw, because capacity for abstraction is a big part of being a smart programmer.
Before doing our webservices in Java, I'd never done much of it and assumed it to be a closer cousin to C++. Using it at length, at a time when I find myself frustrated with some of the lack of abstractions in C++ (notably missing lambda), it's whetted my appetite to drop in a slicker language at the medium level of our stack.
But this thing about smart people makes me cynical. You ever debug a terse Perl program written by a really "smart" person?
What about maintenance? What about the dangers of over engineering? These things should not be overlooked.
Actually, yes I have. And I've found it an absolute joy. Oh, line for line it can take more work to understand. (Though often it is set up so that you can ignore most lines.) But compared to what the same code would have been written out in a more "straightforward" and repetitive fashion?
However there are a lot of people who THINK they are smart but aren't. Working with their stuff can be a nightmare. The difference is painfully obvious once you dive into the code. If you're experienced in Perl, it is usually obvious at a glance.
Indeed, most people who think they are smart, aren't, including myself.
It's very easy to lose sight of where you fit in the larger scheme of things on the great bell curve of humanity. But I assure you, it's almost certain that if you can post to Hacker News you're smarter, richer, luckier than at least a billion people.
(Of course, I don't put any stock in IQ; it's just a saying.)
So maybe a more charitable view is that these people (who think Java is too constraining) wish to be smarter than than they currently are. And anyway, who wouldn't get a little frustrated with all the childproofing features in their everyday tools?
If the program is terse beyond readability then the person who wrote it is not smart. Power has actually few things to do with terseness, and more with readability/ expressivity.
I used to try to cram more stuff onto a line because I thought it was elegant. Now, depending on the circumstance, sometimes I'll deliberately split up something that I originally wrote as a 1-liner because, at second pass, it looks like it'll be hard to read for the next person.
Just having the intermediate variable name makes your code more self-documenting in some situations.
>> I agree Java is verbose and old and should rarely be used on new projects.
People with attitudes like this scare the hell out of me.That's the intention, but the reality is quite different. When smart people really need to write more abstract code in a weak language they will go to great lengths, including on the fly byte code manipulation and all kinds of weird proxying hacks. Or look what they do with CSS.
So, the abstractions are always possible, albeit in a way that is even more complex and definitely more brittle than if they had been implemented in a more powerful language.
Question that was asked the most was: "Will other java developers that do/will work on my project(s) understand this code?"
How do you un-teach people the for () { if ... if .. if .. } for () { ... } ...
In the medium term? Companies and groups using the most productive tools will be more successful. If there are real, scalable advantages to assembling a team of great developers and using powerful techniques, then those will shine through over time. If you want to be in on this, you should probably open your mind to learning new things.
In the long term? Once the effective techniques are proven, the developers who only know the old ways eventually die and are replaced by younger ones who have learned the better ones. Rinse and repeat.
The author lost me right here. C is too painful, and C++ is materially better? OOP is nice and all, but it's no panacea. I've worked plenty in both languages and find that both score roughly equally in 'pain quotient.'
Interestingly, the "LFSP" theory breaks down when you consider memory management and pointers. Those two features of "LFM's" cause far more difficulty for average developers, IMO, than the abstractions available in "LFSP's."
(In reality I think that many smarter languages make debugging easier, not harder, but the point stands that the most interesting or fun solution isn't necessarily the best solution. A good, stable project often needs non-sexy infrastructure, and no language can completely abstract that out.)
The web team's doing shopping carts and drill-down tables in Ruby.
The platform team's doing ultra-low-latency, distributed, redundant key-value stores in Java, and build scripts in Ruby or whatever, possibly an ETL or two using hadoop to boot.
Who're the smart people, again?
But Java has a lot of strengths, and the fact that it's the most popular language for enterprise development doesn't mean it's for "the masses" while the rest of us are "beautiful unique snowflakes". It's a tool to be used for its strengths like anything else.