Newbies and Coding

I'm interested in beginning to code and write programs. I was wondering if there was any good books or pdf's that can teach me about the basics and what languages are good for what. Any help will be greatly greatly appreciated. Thanks guys

Because in my mind the most important part is learning how to make your idea of the final project into code not neccessarily the actual language.

I would start with a procedural language (like C) and then after you get that all figured out move to OOP like C#. I personally hate VB but I wrote my very first code in "Blitz Basic". It is an awesome beginning language when paired with this book that came with it.

The book is "Game Programming for Teens" by Maneesh Sethi. I believe there is a version 2 now, but I used version 1 and it was fine. So if you can find it dirt cheap somewhere, doesnt matter too much. You will only use it to get over the "thoughts to code". Once you get that down, the actual syntax of programs are easy and if you cant remember the keyword, newer languages do most of the work for you, and there is always google.

I would start with the "hello world" program in C. Then try to make some sort of a switch/case (bunch of if this, then that, else if this, then that, and so on) based on user input. Something like enter a number, make sure it is number, and return the day of the week the number corresponds to in a textual format. Like you type 0 and it returns "Monday". You type "fkdsfds" and it returns "error".

Also if you need any help with the C languages (C, C++, C#) I can help. I know others but not as well.

Some will say why bother to learn C because it is so old (1972), but it puts a very nice foundation down. I think after you master pointers in C, you are ready to move up to C#. It will just all make sense more of how things work.

Thanks for the info! that was a great introduction, and gave me most of what i needed to get started.
I have just one more question...when you were talking about the "if, then" sequencing of programming... i was wondering (and i know its possible, but i want to know your input)... im looking to build something like the "if then" but instead of inputs that are done with a human, i want the programming to monitor inputs (like from a car sensor) and then give an output in voltage..which would then in turn activate a solenoid and so on (or basically whatever i needed). What language is this best suited for... (basically looking for almost real time output with little to no delay (if possible of course). any info, again, would be greatly appreciated.
thanks!

Depending on what you want to achieve with the car sensors and constant monitoring you might be better off not using a computer at all. U can probably make a very simple electronic logic circuit that will achieve the same thing or program a micro-controller (micro controller may start to get complicated though).

I don't think that you'll find any language better or worse for sensor monitoring. You're basically describing a simple input -> calculate something -> output situation, this is the only thing that computers can do, so theoretically every language should be able to do it almost equally well.

hey bubbajoe, not to discourage your desire to learn how to eventually do some of that programming, & then figuring out how to get these inputs & outputs rigged & configured, but have you seen this?

the benifits there is you have a serious program behind it that can do all that you want & more, & you can have this all going in weeks rather than months & years or maybe never even becoming more than a passing thought, you may not need to have to learn how to reinvent the wheel when it's as easy as an interface like this

thanks for the link. ya, ill prolly invest in a chip for starting projects...but id like to know how the programming works (well really, i was one of those kids that got a present and played with it for 2 secs, before blasting it apart to see how it worked...so i guess i want to know how everything works..and since programming is at the base of all electronics and computing, that would be the most obvious way.no?). Thanks again for the link...looks that is a diamond for those who want to finish a project quickly

thanks for the link. ya, ill prolly invest in a chip for starting projects...but id like to know how the programming works (well really, i was one of those kids that got a present and played with it for 2 secs, before blasting it apart to see how it worked...so i guess i want to know how everything works..and since programming is at the base of all electronics and computing, that would be the most obvious way.no?). Thanks again for the link...looks that is a diamond for those who want to finish a project quickly

Indeed it is.

If you want to learn coding for microprocessors, then C or C++ is what you will be using.

I thought you just wanted coding for the PC to make games, or applications. Drivers and integrated code is all completely different. There you cant use what is easiest, you have to use what is fastest and smallest. For instance, you shouldnt use a string to classify things, because a string is an array of characters.

each character in the string takes up as much space as an integer. And when you are dealing with storage spaces such as Gigabytes in modern computers, or 512Mb of RAM, this is no problem. However, when you get a PIC with 64Kb of memory, each byte matters.

takes up less space and is much faster, but it starts to get less human readable. The most basic you will probably go is assembly which is a nightmare to understand. I dont get it yet.

When you do a if(string == string), it has to compare every single character. It is as if you had n number of if statements where n is the length of the string. So if("tree" == "there") it is actually:

You will also want to read about the basic elements of programs like a main function and how to compile. Understand what a function is and how variables are passed and returned. Also, understand how basic structures work like arrays, stacks, fifo and lifo stuff. Practice having functions call other functions. Then move on to pointers. This is difficult for many people but just requires patience.

Look at example code around the net and you will get good ideas on how to write code that you think is organized and clear. Remember that one day someone else may be reading it and they don't know that variable z is a pointer to an integer, etc.