Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, May 1, 2018

Insight of the day: an IF statement relies on coercion


From @AnthonyPAlicea's course on #JavaScript, Lecture 27: https://www.udemy.com/understand-javascript/learn/v4/t/lecture/2237498?start=0
A real lightbulb moment for me.

Scope chain in Javascript

A global variable is accessible from within a function in Javascript.

#JavaScript execution stack



This explains so much.

Monday, April 30, 2018

'Learn and Understand' NodeJS by @AnthonyPAlicea completed

var myStatus = { 
  courseName: 'Learn and Understand NodeJS',
  author: '@AnthonyPAlicea',
  completed: true,
  satisfied: "very true ++"
}


Don't rely on JavaScript hoisting



Even though the #JavaScript engine pre-loads functions before executing them, that's no excuse to rely on hoisting. I'll declare my variables upfront.

@AnthonyPAlicea's NodeJS Completed


@AnthonyPAlicea's #NodeJS https://www.udemy.com/understand-nodejs gave me a solid grounding in key concepts and included simple, useful code for review and analysis.  I can now, from memory, write a basic web server in NodeJS and understand exactly what it does.  Now for #JavaScript https://www.udemy.com/understand-javascript

Saturday, April 28, 2018

JavaScript on both ends



After 4 pomodoros on @AnthonyPAlicea's NodeJS course, Lecture 90, I think I understand how JavaScript code runs on both front and back-end.

Looking at this code, I can see how the array of JavaScript objects is declared on the server (/app.js), then passed on to the view (/views/index.ejs), converted to a JSON string, is made available to the AngularJS controller, which then manipulates the JSON object in the client.

As I go through the code line by line, I ask myself continually:

Where does the program get this from?
Where is the variable declared?
How does this part of the program have access to it?

In this way, I can always see, piece by piece, how it all fits together.

Unless of course I'm using Rails, in which case one must have faith in its sugary magic.

Thursday, April 26, 2018

AngularJS makes more sense now



From the NodeJS course by @AnthonyPAlicea.  Important to me because I can go line by line through the code and tell you exactly how it all fits together.  Check it out if you're a junior web dev, his explanations are first rate: https://t.co/sq2aiS18UC

Tuesday, April 24, 2018

Controllers make a lot more sense now



I'm working through Anthony Alicea's "Learn and Understand NodeJS" and Lecture 79 helped me to make sense of the problem that controllers are meant to solve.



Wednesday, April 18, 2018

950 Hours: New blog name, JavaScript, NodeJS, etc.

Mission WebDev

Mission DevOps is now Mission WebDev.  Nothing much else in the blog will change, but it represents the next stage in the evolution of my career as a software developer.  Since I updated my online profile to reflect this, I have attracted more interest, which is always a good sign.  I am working my way through a couple of courses online to lay a strong foundation for front-end development, so in this pomodoro cycle I have covered, inter alia, the following topics:

HTML/CSS/JavaScript

  • Basics of HTML
  • Basics of CSS
  • Basics of Bootstrap
  • Basics of JavaScript:
    • Control Flow
    • Functions
    • Arrays
    • Objects
  • Basics of DOM Manipulation
  • Basics of jQuery

NodeJS (Mostly theoretical)

  • V8 JS Engine
  • Node core
  • modules, exports, require
  • Events and the Event Emitter
  • Asynchronous code, libuv, event loop streams, files, etc.

Study Goals

My goal for the next pomodoro cycle is to complete the following courses online:


It's not an easy course because Alicea goes deep into the Node core and takes the time to explain concepts in exacting detail.  Lots of gestalt moments to be had.


I'm so impressed by Alicea's treatment of NodeJS so far, that I trust his JavaScript course will give me the deep understanding I'm looking for.


A great educational framework.  I've put it on hold until I complete the other two courses, and will probably park it at certain points in order to supplement my knowledge in other areas, but it's the best overall guide to becoming a web dev that I've found so far.

Coding Challenge

In addition to the course, I've set myself the challenge of working my way through last year's Advent of Code in JavaScript.  If I can complete all these challenges, I'll be satisfied with my proficiency in JavaScript and be confident in mastering a web development framework.

React or Vue?

I'm still undecided, but it's probably not something I'll have to address before I hit 1,000 (!!!) hours in my mission to become a fully fledged (and employed) web developer.

See you in a hundred pomodoros.

Tuesday, June 6, 2017

Coming Back from Disappointment: A New Chapter


Review: Putting it all in context

After 700 pomodoros of studying, coding, blogging, and job-seeking spanning five months, I am still without my first job as a junior developer.  The hardest part of it all is maintaining an optimistic outlook after repeatedly being turned down, especially after the excitement of performing so well in numerous interviews.

