This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-12-20 15:48:48

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Programming Languages I want to learn

I want to learn a lot! Can anyone help me?

• JavaScript
• C
• Squeak! (jd1s gonna teach me this)
• Using MySql in PHP
• and other stuff i can't think about

So can you help me?

Offline

 

#2 2010-12-20 15:50:44

werdna123
Scratcher
Registered: 2010-06-12
Posts: 1000+

Re: Programming Languages I want to learn

My dad uses programming languages a lot (probably because he's a programmer  tongue ) but I've never tried any of them.

Offline

 

#3 2010-12-20 16:31:36

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Programming Languages I want to learn

bump!

Offline

 

#4 2010-12-20 16:42:37

Aidan
Scratcher
Registered: 2007-06-15
Posts: 1000+

Re: Programming Languages I want to learn

werdna123 wrote:

My dad uses programming languages a lot (probably because he's a programmer  tongue ) but I've never tried any of them.

Is that how you got into Scratch?

Offline

 

#5 2010-12-20 17:23:46

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Programming Languages I want to learn

I know about as much JavaScript as you do, you know that  tongue


Yawn.

Offline

 

#6 2010-12-20 17:48:18

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Programming Languages I want to learn

JavaScript is easy, I learned a lot of it in a day!  big_smile


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#7 2010-12-20 21:02:56

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Programming Languages I want to learn

Done all of those. =3


Hai.

Offline

 

#8 2010-12-20 21:38:07

JeanTheFox
Scratcher
Registered: 2010-06-14
Posts: 1000+

Re: Programming Languages I want to learn

C, C+, and C++ I would like to learn. Oh, and Starlogo TNG.


http://i51.tinypic.com/20gcn5j.png

Offline

 

#9 2010-12-21 04:34:20

ob6160
Scratcher
Registered: 2010-10-10
Posts: 500+

Re: Programming Languages I want to learn

I can help anyone with vb.net javascript and html  big_smile
Also soon I will be able to help with C#  big_smile

I am also learning Dhtml and html 5  big_smile

OB6160


http://i45.tinypic.com/2jcygsy.gif

Offline

 

#10 2010-12-21 11:17:59

werdna123
Scratcher
Registered: 2010-06-12
Posts: 1000+

Re: Programming Languages I want to learn

Aidan wrote:

werdna123 wrote:

My dad uses programming languages a lot (probably because he's a programmer  tongue ) but I've never tried any of them.

Is that how you got into Scratch?

Nah, a friend told me.

Offline

 

#11 2010-12-21 12:51:55

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Programming Languages I want to learn

So does anyone want to teach me any? I'd like to learn JavaScript first

Offline

 

#12 2010-12-21 12:56:57

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Programming Languages I want to learn

ProgrammingFreak wrote:

So does anyone want to teach me any? I'd like to learn JavaScript first

w3 would like to teach you.


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#13 2010-12-21 13:08:53

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Programming Languages I want to learn

Sunrise-Moon wrote:

ProgrammingFreak wrote:

So does anyone want to teach me any? I'd like to learn JavaScript first

w3 would like to teach you.

lol

Offline

 

#14 2010-12-21 15:20:32

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Programming Languages I want to learn

ProgrammingFreak wrote:

• Using MySql in PHP

Important warning: I know a very old version of PHP and there are probably much easier ways of doing the following. Feel free to research different methods to the one I am showing you.

First, get a database and find out the connection information. This is easy with 000webhost.

To connect to the database using PHP, use this:

Code:

mysql_connect($mysql_host,$mysql_user,$mysql_password);

Then you need to tell the MySQL server which database you want to use. To do this, use this code:

Code:

mysql_select_db($mysql_database);

You're now connected, but you need to know how to send and recieve data. To do this, you need to learn SQL. W3 can teach you.

Now we need to send stuff to MySQL. If you just want to send data, but not receive any, it's simple. Just do this:

Code:

mysql_query($query);

If you want to send and receive data, then that's slightly harder. First, you send the query and MySQL will send back a pointer to where the information is in the database:

Code:

$queryResult = mysql_query($query);

Important to rememeber: $queryResult does not yet contain the data.
The data is returned one row at a time. To check how many rows of data have been found, use this:

Code:

mysql_num_rows($queryResult);

Now to actually get the data. When you ask MySQL for the actual data, it returns an array with a key for each row. The array looks a bit like this:

someArray[0] = "value1"
someArray[1] = "value2"
someArray[2] = "value3"
someArray["firstColumnName"] = "value1"
someArray["secondColumnName"] = "value2"
someArray["thirdColumnName"] = "value3"

You'll notice that each piece of data is accessible under either $someArray[number] or $someArray[columnName].

If you are only hoping to get one row of data, the next bit is easy:

Code:

$result = mysql_fetch_array($queryResult);

$result now contains an array like the one above. If you want to only have the numbers as keys or the column names as keys, add the argument MYSQL_NUM or MYSQL_ASSOC to the fetching code. Example:

Code:

$result = mysql_fetch_array($queryResult,MYSQL_ASSOC);

Important to remember: Do not put a $ sign before MYSQL_*.

If you want to fetch more than one row of data, then it is more complicated. Since only one row is returned at a time, you need to use a loop. An easy(ish) way to do this is this:

Code:

while($result = mysql_fetch_array($queryResult,MYSQL_NUM){
//Do something with $result here,
//but remember it only contains one row at a time
}

That's the basics, but there's lots more to it. Research it at your will.


/* No comment */

Offline

 

#15 2010-12-21 15:24:18

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Programming Languages I want to learn

TheSuccessor wrote:

ProgrammingFreak wrote:

• Using MySql in PHP

Important warning: I know a very old version of PHP and there are probably much easier ways of doing the following. Feel free to research different methods to the one I am showing you.

First, get a database and find out the connection information. This is easy with 000webhost.

To connect to the database using PHP, use this:

Code:

mysql_connect($mysql_host,$mysql_user,$mysql_password);

Then you need to tell the MySQL server which database you want to use. To do this, use this code:

Code:

mysql_select_db($mysql_database);

You're now connected, but you need to know how to send and recieve data. To do this, you need to learn SQL. W3 can teach you.

Now we need to send stuff to MySQL. If you just want to send data, but not receive any, it's simple. Just do this:

Code:

mysql_query($query);

If you want to send and receive data, then that's slightly harder. First, you send the query and MySQL will send back a pointer to where the information is in the database:

Code:

$queryResult = mysql_query($query);

Important to rememeber: $queryResult does not yet contain the data.
The data is returned one row at a time. To check how many rows of data have been found, use this:

Code:

mysql_num_rows($queryResult);

Now to actually get the data. When you ask MySQL for the actual data, it returns an array with a key for each row. The array looks a bit like this:

someArray[0] = "value1"
someArray[1] = "value2"
someArray[2] = "value3"
someArray["firstColumnName"] = "value1"
someArray["secondColumnName"] = "value2"
someArray["thirdColumnName"] = "value3"

You'll notice that each piece of data is accessible under either $someArray[number] or $someArray[columnName].

If you are only hoping to get one row of data, the next bit is easy:

Code:

$result = mysql_fetch_array($queryResult);

$result now contains an array like the one above. If you want to only have the numbers as keys or the column names as keys, add the argument MYSQL_NUM or MYSQL_ASSOC to the fetching code. Example:

Code:

$result = mysql_fetch_array($queryResult,MYSQL_ASSOC);

Important to remember: Do not put a $ sign before MYSQL_*.

If you want to fetch more than one row of data, then it is more complicated. Since only one row is returned at a time, you need to use a loop. An easy(ish) way to do this is this:

Code:

while($result = mysql_fetch_array($queryResult,MYSQL_NUM){
//Do something with $result here,
//but remember it only contains one row at a time
}

That's the basics, but there's lots more to it. Research it at your will.

THanks! I like it.

Offline

 

#16 2010-12-21 21:18:59

banana500
Scratcher
Registered: 2009-09-06
Posts: 1000+

Re: Programming Languages I want to learn

I got my first start in programming with Batch files. Then I learned VBScript. Then I learned to write a program with three simple lines of code that can crash your computer...

I've learned a lot of malicious programs you can write. I don't ever write them, but I know how to. Then, I learned to make screamer programs...

Other than that, I recommend that you learn Perl.  big_smile


http://i.imgur.com/jrCyB2r.gif
'Cause I'm NUMBER ONE.

Offline

 

#17 2010-12-21 21:51:41

Lightnin
Scratch Team
Registered: 2008-11-03
Posts: 1000+

Re: Programming Languages I want to learn

ProgrammingFreak wrote:

I want to learn a lot! Can anyone help me?

• Using MySql in PHP

I'd actually like to learn some more of that myself. That's pretty much what the Scratch website (and these forums) run on.  smile


Help Scratchers make the leap to 2.0!
http://img818.imageshack.us/img818/6844/transitionteam.jpg

Offline

 

#18 2010-12-21 21:55:15

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Programming Languages I want to learn

I just want to learn Python. I don't get importing things.

Offline

 

#19 2010-12-21 22:08:14

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Programming Languages I want to learn

I know php & mysql. I first learnt some of it from school. Then at home I built a web server that runs a database. It was quite fun.

This is what I built.

A website which you sign up to to go to members only area's
When you sign up you get sent an email (A record is made in the database for the account)
When the account is confirmed the account is activated
You can then log in to the account (get sent a cookie/ session) and access member only area's.

I also know how to set up web stores so you can sell stuff on your website (Through paypal) as well as only allowing members to purchase goods and services.

Edit: I could make forums but that would require a lot a tinkering with the design and would take ages to program all of the features (e.g. word length, allowed words, types of members, signitures, BBCode( With BBCode I could call it something else and use any symbol I want) )

Last edited by what-the (2010-12-21 22:12:35)


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#20 2010-12-21 22:36:16

blazerv82
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Programming Languages I want to learn

I should read my Javascript book that I got for my class next semester. Maybe then I can learn more than what i already know. Which isn't much.

I know mostly onclick events. They can be fun to play around with.

[offtopic]Why did W3 ever depricate the HTML tag Marquee!? It works wonders for some of my personal sites. I understand why they did it, but it was useful.[/offtopic]

I would suggest looking at W3's website. Any web/server "language" you want to know, they have tutorials on.


Pretty Hate Machine, Broken, Closer To God, The Downward Spiral, Further Down The Spiral, The Perfect Drug, The Fragile, And All That Could Have Been, With Teeth, Year Zero, Y34RZ3R0R3M1X3D, Ghosts I-IV, The Slip, Pretty Hate Machine 2010

Offline

 

Board footer