Jump to content
MakeWebGames

How does Floydian do it?


Floydian

Recommended Posts

Okay, you can stop laughing now! (sideways...) Oh alright alright, all kidding aside...

I've decided to document who I am as a programmer. Since I'm a web developer, there's a number of technologies that I use. But being a web developer involves more than just programming, so I'm going to be talking about a number of different subjects including how I go about programming. How did I get my start, how do I work, and of course I'm going to be talking about the code.

The big push right now, is on javascript programming. It's a very tough language to learn. But it's not because it's a hard language, but because the quality of tutorials is lacking. I can't tell you how much crap I've seen on the net as far as js tutorials. Almost none of them use js coding conventions. Pretty much none of them push non obtrusive techniques. And very few tutorials use a js library which I consider to be a must for all js developers.

Now, this series of text talks isn't posted on this site for a number of reasons. First and foremost, I'm hosting live examples of the code which I can't do here. Secondly, I wanted more control over the formatting of the talks. I'm an HTML guy, not a bbcode guy...

Thirdly, I wanted to be able to go back and edit at will, at any time, in case mistakes were made or typos are found. There is no discussion are on the site where this is hosted. It's not a commercial site. There is only one advertisement which is a referral link to the company I use for hosting. I encourage all readers to post their questions here on this site where I check daily and will respond to your questions/comments/suggestions and anything else you have for me.

If I haven't lost you yet, I invite you to take part in my text talks series and I hope it helps you out a lot!

Here's the link:

http://www.steelbreeze.us/index.php?p=soyouwanna

Link to comment
Share on other sites

Re: How does Floydian do it?

 

The big push right now' date=' is on javascript programming. It's a very tough language to learn. But it's not because it's a hard language, but because the quality of tutorials is lacking.[/quote']

JavaScript is a SCRIPT not language... calling it a language means your not a programmer. :-D

There 15mill + pages of tutorials on javascript: http://tinyurl.com/cb4o8r, that makes it pretty well documented.

Also, your site's tutorials use YUI, that's not javaScript, it's just some tools they built to help you with the your JS (you need to know JS before you go into that)

Link to comment
Share on other sites

Re: How does Floydian do it?

 

The big push right now, is on javascript programming. It's a very tough language to learn. But it's not because it's a hard language, but because the quality of tutorials is lacking. I can't tell you how much crap I've seen on the net as far as js tutorials. Almost none of them use js coding conventions. Pretty much none of them push non obtrusive techniques.

I here that, thats why I have started to work out how to use YUI because I for one do not know how to code JavaScript, but YUI gives me more freedom work with and is incredibly useful.

 

Also, your site's tutorials use YUI, that's not javaScript, it's just some tools they built to help you with the your JS (you need to know JS before you go into that)

Well you are wrong their.

Quote from YUI:

The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.

Link to comment
Share on other sites

Re: How does Floydian do it?

Exactly...

Maybe it should be called "So Wanna Be a YUI Programmer". YUI uses javascript but teaching how to use the YUI is not teaching someone about javascript.

I've glanced at your engine and for the most part you use the YUI menu and the data table. Both of these could be easily programmed using another library that is a third of the size of the YUI. YUI is great but it seems your only barely using the full capabilities of the library in your engine which adds a lot of bloat for very little functionality (I could be wrong, maybe you use a bit more).

Or you could call it "So you wanna copy a game engine". Yes your engine is more secure, yes you continue to update it and yes it is a copy of another engine. How about creating something new, from scratch, then I would be more interested in how the great Floydian got his start, how he codes etc.

Link to comment
Share on other sites

Re: How does Floydian do it?

 

JavaScript is a SCRIPT not language... calling it a language means your not a programmer.

It's usually advisable you at least try to be correct when berating someone.

JavaScript is a language - individual units comprised in said language are scripts because they require an interpreter to parse and run them (being stored in a human-readable form instead of compiled machine code).

Link to comment
Share on other sites

Re: How does Floydian do it?

 

Also, your site's tutorials use YUI, that's not javaScript, it's just some tools they built to help you with the your JS (you need to know JS before you go into that)

 

Karlos, that's what I said, "set of utilities and controls" is a fancy way to say "tools" :-P

Link to comment
Share on other sites

Re: How does Floydian do it?

 

Also, your site's tutorials use YUI, that's not javaScript, it's just some tools they built to help you with the your JS (you need to know JS before you go into that)

 

