News for hackers. Stuff that matters.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @06:37AM (#21823884)
This is a no-brainer.

As a development manager for a quarter-century, and an active software developer for a lot longer than that, I can definitely say that every place there's a "meeting of the minds" is a place for bugs.

In the software itself, the more complex the design, the more of these "trouble nodes" (what I call them) there are. Each interface, each class, each data interface, is a bug farm.

That's why I'm a skeptic of a number of modern development practices that deliberately increase the complexity of software. I won't name them, because I will then get a bunch of pithy responses.

These practices are often a response to the need to do Big Stuff.

In order to do Big Stuff, you need a Big Team.

In order to work with a Big Team, you need a Big Plan.

That Big Plan needs to have delegation to all the team members; usually by giving each one a specific domain, and specifying how they will interact with each other in a Big Integration Plan.

Problem is, you need this "Big" stuff. It's crazy to do without it.

The way that I have found works for me, is to have an aggregate of much more sequestered small parts, each treated as a separate full product. It's a lot more work, and takes a lot more time, with a lot more overhead, but it results in a really high-quality product, and also has a great deal of resiliency and flexibility.

There is no magic bullet.

Software development is hard.

Re:The top bug predictor is not technical, it's organization... by jiggawatts on Wednesday December 18, 2019 @06:48AM (#21823945)
So, just a day ago, I got dragged into a meeting where many people were involved in a discussion about the new Cloud Enterprise Application Architecture Template. Or whatever.

It had a 3-tier architecture.

I asked: Why?

And they answered: Why not?

I answered: Because layers must only be introduced if needed. Is there a need?

They answered: The standard design is the need.

I clarified: Is there a technical requirement? Or perhaps an organisation one, such as disparate teams working on the two components?

They answered: No! Of course not! It's a unified codebase for a single app written by a single person! But it is not Enterprise enough! It must be split into layers! And then, you see, it will will match our pattern and belong.

I verified the insanity: Are you saying that this finished, working application isn't currently split into layers, but you want it split into layers simply so that it can have layers?

They chorused: Yes.

Re:The top bug predictor is not technical, it's organization... by hyperman1 on Wednesday December 18, 2019 @09:10AM (#21824956)
The 3 tier architecture was a reaction to VB and RAD-like tools, where things like data validation and database I/O were coupled directly to the input component. It was common for these frameworks to not even have an object for data transfer sitting between UI and DB.

This was the timeframe where more and more manual work was automated. Hence it was a common situation where input used to be given by a human, but now comes from another application. The simplest way to do that kind of retrofit was to drive the UI from the application: The application fills in its own gui fields which triggers the validation, then simulates a click on OK.

This caused al kinds of ungodly messes. You need a gui for background processes, reliability was low, etc.. 3 tier architecture were a way to say 'never again' to this style of programming. Forcing people in to it was necessary.

But that was another time. Mindlessly applying an architecture without understanding why is of course dumb. But not applying an architecture without understanding it's pros and contras is just as dumb. It all depends on the quality of the architects in question.

Not that I want to call you dumb, of course. IT today is different from 20 years ago.

Re:The top bug predictor is not technical, it's organization... by specialist on Wednesday December 18, 2019 @09:54AM (#21825403)
n-tiered architectures were born during the transition from "workgroup" to "client/server". This upheaval caused an industry-wide loss of programming lore.

It wouldn't have been too bad, except the ODBC interface inadvertently led to abandoning schema-aware programming models like VB's ADO, Paradox, FoxPro, etc.

At the same time, object oriented became fashionable.

So we ended up with ORMs, ActiveRecord, and various offshoots.

Mostly because no one remembers life before client/server.

Re:The top bug predictor is not technical, it's organization... by pjc50 on Wednesday December 18, 2019 @10:41AM (#21825918)
I was always a bit hazy on what these terms actually meant, and what we lost. It does seem like there was a brief golden age of easy "rapid application development" tools like FoxPro where you could wire some UI fields to a database without too much trouble. Now we have people trying to do the same in the web, badly.
Re:The top bug predictor is not technical, it's organization... by specialist on Wednesday December 18, 2019 @12:24PM (#21827103)
I also had no idea what client/server meant (at the time). My current oversimplified distinction:

Workgroup: I/O thru file system, clients responsible for locking, concurrency, etc.

Client/Server: I/O thru DB's protocol (eg TDS), server responsible for locking, concurrency, etc.

--

As for what was lost, I spent way too long (10+ years) trying to figure that out, trying to fulfill the desire to recover the ADO (Access Data Objects) programming paradigm. I think I succeeded, more or less, and am currently reorienting my life to work on it full-time.

Re:The top bug predictor is not technical, it's organization... by ksec on Thursday December 19, 2019 @02:53PM (#21838548)
I used to loathe FoxPro, now I actually miss it, it was simple enough to quickly get the job done. I have always thought in the 2000s that something better, more powerful and even easier to use would come. And looking back I felt a lot of times technologies general we reinvent the wheel and nothing better actually came out of it.

FileMaker may be an alternative, but I never understood why it hasn't caught on.

And I am not even sure if there are any product similar that is good on the Web.

Re:The top bug predictor is not technical, it's organization... by hyperman1 on Wednesday December 18, 2019 @10:32AM (#21825833)
I assume that's the windows 3.11 era? It was a simpler time, with small non-hostile networks, less critical software, and more humans in the loop. While 'workgroup' mostly means PC/DOS to me, the mainframes of the day had a comparable story unfolding.
Re:The top bug predictor is not technical, it's organization... by ratww on Wednesday December 18, 2019 @11:16AM (#21826343)
Funny thing, I remember lot of similar apps in enterprise businesses until the late 2000s. That only started to change when web apps and cloud-hosted software became the norm.
Re:The top bug predictor is not technical, it's organization... by aprdm on Wednesday December 18, 2019 @10:00AM (#21825484)
Can you talk more about workgroup?
Re:The top bug predictor is not technical, it's organization... by ratww on Wednesday December 18, 2019 @11:27AM (#21826470)
Not the GP, but I used to work in desktop development for enterprise businesses.

Most multi-user apps were two tiered: client and database. The way they worked was by connecting directly to the database and/or a shared filesystem in the local network. All validation happened client-side.

Database credentials and fine-grained file/directory permissions were the only security measures. That and the NAT. ;)

