[HN Gopher] Maybe the Spaghetti Code Conjecture Is False
___________________________________________________________________
Maybe the Spaghetti Code Conjecture Is False
Author : nickdrozd
Score : 57 points
Date : 2021-09-25 18:21 UTC (4 hours ago)
(HTM) web link (nickdrozd.github.io)
(TXT) w3m dump (nickdrozd.github.io)
| justicezyx wrote:
| I am about to write a rant about this author must be out of his
| mind or simply a junior engineer lost in narcissism...
|
| How wrong I have been!
|
| https://en.m.wikipedia.org/wiki/Busy_beaver#:~:text=In%20the....
| Busy beaver game is to design a Turing machine that produces the
| most output for a halting program. And this conjecture is about a
| general property of the programs that can produce the most
| output.
| cryptica wrote:
| It's incredible what kinds of mental gymnastics some people will
| perform in order to justify incompetence.
|
| > "programs ought to be, in some sense, as complicated as
| possible"
|
| "ought to be" - Why? To achieve what?
|
| That's the main problem with academia; when it comes to practical
| matters, they often fail to articulate "why?"
|
| I guess it starts with the fact that a lot of people who got PhDs
| never asked themselves why they needed a PhD to begin with...
| They can answer the universe's most difficult questions but they
| can't answer simple practical questions which start with the word
| "why."
| cma wrote:
| The quote is: "The Spaghetti Code Conjecture says that Busy
| Beaver programs ought to be, in some sense, as complicated as
| possible."
|
| It takes real gymnastics to misquote that into:
|
| "programs ought to be, in some sense, as complicated as
| possible"
| robbedpeter wrote:
| What a bizarre misquote... busy beaver programs are a
| specific type of algorithm, in the sense that you want to
| extract the most possible output, barring infinitely
| generating functions. It makes a lot of sense that the
| programs be as complicated as you possibly can make them,
| from the conceptual level to the explicit coding, because the
| problem space is densely complex and most of the simple stuff
| has been iterated over.
|
| It's a statement about number theory, not general software
| design best practice.
| vanderZwan wrote:
| I kind of wonder if there is some kind of overlap between this
| problem or some variation of it, and the (as I understand) still
| open question of how life manages to evolve as quickly as it
| does.
| andrewflnr wrote:
| This reminds me of the distinction between entropy and
| complexity. A hot cup of water has high entropy, a cold ant has
| high complexity. Another example I've seen describes the
| transition between the low-entropy state of two different-
| temperature bodies of fluid in contact with each other, and the
| high entropy state when they've equalized: complexity arises in
| the mixing process, with convection and mixing.
|
| Maybe spaghetti code is closer to being like entropy, and we
| should expect busy beavers to be more analogous to complexity.
| Busy beavers are kind of on the transition between terminating
| (low-entropy?) and non-terminating programs (high entropy?), and
| complexity arises between low and high entropy temporally... Not
| a perfect analogy I know, even if I knew how to describe it
| precisely.
| goldenkey wrote:
| Entropy itself is somewhat dubious as Carlo Rovelli gets into
| with the idea of relative entropy and course-graining. Entropy
| only exists with regard to a representation / set of observable
| operators. When you change your basis, you get a new entropy.
| So the cold ant, looks like it has low entropy because you've
| used the temperature observable. Under the
| structural/integrated-information observables, it would have a
| much higher entropy.
|
| Read more here: Is Time's Arrow Perspectival? - Carlo Rovelli
|
| https://arxiv.org/pdf/1505.01125.pdf
| mybrid wrote:
| Spaghetti Code: using a 1000 lines of code where 100 will do.
| HPsquared wrote:
| I don't know about that, code golf often produces spaghetti.
| klodolph wrote:
| That's not what people mean when they say "spaghetti code".
| When people are complaining about spaghetti code, they're
| complaining that the code is difficult to follow. Perhaps the
| control flow goes all over the place, for example.
|
| That's how the spaghetti code conjecture got its name. It's a
| conjecture about the control flow structure of busy beaver
| machines. In this conjecture, you're comparing different
| programs with the same _size_ (if we think of size as number of
| states), but where the control structure is connected in
| different ways.
| throw_m239339 wrote:
| Maybe but at some point, at least in my country, anything
| that wasn't a rigid bunch of classes, interfaces and what not
| following all that Java EE / Designer pattern/ Solid / OOP
| stuff was deemed "spaghetti code" and it made you "a bad
| developer", regardless of the language used. Granted this was
| in the mid 2000 before people "rediscovering" the merits of
| functional programming. Today, procedural C style coding or
| functional programming is more accepted in dev shops. I don't
| think I've heard about UML in the last 5 years anywhere I
| worked for instance. Young programmers are lucky they avoided
| that era...
| rvense wrote:
| Many people fret about spaghetti code. Personally, I also fear
| lasagna code - too many layers, often with poor separation.
| nine_zeros wrote:
| Describes my workplace. Too pedantic on layers and
| abstractions. Endless code reviews over nonsense. Before anyone
| says this - we have linters. The problem is nits about how the
| code reviewer would do things.
|
| The pedants also can't figure why nothing gets done.
| dhosek wrote:
| It's amazing how many people jumped in to comment without even a
| minimal glance at the article.
|
| Please folks, before jumping in to comment, at least make sure
| the article is about what you think it's about.
___________________________________________________________________
(page generated 2021-09-25 23:00 UTC)