Karlos, that's what I said, "set of utilities and controls" is a fancy way to say "tools" :-P

Jesus Crise... read past the first 3 words...

Link to comment
Share on other sites

Re: How does Floydian do it?

 

Okay, you can stop laughing now! (sideways...) Oh alright alright, all kidding aside...

I've decided to document who I am as a programmer

After the kidding part, I summarize what the whole deal is about. The text talks aren't intended to teach as much as they are to document who I am as a programmer.

Now if the techniques I use are helpful to someone, then that's great! But not everyone likes drink a Bananas Foster Latte', not everyone, in fact, most aren't going to do things the way I do.

 

I will speak to the question of javascript being a programming languang. Looking at the forum layout, HTML is listed as a child board of "Other Programming". HTML is definitely not a programming language. HTML is a markup language. There are no variables in HTML, no loops, no conditionals, no error handling, etc. The big difference between javascript and languages like C is that javascript isn't compiled. javascript has variables, conditionals, loops, error handling, is fully object oriented and more.

In fact, javascript is far more object oriented than php. For instance, take this php code:

<?php

$number = (int) 1;

Now, you can't do something like:

$string = $number->toString();

In other words, variables that contain numbers in php have no intrinsic methods built into them like javascript does. All variables are objects of some sort unless the variable is undefined. Even a variable with the value null incorrectly identifies itself as an object.

 

Thanks for checking out the text talks. I hope you all have enjoyed them. :)

Link to comment
Share on other sites

Re: How does Floydian do it?

 

Also, your site's tutorials use YUI, that's not javaScript, it's just some tools they built to help you with the your JS (you need to know JS before you go into that)

 

Karlos, that's what I said, "set of utilities and controls" is a fancy way to say "tools" :-P

And yet you say you need to know JS before you use YUI which is wrong.

Link to comment
Share on other sites

Re: How does Floydian do it?

 

<?php

$number = (int) 1;

Now, you can't do something like:

$string = $number->toString();

In other words, variables that contain numbers in php have no intrinsic methods built into them like javascript does.

You casted a variable to a primitive mate, none of the primitives have any methods... in any language... take Java, C++, etc for example. if you want to use that, you would have to cast your variable to a class/object. Then you can call methods on it.

 

And yet you say you need to know JS before you use YUI which is wrong.

You do, if you don't all you will be able to do is copy paste whatever code they generate for you, change a few parameters and get something THEY created. If you want to do something specific for your site, you will need to know some JS.

Even in their examples, they show you THEIR way of doing it, using THEIR tools, but the end result is usually an ALERT command (that's JS not YUI). :-P

Anyone can copy paste scripts from a site to another, but then you end up with this: http://www.youtube.com/watch?v=eppd_fRd ... re=related

Link to comment
Share on other sites

Re: How does Floydian do it?

 

A scripting language, script language or extension language is a programming language that allows some control of a single or many software application(s). "Scripts" are often treated as distinct from "programs", which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end-user they enable the behavior of the application to be adapted to the user's needs. Scripts are often, but not always, interpreted from the source code or "semi-compiled" to bytecode which is interpreted, unlike the applications they are associated with, which are traditionally compiled to native machine code for the system on which they run. Scripting languages are nearly always embedded in the application with which they are associated.

I'm not arguing what is or is not a programming language vs a scripting language because at this point in time the line is very blurry. Look at Microsoft's Visual Basic is that a programming language or is it a scripting language? Yes you can compile it but it requires the vbrun librarys to run, so according to the above reference it's a scripting language, no? Along the same lines PHP is considered a scripting language, yet, you can now compile PHP so now what is it? Script or programming language?

Now some are calling for and working on JavaScript compilers. If this happens now what is it?

 

Just some food for thought :)

Link to comment
Share on other sites

Re: How does Floydian do it?

 

I'm not arguing what is or is not a programming language vs a scripting language because at this point in time the line is very blurry.

None of which matters, since the original argument was that javascript was not, in fact, a language at all... the rest is just back-peddling.

Languages are simply sets of syntax that are used to describe processes in a human readable manner - whether they're interpreted (scripts), run under the context of a VM (ie. byte code like VB, Java, or .NET), or run in a native context (compiled code) doesn't matter - they're all programming languages.

 

