Tuesday, 21 April 2020

10 Hours of Coding Pt.6

Coding Part 6

What I did this HOUR

Today I began the Flappy Square challenge. I finished 1-6 sections completing the first stage. It was similar in the beginning like the Cityscape challenges but is a little easier in my opinion.

What specific things I learnt

Today I went and learned new code for this new challenge. Its very simple and most of it is similar to the cityscape challenge.
context.strokeRect();
var wallX = boundaryMinX
var boundary = { }
var square = { }
var wall = { }

What to do next HOUR

I plan on continuing through to the next stage and seeing what else happens after this.

Completed Challenges






Monday, 20 April 2020

10 Hours of Coding Pt.5

Coding Post 5

What I did this HOUR

I worked, again too long, on the 4th stage but finally finished it. It took some time to remotely understand the code but again, slowly came to understand it. ( But will need to look back :/ ).

What specific things I learnt

I went on to learn new code and how to manipulate foreground and background to make the cityscape.
random();
scale();
round/floor/ceil

What to do next HOUR

Now I will move on to the flappy square challenge or whatever its called, and hopefully its a little easier than the cityscape. But there's a good chance it wont be but so be it.

Lines of Code



Images for Code



Sunday, 19 April 2020

10 Hours of Coding Pt.4

Coding Post 4

What I did this HOUR

This hour I spent too much time on stage 3 but finished it. I also went and looked back at the code i found difficult and still don't understand it fully, need to look into it some more.

What specific things I learnt

I discovered  more code that has confused me much more but it somewhat seems strait forward. I'll come to understand it at some point in time.
Switch Statements
(Switch/case/break)

What to do the next HOUR

I just plan to continue to the next stage (4) and come back to the other code later to get a full grasp, or I might go on to another lesson if there is new code to find.

Completed Challenges




10 Hours of Coding Pt.3

Coding Post 3

What I did this HOUR

This hour was spent on getting the code from the previous stage in my mind and then following through with the next stage. I finished that second stage too but it took over an hour as I wanted the code to sit in my mind. Some of it is still tricky to understand so I will continue to look back and embed it into my mind. ( If I can : / ).

What specific things I learnt

Today I figured out most of the previous coding that i didn't have a full grasp on, and in stage 2, I learned some new code as well. ( Such as...)
"for" = For Loops (which is basically a fancy way of Copy Pasting.
(Again though I will need to look back to fully understand how to use it.)

What to do the next HOUR

I plan on beginning Stage 3 of the Cityscape and looking back a little to understand unclear code.

Completed Challenges



Wednesday, 15 April 2020

10 Hours of Coding Pt.2

Coding Post 2

What I did this HOUR

HTML Stage-1 Section 5 < Here again
This hour I continued and finish the first lesson "Big Cityscape". Towards the end of the lesson, I took a lot more time than an hour. I had major difficulty completing section 7 and 8 as there wasn't a clear way to solve it. I even tested it by typing in the possible solution by hand and it still came up with the wrong answer. Whilst copy pasting the possible solution in and it comes up as the right answer. I might need some clarification on that.

What specific things I learnt

I learned how variables contribute to code and how the slightest mistake may cause all of the code to be useless. As well as I need to take some more time learning Functions, Contest.translate, and Context.restore/Save. (The new specific code I learned was...)
Var hight/width/ground/x/y/etc...
function...
context.save( );
context.restore();
context.translate(x, y);

What to do the next HOUR

I plan on going back and retrying the 7th and 8th sections in the first stage, and advancing to the second stage as well.

Completed Challenges




10 Hours of Coding Pt.1

The Beginning of Coding in 2020

   To start. I chose option 3 with the HTML5 basics. It looked interesting and I wanted to freshen my knowledge about HTML before jumping to new larger versions of coding.
HTML Stage-1 Section 1 < Link (Hard to see)

What I did this HOUR

   I started by Logging in... (bla bla) and getting to the coding practice of "Basic Cityscape". After clicking "Get Started", I was right into it, beginning with the overview and reading what was to be expected for this lesson. Then I was shown the experimental coding lesson where I could remember and get used to the layout again, and scrolling down further I was shown my first challenge. I just went down the list from there completing various lessons until I got to the one hour mark and stopped to post about it.

What specific things I learnt

   I came to remember other unrelated code but the new lines that almost instantly stuck in my mind were the following.
   context.fillStyle = 'color';
   context.fillRect (x, y, Width, Height)
   
(Possible Problem Solved) I came across a problem with the height as in challenge 4 the height is always facing down going along the y axis, when you have the ground being your new 0,0 point you will need to make the HEIGHT number a negative number so that the building no longer goes into the ground, rather goes above the ground to creating the structure. (This was a simple problem, seeing the pattern I quickly solved it).

What to do the next HOUR

   I will most likely be continuing the lessons left in this "Basic Cityscape" lesson, and I may even complete it sooner and move on to the next Lesson.

Images of Progress of the first HOUR

The Practices in Between 




Completed Challenges