View Full Version : Favorite books?

09-29-2006, 12:23 PM
So i'm going to try to get into web programming heavily, and want to know if you guys have any suggests for books I should get. I want to learn Javascript mainly, but also ASP, PHP, and mySQL. I have a very strong background in VB, a strong background in C++, and a bit of Java experience.

I have about $250 to spend, so if you could give me the name of some books, it'd be greatly appreciated. I'll just go to amazon and find them. Thanks a lot.

09-29-2006, 12:33 PM
Well, you have a LONG way to go! :) Don't get down though. It only took me about a month to get into the flow of JavaScript. I've been at it for a year now and I know alot, but I still have alot to learn. So try to put that into perspective. There's good online tutorials, you don't always have to go off spending large sums of money to learn how to program.
Here's some JavaScript links:

JavaScript For Dummies is a nice little book to get people started with JavaScript. You don't have to know much about HTML either. I do suggest though, learning HTML before JavaScript. It'll help alot.

Hopefully this helps!

09-29-2006, 12:45 PM
Yeah, i know plenty of HTML too, forgot to add that.

I know I don't have to spend a lot of money on books, but I think books are much better as a reference than online tutorials. Especially since they go in depth of how things work. When I program, I need to know exactly how and why something is working, so I can apply it to other situations.

Online tutorials are always welcome, though =)

09-29-2006, 12:51 PM
So... why don't you at least try the online tutorials? I'm sure they could help.

By the way; do you know anything about JavaScript?

09-29-2006, 01:34 PM
Online tutorials are always welcome, though =)

I definitely will! I didn't mean to sound like I didn't appreciate tutorials. They are very helpful. I just like to have offline references conveniently organized.

Again, thanks for the tuts

09-29-2006, 01:36 PM
I have done a very small amount of Javascript. Basically some mouseover events, functions, and some variable stuff. Nothing major.

I noticed that it's structured a lot like C++ though, so i think i may be able to catch on rather quickly.

09-29-2006, 01:42 PM
Like C++? I would've said something else but eh... we all have different tastes.
Do you know what a for-loop is?

09-29-2006, 02:04 PM
lol yes, i know what a for-loop is. I've been doing C++ for about 4 years and VB for about 10.

A for-loop in C++ is almost exactly the same as a JavaScript for-loop, so that was easy enough to learn.

And whatta you mean "like C++?", from what i've seen it's A LOT like it, atleast on a basic level (haven't seen any advanced stuff lately)

09-29-2006, 02:10 PM
On the basic level, yes. But there's alot more complex stuff in C++ than there is in JavaScript... Well, at least for what your intentions are.

So what exactly are you looking for in a JavaScript book?

09-29-2006, 02:18 PM
Something that will walk me through the basics, explain what goes on, and give an example for each topic. For example, if they have a section on loops, I'll want a subsection for for-loops which includes what a for-loop is, how it works, and give an example of how it's used. There would be another subsection for each additional loop structure (while-loop, etc).

That would be my ideal book. But if there isn't anything like that available, just something that will start off fairly basic (new to javascript, but not for total programming beginners) and work up to the more advanced stuff.

09-29-2006, 02:36 PM
Okay I see your point. So you need a JavaScript book that isn't too easy, but sort of easy. Just enough to get the hang of it.

what for-loop is, how it works, and give an example of how it's used

A for loop in JS is exactly the same as C++ (just isn't as strict). There's only one type of variable in JS, no int, double, etc. So. Here's a basic for-loop

for (var i = 0;i < 25;i++) {
//display the value of "i"

For-loops can be useful in verifying information, running through a sequence of arrays etc.

An array is a variable that stores data in sequence:

var myArray = ["value 0","value 1","value 2","value 3","this is another value"]

So you could say...

Which would display "value 1"
Not that hard when you look at it from a glance.
So if you can store data using a decimal value, here's where your for-loop comes in.
Let's take a look at this code:

<script type="text/javascript">
function results(contestant) {
var entries = ["jonathan","damien","courtney","kyle"]
for (var i = 0;i < entries.length;i++) {
if (contestant.value == entries[i]) {
Type in the winners name:
<br><input type="text" id="winner">
<br><input type="button" value="Go" onclick="results(winner)">

The "entries" variable are all the possibilities. The for-loop runs numbers from 0 to the array "entries" length (entries.length is how many values there are in entries). If a winner is found in the input (the argument "contestant") it will alert saying the winners' name. Not too complex, just a little experiment with the for-loop. :)

09-29-2006, 02:45 PM
lol, i appreciate explaining the for-loop to me, but I already knew that =)

i just used loops as an example, since we were already talking about it in the post before.

But I wasn't sure exactly how to declare arrays, so that's a plus!

Also, I know that there is only one type of variable in javascript, but what happens if you try to add 1 variable with text to a variable with numbers? Will it result in StringNumber? or will it give you an error? Will it just flat out not work?

Hrm... this is getting a bit off topic...

09-29-2006, 03:04 PM
When you add a number variable to a string, the browser defines the "+" operater as an assignment operator, not addition. So it won't try to add the string and the number, it'll just add the two on top of each other


var a = 2
var b = "string"

Will turn out "string2" just like that :)

09-29-2006, 07:31 PM
Check out this book (http://www.quirksmode.org/book/). I haven't read it yet(plan to get it soon), but if it is anything like the website is should be great. I have also read good things about this book (http://www.oreilly.com/catalog/jscript5/).

09-29-2006, 07:45 PM
the browser defines the "+" operater as an assignment operatorConcatenation, not assignment.

10-01-2006, 01:20 AM
Concatenation, not assignment.

Ah yes, my mistake.