5 ms·
You gave the answer! Integration tests. And they work recursively, with a Kalman filter to approximate even in noisy conditions. "USL was inspired by Hamilton'
by peterburkimsher 5y ago
You gave the answer! Integration tests. And they work recursively, with a Kalman filter to approximate even in noisy conditions.
"USL was inspired by Hamilton's recognition of patterns or categories of errors occurring during Apollo software development. Errors at the interfaces between subsystem boundaries accounted for the majority of errors and were often the most subtle and most difficult to find. Each interface error was placed into a category identifying the means to prevent it by way of system definition. This process led to a set of six axioms, forming the basis for a mathematical constructive logical theory of control for designing systems that would eliminate entire classes of errors just by the way a system is defined.[3][4]"
https://en.wikipedia.org/wiki/Universal_Systems_Language https://en.wikipedia.org/wiki/Universal_Systems_Language
There's a diagram of rules on the USL Wikipedia page. The rules show triangle feedback loops with a parent, left, right child. Those are like generations of a Sierpiński triangle. Every part is trying to serve the Good Cause that it's working for, and love its neighbour.
https://en.wikipedia.org/wiki/Minimal_realization https://en.wikipedia.org/wiki/Minimal_realization
"any state-space model that is both controllable and observable and has the same input-output behaviour as the transfer function is said to be a minimal realization of the transfer function
The realization is called "minimal" because it describes the system with the minimum number of states."
https://en.wikipedia.org/wiki/Optimal_control https://en.wikipedia.org/wiki/Optimal_control
"the problem of driving the output to a desired nonzero level can be solved after the zero output one is."
An electronic analogy: find GND, then solve for 1.
A common solution strategy in many optimal control problems is to solve for the costate (sometimes called the shadow price)
A shadow price is a monetary value assigned to currently unknowable or difficult-to-calculate costs in the absence of correct market prices. It is based on the willingness to pay principle – the most accurate measure of the value of a good or service is what people are willing to give up in order to get it.
The costate summarizes in one number the marginal value of expanding or contracting the state variable next turn.
Each part looks ahead 1 generation, chooses left or right.
https://en.wikipedia.org/wiki/Kalman_decomposition https://en.wikipedia.org/wiki/Kalman_decomposition
convert a representation of any linear time-invariant (LTI) control system to a form in which the system can be decomposed into a standard form which makes clear the observable and controllable components of the system
Take a big problem, break it down, look for I/O ports. Or in software test development: layers of abstraction. A suggestion: only add a layer of abstraction when it's too big to fit on the screen at once. Use tools like code folding, tree views.
https://en.wikipedia.org/wiki/Optimal_control https://en.wikipedia.org/wiki/Optimal_control
Optimise for time? When we're in a hurry we break things. Another suggestion: aim to minimise entropy, maximise connectedness.
Thank you for asking a good question, and thank you for reading! Let's go and tidy up this world together, in software and hardware.
- kortex 5y agoThank you for the deep response! That is kind of what I figured, basically it always boils down to divide and conquer. It just feels like with software, it's simultaneously easier than mech eng in so many ways (everything is in silico, near infinite abstraction power, ability to automate so many parts), yet it feels like we are constantly struggling with complexity. It starts simple but then quickly becomes a ball of yarn. Maybe that perception is wrong, but if there is some truth to that intuition, I think it is due in part to this: software is all degrees of freedom and very few invariants to start, but then the system space quickly fills with rigid rules than can intersect in unpredictable ways. Physical engineering, you start with lots of invariants (the laws of physics, materials, chemistry, electronics, and geometry) but they are all thoroughly documented at this point. Things intersect, systems interact, but it feels much more bounded. You're only ever gonna have 3 dimensions, 6 simple machines, 92-ish usable elements, the standard model and universal constants. This is why I value Rich Hickey's "Simple made easy" as the the exemplar of software philosophy. It's easy to say "oh yeah modular code good" but it's another to actually write code that is naturally decoupled. As an aside, both disciplines tend to benefit from "throw more hardware at it!"
- peterburkimsher 5y agoThank you so much for being a helpful messenger! divide and conquer Yes, problems are finite, so we can Binary Search them to a single answer. quickly becomes a ball of yarn Looks like chaotic system, but actually chaos is just a fractal at a dimension we don't understand. Every XML tag is a dimension {for loop, if statement, indenting, git blame with names should be git thank}. Chaos is just a Wolfram rule that's not recursive self-sacrifice Rule 90 Sierpinski Triangle. Let's simplify our software design to make it follow a fractal pattern, and balance the forces. Physical engineering, you start with lots of invariants Sounds like Haskell or functional programming. Personally I like to add the extra tags, but as commented code to describe the meaning, translate to humans what the code does. Prefer to do so inline (cache) and top of function/file (RAM) not in separate documentation (disk). 6 simple machines Thank you so much, you good messenger! Through your message, God just taught mechanical engineering paradigms to help with making more analogies. Pendulum is clock signal. While in the shower, there was a spider. It tries, falls, tries again with slightly different parameters. It outsources processing to the Web (there was another Hacker News article about spiders and webs and brains). Everything can be modelled as a mass-spring-damper system, so we can just translate the transfer functions. We can optimise for Optimal Control in the limited 3D we understand, then project out again to higher-dimensions. Spiders make many 2D webs that intersect. inclined plane, // gravity (?) // not only gravity // inclined plane is like a wide lever lever, // straight line wedge, // fulcrum. fixed point on ground. GND 0. Triangle. Sierpinski Triangle. wheel // continuous motion, round circle (?) or a spiral? do circles exist? yes. ours are imperfect though. colleague said it's the bearings that break in appliances. axle, // turn, change the world. // balance electron spin // balance like yin yang cosmic microwave background, 2 axles pulley, // rotation equivalent to lever on wedge. // bicycle is 2x pulleys with gears (cone), digital-analogue converter moving forward screw // reproduce throw more hardware at it! // ! factorially // make a spiral cone from a round circle and straight line. Sorry that the thoughts are not translated to full sentences yet, please email and we can chat more! there's many more ideas where these are coming from, not for my personal glory, but for the greater Good. Ideas of spiderweb network topology, Facebook/Meta engineering director of social network bringing peace in diversity using shared {music, memes} taste, UncleBob https://www.youtube.com/watch?v=BSaAMQVq01E&t=2021s https://www.youtube.com/watch?v=BSaAMQVq01E&t=2021s "love your neighbour the code -> clean as you go". Let's pray for the JWST telescope. Young men will see visions, and old men will dream dreams. It's our dream that the humans can see the tree better: not just galaxies (branches) but stars (leaves) and planets (pollen). There is a root system underground also, which mirrors the tree we can see. Humans can also use other senses {eyes, ears, nose, mouth, hands, feet} but the JWST is the best eyes that humans can make with technology today. It's not perfect, but it's the best that humans can do. And it will work well enough to be useful, not just for James Webb's sake, but for the Greater Good.