News for hackers. Stuff that matters.
Re:Web Programming Is Getting Unnecessarily Complicated by Falkon1313 on Tuesday July 19, 2016 @01:09AM (#12119848)
In my early days of programming, things began with realizing that I could use this wonderfully powerful system to solve problems (almost any problem you could model!) and create things (almost anything you could want to simulate!). I just had to figure out how to model the domain problem logically in a useful way, or what aspects of something to simulate, and how to allow the user to interact with it.

That soon changed. In learning about programming, one can't help but to come across the writings of those preaching the gospel of the holy virtues of 'reusable code'. Modular code, libraries, object-oriented code, design patterns, frameworks, plugins, APIs, services, stacks and toolchains!

So programming is now largely about resolving a ton of dependency issues and getting scores of different modules, frameworks, libraries, APIs, etc. to play nicely with each other. Instead of using our brainpower to understand and model the domain problems that are ostensibly the reason for our software, we're using it trying to figure out how the heck to glom together all this generic abstract code and modify the output to vaguely resemble something in the domain, in a way that won't perform so horrendously that customers immediately give up on it.

We write hooks, overrides, and underrides to throw out the work that the reusable code is doing and get it to do what we want (more-or-less). We write translation and adaptation and bridge layers to convert the data structures used by one module to those used by another (and vice-versa) and eventually to something roughly approximating the domain data. We set up elaborate clusters of interdependent modules, submodules, plugins for our plugins, all on top of a generic framework that wasn't even designed with the domain in mind.

As a profession, we've gone way too overboard trying to do everything with reusable code. This is why it can take several hours to do something as simple as change a link (and that can completely break something seemingly-unrelated elsewhere in the system). And it's kind of amusing that we're now adding layers of complexity to manage the layers of complexity.

I want to get back to focusing on building logical models that fit the domain, solving problems, and simulating things. For that we need a new doctrine of vertical development that doesn't just religiously say "Throw another layer of indirection and generic abstraction on it! Yay reusable code!" as a sacred solution for everything. Sure, code reuse can be good, but let's be sensible about it, not kid-in-a-candy-store crazy.

Re:Web Programming Is Getting Unnecessarily Complicated by tboyd47 on Tuesday July 19, 2016 @04:53PM (#12124810)
You are correct. I've come to see it as one of many psychological responses of developers to work they feel is beneath their skillset. People with advanced computer science backgrounds often end up in web development just that's where the jobs are, and most of the work is not in solving difficult problems. Mostly, you are just pulling data out of a database and displaying it in HTML. The thought of doing that for your entire career as a programmer is intolerable to some people, so they concoct any ingenious scheme they can to rise above it. For some people, this results in an obsession with writing modular code they can re-use. Another response is to delve into obscure, hyper-intellectual programming languages. Another is to become obsessed with markers of system robustness like availability and concurrency to the point where all of your decisions as a programmer optimize for those. I've seen all of these (and been guilty of some of them).

The interesting bit is that these people are often very eloquent and convincing in making others believe that they have an objectively better way to program, and that this is THE way to advance in the field, and not just some elaborate game created to stave off boredom. Never mind the fact that you're still just doing things like validating phone numbers and moving buttons slightly to the right. This is nothing less than the future of computer science!

So you end up with a herd effect where greener or less-capable developers follow these "thought leaders" blindly, resulting in the fragmentation we're in now. I find it interesting how "Five Whys" has made its way into dev culture as a line of questioning for business requirements, but never for tech requirements. "It's getting more and more popular every day," or, "It's going to look great on your resume," is often the end of the discussion.

Re:Web Programming Is Getting Unnecessarily Complicated by marklgr on Tuesday July 19, 2016 @02:50AM (#12120233)
Reusable code, frameworks or plugins are fine, the problem is their cambrian explosion since now anyone can jump in and publish some JavaScript or Go code, especially with the micro-stuff trend. So we end up with zillions of projects competing for traction, and we move from one new cool and shiny thing to the next, for all (micro-)components of the stack.

This is the often-forgotten cost of competition (for all its merits) as opposed to cooperation: it wastes time and energy.

Re:Web Programming Is Getting Unnecessarily Complicated by sangnoir on Tuesday July 19, 2016 @07:34AM (#12121106)
> , the problem is their cambrian explosion since now anyone can jump in and publish some JavaScript or Go code, especially with the micro-stuff trend

I do not buy that this is a problem. It's not an apples-to-apples comparison, but anyone can publish a 'book' on Amazon as easily as publishing an NPM module (and they do), however, no one is complaining that there are "too many low quality books". Why is it easy to ignore books but harder to ignore shitty projects? Similarly there are countless instances of bad poetry online, and very bad fan-fiction, but the sky isn't falling in the literary world. Can someone educate me: why do other people's shitty software projects elicit such strong reactions?

Re:Web Programming Is Getting Unnecessarily Complicated by TheOtherHobbes on Tuesday July 19, 2016 @07:51AM (#12121166)
Because books and poetry aren't supported by package managers. They're self-contained, so you can ignore them and no one cares.

They also don't purport to solve a specific problem. (Like left-pad.)

And they're not boosted by a FOSS ideology which their existence a political choice and not just a practical issue.

So basically interdependence. You need at least some external code to finish most projects, and the chances are good it will be somewhere between overcomplicated, unreliable, poorly documented, poorly maintained, and unnecessary.

Maybe package managers need active best-of-breed curation and industry-wide coding and documentation standards. But professional standards are anathema to the move-fast-and-break-things crowd, so I doubt that will ever happen.

Re:Web Programming Is Getting Unnecessarily Complicated by uola on Tuesday July 19, 2016 @08:43AM (#12121369)
I'm not sure how useful analogies are in this case, even so I get pretty upset over a lot of popular poor quality business books (and similar) that have real impact on things.

If you want to make a comparison you can equate things to hardware where things like quality control and yield is instrumental. If you buy a plastic case that after a year self-disintegrates because while it looked the same it wasn't manufactured to spec. When this could potentially happen to every part of your device this quickly becomes annoying.

Yet, this is how software is all the time and is further worsened by a lack of due diligence and quality control. How many developers can get the time to properly verify a technology or library. Not to speak of if it's even fair to expect developers to be able to reach those conclusions.

Re:Web Programming Is Getting Unnecessarily Complicated by pjmlp on Tuesday July 19, 2016 @03:06AM (#12120280)
Hence why we old timers just wait for dust to settle, and then we move on.
Re:Web Programming Is Getting Unnecessarily Complicated by CuriouslyC on Tuesday July 19, 2016 @11:08AM (#12122188)
Sexual reproduction also wastes energy relative to asexual reproduction, yet sexual reproduction is by far the more successful strategy.
Re:Web Programming Is Getting Unnecessarily Complicated by blacksmith_tb on Tuesday July 19, 2016 @03:03PM (#12123989)
9.2×10^29 bacteria beg to differ... [1]

1: http://www.nature.com/news/there-are-fewer-microbes-out-ther...

Re:Web Programming Is Getting Unnecessarily Complicated by corysama on Tuesday July 19, 2016 @01:38AM (#12119962)
In other words: "Is it Really Complex? Or, Did We Just Make it Complicated?" https://www.youtube.com/watch?v=ubaX1Smg6pY
Re:Web Programming Is Getting Unnecessarily Complicated by EGreg on Tuesday July 19, 2016 @01:20AM (#12119891)
I started out doing that. And inevitably I'd wind up refactoring multiple similar projects into reusable code and conventions. Over many years I arrived at this:

http://qbix.com/platform

Now I can assemble a website that works everywhere and has best practices, by expressing exactly what I want in high level code. When modeling a new app or talking to our developers about architecture, we can use a common language of users, communities, streams, access, realtime pushes and offline notifications etc. People know what I mean when I say "the Patients/account streams should be published by the community and have Patients/photo stream templates for the admin role, related to Patients/gallery category stream published by the logged-in user."

Everything is namespaced, reusable, interoperable and works on every device. It took a long time to make the system but now we can assemble apps like out of building blocks, and have anyone work on anything and know what the conventions are. So yeah, it's paid off!!

Re:Web Programming Is Getting Unnecessarily Complicated by adrianratnapala on Tuesday July 19, 2016 @01:29AM (#12119931)
When I go to the qbix website, and click on the "for Developers" link, nothing happens. Possibly something would happen if I played with my NoScript options.

Now I have some choices: allow javascript in order to read plain text, or ignore your web framework.

Guess which one I picked.

Re:Web Programming Is Getting Unnecessarily Complicated by buckbova on Tuesday July 19, 2016 @01:38AM (#12119967)
Unfortunately the for developers link had no code samples. So you didn't miss anything aside from a sales pitch.
Re:Web Programming Is Getting Unnecessarily Complicated by gunn on Tuesday July 19, 2016 @04:03AM (#12120482)
Re:Web Programming Is Getting Unnecessarily Complicated by EGreg on Tuesday July 19, 2016 @11:36AM (#12122351)
Because the code samples are in the developer GUIDE.
Re:Web Programming Is Getting Unnecessarily Complicated by EGreg on Wednesday July 20, 2016 @03:16PM (#12131668)
Don't use it if you don't want. We built it for ourselves and it's available to you if you want to use it. If you don't want to turn on Javascript to get started with the platform, that's up to you.
Re:Web Programming Is Getting Unnecessarily Complicated by random_rr on Tuesday July 19, 2016 @08:39PM (#12126044)
Edgy
Re:Web Programming Is Getting Unnecessarily Complicated by pjc50 on Tuesday July 19, 2016 @09:23AM (#12121561)
The aim of reusable parts was to make software components behave like electronic components: purchasable from vendors, standardised, interchangeable, can be fitted together without conflicts. Nobody would consider replacing a NE555 or op-amp with its discrete transistor equivalent.

It sort of succeeded, but only at the data structure layer. Perhaps the high point of reuse is npm-style dependency-orientated programming, where people really do reuse tiny functions like leftpad(). But it's not stable. Because nobody is interested in providing that stability, and there's no money in it. There can't possibly be, because nobody will pay for tiny software components like leftpad. The market doesn't exist.

You can't second-source leftpad(), and that makes it possible for one person to break a lot of random builds across the world.

Re:Web Programming Is Getting Unnecessarily Complicated by nicops on Wednesday July 20, 2016 @03:01AM (#12127326)
Let me tell you a story. When I do frontend nowadays, I mostly develop with angular js. People like to complain about angular and having to know so many libraries, and frameworks, when the past was simple.

But what is simple, really? Let's look at some past experiences:

1. At a very first gig, when I was doing my very little first steps in this software thing, I had to build a website prototype. Pure static html pages inside a folder, that were linked to each other, didn't need to deploy, it was just a demo. It didn't use CSS. It didn't use a template engine. Really simple. But, every change was a PITA, because the website had a header, so every change, meant you had to open the file, and rewrite the whole header... in all files, manually!

2. In another moment of my past, I had to do some changes in an app was built with JQuery. JQuery is a library, but it's pretty simple. Select dom elements, and apply changes and hook events up. Simple.

Only, following and understanding the flow of the app was hard as hell. Each page had a lot of code and it wasn't obvious at all what was happening. Complex transformations of the dom were daunting. Small changes would break in intractable ways.

3. PL/SQL Stored procedures + tables. Pure SQL + structured programming is simpler than objects, and way simpler than using ORMS. Of course we had no tests, so less stuff to look at. I'm not even going to describe the downsides because you all people surely know that.

My point is, let's always look at the other side of things, and really weight at all the tradeoffs. I get what you mean but when I read a line like:

> I want to get back to focusing on building logical models that fit the domain, solving problems, and simulating things.

I feel that it's really a little _naive_. I mean, of course you focus on that kind of things. You need to work on backend, solving some kind of problems. But in some other problems, like for example, visual interfaces, you better be reusing shit.

Re:Web Programming Is Getting Unnecessarily Complicated by Falkon1313 on Saturday July 23, 2016 @04:23AM (#12148805)
1. been there, done that. 2. been there, done that. 3. Considered that in a case where multiple systems were hitting the same database but doing inconsistent things - putting the logic in the database would at least make it consistent, but went with REST API instead to solve the problems.

I'm not entirely against code reuse, sure, reuse bits like visual interface if they fit, but the idea that it can solve everything by just sticking existing bits together is a false lead. It takes much longer than expected and it makes an unmaintainable mess.