News for hackers. Stuff that matters.
Re:O(n^2), again, now in Windows Management Instrumentation by crankylinuxuser on Monday December 09, 2019 @11:09AM (#21743759)
This is absolutely the better analysis. Many times, especially in agile-world, you get away with things as fast and as reasonable as you can. And that usually means O(n) as it is perfectly acceptable for a single call... But when an O(n) calls another O(n) is where you run into trouble.

But at the beginning, nobody was planning for that call to be fast - implicit requirements lead it that way.

In some ways, being able to identify and detect resource usage is what is nice about waterfall. Identification of critical API calls and respective timings would be integral to continue building the GUI elements. But we all know how waterfall is poo-pooed these days.

Re:O(n^2), again, now in Windows Management Instrumentation by pjc50 on Monday December 09, 2019 @11:29AM (#21743925)
> Identification of critical API calls and respective timings would be integral to continue building the GUI elements. But we all know how waterfall is poo-pooed these days.

If you've worked out which API calls are happening and how often, you've already written most of the application. It's just that it might be on paper or in pseudocode.

Waterfall was abandoned because getting to that level of detail takes far too long for management to accept and it's easier - sometimes orders of magnitude faster - to write the thing as actual code, try it, and then see what needs improving. And see what was wrong with the requirements.

Re:O(n^2), again, now in Windows Management Instrumentation by retrovm on Monday December 09, 2019 @11:38AM (#21743995)
That presupposes that you can start with a big pile of bad APIs and somehow incrementally approach something worth having. That's not consistent with my experience. In my experience the innermost APIs, the ones that get written down first, are effectively cast in stone and dictate the quality of the whole product, forever. The first draft of a system is the one that should have all its APIs worked out with a pencil before any code is written. You get these accidental complexity explosions precisely because someone thought it was easy and obvious to write a function returning std::vector<string> (or whatever) and didn't consider from the caller's point of view that making the function take an output iterator might be less complex.
Re:O(n^2), again, now in Windows Management Instrumentation by jacobolus on Monday December 09, 2019 @03:06PM (#21745930)
You are right. It is typically more effective to write one implementation as a hacky prototype, play with it a bit, throw it away, and then rewrite a production implementation from scratch, so that the mistakes of a design made by someone inexperienced don’t get baked in forever.

Unfortunately there are cultural/psychological factors which often preclude or discourage this method, even if it would save time and produce better code in the medium term than either exhaustive planning up front uninformed by practice OR just iterating the initial broken version to continually meet new requirements.

Re:O(n^2), again, now in Windows Management Instrumentation by BlueTemplar on Monday December 09, 2019 @03:21PM (#21746089)
Lol, ninjaed, see above.
Re:O(n^2), again, now in Windows Management Instrumentation by BlueTemplar on Monday December 09, 2019 @03:19PM (#21746070)
I've been taught waterfall a couple of years ago. We were supposed to do our project using waterfall (but at least with weekly meetings with the "customers").

My suggestion of building a first test version to, amongst other things, at least get our feets wet with the programming language (which most of us had hardly any experience with), then throw it completely away and restart "from scratch" (but with a better idea as of what we were supposed to do) was rejected.

Re:O(n^2), again, now in Windows Management Instrumentation by TimTheTinker on Monday December 09, 2019 @11:25AM (#21743886)
Waterfall refers more to the fact that further work (development, testing, or deployment) has to wait for someone else to finish something else first. Multiply that by how many “steps” something has to go through before being released. This implies everyone is taking work in large chunks instead of small iterations, and that too much is being planned too early instead of learning as you go.

Taking things iteratively, small iterations, delaying decisions, learning as you go — that’s what agile development is. And all the stuff you mention above is possible when developing with agility.

Re:O(n^2), again, now in Windows Management Instrumentation by ComputerGuru on Monday December 09, 2019 @12:35PM (#21744529)
> Many times, especially in agile-world, you get away with things as fast and as reasonable as you can.

Which has led to the ridiculous software bloat we have today. This always MVP, break fast, break often garbage needs to die.

Re:O(n^2), again, now in Windows Management Instrumentation by chousuke on Monday December 09, 2019 @03:11PM (#21745989)
I feel like the concept of an MVP is often abused. It shouldn't be a thing that somehow works with bubblegum and luck; it should still be "solid". The point ought to be to leave out features, not quality.
Re:O(n^2), again, now in Windows Management Instrumentation by NateEag on Monday December 09, 2019 @04:48PM (#21746988)
When you leave out features and quality, you have a proof of concept.

Those are valuable things to build, IMO. Just make sure you leave out enough features that it cannot be pushed into production once someone else sees it running.