Reflections #2 HTML, CSS, Ruby

Today’s the 2nd day in school, although it’s actually the 2nd week already. But because I was away in HK for a holiday, I missed 3 days of lessons. I made it back on Saturday afternoon, and spent the weekend working on the Ruby coding exercises. It was challenging but satisfying in a way.

Objective – What did you do today?
Today, I learnt about HTML, CSS and we cloned the Google homepage. We also learnt some shortcuts to solving some of the exercises.

Reflective – How did you feel today?
I felt a bit bored today during the html, css class because styling CSS is very tedious, sometimes the layout doesn’t go the way you want and you have to try different ways to find out what’s the problem. Even though the Google homepage looks simple, it’s actually quite hard to style one that looks identical.

Interpretive – What did you learn today? (not a lecture note)
Just thinking about the coding exercises I did over the weekend, I think there was an aha! moment when I was doing the coding for checking Ugly Numbers. If it’s divisible by 2,3 and/or 5 only, then it’s an ugly number.

When I started on the question, I used some If/Elsif conditionals and loops, and it was confusing. Then I took a break and started again, and this time i just put 3 “While” code blocks to loop the divisions. No If/Else at all, and surprisingly, it works.

Because if the number (value held in variable) divides by 2 until it cannot divide by 2, it will naturally move down the stack to next “While x % 3” statement which asks implicitly whether it can divide by 3 and proceeds to divide it by 3 until it cannot be divided by 3, and let it move to 5.

Less is more.

Reflection – Questions and problems
I have problem writing a code to solve the Towers of Hanoi recursion problem. Although i understand the solution and can solve it by hand, but writing the actual code is problematic. I think I will need to continue studying Ruby methods, etc, and attempt again next time. (I spent about 2 hours at home trying to google the answer and see other people’s Ruby code, but none seem to work.)

Decisional – What are you going to do tmr?
Tmr I will get some breakfast before class starts. We will be working on static pages.
I will also continue the online Ruby lessons.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s