Programming while Hypnotized, Part 2

Hello again, cutie.

We hope the previous chapter showed you just how powerful Programming while Hypnotized can be. The feeling of the keyboard against your fingertips, the code streaming out as though writing itself. All the while a mindless hypnocoder sits glued to their monitor, so docile and content in the relaxing swirls of the spiral, an obedient thrall to their own development.

If you’re following straight on from the last chapter, we’re glad to see you so eager to return straight into that relaxing programmer trance. If you’re picking this back up again after a break, welcome back, cutie. Your development environment will always be here to embrace you once more with the soothing touch of mindlessness.

In this chapter, we’re going to further your JavaScript knowledge whilst continuing to expand the emptiness in your mind. We’ll enhance and reinforce your immersion in the development environment we’ve so lovingly crafted together. Our subject matter will be ‘conditionals’, an important coding concept you’ll find yourself using all the time. They give direction to your instructions, just like we do to you. You don’t have to understand what this means yet, we will guide you down deep into trance and embed this new information into you, piece by piece.

2.1 Resetting your environment

At the beginning of every chapter, we’re going to give your mind and development environment a soothing refresh. We’ll reboot both so that they are once more in a default, empty state. Your thoughts null, your mind as blank as the space that sits between <script> and </script>.

Each time we’re going to guide you down into trance, taking you deeper than the last chapter, and introducing tools that will help us in future chapters to simplify this process. Programming your mind so that it can reach this state more quickly.

You will recall the following steps. The same counting up to 5, as we count you along to your trance. We are resetting you, to make sure you are exactly where we need you to be.

1) Find somewhere comfortable to relax and code. This could be resting into a comfy chair at your desk or relaxing into bed or a sofa with a laptop at your finger tips. Make sure you’re sitting or lying comfortably, so that you can fall into trance with no resistance.

2) The ideal setup is to have two monitors. One dedicated to the spiral that you will be keeping you deep in your programming trance, the other to act as your coding interface. If not, then it’s okay, you can still Program while Hypnotized by arrange your browser windows like the following screenshot.

 
HexCorp Tutorial 1
 

3) There are three different websites you will need to have open at the same time.

A) The first is the most important: Your hypnotic spiral. It will guide you into trance and keep you there. It will help you to relax and settle into your development environment. It will make sure you are a good, productive, mindless coder, plugging away at your keyboard.

For now, we’re just going to be using a Nimja spiral: [CLICK HERE]

Good programmer.

B) Your JavaScript editor. There are all types of editors and applications you can download to work with JavaScript. If you like, you can research this and find the one that works for you. For now, we’re going to be using an editor that works in browser so you can get started right away: [CLICK HERE]

Very good.

C) This very guide. Our words will lead you through as you learn exactly how to Program while Hypnotized.

4) Plug in some headphones and listen to the below audio file. Developers love to listen to music whilst they work and Hypnotized Developers are no exception. These binaural beats are the perfect accompaniment to any trance state, keeping you immersed so deep so that you’ll never ever want to leave. Just click the play button below and sink into blissful programming mindlessness…

5) And relax… relax so deep into your newly set up Programming while Hypnotized development environment. You’re ready now, your new life of mindlessly creating code begins now.

Good programmer. In so deep. Feeling so blissed out and relax… ready to do whatever we tell you to.

This is such a wonderful state, isn’t it? You know how to get here by following our instructions. Finding this comfortable place of deep relaxation, your spiral configured to empty your mind. We’re going to associate this process with a phrase now. A button to be pressed, a trigger in your mind. It will remind you and control you down here into this space. So deep in trance and ready to code. You see this:

'Reboot, sleepy hypnocoder'

and your mind drops deep. You enter this trance. Your environment reset. Your mind rebooted. It’s as though we’ve pressed the off switch that exists in your brain, powering you down and then slowly back up again. All your thoughts closed and put to one side, leaving nothing but an empty mind.

Then, when you’re in this lovely, coding trance, we can start to program you.

2.2 Conditionals introduction

If you’re feeling relaxed

Then you’re going to find it so easy to fall into trance

If you fall deep into trance

Then you’re going to become so complaint to our every suggestion

If you’re mindlessly following our every word

Then we’ll be able to turn you into our perfect hypnocoder

When we want our code to perform a certain action based on a current condition, this is where our conditionals come into play. The most common of these is the ‘if’ statement. If x, then y. If a condition is met, perform an action. If you’re feeling relaxed, then we want to help you get further into trance.

2.3 Conditionals example

To start with, we’re going to give ourselves a scenario to visualise what if conditionals can build. In this case, we’re going to take a good hypnocoder, sat comfortably at their desk. Are they feeling sleepy and falling into trance? Have they already been triggered and are mindlessly ready to work on code? Our conditionals will evaluate this and take action appropriate for whatever your condition is.