There's still software in the market that uses this model, like some niche ERPs from the 90s and software catered to small/mid businesses.

Re:The top bug predictor is not technical, it's organization... by johnchristopher on Wednesday December 18, 2019 @12:09PM (#21826925)
> Database credentials and fine-grained file/directory permissions were the only security measures. That and the NAT. ;)

It baffles me that the CCNA materials is still based around these use cases.

Re:The top bug predictor is not technical, it's organization... by wayoutthere on Wednesday December 18, 2019 @11:46AM (#21826684)
> The simplest way to do that kind of retrofit was to drive the UI from the application: The application fills in its own gui fields which triggers the validation, then simulates a click on OK.

> Not that I want to call you dumb, of course. IT today is different from 20 years ago.

The meteoric rise of RPA within IT shops is recreating the same situation. The more things change, the more they stay the same.

Re:The top bug predictor is not technical, it's organization... by dandelo53 on Wednesday December 18, 2019 @12:29PM (#21827151)
I think RPA is the merging functional and technical, which is what all the debate is revolving around... Change can't happen without change
Re:The top bug predictor is not technical, it's organization... by walterbell on Wednesday December 18, 2019 @12:25PM (#21827112)
What is RPA?
Re:The top bug predictor is not technical, it's organization... by dandelo53 on Wednesday December 18, 2019 @12:31PM (#21827166)
This link should resist time rot: https://www.google.com/search?q=top+rpa+vendors
Re:The top bug predictor is not technical, it's organization... by walterbell on Wednesday December 18, 2019 @01:08PM (#21827517)
"Robotic process automation" was indeed what came up in my web search for the term, but it seemed an unlikely fit for generic distributed app development. Why is robotic process automation sweeping "IT shops"?
Re:The top bug predictor is not technical, it's organization... by wayoutthere on Wednesday December 18, 2019 @01:15PM (#21827571)
Because rather than upgrading software and building APIs that integrate at a low level, IT shops are building software and APIs on top of UI automations. Some new fancy service desk platform the suits want may not have a connector to your 15 year old heavily-customized SAP instance (which is run by another team you have no influence with), and budget / time constraints leave RPA as the only option.

It's pretty easy to see why this would cause problems, but the consulting companies have been pushing hard on RPA because when it blows up in 5 years, who are you going to call? I say this as a consultant who has to sell this awful crap because "partnerships".

Re:The top bug predictor is not technical, it's organization... by walterbell on Wednesday December 18, 2019 @01:54PM (#21827981)
Thanks for the context. Seems like the latest incarnation of scripting 3270/mainframe terminals, telnet/expect sessions or web/selenium/headless browsers.

Copy&paste is the enterprise API/data integrator of last resort. Image/video is another integration point. iOS can screen capture full-page images of web pages, with tools for human annotation. Soon the local ML/bionic processor and AR toolkit can perform text recognition on those images, which means they can be live edited, re-composed and fed into another system.

> fancy service desk platform the suits want may not have a connector to your 15 year old heavily-customized SAP instance (which is run by another team you have no influence with)

This intersects with DRM and the title of the OP story. When OrgA and OrgB fail to partner/cooperate (e.g. no formal integration) or are actively hostile (implement DRM to prevent data movement between OrgA and OrgB products), it creates pain for customers and new business opportunity for OrgC and OrgD.

Which is why scraping and reverse engineering are never going away, they are society's last line of defense against vendor org dysfunction.

Re:The top bug predictor is not technical, it's organization... by wayoutthere on Wednesday December 18, 2019 @03:40PM (#21829183)
Oh it's so much worse than that. Swivel-chair / copy-paste integrations are often a better solution than RPA in today's world.

It was one thing scripting mainframe terminals, but the equivalent today are SaaS apps. The major enterprise vendors like Salesforce are pretty good about roadmaps and release schedules, but a lot of the smaller ones work on more of a continuous deployment model. This means your RPA integrations are constantly breaking, and suddenly you have to hire a whole bunch of RPA analysts to deal with fixing them. Or you can just hire a few more data entry people to do it manually.

Re:The top bug predictor is not technical, it's organization... by foobiekr on Wednesday December 18, 2019 @10:35PM (#21831851)
I ... I feel bad saying this, but I can totally see a use for RPA.

One, and more often than not, applications embed a ton of business logic in the client which is not easily available in the API.

Two, and honestly I feel dirty writing this, the UI is usually a lot better tested. Or tested at all.

I'm just the messenger, here. We were very adamant about NOT doing this in my previous company or our current projects, but I can totally understand the "it's good enough for humans, it's good enough for machines" attitude. It makes me sad though.

Re:The top bug predictor is not technical, it's organization... by m463 on Wednesday December 18, 2019 @06:07PM (#21830415)
Is MVC a good thing?
Re:The top bug predictor is not technical, it's organization... by afriendofjungs on Wednesday December 18, 2019 @09:50AM (#21825369)
You're lucky you got some form of discussion out of the people you work with. Whenever I try to steer conversation towards "technical accountability" where I ask what I think are legitimate questions concerning application design and architecture, the mood is as if no-one else believes it's of any importance and I am that weird guy putting spokes in the wheels of a great project. My arguments aren't refuted, they're conveniently ignored. People are honestly dumbfounded and prefer to change subject at best, at worst they lash out with what seems to be simplistic thinly-veiled "culture" attacks -- "oh, please, not with that abstraction/encapsulation argument again, we've got work to do"-sort of utterances.
Re:The top bug predictor is not technical, it's organization... by Vinnl on Wednesday December 18, 2019 @07:25AM (#21824117)
> I answered: Because layers must only be introduced if needed. Is there a need?

