Anonymous
×
Create a new article
Write your page title here:
We currently have 33 articles on Monster Amor. Type your article name above or click on one of the titles below and start writing!



Monster Amor
33Articles

Code: Difference between revisions



Virtual photographs of monster girls in the real world
mNo edit summary
mNo edit summary
 
(17 intermediate revisions by the same user not shown)
Line 3: Line 3:
Code consists of instructions written in <s>alien</s> machine languages. Contrary to popular belief, they are much ''easier'' to read and write than human languages. In fact, '''you''' are going to learn how to code right now!
Code consists of instructions written in <s>alien</s> machine languages. Contrary to popular belief, they are much ''easier'' to read and write than human languages. In fact, '''you''' are going to learn how to code right now!
== '''How to code''' ==
== '''How to code''' ==
Let's get right down to it: All you need to learn are ''five core concepts''. The language doesn't matter. At a high level, they're all the same. Half of them look like C, but that's not to say the grade or even the speed. C, being among the beefiest of letters, is also a ''language''. Let's follow in the footsteps of everyone else and write our code to be like C.
Let's get right down to it: All you need to learn are '''five''' core concepts. Ironically, one of the absolute worst things you can do while learning to code is to ''learn'' a ''language''. When you muddy the simple waters of code with the murky depths of a language, you end up learning mostly unnecessary, random information and thinking it applies to all code. This only leaves you with a great big ''mess'' to sort out afterward. Since all teachers of code for some reason assume their students want a mess, learning to code has developed a bad reputation. Let's clean it up and see what we're ''really'' dealing with.
=== Variables ===
=== Variables ===
Variables are how you store ''all'' the things. They can take many forms, such as text and various kinds of numbers. Creating variables might look like this:
Variables are how you store ''all'' the things. They can take different forms, such as text, numbers and booleans. It should be noted that boolean is an ''actual word'', and a boolean can have only two values: '''true''' or '''false'''. Creating variables might look like this:
<nowiki>var userName
var userAge
var isAlive</nowiki>
If we set their initial values in the same line, it looks like this:
  <nowiki>var userName = "Ada Lovelace"
  <nowiki>var userName = "Ada Lovelace"
var userAge = 209
var userAge = 209
var isAlive = false</nowiki>
var isAlive = false</nowiki>
Many languages need you to tell them what ''type'' a variable is. For those, the code to create variables might look like this:
<nowiki>string userName = "Ada Lovelace"
int userAge = 209
bool isAlive = false</nowiki>
There are four types used for ''basically everything'':
* '''string''': text surrounded by quotes
* '''int''': integer, a whole number
* '''float''' or '''double''': a real number, with a decimal point in it
* '''bool''': boolean, can be either true or false
=== Functions ===
=== Functions ===
=== Conditionals ===
=== Conditionals ===

Latest revision as of 13:21, 6 December 2024

⚠️ This article is a stub. Amorphant is working on it right now.

Code

Code consists of instructions written in alien machine languages. Contrary to popular belief, they are much easier to read and write than human languages. In fact, you are going to learn how to code right now!

How to code

Let's get right down to it: All you need to learn are five core concepts. Ironically, one of the absolute worst things you can do while learning to code is to learn a language. When you muddy the simple waters of code with the murky depths of a language, you end up learning mostly unnecessary, random information and thinking it applies to all code. This only leaves you with a great big mess to sort out afterward. Since all teachers of code for some reason assume their students want a mess, learning to code has developed a bad reputation. Let's clean it up and see what we're really dealing with.

Variables

Variables are how you store all the things. They can take different forms, such as text, numbers and booleans. It should be noted that boolean is an actual word, and a boolean can have only two values: true or false. Creating variables might look like this:

var userName = "Ada Lovelace"
var userAge = 209
var isAlive = false

Many languages need you to tell them what type a variable is. For those, the code to create variables might look like this:

string userName = "Ada Lovelace"
int userAge = 209
bool isAlive = false

There are four types used for basically everything:

  • string: text surrounded by quotes
  • int: integer, a whole number
  • float or double: a real number, with a decimal point in it
  • bool: boolean, can be either true or false

Functions

Conditionals

Don't let the obnoxious word frighten you. The original authors dislike it too, and have long since shown their disdain by replacing it with the much shorter if.

Loops

Classes

Examples

What now?

Now you pick your first language. Much like buying your first car, this will depend on your needs and desires, but should prove to be much cheaper.

Due to the above comparison, we will not be advising you to "break a leg," but will instead wish you Godspeed.