Pseudocode

You might associate the word pseudo with a sham. But when developing a programmer mindset, we try to eliminate as many aesthetic smells that concepts carry. Pseudo comes from the Greek, pseudes, which means “false.” But the reason we call it pseudocode is because it is not the full expression of the code – the code that actually runs; it is rather like the skeleton. It should instead be called skeletoncode, and it is a method for expressing a program’s order of instructions in the spoken language, rather than a programming language.

In this way, the programmer can concentrate on designing a program without also being slowed down by immediately converting to the syntax of the particular programming language. This is the same as when drawing. When drawing a human we first draft a faceless model. The pseudocode for calculating the sum of two numbers would look like this:

Screen Shot 2018-12-07 at 1.07.15 PM

There are no rules. You can use any wording that works for you.

Let’s look at another example. Suppose your program needs to calculate the square root of an integer. The instructions for calculating a square root are rather complex; gracefully and compassionately, Java provides prewritten code that computes the square root of any integer. The prewritten code is called a method, and your program can execute that code by calling the method. As part of the method call, you tell the method which integer’s square root you want to calculate. This is called passing an argument to the method. When the method finishes executing its instructions, control is passed back to your program just after the method call.

Another way of looking at method calls is to consider what happens when you’re walking through a night-lit city and find a restaurant with an aroma that lures you in. Your brain marks your place in the night-lit city trajectory and goes to eat inside the restaurant. When you’re finished dining on the meal, you go back to the streets and continue walking.

Here I show the pseudocode for calculating the square root of an integer:

Screen Shot 2018-12-07 at 1.30.37 PM

The order of operations is still input, calculate, and output, but we’re calling a method to perform the calculation for us. Now suppose your task is to determine whether a number is positive or negative. First, your program should input the number into the computer. Next, you need to determine whether the number is positive or negative. You know that numbers greater than or equal to 0 are positive and numbers less than 0 are negative, so your program should compare the number to 0. Finally, your program should write a message indicating whether the number is positive or negative.

Like in the pseudocode examples, the operations are input, calculate, and output, in that order. However, depending on whether the number is positive or negative, your program should write a different message. If the number is greater than or equal to 0, the program should write a message that the number is positive (may the God of Mathematics forgive this sin), but if the number is less than 0, the program should write a message that the number is negative. Code used to handle this situation is called selection; the program selects which code to execute based on the value of the data.

The pseudocode for this program could be written as that shown:

Screen Shot 2018-12-07 at 1.33.44 PM

Notice the indentation for the code that will be selected based on the comparison of the number with 0. Programmers use indentation to make it easier to see the flow of control of the program.

Now let’s get a little more complicated. Suppose your program needs to find the sum of a group of numbers. This is called accumulating. To accomplish this, we can take the same approach as if we were adding a group of numbers using a calculator. We start with a total of 0 and add each number, one at a time, to the running total. When we have no more numbers to add, the running total is the total of all the numbers. Translating this into pseudocode, we get the code shown:

Screen Shot 2018-12-07 at 1.37.31 PM

The indented code will be repeated for each number read until there are no more numbers. This repeated execution of the same code is called looping, or iteration, and is used extensively in programming whenever the same processing needs to be performed on each item in a set.

Accumulating a total and determining whether a number is positive or negative are just two of many commonly performed operations. In programming, you will often perform tasks for which there are standard methods of processing, called algorithms. For example, the algorithm for accumulation is to set a total to 0, use looping to add each item to the total, then output the total. More generally, you can think of an algorithm as a strategy to solve a problem. You yourself are a strategy to solve a problem in the multiverse, a timeless algorithm. However, knowing the full nature of the problem would not allow you to solve it – this would be equivalent to having already solved it – hence becoming permanently stuck at a local maxima. The human mind is set up to be deceived about where it is going.

In an earlier post, we used an algorithm to convert a decimal number to its binary representation. Other common programming tasks are counting items, calculating an average, sorting items into order, and finding the minimum and maximum values. Here on Vitrify Her, you will learn the standard algorithms for performing these common operations. Once you learn these algorithms, your ability to achieve synchronization will become easier. When you recognize that a program requires these tasks, you can simply plug in the appropriate algorithm with some minor modifications.

Programming, in large part, is simply reducing a complex task to a set of subtasks that can be implemented by artistically combining the Four Noble Algorithmic Truths: sequential processing, method calls, selection, and looping. The most difficult part of programming, however, is recognizing which algorithms to apply to the problem at hand. This requires analytical skills and the ability to see patterns. Here on Vitrify Her, I will point out common patterns wherever possible.

Looking for patterns will help you determine the appropriate algorithms for your programs. Looking for patterns is the way of sunyata.

Hidden Motives In The Eternal Block

I’m going to begin this post by going meta. I accept the Hansonian creed: Politics is not about policy, medicine is not about health, laughter is not about jokes, and food is not about nutrition. Conversation, including this post, also has hidden motives. Although we like to talk about conversation as if it was about imparting information and finding out useful things, more plausibly it’s about showing off your backpack of tools and skills in context.