It might have gone better if you had also stated why that is the case, e.g. "every additional layer exponentially increases the likelihood of bugs being introduced, so their introduction must be worth that risk, or the higher cost of mitigating measures".

Of course, the challenge will still be that "likelihood of bugs" is rather abstract, and often people believe they can be prevented just by paying more attention, and assume that that will happen of its own accord.

Re:The top bug predictor is not technical, it's organization... by marmaduke on Wednesday December 18, 2019 @07:55AM (#21824318)
I went through this, more or less, several years ago. But now I see the uselessly layered app being almost effortlessly retrofitted with new top and bottom layers, keeping only the original middle layer.

If they hadn't layered it, the new retrofitting wouldn't even be possible and the company wouldn't have that contract.

Was it insanity?

Re:The top bug predictor is not technical, it's organization... by jressey on Wednesday December 18, 2019 @09:06AM (#21824902)
Then you do the layering when you need to. One of my biggest gripes about many engineers is their desire to fix technical debt for no business purpose.

In your example, the team tasked with retrofitting would have introduced the layers when the need to make changes arose.

Re:The top bug predictor is not technical, it's organization... by silveroriole on Wednesday December 18, 2019 @09:22AM (#21825087)
What actually happens in a “business purpose focused” company: You tell the boss you need to double the estimate they gave to the customer, so that you can pay the tech debt and add those layers we need. Boss refuses, we need that change now so get it done without fixing the debt, why is the team so incompetent that they didn’t add layers to start with, why didn’t you just fix the tech debt on your own time in quiet periods, we can’t have a ticket for that since it doesn’t add business value, blah blah...

;)

Re:The top bug predictor is not technical, it's organization... by _def on Wednesday December 18, 2019 @09:50AM (#21825368)
That's why there's no final answer to "layer: yes or no?". It depends. And as a developer it's your job to guess which decision is more likely to save you time (= money) in the future. There's no way to know the right answer for sure because it depends on further (business) decisions that aren't made yet.
Re:The top bug predictor is not technical, it's organization... by jressey on Wednesday December 18, 2019 @11:19AM (#21826367)
What you're describing sounds to me like poor departmental relationships and the typical challenges of lots of people with lots of goals working together.

I sure hope all of y'all's companies are 'business purpose focused' or you're gonna be looking for a new job pretty soon.

Re:The top bug predictor is not technical, it's organization... by celticmusic on Wednesday December 18, 2019 @11:33AM (#21826527)
are you claiming this same boss would have given you the time to do it at some other point, thereby delaying something else?
Re:The top bug predictor is not technical, it's organization... by silveroriole on Wednesday December 18, 2019 @12:53PM (#21827372)
Ironically yeah ime - when doing it upfront. These places sometimes expect so much business value from Cool New App that they let it spiral out of the agreed timespan and you get lots of time to ‘add layers’ (i.e. plan for the future or overcomplicate, however you see it). Once Cool New Thing is live and expectations have cooled, they just want to make some ‘small’ changes, nobody wants to let you restructure the architecture.
Re:The top bug predictor is not technical, it's organization... by marmaduke on Wednesday December 18, 2019 @01:40PM (#21827830)
That's a tall order in a 100k LOC app, for a small team with budget constraints. I'm pretty sure they couldn't do it your way, whereas the prelayered way set them up for a success.

Prelayered raises initial complexity while lowering eventual complexity. It also protects the core layers where the IP is (presumably) from regressions during retrofit.

Re:The top bug predictor is not technical, it's organization... by organsnyder on Wednesday December 18, 2019 @07:48AM (#21824262)
I did a project like that at my old job. It was a single screen with a single purpose (login the user via oauth SSO, then collect a couple of pieces of input and submit them to a backend webservice), so it was assigned to me rather than creating a project team. To make it match the rest of our application architecture I created a REST layer in C# that communicated via SOAP to an ESB that forwarded the SOAP request to a Java webservice that finally forwarded it to the backend system. I did depart from our organizational norm by doing the frontend with plain HTML+JS (plus Boostrap, IIRC) rather than AngularJS.

Yes, it was complicated, but I think there is a benefit: it's very clear where certain functionality should live. The C# REST layer was application-facing, so it took care of SSO and basic validation. The Java webservice contained the business logic to validate things from an broader enterprise perspective. The ESB was a piece of trash that did provide authnz so the Java webservice didn't have to.

Was it worth the complexity? Probably not, in this case. But those sorts of applications tend to have long lifespans and evolving requirements, so the standardization can be helpful.

Re:The top bug predictor is not technical, it's organization... by ratww on Wednesday December 18, 2019 @11:53AM (#21826769)
> Yes, it was complicated, but I think there is a benefit: it's very clear where certain functionality should live

Off-topic, but your post reminds me of this Michael Feathers article [1], where he argues that while programming languages have tools to support encapsulation, the don't really work, but the thing about microservices (or layers in this case) is that they actually force us to actually encapsulate our code.

[1] https://michaelfeathers.silvrback.com/microservices-and-the-...

Re:The top bug predictor is not technical, it's organization... by organsnyder on Wednesday December 18, 2019 @01:40PM (#21827827)
That's a really good article—thanks for sharing it. I totally agree that forced encapsulation (ideally with tightly-governed contract-first APIs) is the most enticing selling point of microservices.
Re:The top bug predictor is not technical, it's organization... by wayoutthere on Wednesday December 18, 2019 @11:49AM (#21826721)
I would say that this could very easily be justified as standardizing and de-skilling development and production operations. That's a very good business reason to standardize architecture patterns, because it's cheaper to use a pattern that is sometimes overkill than it is to have a bespoke architecture for every app.
Re:The top bug predictor is not technical, it's organization... by NicoJuicy on Wednesday December 18, 2019 @07:07AM (#21824037)
I actually like DDD, where code is executed per domain with a bounded context.