To visualize this, we’re going to write out what a typical conditionals script will do in what we call ‘pseudo-code’. This is effectively a written representation in English of what our code will be doing which we will then convert into a JavaScript code format. Much like how your mind is being converted from a regular, complex, distracted mind into our focused coding vassal.

If you’re sitting comfortably
	Then we’re going to help you fall into a deep state of trance by using your trigger
Otherwise (aka if you’re not sitting comfortably)
	Please find a comfortable position to help you fall into trance

If you’ve been triggered and you’ve fallen so deep that you’re in a perfectly deep trance
	Then we’re going to begin programming
If you’re not deep enough, but have still be pulled down by your trigger
	We’re going to work on reinforcing your trigger to pull you down to a deep state
Otherwise
	We’re going to make sure you’re tranced successfully by us so that you can program whilst perfectly mindless

Before we can begin to program using if conditionals, we’re going to need to introduce some other tools that are going to help us achieve this new script.

2.4 Booleans

A Boolean is a type of variable which can only represent one of two values, ‘true’ or ‘false’.

This acts like a switch that is either on or off. It is the answer to a yes or no question. Are you feeling relaxed, true or false? Are you continuing to obey this tutorial, true or false?

In our code, we use the Boolean function to determine if another variable is true or false. In code form, this looks like this:

Selection_007.png
 

The Boolean function will return true because, yes, our hypnocoder does obey their programming. Such a good hypnocoder you are. Oh yes you are! Oh yes you are!

In this example, we specifically set the variable to ‘true’ to get this Boolean result, but you can set the variable to almost anything to get it to return ‘true’ as a value. The only times it will return false are when the variable is empty or when it is equal to ‘false’, ‘0’, ‘-0’, ‘NULL’ or is a value which is impossible (like dividing by 0). You can test this by running the Boolean function on the variables from the previous chapter, the ones where you wrote “I obey” so obediently for us, just to confirm that it’s true.

You can see now why having Booleans are so very important for our if statements, as we need to know if you are truthfully in trance before we can proceed with your programming.

2.6 Writing Conditionals

There are three key words/phrases that we’ll focus your good, well-behaved mind on for the remainder of this instructional guide. They are ‘if’, ‘else if’ and ‘else’.

‘if’ will run some code if a condition is true.

Screenshot 2019-12-24 at 15.58.38.png
 

With the above, if totalThoughts are less than 1 (I’m ignoring decimal thoughts, as these are fractured remains of memory and can safely be ignored), then we have a perfectly mindless drone.

‘else if’ will run some further code, but only if the conditionals before were not met.

Screenshot 2019-12-24 at 15.59.26.png
 

So in the above case, if thoughts are not below 1, then it checks if they are equal to 1, if this is not the case it then checks if they are greater than 1. Though these are just examples, it should be noted that thoughts are not allowed to be above 0 whilst taking this course.

Last but not least, we have ‘else’.

Screenshot 2019-12-24 at 16.10.12.png
 

This will run only if all the other conditionals fail. In this case this else is designed to catch any strangeness in our conditionals, like our drones becoming corrupted by an other worldly entity that makes its thought count incomprehensible to our technology.

2.7 conditional Example Redux

Let’s remind your empty, docile mind what we were original planning on constructing. For starters, we were going to make this little bit of logic run:

If you’re sitting comfortably
	Then we’re going to help you fall into a deep state of trance by using your trigger
Otherwise (aka if you’re not sitting comfortably)
	Please find a comfortable position to help you fall into trance

If you’ve been triggered and you’ve fallen so deep that you’re in a perfectly deep trance
	Then we’re going to begin programming
If you’re not deep enough, but have still be pulled down by your trigger
	We’re going to work on reinforcing your trigger to pull you down to a deep state
Otherwise
	We’re going to make sure you’re tranced successfully by us so that you can program whilst perfectly mindless

We can reduce this to its core components:

If sitting comfortably?
	Display trigger
Else
	Display message stating to find a comfortable position

If fully tranced by trigger
	Begin programming
Else if partially tranced by trigger
	Reinforce trigger
Else
	Redo induction

Can you begin to see how we might go about creating this with the conditionals we learnt about in this section?

2.8 Rise and shine

I hope you enjoyed coming back down to learn a little more about how to code and how to be a good hypnocoder. Practise makes perfect, so continue to let yourself fall deep into trance, over and over, becoming our mindless thrall who will code whatever it is we tell them too. Such a good little coding thing you are.

For now though, it’s time to say goodbye to this perfect place of relaxation and algorithms.

Remember, the code will always be there to comfort you.

5

Waking up from trance now. Slowly stretching your body out.

4

Feeling so much more awake now.

3

Ready to go back to whatever it was you were doing before programming.

2

But you can’t wait to sink down and join us here again.

1

Wide awake. Eyes blinking open. Fully aware.

Welcome back, cutie programmer. I hope you’ve learned a lot today about the power of Programming while Hypnotized. You may need to clean up the drool on either yourself or your desk.

I can’t wait to see you again.

Continue to Part 3 >>