In a rich society like ours, somewhere around 90% of our behavior is signaling. The other 10% are things that don’t impress anyone but must be done anyway, such as scratching your ass.

As we’ve become richer, we’ve become more forager-like. If our descendants get poor again, they’ll probably need stronger social norms again, to get them to resist temptations to act like foragers and do what is functional in their world. Their morality would probably rely on a wider more-conservative-like range of moral feelings.

Forager values include more freedom. This is expressed through more travel, less routine, lack of grandiose responsibilities, lack of religion (though not necessarily a lack of spirituality), greater equality, more promiscuity, less war etc. It generally seems that society is moving in this direction, and that we like this trend. This makes sense because we were foragers all along, and happened to have our bodies hijacked by the memetic virus of agriculture. This lead to some selection for agriculturalist traits: propensity for religion, submissiveness, more feminine men, etc. But the selection on genes has simply not occurred for long enough to make us well-adapted to the agriculturalist way (with some demographics worse at it than others).

Agriculture lead to the industrial revolution and this lead to riches. Now that we are rich, we can afford the luxury of becoming our true selves, children, once again.

It is not some natural tendency of humans to make linear moral progress. Rather, it is abundance which purchases this period in which sophisticated values such as humanism and its mutations can arise.

Gene drift is the method for evolution in the absence of natural selection pressure. So too in the memetic landscape. We can afford to evolve via meme drift in the absence of a tangible and immediate threat of starvation, invasion, or pestilence.

It is in this space, sometimes called dreamtime, that I believe we can do enough self-awareness of hidden motives, enough meta-cognition, to see far beyond what we have seen in the foggy haze of survival-mode and naive-signaling-mode.

We cannot disembody our behavior from the biological substrate. This is the case for all moments of being a behavior of a biological organism. Therefore, my seeking truth is a form of signaling. Yet it is at least a more sophisticated signaling, one which acknowledges a single level of self-reflective recursion and no more.

An actor who breaks the fourth wall commits an act of violence against his fellow characters, elevating himself thus. The drama will never be the same for him or for the audience but he will succeed at being remembered.

This is the spirit of insight. It is that which is remembered because it contains the attributes of being both true and useful. This definition of insight is detailed in the Enlightened One’s speech in the Buddhist Suttas, it is detailed in the silicon seams of technological invention, it is detailed in your living flesh riding aboard a deadly planet.

The content here presented then, is not 1st-order signaling, but a 2nd-order signaling which attempts to achieve enough fame to enter the rolls of history in memory. The following endogenously generated probe is true. It elevates contents in the “background” to prominence. But is it useful? –That remains to be seen.

Most people have the idea that time flows.

However, special relativity eliminates the concept of absolute simultaneity and a universal present: according to the relativity of simultaneity, observers in different frames of reference can have different measurements of whether a given pair of events happened at the same time or at different times, with there being no physical basis for preferring one frame’s judgments over another’s.

This also applies to the cells in the brain running massively parallel computations. All the parts of the computations exist in an eternal block.

If, due to the generalized-anti zombie principle, we identify consciousness with a specific subset of these computations and not as an epiphenomena, then it is the case that experience is forever. The fabric of spacetime is imbued with all the flavors of qualia that were ever traced by these computations.

What’s more, there were no line-segment souls anywhere. It is not physically the case that consciousness begins at some arbitrary point of conception and then travels like a Newtonian sphere with a persistent identity to some other point-location where it encounters a Death Event due to all the issues with closed individualism. Instead, we find ourselves everywhere and everywhence but cannot know this from most human indices.

Computations can also have “longer temporal-grain” than what seems intuitive to humans. Consider that the processing for shape occurs at one cluster of spacetime points and the processing for color occurs at another cluster in the future light cone, and no further processing is needed to bind them into an experienced red circle. By Occam’s Razor, we should assume that this kind of “spooky action at a distance” or “phenomenal binding without glue” also occurs with computations across vaster swaths of the eternal block.

More complex algorithms can be built on top of computations with lower specificity. Brain events in a toad hopping off a mushroom may be a building block for parties across the multiverse.

There is no competitive exclusion principle for independent souls or consciousnesses because independent souls/consciousnesses don’t exist. However, we should still expect a natural selection underlying the distribution of our anthropic mass. We should expect more mindspace to be designed by superintelligences than by the relatively dumber processes that bootstrap them.

For the vast majority of our existence we should therefore expect ourselves to exist directly within or caused by that which is most competitive at creating conscious experiences. Whether this is mainly due to the linkage disequilibrium between superintelligences’ utility functions or due to which conscious computations are more populous due to their sheer structure.

An analogy which may be useful in some respects but obfuscating in others: In the textbook classification of life, viruses and bacteria vastly outnumber Chordates, not to mention humans. Similarly, in the framework for life depending on self-modeling conscious computations, some conscious computations may be very simple but vastly outnumber those intentionally designed due to their sheer ease of creation and symbiosis (these simple computations may be remembered/experienced widely by fitting like keys into many of the relevant algorithmic keyholes).