News for hackers. Stuff that matters.
Re:The Ball-of-Mud Transition, or how software gets complex by ColinWright on Monday October 14, 2013 @09:40AM (#6547161)
Picking up on adrianN's comment[0], when you have a collection of nodes and start connecting them at random, initially they are all disconnected (obviously) and any two that you pick are likely not to have any edges. This in the early stages, your graph is isolated nodes and isolated edges.

After a while, by chance, you happen to join an existing edge to a node. That component now has three vertices, and is 50% more likely to be chosen at random than the isolated edges.

There comes a point where you join two non-trivial components, and before long you reach a tipping point. Suddenly nearly every node you choose already belongs to a component, and that component starts vacuuming up everything.

Thus we have the emergence of "The Giant Component". This transition is sharp and well-studied. Whether you think of it as "obvious" depends on how much you study these things. I seem to recall that there is a major result that says that all first-order predicates have these threshold emergence properties, but it's been too long (30 years) since I studied this, and I could be wrong. I may be able to find some references if people really want me to.

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

Re:The Ball-of-Mud Transition, or how software gets complex by gavinpc on Monday October 14, 2013 @01:36PM (#6548529)
This is very close to the "percolation problem." [0]

According to Robert Sedgewick, this particular problem has no known mathematical solution, and the threshold (for a given N) is only obtained through, e.g. a Monte Carlo simulations where you randomly open sites until the grid percolates (akin to the adding of threads). The whole thing is a good application of the union find algorithm.

The threshhold for N > 2 is about 60%. Not sure how that applies to software complexity, but it's interesting to think about.

Thanks, Coursera!

[0] http://en.wikipedia.org/wiki/Percolation_threshold

Re:The Ball-of-Mud Transition, or how software gets complex by joe_the_user on Monday October 14, 2013 @11:12PM (#6551279)
You mean one particular percolation problem, I assume.

Just to clarify because one might interpret your statement to mean that percolation problems in general don't have exact formulas for their solution but the "exact formula" section in your link would say otherwise.

Re:The Ball-of-Mud Transition, or how software gets complex by selimthegrim on Monday October 14, 2013 @03:41PM (#6549178)
For general graphs, the situation is indeed poor. For lattices, much more is understood, cf. http://en.wikipedia.org/wiki/Stanislav_Smirnov
Re:The Ball-of-Mud Transition, or how software gets complex by vjoel on Monday October 14, 2013 @01:36PM (#6548532)
Transitive closure and connected components are not expressible in first-order logic, but maybe you are thinking of Fagin's 0-1 law for finite relational models[1]:

For a given first-order sentence s, as n -> infinity, the fraction of models of cardinality n that satisfy s approaches either 0 or 1.

[1] http://researcher.watson.ibm.com/researcher/files/us-fagin/t...