But that won't stop me.  There are identifiable reasons for my failure, and the good news is that all the things cited are eminently improvable and correctable:

  1. Quite simply, the quality of my code, into which I have poured so much effort, is still not good enough in the estimation of the interviewers.  This is good news, for I can learn from their feedback and code to a higher standard.
  2. After one poor performance in a pair programming interview, I handled myself well in very similar conditions three days later.  I know where I went wrong in the first one; I know what I did right in the second.  I can build on this.
  3. I need to familiarise myself with the core competencies, frameworks, and tools of front-end development.  My plan was always to give myself a solid foundation of programming in Ruby and a basic sense of DevOps with Vagrant and Docker, and although there is room for improvement in that regard, the task of getting really good at HTML, CSS, Rails, Heroku, etc is now a lot easier.
Add to that, I have gained a lot of contacts, spent plenty of time at meetups, made good impressions on many people, and have a highly sophisticated approach to learning and time-management.

So all things considered, I am many miles further down the road than when I set out on this journey at the beginning of the year.

Where to from here?

Rails

I think I'll muscle through Michael Hartl's Rails tutorials.  Although there are many good ones, this one is updated to Rails 5 and seems to do a fair job of sticking to the core knowledge.  The Odin Project looks good as well, but there's no point in jumping around from course to course.

HTML/CSS

Many experienced developers tell me that most juniors today are pretty weak on HTML and CSS, having jumped straight to boilerplates, JavaScript, and plugins.
As with other endeavours, I believe wholeheartedly in mastering the fundamentals.  It is hard to make such a commitment to something seemingly outdated, but I believe it will benefit me greatly in the long run.

JavaScript

The debate between Ruby and JavaScript rages on, and I have heard it said from those in the front-end world that the only language you really need is JavaScript these days.  I am glad I chose to learn through Ruby, and having gained a grasp of the fundamentals, learning JavaScript will be less daunting from here on out.

Summary

As much as I'd love to have been picked up by a company already, I am not really behind schedule at all, all things considered, and having taken some time to relax, recharge, and review, I am now keenly looking forward to the next couple of months.

Wednesday, March 29, 2017

Rails Study, Day 4: Still Working on the Dev Environment

So far I have spent time on the following:

  1. Vagrant
  2. Docker
  3. Digital Ocean Droplet
  4. Heroku
However, I'm going to take a step back and reconsider what I'm trying to accomplish.

What is my deliverable?

I want to build a Rails site, hosted on Heroku, that showcases my solutions to puzzles from Advent of Code.

How is my work supposed to flow?

Images, containers, Atom, etc.
  1. Development environment (DE) is separate from the host operating system. (Docker container or VM)
  2. Text editor (Atom) has read/write access to the code in the DE.
  3. The DE can be easily duplicated for a sandbox server.
  4. Code from the DE can be pushed to Github; from Github, the latest code cloned.
  5. Changes from the DE can be pushed to Docker Hub; from DH the latest version of the DE.
  6. Production code from the DE can be pushed to Heroku; from Heroku, the latest production code, although that should be available in Github.