Look at Microsoft's Visual Basic is that a programming language or is it a scripting language?

VB is a programming language because it compiles to byte code, which while not native (requiring a vm of some sort), is not human readable and is optimized for the running platform. This is not to be confused with VB Script, which is a VB-like scripting language. The real confusion comes in when the vbrun library itself is embedded in the executable, however it's still byte code even if the interpreter is stored in the exe.

 

Along the same lines PHP is considered a scripting language, yet, you can now compile PHP so now what is it? Script or programming language?

It's still a scripting language - like VB, it can just be archived together with it's interpreter to make it seem self-executing.

Link to comment
Share on other sites

Re: How does Floydian do it?

Come on guys... VB is not the "language"... it's Visual Basic, where "BASIC" is the language... same as Q basic.

I found this by Answerbag on some site:

The primary difference between a "programming language" (C, C++, VB etc.) and a "scripting language" (PHP, ASP, JSP, JavaScript, VBScript)is that code written in a programming language needs to be compiled before it is run. Once it is compiled, it can be run any number of times.

Scripting languages, on the other hand, are interpreted at run-time. This means that every time you want to run the program, a separate program needs to read the code, interpret it, and then follow the instructions in the code. Compiled code has already been interpreted into machine language, so it is will typically execute faster because the conversion into machine language has already been done.

Markup languages (HTML, XML) are somewhat different from both of the others. A markup language is simply a set of tags that are used to "mark up" text documents so that sections of text can be logically arranged and labeled. These documents can be viewed as plain text, or, more commonly, are viewed through a browser. The browser parses the document, looking for markup tags, and it then arranges the text and/or formats it according to the values in the tags.

And find that it bests describes the difference between the 3.

Also, if you say VB is not compiled, your wrong. VB will let you run the program as a script inside it's IDE (VB, VB.Net etc), BUT when you deploy it, you need to compile it, and distribute the executable.

Also found this:

The difference between "programming" and "scripting" is better defined by usage, or application, as well as scope and purpose. A programming language is used for building standalone projects, or "applications"; a scripting language is used to write "scripts" that interact with other data or systems to perform parts of a task rather than an entire workflow.

In short, you can run something done in a "programming language" by it's self where a "script" can only be run in whatever program is design for it to run in.

Hope that clears some confusion...

Link to comment
Share on other sites

Re: How does Floydian do it?

Somewhere, Bill Clinton is still debating what the meaning of "is" is...

I don't think anyone is arguing that javascript isn't a scripting language. I also don't think that anyone is arguing that a programmer sits down and writes programs in their language of choice. That programmer can be said to be writing a script if they are working with a scripting language.

I hope that clears it up and brings us to a point of agreement.

Link to comment
Share on other sites

Re: How does Floydian do it?

 

Come on guys... VB is not the "language"... it's Visual Basic, where "BASIC" is the language... same as Q basic.

Wrong again, which makes it obvious you've never actually used it for anything (at least anything beyond amateur dinking anyway). Visual basic is a separate language from basic, and they look very little alike. Microsoft held on to a few basic constructs, sure, but mainly they were cashing in on the widespread popularity of BASIC at the time they were releasing VB.

 

And find that it bests describes the difference between the 3.

It doesn't matter what the difference between the three are. Your original statement - that javascript is not a language - is patently false, and you're just backpeddling now.

 

Also, if you say VB is not compiled, your wrong. VB will let you run the program as a script inside it's IDE

First, I've never said VB isn't compiled - in fact I went as far as explaining that it can be compiled to either byte code, or with the interpreter embedded so as not to require the ubiquitous vbrun dll files that plagued our lives in the 90's.

I will however point out just how wrong your claim is about vb running a program as a script though - it's always compiled, even when debugging. Again, you might know this had you every used it.

Link to comment
Share on other sites

Re: How does Floydian do it?

And there's another text talk! This brings the total number of javascript text talks to five.

The last two javscript text talks demonstrate using an event handler to handle events on child elements. Rather than using 10, 20, 30 or more event handlers for 10, 20, 30 different elements respectively, we're just using one event handler for all of them at once. This event handler deals with the click event. If you needed a click/mouseover/mouseout/focus handlers, then you would need one event handler for each event type, but each one could still handle events on all the child elements in it.

http://www.steelbreeze.us/index.php?p=soyouwanna

Remember to post here if you have any questions or comments about the text talks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...