Difference between revisions of "Main Page"

From CodeStuff
Jump to: navigation, search
Line 1: Line 1:
'''The beginning of something that probably won't be finished
+
'''A wiki where you can see your code run
  
This is an experiment at making an introduction to programming wiki where code can be tweaked and run from inside the wiki page.
+
This wiki has pages of programming tutorials.   The tutorials contain embedded code each with a "Run"' button, like this...
The [[API]] has just a few functions available, but it should be sufficient to be able to make some interesting things to play with.
+
  
Give it a go by clicking Run. Give [[Radish]] a go for something that moves and has mouse and keyboard input.
+
<edcode name="part1">print ("Octopus surprise!");
<edcode>
+
drawLine(35,100,620,400);</edcode>
print("Hi there");
+
Clicking the "Run" button will open up a view showing the running program.  Whenever you see an example like this you can change the program simply by typing in your changes. You are encouraged to always try changing things to see what will happen.  That's the best way to learn. If you make a mistake and the program won't run, just reload the page and it will restore to its original form.
 +
 
 +
===What do I do if it doesn't work?===
 +
To run the programs inside your web browser, you will need a Web Browser that supports the recent HTML5 standards. 
 +
Mozilla FireFox, Google Chrome, Opera, and Safari should all work.  Internet Explorer <i>may</i> work if you have a version of 9 or higher.
 +
 
 +
Here's an example showing some more things that you can do.  It draws a few things including a small loop that runs fifty times drawing two circles each time in order to construct a heart.
 +
 +
<edcode>print("Hi there");
 
print("next line");
 
print("next line");
 
print("over here",300,200);
 
print("over here",300,200);
Line 15: Line 22:
 
print("Now in Red!");
 
print("Now in Red!");
  
setColour("rgba(200,128,30,0.5)");
+
setColour("rgba(255,30,30,0.1)");
  
for (var x=0; x<10;x++) {
+
var = 0;
   print("*",40+x*30,250-x*10);
+
//now we draw 2 circles 50 times to make a heart
}
+
while (i < 50) {
</edcode>
+
   fillCircle(300-(i/2.4),150-i,i);
 +
  fillCircle(300+(i/2.4),150-i,i);
 +
  i=i+1;
 +
}</edcode>
  
The educational aspect of the site is in it's infancy. I have been creating examples to explain concepts and how to do things. The language is probably still too technical for a novice audience, I will try to adjust this as I see which parts are comprehensible to others.  
+
The site is a work in progress. I have been creating examples to explain concepts and how to do things. The language is probably still too technical for a novice audience, I will try to adjust this as I see which parts are comprehensible to others.  There are still areas than need filling in. I try and add a little bit each day, so hopefully it will build up nicely soon.
  
  

Revision as of 20:50, 7 February 2012

A wiki where you can see your code run

This wiki has pages of programming tutorials. The tutorials contain embedded code each with a "Run"' button, like this...


Clicking the "Run" button will open up a view showing the running program. Whenever you see an example like this you can change the program simply by typing in your changes. You are encouraged to always try changing things to see what will happen. That's the best way to learn. If you make a mistake and the program won't run, just reload the page and it will restore to its original form.

What do I do if it doesn't work?

To run the programs inside your web browser, you will need a Web Browser that supports the recent HTML5 standards. Mozilla FireFox, Google Chrome, Opera, and Safari should all work. Internet Explorer may work if you have a version of 9 or higher.

Here's an example showing some more things that you can do. It draws a few things including a small loop that runs fifty times drawing two circles each time in order to construct a heart.


The site is a work in progress. I have been creating examples to explain concepts and how to do things. The language is probably still too technical for a novice audience, I will try to adjust this as I see which parts are comprehensible to others. There are still areas than need filling in. I try and add a little bit each day, so hopefully it will build up nicely soon.


tutorial pages

These are roughly in an order of progression. There are quite a few pages I intend to write to fit in between these pages to smooth out the progression.