I started my C++ book the other day. The book is titled, C++ Programming in Easy Steps. Each page is a lesson and there is sample programs for each lesson. The book is very interesting in the fact that it walks you through what you are doing, how to do it, and the why part comes with writing the code. I did notice myself looking at the inside of the front cover in the beginning but I am starting to memorize what each keyword means. I know that some people won’t like the fact that the book doesn’t spell out what each keyword does, but I like learning by doing and it has been great for me. The more I read of this book, the more excited I am getting for the Java books.
The 4 chapters that I have read have covered:
- Introduction – compiling and running programs, creating variables, and a little on arrays
- Performing operations – Arithmetic, assigning values, logic, conditions, data types
- Making statements – Branching with If, looping for, looping while, functions
- Handling strings – Creating string variables, join and compare strings, copy and swap strings, substrings
It is starting to get a lot more complicated and I am spending more time on each new lesson but it is a great feeling once it clicks. I am starting to see how knowing this language will be helpful for my future use with APEX, VF, and even how to better use custom formulas. The syntax and keywords of each language are different but I can start to see a pattern emerge in all of it. I can see myself getting buying a programming theory/architecture book in the near future to confirm my theory and gain more insight into the how and why. I am hoping to finish a couple more chapters by the end of the week and write up my first comprehension review.
In a previous post, (JavaScript != Java)… I had covered what JavaScript can do for a webpage and thanks to a great comment from @apexsutherland I now know the answers to the questions that I posed. Thanks again Alex! This post will be brief and cover the syntax of JavaScript.
I have started the book on C++ and that has greatly helped with my understanding of JavaScript (FYI: I will be posting again about the start of the C++ book and probably more on JavaScript as I learn more). Syntax to remember:
- Composed of statements that end can end with a ; or a line break
- Be mindful of capitalization because it is a case-sensitive language
- Single line comments start with //
- Multiple line comments start with /* and end with */
- Read the “=” as “is set to”
- Example : if (test condition) {value if true; value if false;} Note: does not have to have a value for a false return. Note: This is helpful for making sure web-to lead forms are completely and correctly filled out
- I need more time before I completely understand arrays – I see how they are set-up and know they are very important (saw them in action at Dreamforce with help from @jhoskins). Any suggestions?
To me, the syntax seemed very similar to C++. Now that I have started to learn about C++ it is greatly helping my comprehension of JavaScript and vice-versa for that matter! I am hoping it will help with arrays!