What are the specifications of my development environment?


  1. Version control of all relevant packages.
  2. Read/Write access to development environment from host.
  3. Access to online platform (Github, 
  4. Available locally, without a constant internet connection.
  5. Totally accessible by Atom text editor on my host machine.
  6. Can upload code to Heroku, pull the latest code from Heroku, and push updated code to Heroku.
  7. Can push updates to the environment to a repository.

What shall be my development environment?

  1. Docker container for the DE, with all the necessary packages installed.
  2. Atom text editor installed on host.
  3. FTP access between DE and host.
  4. Github access from DE.
  5. Docker Hub access from DE.
  6. Heroku access from DE.

Thursday, March 23, 2017

Ruby Achievement Unlocked, Time for Rails

Having reviewed my solutions to the first three Days of puzzles of Advent of Code, I am now comfortably proficient in the fundamentals of programming in pure Ruby.



When presented with a problem, I am confident that I can do the following:

  • Define the problem
  • Describe the solution broadly in programming terms
  • Denote the likely classes and methods to be used therein

Thereafter, I am now confident that, given enough time, I can solve the problem.  There is room for vast improvement, but that will come with time.

I really enjoy the daily solution of programming puzzles, and would love to solve all fifty; however, my duty is to prioritise my studies according to optimal employment criteria, and there aren't a lot of jobs going for junior developers who specialise in solving fun puzzles in pure Ruby.

Having passed this milestone in my learning, I am now ready to hit the books again.  My study plan encompasses the following:

  • Build a website in Ruby on Rails to showcase my Advent of Code puzzle solutions.  This includes the following:
    • Deep knowledge of Rails
    • Proficiency in Javascript
    • Proficiency in JQuery
    • Proficiency in HTML/CSS
    • Proficiency in PostgreSQL and/or mySQL
    • Writing automated tests in RSpec (my preference) or Factory Girl
  • Host the website on Heroku
  • Additionally, I will further my knowledge of the following:
  • Coffeescript
  • Haml
  • Amazon Web Services: it would be good to know which services are of the highest priority, as one could spend a lifetime on there.

To gain experience in upgrading older Rails versions, I could probably clone the source code of an existing Rails to a virtual machine, on which an old version of Rails is installed.  However, this is a lower priority.

As all who know me can attest to, I can learn and work quickly and efficiently, and am adaptable and resilient.  I also take pride in managing expectations between multiple clients and communicating with both clients and colleagues.

For the next couple of weeks I will focus primarily on the Rails framework by working through Ryan Bigg's promisingly large tome: Rails 4 in Action.  In this way I expect to establish a thorough grounding in Rails and also a gain a perspective on the changes from Rails 4 to Rails 5, which could come in handy if I ever work on a legacy codebase.

Tuesday, December 6, 2016

Syntax Highlighting!

This blog officially has syntax highlighting!

BASH

# Hello world for the Unix shells (sh, ksh, csh, zsh, bash, fish, xonsh, ...)
echo Hello World

JavaScript

// Hello World in JavaScript
document.write('Hello World');

PHP

// Hello world in PHP
echo 'Hello World!';

Plain Text

Hello, world!

Python

# Hello world in Python 2
print "Hello World"
# Hello world in Python 3 (aka Python 3000)
print("Hello World")

Ruby

# Hello World in Ruby
puts "Hello World!"

Friday, December 2, 2016

From Pastebin to Gist: Not So Fast!


I published my first paste on Pastebin five years ago (at the time of writing), and Pastebin has been very good to me ever since, but it's time to migrate my data to Gist on Github.

I looked around for an automated migration solution, but couldn't find any.

Then I thought about copying and pasting all my pastes, but that's stupid, laborious work, and no self-respecting programmer would do something so repetitious.

So what's the clever solution?

The following headers are the skeleton of my plan.  I will update this post as I progress.

Part One: Get the raw pastes from Pastebin

Pastebin API

Pastebin has a scraping API and a developer's API which costs a lifetime membership.  At the time of writing there is a big discount on lifetime membership, so I bit the bullet and got it.  The practice it gives me will be more than a decent ROI.

Construct the Query, in Ruby

All the sample scripts are given in PHP, but there must be a way to do it in Ruby, or failing that, in JavaScript.

Execute the Query

Part Two: Upload the raw pastes as separate Gists

Github API

Construct the Script, in Ruby 

Execute the Script


Tuesday, November 29, 2016

Near-future Study Topics

Primary Focus


  • ES6 Javascript
  • Componentization
  • Semantic HTML Markup
  • Responsive CSS
  • CSS Animations
  • React
  • Ability to implement custom bespoke layouts from scratch

Secondary Focus


  • Node.js
  • Webpack
  • using CSS modules, Radium or Aphrodite
  • Redux
  • Server Side Rendering

Wednesday, November 23, 2016

Progress Report on Full Stack Web Development Training


I've committed myself completely to the full stack web development course through Code Academy, and it's going quite well.

My goal for the coming week is to complete all the courses leading up to Ruby and Ruby on Rails before I attend the Melbourne Ruby meetup next week.

My main priority is Ruby, so at this stage I am interested in the other components of the full stack only insofar as they are strictly needed for working with Ruby on Rails.  Once I've completed the main modules of all the courses in the stack, I'll go back and complete the supplementary exercises to sharpen my skills.

At the moment, this is how it looks:



Having spents years fiddling with basic Python and BASH, none of this is particularly difficult, but I commend Code Academy on putting together courses that give a good introduction to each language and framework.  I was a little bored by the HTML & CSS course because I came into fairly comfortable with both, so my only recommendation would be for Code Academy to consider a way of giving the equivalent of RPL (Recognition of Prior Learning) to students who can pass certain tests with ease.

For example, if someone already understands what a boilerplate is, a few questions on a test would bear this out and that portion of the course could be marked as completed automatically.  Instead, I had to slog through material I already knew back to front.

Still, I strongly recommend the course.  I feel that it is working well for me, and will commence the next stage of my journey towards a career as Ruby developer with confidence upon completion of these courses.

1,050 hours

It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group.  Much of ...