Not for a single person though, but it will force kin developers to think more deeply.

Otherwise it could easily result in a code-mesh/hell.

Re:The top bug predictor is not technical, it's organization... by debt on Wednesday December 18, 2019 @09:40AM (#21825262)
I’m trying an experiment in my new role where I deliberately avoid these types of projects.

They usually don’t deliver on time and are too stressful to work with. It’s not worth it both personally and from a career perspective.

However if they manage to deliver a complex design on time, I’ll have lost a great career opportunity. It’s a gamble either way, but high complexity both in organization and design, usually yields a high failure rate on just about every metric I can think of except the metric of “I’m going to use this complex design to get another job and bail myself out of the dumpster fire I’m creating before I have to deliver anything of value”.

Re:The top bug predictor is not technical, it's organization... by 0x445442 on Wednesday December 18, 2019 @10:02AM (#21825506)
What is your avoidance mechanism if you don't mind me asking?
Re:The top bug predictor is not technical, it's organization... by debt on Wednesday December 18, 2019 @10:56AM (#21826112)
Figure how to support it without being involved in actual deliverables. Or transfer to a new team/project. Or both.
Re:The top bug predictor is not technical, it's organization... by spookthesunset on Wednesday December 18, 2019 @11:34AM (#21826546)
I’ve had those “well, your project is fucked” meetings. The ones where all the leads are architecture astronauts inventing requirements as they go. “We have to have the ability to pass the original authentication the entire way down the stack including the rabbitmq instance too.

Why?

“Security”

Okay....

... astronaut proceeds to fill two whiteboards with ungrounded nonsense.

All you can go is smirk and just wait until the whole project gets mysteriously canceled because no mortal could ever implement it successfully.

Honestly as long as I don’t need to directly depend on them, these are some of my more favorite meetings. So surreal. That and when the team infights the entire time.

Re:The top bug predictor is not technical, it's organization... by jiggawatts on Wednesday December 18, 2019 @04:17PM (#21829576)
The most impressive architecture I've ever seen was from these two consultants from a big-4 consultancy that had been sitting at a desk at the customer site for literally years. They had lunch together, never talked to anyone that I could see, and I didn't even know what they did for the first couple of years.

I walked past their desk one evening after hours and noticed a printed A3 page of their high-level design diagram. It was... spectacular.

It had over a hundred tiny icons, each representing various systems. Triangles for directory systems, cylinders for databases, and little arrows connecting these things.

You have to picture a spider web of connections between dozens of each type of system.

The notion that this could be implemented was absurd beyond all comprehension. Just one of the tiny little arrows was connecting SAP to a custom system vaguely similar to Siebel. This arrow represented on the order of thousands of tables and API endpoints that need to be hooked up. Another arrow connected an Active Directory with a million accounts to an Oracle directory of the same scale. Another arrow represented synchronisation between a cloud-hosted payroll service to an on-premises equivalent product.

Half the systems didn't exist. Three quarters of the connections didn't exist. Most would have to be written as bespoke code. Some of the arrows would in turn require load balancers, distributed systems, and change tracking databases of their own. We're talking thousands of man years of effort to implement this thing.

It was audacious in the breadth of its scope to the point of going past insane into the brilliant daring art that's only possible if you can appreciate it at the right level of understanding.

That understanding was that these two brilliant people had been collecting something like $4K/day each for years and produced something that dares your to call them on their bluff. But nobody dared say that the emperor has no clothes. They pulled it off.

I was truly impressed.

Re:The top bug predictor is not technical, it's organization... by spookthesunset on Wednesday December 18, 2019 @04:50PM (#21829840)
The nice thing about those kinds of bozos is it helps you filter out other adjacent bozos as well. Anybody who thinks said bozos are on the right track can immediately go into your "yeah, they don't know what they are talking about" bucket.

That being said, I took a picture of the two whiteboards after this dude filled it up with their god-like wisdom. It was truly a marvel of ungrounded architecture.

Re:The top bug predictor is not technical, it's organization... by ZainRiz on Wednesday December 18, 2019 @06:08PM (#21830421)
The number of code repositories I've seen where the database layer was (leakily) abstracted away "in case we ever need to migrate" is WAY greater than the number of code bases where there was actually a need to migrate.

Yet they all still introduced the headaches of having to update the abstraction layer whenever you wanted to make schema changes

