convert Metric to English and English to Metric using pseudocod
-
Most things which are undeniably complex are composed of simpler components which in turn are composed of yet simpler components, and so on. In short, just because a system is composed of simple components doesn’t imply a lack of complexity; the complexity is often in the interactions. This can be seen, for example, in conway's game of life.
Steve
Stephen Hewitt wrote:
just because a system is composed of simple components doesn’t imply a lack of complexity; the complexity is often in the interactions
But it does imply that if we can fully understand the simple components, we can build a machine that replicates the behavior of the larger system without needing to understand all of the complex interactions before we do; and that we'll be in a better position to understand those complex interactions after we replicate them using just our understanding of the underlying and simpler components. For example, after constructing a mechanical or computer replica of ants making random turns and dropping pheromones when they have food in hand, we can better understand the behavior of the colony as a whole. The point being that this kind of investigation is doable - we can make immediate progress on the first step because it is simple; and that having made that progress, it will be easier to take a next step, etc. And that's the kind of thinking and doing we advocate. Start with something small and simple - even if you don't understand the whole thing - and see what happens. But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks". Take your pick.
-
Stephen Hewitt wrote:
just because a system is composed of simple components doesn’t imply a lack of complexity; the complexity is often in the interactions
But it does imply that if we can fully understand the simple components, we can build a machine that replicates the behavior of the larger system without needing to understand all of the complex interactions before we do; and that we'll be in a better position to understand those complex interactions after we replicate them using just our understanding of the underlying and simpler components. For example, after constructing a mechanical or computer replica of ants making random turns and dropping pheromones when they have food in hand, we can better understand the behavior of the colony as a whole. The point being that this kind of investigation is doable - we can make immediate progress on the first step because it is simple; and that having made that progress, it will be easier to take a next step, etc. And that's the kind of thinking and doing we advocate. Start with something small and simple - even if you don't understand the whole thing - and see what happens. But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks". Take your pick.
The Grand Negus wrote:
But it does imply that if we can fully understand the simple components, we can build a machine that replicates the behavior of the larger system without needing to understand all of the complex interactions before we do; and that we'll be in a better position to understand those complex interactions after we replicate them using just our understanding of the underlying and simpler components.
Possibly, but you can't just know how to make a transistor and make a computer: you have to know how to put them together.
Steve
-
The Grand Negus wrote:
But it does imply that if we can fully understand the simple components, we can build a machine that replicates the behavior of the larger system without needing to understand all of the complex interactions before we do; and that we'll be in a better position to understand those complex interactions after we replicate them using just our understanding of the underlying and simpler components.
Possibly, but you can't just know how to make a transistor and make a computer: you have to know how to put them together.
Steve
Stephen Hewitt wrote:
Possibly, but you can't just know how to make a transistor and make a computer: you have to know how to put them together.
Of course not. I never said anything like that. I said that having made a transistor, and hooking a few of them together to "see what happens", you'll be in a better position to take the next step, and the next, eventually leading to a computer. Are you purposely being contrary?
-
Stephen Hewitt wrote:
Possibly, but you can't just know how to make a transistor and make a computer: you have to know how to put them together.
Of course not. I never said anything like that. I said that having made a transistor, and hooking a few of them together to "see what happens", you'll be in a better position to take the next step, and the next, eventually leading to a computer. Are you purposely being contrary?
The Grand Negus wrote:
Are you purposely being contrary?
No. I could ask you the same question.
Steve
-
Stephen Hewitt wrote:
In general you only reply to questions which give you some "plausibile deniability".
Actually, I reply when the opportunity presents itself to promote - not myself - but one or more of several principles that lead to different ways of thinking about programming, and that, when applied, produce significantly different programs. Our Plain English development system is one example.
The Grand Negus wrote:
reply when the opportunity presents itself to promote - not myself - but one or more of several principles that lead to different ways of thinking about programming, and that, when applied, produce significantly different programs.
In other words, you reply to promote your ideas. Which, regardless of their intrinsic value, often havea rather tenuous relationship to the topics being discussed prior to your reply. Example: i think this thread at one time had something to do with UOM conversions... (BTW - since most of us know you only by your ideas, drawing a distinction between them and yourself is somewhat pointless)
---- I just want you to be happy; That's my only little wish...
-
The Grand Negus wrote:
reply when the opportunity presents itself to promote - not myself - but one or more of several principles that lead to different ways of thinking about programming, and that, when applied, produce significantly different programs.
In other words, you reply to promote your ideas. Which, regardless of their intrinsic value, often havea rather tenuous relationship to the topics being discussed prior to your reply. Example: i think this thread at one time had something to do with UOM conversions... (BTW - since most of us know you only by your ideas, drawing a distinction between them and yourself is somewhat pointless)
---- I just want you to be happy; That's my only little wish...
Shog9 wrote:
In other words, you reply to promote your ideas.
Doesn't everyone? Or are you responding for someone else? :-D
Shog9 wrote:
Example: i think this thread at one time had something to do with UOM conversions...
Check back, Shog. The topic was pseudocode. And the link between pseudocode and Plain English code is both short and direct. Besides, you know how I hate to see beginners get off on the wrong foot. How could I resist?
-
The Grand Negus wrote:
reply when the opportunity presents itself to promote - not myself - but one or more of several principles that lead to different ways of thinking about programming, and that, when applied, produce significantly different programs.
In other words, you reply to promote your ideas. Which, regardless of their intrinsic value, often havea rather tenuous relationship to the topics being discussed prior to your reply. Example: i think this thread at one time had something to do with UOM conversions... (BTW - since most of us know you only by your ideas, drawing a distinction between them and yourself is somewhat pointless)
---- I just want you to be happy; That's my only little wish...
Shog9 wrote:
(BTW - since most of us know you only by your ideas, drawing a distinction between them and yourself is somewhat pointless)
On the contrary, the ideas (at least the good ones) existed long before I did, and will certainly live on long after I'm dead. I'm just a "link in the chain" - a present voice enunciating eternal truths in ways suited to my contemporaries. Others have gone before me, and still others will pick up the torch when I'm gone. By the way, what do you see as your role in the great scheme of things?
-
Shog9 wrote:
(BTW - since most of us know you only by your ideas, drawing a distinction between them and yourself is somewhat pointless)
On the contrary, the ideas (at least the good ones) existed long before I did, and will certainly live on long after I'm dead. I'm just a "link in the chain" - a present voice enunciating eternal truths in ways suited to my contemporaries. Others have gone before me, and still others will pick up the torch when I'm gone. By the way, what do you see as your role in the great scheme of things?
The Grand Negus wrote:
On the contrary, the ideas (at least the good ones) existed long before I did, and will certainly live on long after I'm dead.
Quite likely. But the ideas that you espouse, good and bad, identify you. A quick scan through this thread reveals three examples of pseudocode, each unique (within the context of this thread at least). You are known in this thread by your pseudocode. You are also known in this thread by your bringing up the notion of a compiler that accepts a pseudocode-like syntax as input (although, it wouldn't exactly be pseudocode in that case). This latter idea is the one you've become known for, to the extent that separating you from the idea isn't an activity likely to be seen as productive by... anyone here.
The Grand Negus wrote:
By the way, what do you see as your role in the great scheme of things?
Grease on the cogs, catalyst in the concoction. Maybe.
---- I just want you to be happy; That's my only little wish...
-
The Grand Negus wrote:
On the contrary, the ideas (at least the good ones) existed long before I did, and will certainly live on long after I'm dead.
Quite likely. But the ideas that you espouse, good and bad, identify you. A quick scan through this thread reveals three examples of pseudocode, each unique (within the context of this thread at least). You are known in this thread by your pseudocode. You are also known in this thread by your bringing up the notion of a compiler that accepts a pseudocode-like syntax as input (although, it wouldn't exactly be pseudocode in that case). This latter idea is the one you've become known for, to the extent that separating you from the idea isn't an activity likely to be seen as productive by... anyone here.
The Grand Negus wrote:
By the way, what do you see as your role in the great scheme of things?
Grease on the cogs, catalyst in the concoction. Maybe.
---- I just want you to be happy; That's my only little wish...
Shog9 wrote:
This latter idea is the one you've become known for, to the extent that separating you from the idea isn't an activity likely to be seen as productive by... anyone here.
Which is a shame. And something, frankly, that I don't understand. Our message, stated in many ways and in many places in these forums, is this: Programming isn't fun anymore. It's not fun to learn, it's not fun to teach, and it's certainly not fun as an occupation. One can no longer master the machine, the operating system, or the development tools - they're just too damn and unnecessarily complicated. But since no one can create who is not master of his tools, the image of God in us - the little creator made after the pattern of the Big Creator - is squelched. The whole thing, therefore, must be simplified or we die (or at least the only part of us that matters, the creative part, dies). And what steps do we recommend? Well... y'know.
Shog9 wrote:
Grease on the cogs, catalyst in the concoction. Maybe.
Fair enough. Start there. But take care not to weary in well-doing, and don't let cowardice or laziness or both keep you from the next step. You're clearly much too gifted to spend your life as an oil can.
-
Stephen Hewitt wrote:
just because a system is composed of simple components doesn’t imply a lack of complexity; the complexity is often in the interactions
But it does imply that if we can fully understand the simple components, we can build a machine that replicates the behavior of the larger system without needing to understand all of the complex interactions before we do; and that we'll be in a better position to understand those complex interactions after we replicate them using just our understanding of the underlying and simpler components. For example, after constructing a mechanical or computer replica of ants making random turns and dropping pheromones when they have food in hand, we can better understand the behavior of the colony as a whole. The point being that this kind of investigation is doable - we can make immediate progress on the first step because it is simple; and that having made that progress, it will be easier to take a next step, etc. And that's the kind of thinking and doing we advocate. Start with something small and simple - even if you don't understand the whole thing - and see what happens. But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks". Take your pick.
The Grand Negus wrote:
But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks".
So you are saying anyone can and should build a 400 passenger airbus to cross the ocean, without understanding aerodynamics, fuel consumption, weight loss to fuel use balance dynamics? You are more far gone than I thought! Well, go for it! But I can guarantee you that you shall NEVER achieve flight unless it is just long enough to kill all the witnesses. Madness. But keep those monkeys typing, sooner or later they will type out a full copy of war and peace through random strokes. When they do, call me, you can laugh then. Until then, the rest of us have real work to accomplish, and are doing so, including aerodynamics and spatial physics, in 4+ dimensions. You can stick to your one dimensional thought, personally I prefer a wider universe of movement or my legs fall asleep. I don't make mountains out of molehills, if anything through quaternion mathematics I have reduced complexity by increasing dimensions. There is never more math than needed, which is far more than you will ever understand.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
The Grand Negus wrote:
But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks".
So you are saying anyone can and should build a 400 passenger airbus to cross the ocean, without understanding aerodynamics, fuel consumption, weight loss to fuel use balance dynamics? You are more far gone than I thought! Well, go for it! But I can guarantee you that you shall NEVER achieve flight unless it is just long enough to kill all the witnesses. Madness. But keep those monkeys typing, sooner or later they will type out a full copy of war and peace through random strokes. When they do, call me, you can laugh then. Until then, the rest of us have real work to accomplish, and are doing so, including aerodynamics and spatial physics, in 4+ dimensions. You can stick to your one dimensional thought, personally I prefer a wider universe of movement or my legs fall asleep. I don't make mountains out of molehills, if anything through quaternion mathematics I have reduced complexity by increasing dimensions. There is never more math than needed, which is far more than you will ever understand.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Y'know, Jeffry, I think you've got a bit too much of your self-esteem tied up in this math thing. Perhaps it's time we turn out the lights and dream of Mr Edison doing (or not doing) quaternion mathematics in 4+ dimensions...
or perhaps you turn out the lights and dream of crashing a space shuttle for inaccurate math! :wtf:
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
The Grand Negus wrote:
But always insist on small and simple. The other camp says, "If you don't fully understand the complex mathematics underlying aerodynamics and can't build a 400-passenger airliner capable of transatlantic flight, then get back to the bicycle shop boys, because you're nothing but quacks".
So you are saying anyone can and should build a 400 passenger airbus to cross the ocean, without understanding aerodynamics, fuel consumption, weight loss to fuel use balance dynamics? You are more far gone than I thought! Well, go for it! But I can guarantee you that you shall NEVER achieve flight unless it is just long enough to kill all the witnesses. Madness. But keep those monkeys typing, sooner or later they will type out a full copy of war and peace through random strokes. When they do, call me, you can laugh then. Until then, the rest of us have real work to accomplish, and are doing so, including aerodynamics and spatial physics, in 4+ dimensions. You can stick to your one dimensional thought, personally I prefer a wider universe of movement or my legs fall asleep. I don't make mountains out of molehills, if anything through quaternion mathematics I have reduced complexity by increasing dimensions. There is never more math than needed, which is far more than you will ever understand.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Jeffry J. Brickley wrote:
So you are saying anyone can and should build a 400 passenger airbus to cross the ocean, without understanding aerodynamics, fuel consumption, weight loss to fuel use balance dynamics? You are more far gone than I thought!
:laugh: I sure wouldn't get in his airplane :rolleyes:
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
-
Y'know, Jeffry, I think you've got a bit too much of your self-esteem tied up in this math thing. Perhaps it's time we turn out the lights and dream of Mr Edison doing (or not doing) quaternion mathematics in 4+ dimensions...
The Grand Negus wrote:
you've got a bit too much of your self-esteem tied up in this math thing
:|:zzz:
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
-
Stephen Hewitt wrote:
Or more succinctly: f = 9/5*c+32 Where "c" is degrees centigrade and "f" is degrees in fahrenheit.
And what language is that last line?
Stephen Hewitt wrote:
Not only is it clearer but also more useful. Using the basic rules of algebre I can derive the f->c conversion as follows: f = 9/5*c+32 f-32 = 9/5*c (f-32)*5 = 9*c (f-32)*5/9 = c So c = (f-32)*5/9
Let me make this perfectly clear, at least between you and I, once and for all. We're not saying that algebra is useless, or that algebraic notation is less appropriate than Plain English for certain specific tasks. We're saying that algebraic notation is more easily thought of as a sub-language of English rather than the reverse. We're saying that an intelligent machine should understand both; specifically, it should understand the sub-language in the context of the larger, natural language - exactly as you have used both "languages" in the quotations above. The letters "c" and "f" can be appropriate abbreviations, in certain contexts, but only if their meanings are clearly defined at a higher, more descriptive level. The reason we are emphasizing (at this time) the natural language aspect is that computers already know how to parse, manipulate, and otherwise process algebraic notation - but they don't know how to deal with natural languages with the same level of expertise. And because most programmers are unaware of the amazing power and flexibility that natural languages possess. C'mon - off the top of your head, would you think that an efficient native-code-generating compiler could be conveniently written in English?
The Grand Negus wrote:
Stephen Hewitt wrote: Or more succinctly: f = 9/5*c+32 Where "c" is degrees centigrade and "f" is degrees in fahrenheit. And what language is that last line?
The language is math, or more specifically, algebra! The writing of the sentence is in the script of English. Computers and programming were invented in the images of math and science, which has its own miriad of languages.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Stephen Hewitt wrote:
In short, I contend that your example was a bad example of the merits of plain English.
Agreed. Mathematical relations are a weak point in every natural language; that's why things like algebraic notation are invented in the first place. But I didn't get the choose the example here - the problem assigned by the instructor was clearly math-centric. Nevertheless, I'm quite sure that a complete solution to the given problem - including the interface, etc - would include a much smaller percentage of formulaic matter and would therefore benefit from the "compiled pseudocode" I recommended. It's not unlike a MIDI music machine I programmed years ago on and Apple II. There were certain routines that, for performance, had to be written in assembler. But the bulk of the program was much more easily written, tested, modified, and perfected in Applesoft Basic (a more English-like language). Besides, formulaic languages reach their "limits" very quickly (no pun intended). Consider, for example, this natural language description of an object:
a two-inch aluminum cube with a quarter-inch spherical void at its center
What's the formula for that? And for the other zillion things that can be easily described in half a sentence but that nevertheless defy mathematical description?
The Grand Negus wrote:
Besides, formulaic languages reach their "limits" very quickly (no pun intended). Consider, for example, this natural language description of an object: a two-inch aluminum cube with a quarter-inch spherical void at its center What's the formula for that? And for the other zillion things that can be easily described in half a sentence but that nevertheless defy mathematical description?
BS! Do you want to retract this example before or after I direct your attention to NURBS? A two inch cube with a cavity in the middle CAN be represented mathematically. Or did you forget about the existance of Maya, AutoCAD, Rhino3D, [many more]??
Dave Kreskowiak Microsoft MVP - Visual Basic
-
PaulC1972 wrote:
That's not necessary, just look at the "nasty" replies you get
But from how many of the larger community here? A handful of cranks do not a majority make. Besides, I don't say what I say because it's popular (or not). I say these things simply because I believe them to be true. In other words, even if I got three million nasty remarks on this forum, I'd still be compelled to say the same kind of things.
>> do not a majority make Yoda! You're back! ;)
Cheers, Sebastian -- Contra vim mortem non est medicamen in hortem.
-
xcom2001 wrote:
as a teaching aide to help me understand how this works.
I will add some background, since ... other ... discussions led astray this discussion. Pseudo code is not meant to compile, deliberately. Think of it as programmer short-hand. What I posted was close to Pascal in structure, but need not be, you will find C like references of pseudo code. program Celsius To Fahrenheit (input: double celsius) begin // Convert Celsius to Fahrenheit. double fahrenheit = (celsius * 9 / 5) + 32 return fahrenheit; end or purely algorithmic Celsius to Farhrenheit fahrenheit = (celsius*9/5)+32 return fahrenheit Pseudo code originated as an alternative to flowcharts, which for Fortran programming could become very long and tedious drawings. The goal was to design your code, not write it "yet" so it should be A) shorter than your actual code B) be easy to write, without any formal rules, but should be consistent in what ever rules it uses. Back in the Fortran era, language, and column (yes good old punch-card limits) rules made full program writing difficult, thus pseudo code was a way of exchanging ideas and perfecting ideas. There is a REAL reason behind this. As you are designing an algorithm you want to be able to shape it, change it rapidly, yet also be able to understand it. If it follows any persistent "syntax" it gets bogged down in rules than make it wordy and/or impossible to maintain, again like flow-charts. It should be consistent in what few rules it does use for ease of peer-exchanges. The goal is not to finish your code, period. Not with pseudo code at least. Pseudo code or UML or flowcharts are what you bring to design-reviews. Obviously if you have a finished product, and you made poor assumptions in your design, you've just wasted everyone's time by trying to short-cut the process. So Pseudo code is fast, friendly and "similar" to what ever language you are using with absolutely the most minimal rules. In this way a design review can review the pseudocode, you can show what you intend to do without wasting too much time in doing so. You can change that code rapidly from input in the design review, or shortly thereafter. For my design reviews I use a combination of pseudo code, uml flow diagrams and mind-maps. Given the original purpose, the speed of which to A) design code B) present your design C) standardized exchange of peer thought... This combination works well.
thanks: https://movied.org
-
The Grand Negus wrote:
Besides, formulaic languages reach their "limits" very quickly (no pun intended). Consider, for example, this natural language description of an object: a two-inch aluminum cube with a quarter-inch spherical void at its center What's the formula for that? And for the other zillion things that can be easily described in half a sentence but that nevertheless defy mathematical description?
BS! Do you want to retract this example before or after I direct your attention to NURBS? A two inch cube with a cavity in the middle CAN be represented mathematically. Or did you forget about the existance of Maya, AutoCAD, Rhino3D, [many more]??
Dave Kreskowiak Microsoft MVP - Visual Basic
thanks: https://movied.org
-
Jeffry J. Brickley wrote:
So you are saying anyone can and should build a 400 passenger airbus to cross the ocean, without understanding aerodynamics, fuel consumption, weight loss to fuel use balance dynamics? You are more far gone than I thought!
:laugh: I sure wouldn't get in his airplane :rolleyes:
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
thanks: https://movied.org