Wednesday, June 10, 2015

Project Conclusion

As the semester winds up to an end, so too does my passion project. I would like to use this post as a way to reflect on my project as well as make connections to my bible class.

My initial goals for this project were to get an introduction to coding, begin writing code and become more equipped for computer science at university. I believe that in one way or another, I accomplished all of these goals. Code academy was a great tool to accomplishing my goals as it gave me a very convenient way to learn and experiment at the same time.

When considering the "throughlines" I have learned about in my bible class, I find that I am able to relate my project to them.

The first one which I found relates to my project is God worshiping. An aspect of God worshiping is celebrating who God is and having a sense of wonder towards God. When you begin to understand a bit more about the complexity of computer software it gives you a sense of wonder at the creativity that God has instilled in us. Someone had to make these languages all the other intricacies of computer science. This definitely gave me a deep sense of wonder.

One last one Which I would like to talk about is "Idolatry discerning." Computer science takes time and if you're doing it for a job or just because you enjoy it, I can see how it could become your number one priority in life. Anything given more importance than God is an idol, so in the future I will have to make sure to keep my priorities in line when dealing with computer science.

Tuesday, June 9, 2015

Program Two

Since the completion of the first program at code academy, I have started the second program. This program involves creating a choose your own adventure web game using what I have learned from Javascript in the first lesson.

I have found this to be quite fun so far and also very useful as it allows me the opportunity to utilize all I know about Javascript in the same project. It also acts as a good refresher of old concepts as when I need to do something involving something which I learned say a month prior, I am forced to go back and relearn things which I have forgotten.

More Progress

As I continued my course at code academy, a lot of the lessons were just simply combining concepts which I had already learned to make more complex code. This was fun and rewarding as I got to see most of what I had learned work together in new ways.

Next I learned about substrings and how to manipulate them. A substring is simply just part of a string. For example, in your email inbox, the first few lines of the email are displayed. This is a substring of the full string, the email. You can display a substring of a string by using the .substring(x,y) code after a string. The x is the place where you want the substring to start and the y is the place where you want the substring to end. Below is an example of a few substrings printed out using the console.log function.











Next I moved onto variables. Variables are a way to save values by declaring a name for it. This is done with the command "var" followed by the name which you are declaring for the variable, then an equals sign and finally the value. Below is a simple example of declaring a variable then printing it out.











Next I learned how to change a variables value. This is just as easy as redeclaring the variable as if it was a new one on a different line.

I have made a lot of progress on the fundamentals of Javascript and this after learning about variables, I actually finished the first Program on Javascript at codeacademy.

Progress

Despite the lack of posts on this blog, I have continued to learn and explore javascript for this project. I have had an unfortunate lack of motivation and an apathetic approach to posting on my blog as it is very time consuming and difficult to blog about my topic.

However, I do want to continue to share about the progress I am making on the course at code academy.

The next thing I learned about with Javascript is a big one and one which I find quite cool. It is comparisons and if statements. An if statement uses the word "if" and a following statement. If this statement is true, it will run the code in the following curly braces {} An example of this can be seen below.

The above if statement did something if the statement is true. I then learned how to make the computer do something if the statement was instead false. This is done by adding an "else" section. If the statement is not true, it will run the code inside the curly braces after the "else." An example can be seen below.

The next thing I learned on code academy was a bit about debugging. I was given several lines of incorrect code with mistakes in it. This code did not run properly. It was my task to fix the code so that it could run. It took me a bit to see all of the errors but I did get it eventually.

The next new thing which I learned involved the modulo or the "%." When this symbol is placed between two numbers, the computer divides the first number by the second and displays the remainder. To practice this, i was given the simple task of printing out the answers to some questions using a modulo using the console.log function. Some examples of using the modulo are down below.







Friday, March 20, 2015

Code Academy

Since the start of this project I have had some time to play around with Javascript. I've started an online program at code academy (Link here http://www.codecademy.com/en/tracks/javascript).

The program is working very good for me as it gives you a concept, explains it then gives you a small little project to affirm your understanding.

The first thing I learned was about the .length function. This will tell you how many letters are in a word or phrase. For example if I wanted to know how many letters are in the word "Jordan" I could input "Jordan".length and it will output "6."

Next I learned how to do basic math functions with Javascript. Addition, subtraction, multiplication and division can be easily done with the +, -, * and / signs respectively. For example if I want to perform the function 2 plus 5, I simple type "2 + 5" (note the spacing), and the answer "7" is produced.

Next I learned how to make comments on the code within the actual body of the code. This is useful either to keep organized or to help other people reading your code. To make a comment in your code, start your line with "//" then anything you type after that wont be added into your code.

Next I learned how to make confirmation messages. This will bring up a popup window when executed where you either have the options to press "Ok" or "Cancel". You can do this by using the confirm command. See example below of the code I wrote and the confirm message that pops up.



These can be used to confirm things with users for example, to make sure they don't accidentally delete important things. 

Next I learned about prompts. These commands bring up a dialogue box which the user can enter information into. Here is an example of the code and the prompt dialogue box.


Next I learned about different date types: numbers and strings. Numbers are just quantities used to do things like math. Strings are sequences of characters with the letters a-z, numbers and spaces. To make a number in your code just write the number without quotes and to make a string write your phrase in quotes. An example of a string is "Pizza is good"

Next I learned about a different data type called booleans. A boolean is either true or false. The example code academy gives is using booleans to compare two numbers. 7 > 5 would come out as "true". Here is another example using both booleans and the .length function.

Next I learned how to do the console.log function. This is also commonly called printing out. Whatever you put in the brackets of console.log() will be displayed. here are two examples of work I did with code academy.


Finally, the last thing I learned about for this post was comparisons. Using all the different aspects of javascript I have learned so far, I can compare different things using the commands below (picture from code academy)
Using these, you can compare many things and get a true or false response. Here is before and after pictures of the assignment I did on Code academy.


As you can see I've gotten a pretty good start on my learning of Javascript and I will continue to learn more as I progress throughout the code academy program. 

Friday, February 27, 2015

Project Introduction

This blog has been created to log my progress for a school project called "passion projects." Each student chooses a topic they would like to learn about or a goal they would like to achieve and is given class time to work on it.

For my passion project I will be learning about coding javascript and learning what it is like to be a software engineer. This include the entire development process from initial conception of an idea to the finished product.

I am going into university for either computer science or software engineering. My school has a very poor selection of computer courses with no developed computer science program so I decided this was a great opportunity to learn.

I feel a good place to start is with the basics. My friend from another school has (generously) provided me with all of his notes from his grade 11 and 12 computer science courses. I will First read through these and do my best to understand them.

Next I will need to work on a few projects to test and further my understanding. I plan to use online resources and programs to learn and help me through this process.

This is an absolutely massive project to undertake. It will take lots of dedication and motivation if I plan to even scratch the surface of success. However, this project (if successful) will most definitely help me in the long run. It will provide me with a much stronger foundation heading into university and beyond.