News for hackers. Stuff that matters.
Re:People who disagree aren't trying to make things complex by btilly on Tuesday December 11, 2018 @05:52PM (#18659742)
Since this seems to be the place for personal views, my views, after 20 years of experience, is that people do not notice the complexity of anything that they have digested as normal. As a result doing anything other than what they are used to seems very complex to them. Whether that other thing is actually complex to a neutral third party is situation and observer dependent.

I have seen this with procedural programmers struggling with OO code. OO programmers struggling with functional techniques. Programmers of all kinds seeing a new framework. Programmers used to more structured code trying to fix shell scripts. React developers encountering code using older JS libraries, and developers comfortable with older libraries encountering React. And so on and so forth.

In all cases the common denominator is that the programmer is uncomfortable with the new way of doing things. And the first reaction is, "What's wrong with this code?" And "It's messy and complex" is one of the easiest conclusions to draw.

Re:People who disagree aren't trying to make things complex by ThrowMeDown01 on Tuesday December 11, 2018 @10:27PM (#18661147)
My now favorite example for what you describe is this blog post "I no longer understand my PhD dissertation". However, it's worse, even the same person experiences this - because over time we are different people.

To quote from the blog post:

> I was curious to see how much of the dissertation I can still grasp, five years after the fact. I figured it couldn’t hurt my ego if I refreshed my mind with past mathematical glories.

> How wrong I was.

> This was not the casual read I had in mind. The notation was alien. I even had to scour the examiner’s report to direct me to the key results. And while I could have sworn this was a well-written thesis, I repeatedly found myself bamboozled by my own prompts. “The result now follows easily…” may have made sense back when, but now the author-turned-confused reader can profess that it most certainly does not follow easily, at least in his own mind.

https://medium.com/@fjmubeen/ai-no-longer-understand-my-phd-...

Re:People who disagree aren't trying to make things complex by qlk1123 on Tuesday December 11, 2018 @11:27PM (#18661397)
Thanks for sharing the interesting article! This effect also applies on presentation slides.

Just checkout my archive for some slides I presented a few years ago. I would have thought that they are random compilations if there are no file names.

Re:People who disagree aren't trying to make things complex by userbinator on Tuesday December 11, 2018 @08:37PM (#18660653)
people do not notice the complexity of anything that they have digested as normal

...which is why examples of "minimal complexity" code often provoke feelings of extreme unease and horror; one nice example is https://news.ycombinator.com/item?id=8558822 where the functionality:code ratio almost seems impossible at first glance.

I have seen this with procedural programmers struggling with OO code.

To be fair, a lot of OO code tends toward overengineering and premature abstraction.

Re:People who disagree aren't trying to make things complex by munchbunny on Wednesday December 12, 2018 @12:13AM (#18661552)
To be fair, a lot of OO code tends toward overengineering and premature abstraction.

And a lot of functional code tends towards unnecessary levels of indirection through higher order functions as a way of deferring responsibility for actual logic, or on the flipside insufficient abstraction leading to difficulty extending functionality.

I've gone back and forth multiple times between functional practices and OO practices, and I definitely empathize with the confusion going in both directions. You trade one problem for another, and in the end there really is no free lunch.

React Redux is a great example. People who have gotten over the hump of the boilerplate involved in threading state up and down the tree love how little energy they're spending routing state changes to the correct destinations. However, to someone who is used to event-based UI programming, this looks like a horrific waste of energy reminiscent of how a giraffe's laryngeal nerve goes all the way down the neck then back up. They've both got a point, but you have to follow their paths to see it yourself.

Re:People who disagree aren't trying to make things complex by js8 on Wednesday December 12, 2018 @02:06AM (#18661931)
"I've gone back and forth multiple times between functional practices and OO practices, and I definitely empathize with the confusion going in both directions. You trade one problem for another, and in the end there really is no free lunch."

I think there is a strange kind of duality between OOP and FP. I think OOP passes structures of objects hidden behind interfaces, while the FP passes composed functions in other direction. So you can convert your OOP code to FP code almost mindlessly by total "inversion of control" - wherever you pass an object somewhere (making a call), in FP you pass the operation from the callee to the caller instead.

And I think it's this duality that you observe in practice.

However, I believe there is a practical difference between the two, which makes FP superior despite being harder to understand initially.

It's much easier to spot that you're doing "no-ops" in FP than in OOP. In OOP, often you pass the objects unchanged across layers, while in FP, this manifests as identity functions being used. And it's easier for both human and compiler to remove these redundant identity functions (through function specialization and things like fusion etc.).

Also, I believe functional approach allows you to better realize that there are some algebraic laws governing your problem domain.

It's really kind of like in mathematics, when you come from point-wise understanding of functions to functional understanding of functions, more insight is gained.

Re:People who disagree aren't trying to make things complex by btilly on Tuesday December 11, 2018 @09:00PM (#18660762)
That is an excellent link to read through, and the code is an excellent description.

There is an inherent complexity to a compiler. That example had only that. There are standard names for things in C. That example had only that. In all fields, internalizing compact names improves how much an expert can think and makes it impenetrable to beginners. (Math is particularly good at supplying examples.) That program used compact variable names that are standard enough in C to be instantly recognizable, but come as a shock to someone who hasn't internalized them.

The result is a compressed version of exactly what an experienced compiler programmer has already internalized. And is utterly impenetrable to anyone who hasn't internalized the concepts that they need.

Re:People who disagree aren't trying to make things complex by LolNoGenerics on Tuesday December 11, 2018 @08:41PM (#18660672)
To mock about the doings of others is easy. Plead me guilty. But there are rights and wrongs on both sides. Usually.

My theory is that engineers are often stuck in a filter bubble. Especially newer engineers. If you read all day about microservices and SPAs, there is at some point no place for something else. But classic web app achitectures are still doing very well. At a common scale they do things better with less complexity. The point is that they aren't very heavily discussed anymore. Most problems have been discussed and there are solutions for it. For me it is hard to argue about the problems of modern approaches. Not because I don't have any arguments, but because mostly the response is that we have to throw more code, hardware and architecture at it. It works for FAANG, why argue?

All sides need to pay more respect to things that work. And we have to set context when/where/why it works.

Re:People who disagree aren't trying to make things complex by jondubois on Wednesday December 12, 2018 @04:45AM (#18662584)
True, definitely Amazon is heavy on the Serverless marketing/filter bubble.
Re:People who disagree aren't trying to make things complex by hartator on Tuesday December 11, 2018 @06:15PM (#18659890)
Ha, it has been my reverse experience in all the examples cited.

When learning functional, I had a haha moment as I was coming from OO.

When learning React, I had another haha moment as I was coming from regular JS libraries.

There is an objective truth that is there or not.

Re:People who disagree aren't trying to make things complex by ilaksh on Tuesday December 11, 2018 @08:32PM (#18660637)
I'm pretty sure a big part of intelligence is a type of compression. Once you are familiar with certain things, your brain automatically compresses and decompresses those patterns so you don't have to deal with them consciously much. You would not notice the same amount of complexity.

Having said that, things like cyclomatic complexity do exists. Although smaller units that are simpler on their own, do mean there are more to mentally reassemble into the larger whole.