Re:The top bug predictor is not technical, it's organization... by he0001 on Thursday December 19, 2019 @09:12AM (#21835006)
What would you do instead?
Re:The top bug predictor is not technical, it's organization... by yellowapple on Wednesday December 18, 2019 @06:13PM (#21830465)
Are these three tiers respectively called "model", "view", and "controller", by chance?
Re:The top bug predictor is not technical, it's organization... by trophycase on Wednesday December 18, 2019 @02:01PM (#21828049)
Decoupling and modular design is pointless?
Re:The top bug predictor is not technical, it's organization... by jiggawatts on Wednesday December 18, 2019 @04:19PM (#21829601)
In this case, yes. There is such a thing as pointless busywork that has no tangible benefit to the business, user, or the future codebase maintainer.
Re:The top bug predictor is not technical, it's organization... by he0001 on Thursday December 19, 2019 @09:05AM (#21834949)
What do you propose instead?
Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @07:35AM (#21824179)
> That's why I'm a skeptic of a number of modern development practices that deliberately increase the complexity of software

Maybe I'm nitpicking, but the article points out the number #1 predictor of software bugs is not the complexity of software but of the organization itself. A single person can make an hugely complex piece of software, and a relatively large team can make a conceptually simple system.

As for software complexity itself, there's an interesting research result that the thing that matters the most is line count. Not cyclomatic complexity, not the type system, not modularity or test coverage, not the programming language -- looking at the line count alone trumped all the other metrics in predicting flaws. (I can't look for this paper now, but I'm sure with a bit of googling anyone can).

Re:The top bug predictor is not technical, it's organization... by iainmerrick on Wednesday December 18, 2019 @08:02AM (#21824368)
A single person can make an hugely complex piece of software, and a relatively large team can make a conceptually simple system.

In practice I think you tend to hit Conway’s law -- organizations build software that mirrors their own organizational structure. So it’s hard for large teams to make simple designs.

I’m very skeptical about that line count metric; in my observation bugs tend to sit between modules due to bad interface design. But I could certainly believe that bad modularisation is correlated with line count (in the form of excessive boilerplate).

Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @08:05AM (#21824389)
You can be skeptical, but this has been tested empirically. Defect density per lines is relatively constant (this is a well-known empirical result, which you can also google), which means more lines predict more bugs. When researchers contrasted line count vs bad modularization, line count was the better predictor (precision & recall).

Maybe it's anti-intuitive, but it's what reality shows :)

Re:The top bug predictor is not technical, it's organization... by vanderZwan on Wednesday December 18, 2019 @08:50AM (#21824743)
Maybe it's something as banal as there being a high enough chance of mistakes per LOC that this factor ends up dominating the other factors.
Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @08:58AM (#21824830)
Maybe. The key takeaway of this for me is: if you want to introduce a bug-predicting metric, you must do better than simple LOC count. If you can't do better, then ditch your metric :)
Re:The top bug predictor is not technical, it's organization... by MontyCarloHall on Wednesday December 18, 2019 @09:06AM (#21824904)
>if you want to introduce a bug-predicting metric, you must do better than simple LOC count

Agreed. As I pointed out in another post[0], a good candidate for this metric is the amount of unnecessary code, which is often a proxy for unnecessarily large/complex teams.

[0] https://news.ycombinator.com/item?id=21824110

Re:The top bug predictor is not technical, it's organization... by lallysingh on Wednesday December 18, 2019 @10:08AM (#21825557)
There's also just reading/remembering costs per LOC that make it harder to track specifics about APIs and your own code.

Smaller code fits in your head better, and stays more predictable. You don't have as many weird if-conditions to remember.

Re:The top bug predictor is not technical, it's organization... by iainmerrick on Wednesday December 18, 2019 @01:01PM (#21827454)
You don't have as many weird if-conditions to remember.

More LOC doesn’t necessarily mean more if-conditions, though! For code written in different styles.

It’s a strong statement that LOC and LOC alone is the best known predictor of bug rate, but that seems to be what several people in this thread are saying.

For example, I think most people (though not all) would agree that very dense code full of tricky one-liners (think Perl Golf) is more likely to be buggy and hard to maintain. But if so, “number of control structures used” or some such ought to be a better metric than plain LOC (I assume we’re using “LOC” literally here, not as a shorthand for something else).

Maybe there’s some second-order effect going on? Like very dense code discouraging modifications, so it gets less maintenance, and therefore accrues fewer bugs over time?

This is an interesting topic! Any research links appreciated.

Re:The top bug predictor is not technical, it's organization... by iainmerrick on Wednesday December 18, 2019 @12:52PM (#21827364)
You can be skeptical, but this has been tested empirically.

Yeah, I wasn’t claiming to be right, more noting my reaction! I’ll look up the research -- any links appreciated.

Re:The top bug predictor is not technical, it's organization... by 0x445442 on Wednesday December 18, 2019 @10:08AM (#21825573)
> in my observation bugs tend to sit between modules due to bad interface design

Yep, and when you start ripping the monolith apart into separate version controlled projects and deployment pipelines without addressing the interface issues you've significantly increased the complexity of your work products.

Re:The top bug predictor is not technical, it's organization... by matwood on Wednesday December 18, 2019 @11:39AM (#21826612)
Keep in mind that size doesn't necessarily equal complex. Where I have seen Conways law most clearly is with dysfunctional teams regardless of size.

I was on a team once where one of the senior people was such a jerk no one wanted to work with him. This led to him and the team carving out a piece of the system that he alone worked on and interfaced with the rest of the system through a single queue. This was certainly not the best design and added all sorts of unnecessary complexity.

Another team I was on had a person who was a good programmer and tended to blow off design meetings. The organization never rarely reprimanded this person. In turn it led to various APIs being built that were close, but always not quite right.

Big company examples abound. Contrast and Apple keynote to a Google one. Sometimes I wonder if the people presenting at the Google one even work at the same company.

Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @07:43AM (#21824223)
That makes sense. Every line is a potential bug.

But it's not the only factor, and, quite frequently, it's a matter of correlation, as opposed to causation.

That kind of thing can be very tricky to determine.

When I write software, my first stab at a function tends to be a fairly linear, high-LoC solution, which I then refactor in stages; reducing LoC each time, and ensuring that the quality level remains consistent, or improves.

As far as quality goes, my first, naive stab, was just fine, and I have actually introduced bugs during my refactoring reduction.

Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @08:08AM (#21824407)
Note that I'm not arguing about underlying reasons, just saying what the empirical results show. That's reality.

So if you try to predict software bugs using modularization (or lack thereof) or "if-then-else" branches, or whatever complexity metric you can think of, you'll get one result. If you try to predict them using simple line count, you'll get another result. The second one will have better precision & recall. So no metric so far has been shown to be better than simply counting lines. That's not an obvious result, but it's the truth.

Sadly, you'll have to believe me because I cannot find the studies right now.

Re:The top bug predictor is not technical, it's organization... by shantly on Wednesday December 18, 2019 @08:29AM (#21824566)
Any results/findings for development speed or new hire on-boarding?
Re:The top bug predictor is not technical, it's organization... by usrusr on Wednesday December 18, 2019 @08:53AM (#21824768)
> Every line is a potential bug.

But there are many code lines that don't contain bugs. If only one could somehow make software only from those...

I'd take a slightly more mathematical approach to the code lines predictor: zero lines of code contain zero bugs, an infinite amount of lines of code contains an infinite number of bugs. It follows immediately that yeah, LOC is massively important and no, we are not interested in that, what we do want to know is how everything else is influencing the derivative.

(and on that digression about longish linear solutions: I completely stopped feeling bad about writing long, linear functions for long, linear problems. I've come to greatly prefer those over the indirections of forced subdivision. If there's a reason to subdivide other than "long is bad", great, go for it, but never subdivide just for having smaller parts. Use assign-once, nested scope etc to make the length more palatable)

Re:The top bug predictor is not technical, it's organization... by hnick on Wednesday December 18, 2019 @06:22PM (#21830535)
Pretty sure when the tests are green you're just meant to reach for the next sticky note ;)
Re:The top bug predictor is not technical, it's organization... by 0x445442 on Wednesday December 18, 2019 @10:15AM (#21825647)
Do you know if the paper controlled for all the variables in tandem. For example, I wouldn't think line count is necessarily mutually exclusive to modularization. That is to say, I'd expect well modularized code to reduce line count generally.
Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @12:41PM (#21827259)
I found a video about the paper: the presenter claims the author of the paper (not the same person) did a double-barrelled correlation and that no metric had better predicting value than "simply doing wc -l on the source code".

See minute 39:30: https://vimeo.com/9270320

Re:The top bug predictor is not technical, it's organization... by 0x445442 on Wednesday December 18, 2019 @05:03PM (#21829947)
Thanks for finding that.
Re:The top bug predictor is not technical, it's organization... by the_af on Thursday December 19, 2019 @08:37AM (#21834752)
You're welcome. I've watched the whole video and it's pretty interesting. Not being Canadian or Australian I missed most of the jokes though :P
Re:The top bug predictor is not technical, it's organization... by the_af on Wednesday December 18, 2019 @10:16AM (#21825664)
I think it did, that's the thing. Unfortunately since I cannot find the paper now, I can't tell you :(
Re:The top bug predictor is not technical, it's organization... by andydavieswork on Wednesday December 18, 2019 @06:54AM (#21823967)
> In order to do Big Stuff, you need a Big Team.

Depends on your definition of Big Stuff. If you mean send a rocket to Mars, then yes. But the vast majority of us are working on simple web apps that might call a few apis, yet these seem to require Big Teams. Compare that to what a single game developer might produce, and compare the complexity and performance of the product.

I think we need Big Teams for Small Stuff precisely _because_ of these 'modern development practices' that you mention. Getting things done in these paradigms takes _forever_, so you need a Big Team.

Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @07:11AM (#21824047)
That's true. Like I said, I can only speak from my experience.

I do think that we are in a sort of "dependency hell," that is sorting itself out. In the end, a few really good dependencies will still be standing in the blasted wasteland.

Dependencies mean that a small team can do Big Stuff, but that relies on the dependency being good.

"Good" means a lot of things. Low bug count is one metric, but so is clear documentation, community support, developer support, and even tribal knowledge. It doesn't necessarily mean "buzzword-compliant," but sometimes aligning to modern "buzz" means that it benefits from the tribal knowledge that exists for that term, and you can deprecate some things like documentation and training.

People often think that I'm a dependency curmudgeon. I'm not. I am, however, a dependency skeptic.

I will rely on operating system frameworks and utilities almost without question, but I won't just add any old data processor to my project because it's "cool." I need to be convinced that it has good quality, good support, and a high "bus coefficient," not to mention that it meets my needs, and doesn't introduce a lot of extra overhead.

Nothing sucks more than building a system, based on a subsystem that disintegrates a year down the road. I suspect many folks that have built systems based on various Google tech, can relate. I have had that experience with Apple tech, over the years (Can you say "OpenDoc"? I knew you could!).

Re:The top bug predictor is not technical, it's organization... by chiefalchemist on Wednesday December 18, 2019 @07:35AM (#21824180)
> I think we need Big Teams for Small Stuff precisely _because_ of these 'modern development practices' that you mention.

Perhaps. But what I've also seen is the head count of a given project is a direct reflection of the intra-org status of the person heading the project.

There's a belief - that's a myth - that if 3 ppl is good the 6 is twice as good and time will be cut in half. I think we also know - with rare exception - that productivity slides as heads increase.

That's a given.

Then there's also a belief - again a myth - that some mod dev practices can fix the increased head count issue. It might mitigate it here and there. But MDP can only do so much to fix a dysfunctional org/group.

Ultimately it's a leadership/management issue. Process and technology are too often lipstick on a pig.

Re:The top bug predictor is not technical, it's organization... by pjc50 on Wednesday December 18, 2019 @10:43AM (#21825945)
> There's a belief - that's a myth - that if 3 ppl is good the 6 is twice as good and time will be cut in half. I think we also know - with rare exception - that productivity slides as heads increase.

This goes back to Brooks and has been true since longer than most of the programming industry has been alive. I do wonder why people are so resistant to learning from the past and just assuming "the way we do things now" must be an improvement.

Re:The top bug predictor is not technical, it's organization... by wehadfun on Wednesday December 18, 2019 @08:06AM (#21824392)
> that if 3 ppl is good the 6 is twice as good

This 6 person development team is promoted by the Agile Industry. They say 6 people is a sweet spot, so that if someone goes on vacation then some other developer can "cover" them.

Re:The top bug predictor is not technical, it's organization... by chiefalchemist on Wednesday December 18, 2019 @08:15PM (#21831210)
Yes. I should have said 6 and 12 or more. That said, it was only a quick refernce to the fact that productions drags as head count increases.
Re:The top bug predictor is not technical, it's organization... by pjc50 on Wednesday December 18, 2019 @07:43AM (#21824224)
In order to get Big VC Money, before doing a Big IPO, you need a Big Team doing a Big Plan. Nobody's going to give you a billion dollars for something that's simple enough for one person to do.

You may say, "but this problem doesn't need a billion dollars!", to which I say "your corporate ownership structure isn't complicated enough, you need to make sure that as much of the billion dollars sticks to your hands as possible after you fail". WeWork passim.

Re:The top bug predictor is not technical, it's organization... by bob33212 on Wednesday December 18, 2019 @08:15AM (#21824449)
I interviewed at a well funded company for engineering manager. The interview centered around how they were going to build a 100 person team so the job would include lots of interviewing and hiring.

I assume that some investor was told that "We are going to have 100 developers while our competitor has only 20" and the investor bought into that plan.

Re:The top bug predictor is not technical, it's organization... by blowski on Wednesday December 18, 2019 @10:01AM (#21825496)
Plus managers who define their worth by easily measurable values like how many 0s on their p+l statement, and lines to them on the org-chart. Success of the project is much more subjective.
Re:The top bug predictor is not technical, it's organization... by 0x445442 on Wednesday December 18, 2019 @09:51AM (#21825375)
I agree with everything you have said. But the trends in "The Enterprise" are to eschew these ideas in favor of overly complex serverless architectures with poorly specified interfaces where any pluggable developer/resource can perform hit and runs on any component. What I've seen this lead to is the most brittle, bug ridden, low quality software in my career. And the irony is it's led to none of the perceived benefits of serverless architectures but has enhanced all the drawbacks of monolith architectures.

My best guess is to why things have become this way is that middle management in "The Enterprised" reckoned "Agile" as an opportunity to commoditize software development.

Re:The top bug predictor is not technical, it's organization... by streetcat1 on Wednesday December 18, 2019 @09:38AM (#21825234)
You might be ignoring the productivity gains in software dev over the last 10 years.

With open-source, languages like go/rust, excellent IDEs and basically free compute, the amount that a single developer can produce is 10x/20x more.

Re:The top bug predictor is not technical, it's organization... by abraxas on Wednesday December 18, 2019 @01:51PM (#21827940)
This is pure hogwash. All that productivity and more has been available for two decades with Java and C#. It's just that hipsters rejected it wholesale because those are their parents' programming languages.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @10:56AM (#21826115)
Tell me about it.

I write in Swift. I love it.

I started with Machine Code (not ASM -Machine Code).

Also, all those lovely system frameworks are wonderful.

I used to use MacApp (Google it), and PowerPlant (Same).

AppKit and UIKit knock them into a cocked hat. SwiftUI shows promise, but it may be a year or two before it can really match the standards.

Re:The top bug predictor is not technical, it's organization... by afarrell on Wednesday December 18, 2019 @09:14AM (#21824999)
> This is a no-brainer.

It is NOT obvious to someone who hasn't thought about it for a while. Suppose someone is trying to persuade another person and just assumes that they already realize the costs of organisational complexity. There's a good chance they'll run into a wall and not get the message across.

If you think realizing it is a no-brainer, then your 25 years of experience is showing.

Re:The top bug predictor is not technical, it's organization... by ZainRiz on Wednesday December 18, 2019 @06:10PM (#21830440)
There's a name for the bias where something seems obvious once you've been told about it, but I can't remember what it's called (I don't think it's hindsight bias...)
Re:The top bug predictor is not technical, it's organization... by afarrell on Thursday December 19, 2019 @03:15PM (#21838775)
Egg of Columbus?
Re:The top bug predictor is not technical, it's organization... by jve on Wednesday December 18, 2019 @06:42AM (#21823909)
> I'm a skeptic of a number of modern development practices that deliberately increase the complexity of software. I won't name them, because I will then get a bunch of pithy responses.

Bring it on. Share your experience with youngsters. And let the elite confront with methodologies you maybe didn't have experience with.

Re:The top bug predictor is not technical, it's organization... by carlmr on Wednesday December 18, 2019 @07:07AM (#21824034)
I'd also be interested. Some drivers of complexity I would think of:

* Using many of the GoF/OOP patterns, because you may need extensibility at some point. Basically YAGNI.

* Complex, hard to mentally map, build systems (e.g. CMake).

* Designing for purity over simplicity (I'm actually big on FP, here I'm thinking of the Haskell crowd which IMHO sometimes overdoes it).

* Writing a complex architecture without prototyping. Often your prototype will tell you what you need. If you start architecting too much beforehand then you often waste time on some details that don't matter, and even worse, afterwards you try to force it into your architecture which doesn't actually fit the problem. The beauty of software is that it's easy to change things. Architecture on buildings is different because you need to make sure that you're not building the wrong thing. In software building the wrong thing can give you the right insights and still be faster than planning for every eventuality.

Re:The top bug predictor is not technical, it's organization... by doublement on Wednesday December 18, 2019 @11:59AM (#21826831)
> Writing a complex architecture without prototyping. Often your prototype will tell you what you need.

One million times yes. In my experience using a prototype as an input to a specification works much better than the other way around.

> Complex, hard to mentally map, build systems (e.g. CMake).

Also yes. It's almost to the point where one has to understand every detail of how CMake works to get it to do one (1) specific thing you need in your build process.

Re:The top bug predictor is not technical, it's organization... by heisenbit on Wednesday December 18, 2019 @07:46AM (#21824245)
* Splitting requirements documents into user stories and then evolving the document further. This practice can be improved upon by adding redundancy with attaching the document to user stories and enterprise wiki. Further optimization can get to the org to CMMI level 5 but requires investment in diversity of the most critical requirements in other locations and protection of these assets from being linked.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @07:00AM (#21823988)
Nah, that's OK. Thanks.

Just to clarify. I have been down this road. I am not interested in sacred cows or third rails.

I'm trying to do all my writing and commenting, based only on my own experience and insight.

I'm done with fighting on the Internet. I don't have the energy for it anymore.

Re:The top bug predictor is not technical, it's organization... by carlmr on Wednesday December 18, 2019 @07:17AM (#21824069)
I can respect that. Although I would have liked to hear your take on it, I know what you mean.
Re:The top bug predictor is not technical, it's organization... by bob33212 on Wednesday December 18, 2019 @08:20AM (#21824492)
Agile and Scrum can add a lot of meetings and processes and metrics into a development team. For non-technical managers this is great because they can create nice charts with story points for upper management.

The above comment can devolve into a flame war because non-technical managers see Agile and Scrum in a different light. They believe that without proper management developers will be unproductive.

Re:The top bug predictor is not technical, it's organization... by carlmr on Wednesday December 18, 2019 @08:24AM (#21824518)
I can't believe I forgot this one. Scrum is so terrible, I don't know why it's still being introduced.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @07:24AM (#21824105)
I'm always happy to chat (pontificate in an "OK Boomer" kind of way, I guess), but not in public forums. My screen name applies in a lot of places.
Re:The top bug predictor is not technical, it's organization... by Meai on Wednesday December 18, 2019 @07:47AM (#21824254)
I've started to see it that way too. Every place where there is source code, the complexity grows instantly - it's like a virus. The only firewall you can have for this is if you have it all in different projects that need to justify themselves on their own on all merits, financially, technically, etc.
Re:The top bug predictor is not technical, it's organization... by calineczka on Wednesday December 18, 2019 @06:43AM (#21823921)
> an aggregate of much more sequestered small parts, each treated as a separate full product

What does it mean exactly? I feel you are trying to share a nice idea but I can't comprehend it. What are those small parts? Classes? Modules? Services? What does it mean to treat them as a separate full product within an organization?

Re:The top bug predictor is not technical, it's organization... by asdfman123 on Wednesday December 18, 2019 @12:15PM (#21827006)
One simple way of hermetically sealing organizational complexity: microservices.

Many people don't seem to understand when to use microservices. They're not for small teams.

I believe the real benefit of them is that you can have a team at say, Amazon, who works on their product prediction engine. They have well defined input data, and they have well defined data consumers need as an output. Beyond that, they just have to coordinate within their own team to build what they need to.

They don't have to meet with stakeholders across the organization and get into debates with ten other guys in other departments about adding a database field. They have their own database, of their own design, and they do with it what they want. If they need more data they query some other microservice.

Re:The top bug predictor is not technical, it's organization... by carlmr on Wednesday December 18, 2019 @06:57AM (#21823977)
Not OP, but to me this is the Unix philosophy of having many small tools that work well and interact well.

Even if your modules are very separated, if you can't individually use and play around with them they become a part of a big blob of software. Services may be products, but only if they're idependently usable.

If you have a small product that's useful in and of itself (e.g. git) you can much more easily make it work well and then integrate with other good tools and replace those if necessary (e.g. if you have problems with Bitbucket/Jira/Confluence, you can switch them out for other solutions, e.g. Gitea).

But if you have a huge clomplex product then at some point it becomes organizationally impossible to move away from it.

Re:The top bug predictor is not technical, it's organization... by nradov on Wednesday December 18, 2019 @09:40AM (#21825259)
The Unix philosophy is all well and good, but it's very limiting. There are major types of valuable software products that simply can't be built out of small tools or services.
Re:The top bug predictor is not technical, it's organization... by HeroOfAges on Wednesday December 18, 2019 @12:59PM (#21827437)
While there are certainly many ways to build complex software, I haven't found composing a complex system from many simple and independent parts limiting.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @09:47AM (#21825326)
Exactly. It's just one way of doing things, and I definitely admit that some very good things have come from much more complex systems.

However, bug control is absolutely vital with these systems, and you definitely need some kind of quality-assurance system, or you will be hatin' life.

Re:The top bug predictor is not technical, it's organization... by anon73044 on Wednesday December 18, 2019 @10:33AM (#21825841)
Care to site some examples?
Re:The top bug predictor is not technical, it's organization... by Leherenn on Thursday December 19, 2019 @02:27AM (#21832751)
Anything performance related I'd say, e.g. stuff like games.

There are some overheads involved, and you lose optimisation possibilities.

Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @07:01AM (#21824001)
Exactly.
Re:The top bug predictor is not technical, it's organization... by ChrisMarshallNY on Wednesday December 18, 2019 @06:59AM (#21823986)
TL;DR: Lots of small modules (they could be drivers or classes), with narrow, well-defined, highly agnostic intersections.

Most of my coding work has been done as a lone programmer. Even when I was working as a member of a large team, I was fairly isolated, and my work was done within a team of 3 or fewer (including Yours Troolie).

I have also been doing device interface development for most of my career, so I am quite familiar with drivers and OS modules.

When I say "sequestered," I am generally talking about a functional domain, as opposed to a specific software pattern.

Drivers are a perfect example. They tend to be quite autonomous, require incredible quality, and have highly constrained and well-specified interfaces. These interfaces are usually extremely robust, change-resistant and well-understood.

They are also usually extremely limited; restricting what can go through them.

The CGI spec is sort of an example. It's a truly "opaque" interface, completely agnostic to the tech on either side.

There are no CGI libraries required to write stuff that supports it, there's no requirement for languages, other than the linking/stack requirements for the server, etc.

It's also a big fat pain to work with, and I don't miss writing CGI stuff at all.

It is possible to write a big project his way, but it is pretty agonizing. I've done it. Most programmers would blanch at the idea. Many managers and beancounters would, as well. It does not jive well with "Move fast and break things."

But there are some really big projects that work extremely well, that don't do this. It's just my experience in writing stuff.

When you write device control stuff, you have the luxury of a fairly restricted scope, but you also have the danger of Bad Things Happening, if you screw up (I've written film scanner drivers that have reformatted customer disks, for instance -FUN).

YMMV

Re:The top bug predictor is not technical, it's organization... by winrid on Wednesday December 18, 2019 @06:52AM (#21823959)
Based on my understanding a common name would probably be Slimlane, or Blade...
Re:The top bug predictor is not technical, it's organization... by downerending on Thursday December 19, 2019 @12:24PM (#21836979)
> Problem is, you need this "Big" stuff. It's crazy to do without it.

Sometimes you do. But many times big stuff gets written for reasons other than need. One of the best wins in our industry is to recognize that the big stuff isn't needed and to never start the project in the first place.