Codecademy (Part 1 - Javascript, HTML and CSS)
Noticed a tweet announcing that CodecademyĀ was starting a Python track, and thought I would have a look since Python is one of the many things on my todo list.
Instead ended up playing for a loooonnnng time. They have a great online learning experience Code Year, i guess it's meant to take a year. I have so far worked through Javascript, HTML and CSS, which is about 80& of the course. It's all fairly straightforward and beginner focused, but i am interested in the ways in which coding is taught to beginners online (ever since finding this wonderful RubyĀ tutorial), and find it quite interesting working through these tutorials. Definitely a much gentler introduction than my first-year uni course!
The rest of the course is jQuery, and then Python, two things i don't know and want to learn, so i will save those for the future.
My main problems with Code Academy are that it seems your code can be quite wrong, but as long as it compiles (or passes some sometimes seemingly random checks), you will get a pass mark, whilst other times it will keep failing and you will have no idea why, i think the engine may even screw up sometimes and it fails when it should pass.
Also, and i believe this is due to different people writing each section, the flow is a bit off, some things are skipped over, while other topics are hammered a little too much.. but that is really a minor gripe.
So the first section, and a massive one, is all about Javascript. Everytime i code in Javascript it makes me want to cry, apart from things like type-checking, here are some of my issues.
Inheritance: A class is defined through a constructor, then linked to a base-class afterwards. Urrggh.
function Penguin(name) {Ā
Ā Ā this.name = name; Ā Ā
Emperor.prototype = new Penguin();
Access modifiers! They exist, which is good, but this.blah means public, while var blah means private... gah!
function Person(name,age) {Ā Ā
And... hmm.. i swear there were more. However, there are some nicely done things, like function pointers
Ā Ā var bankBalance = 7500;Ā Ā Ā
Ā Ā var returnBalance = function() {
this.askTeller = function() {
Ā Ā return returnBalance;
for (var prop in languages)
if (typeof languages[prop] == "string")
console.log(languages[prop]);
The HTML section on Code Year is tiny, and unsatisfying. It touches on only a few concepts, like images, lists, tables, and links. Maybe there isn't much more to HTML, but i feel this section could've covered forms, and touched on HTTP concepts such as GET and POST.
Fortunately, things pick up again in the CSS section. My CSS is terrible, i know what it does, but for me knowing css is basically having a little black book of tricks to get things done, and these lessons were great for improving mine! From the simple:
Note thatĀ marginsĀ areĀ outsideĀ of the border, whileĀ paddingĀ isĀ inside.Ā
To useful, but brief guides to selector weighting
static - relative to where it should be according to the DOM, the default
relative - relative to its static position
absolute - relative to its first non-static parent*
fixed - relative to the window
*It is also interesting to note that when no styling is applied to the child, it stays within the parent. Only when we apply an attribute does the absolute positioning take effect.
Never mind the all important !importantĀ ! HA! Anyway, after a week slogging through things i basically already know, i'm looking forward to getting stuck into the last 20% of the course.