hockey97
June 17th, 2009, 08:32 PM
Hi, I am going to go to the library this weekend. I want to check out books that will help me learn about anything about computer engineering.
I really want to master programming to write clean and less buggy code. I also do want to learn how to neatly create scripts. This also means how to create classes and when to use them.
I am still not 100% sure on why we use classes I do know how they function and I do use them at times but I commonly use it to seperate code.
So like one file will contain code for a login system and then another file contains code of a database managment code.
I later on include those code to a main file that will contain the code to run the program. I just use this way to make things neat. I would know where exactly each code for what is located in what file. In those files I do have classes which is reuseable. I mean like for example doing a query for a database look up. I have a class for that so that I don't have to write alot of code. I can just use a class and reuse it for different lookups in the database.
I still want to learn really why we use it and examples of classes used.
I was thinking to get a book on something like this. On the internet I don't get a good explanation nore examples. I find sites that just say well classes are used for reusable code for example a car. I mean I do understand that all cars have a motor,doors,wheels,speed,acceleration.
That car example does show that classes are used for code that have common functions but differ in values. So the color of a car can be black,orange,green etc. But the color will still be ontop of the body on the car.
So I am just guessing that classes are used for codes or scripts that you can have the same functions for an object but have different values.
For that query example I mean the sql code will be the same no matter what but the values like the data table and the records names etc will be different.
Yet I found other sites saying that classes are used for just organizing code.
So that you have objects and those objects would be like a car, a airplane. Under those classes you will have functions and variables related to jus that object.
So when you make the main script the running of the program you can include those classes and then use logic to run those functions. I was told it makes things neater. So when you need to make any modifications you just add the code to those classes.
So I would like to know what you guys suggest is a good book to read on anything related to programming.
I would also love to learn assembly and hardware programming.
Thanks for your time.
I really want to master programming to write clean and less buggy code. I also do want to learn how to neatly create scripts. This also means how to create classes and when to use them.
I am still not 100% sure on why we use classes I do know how they function and I do use them at times but I commonly use it to seperate code.
So like one file will contain code for a login system and then another file contains code of a database managment code.
I later on include those code to a main file that will contain the code to run the program. I just use this way to make things neat. I would know where exactly each code for what is located in what file. In those files I do have classes which is reuseable. I mean like for example doing a query for a database look up. I have a class for that so that I don't have to write alot of code. I can just use a class and reuse it for different lookups in the database.
I still want to learn really why we use it and examples of classes used.
I was thinking to get a book on something like this. On the internet I don't get a good explanation nore examples. I find sites that just say well classes are used for reusable code for example a car. I mean I do understand that all cars have a motor,doors,wheels,speed,acceleration.
That car example does show that classes are used for code that have common functions but differ in values. So the color of a car can be black,orange,green etc. But the color will still be ontop of the body on the car.
So I am just guessing that classes are used for codes or scripts that you can have the same functions for an object but have different values.
For that query example I mean the sql code will be the same no matter what but the values like the data table and the records names etc will be different.
Yet I found other sites saying that classes are used for just organizing code.
So that you have objects and those objects would be like a car, a airplane. Under those classes you will have functions and variables related to jus that object.
So when you make the main script the running of the program you can include those classes and then use logic to run those functions. I was told it makes things neater. So when you need to make any modifications you just add the code to those classes.
So I would like to know what you guys suggest is a good book to read on anything related to programming.
I would also love to learn assembly and hardware programming.
Thanks for your time.