The goal of this post is to either present questions or provide a direction for learning. We may explore the individual topics presented here in future posts, but this is designed to guide a professionals research. Links have been provided to additional resources, it is recommended to take advantage of those as well.
In this post, we are going to explore several topics that will have a meaningful impact on a professional programmer's career.
Master the basics
- Understand when a closure is created for every function.
- Understand that inner closures have visibility into the closure that contains them, but not the other way around.
As a jumping off point, checkout MDN for a good explanation of closures. For an inspirational reference, why these constructs are named closures to begin with, look to the mathematical definition.
The term "context" is the setting of an environment for an event. In interviews, programmers, including senior candidates, are sometimes surprised when asked to describe the characteristics of context. We have already explored this in closures, but understanding how to describe and control these features is relevant. In interviews expect to answer questions like:
- Describe the significance of
- Understand the steps that occur when using
newkeyword with a function. For example
const john = new Person("John", "Smith").
this. What is it for and how is it assigned?
Explore context further as it relates to the keyword
this on MDN.
Understand lexical and block-level scope
- What is the difference between var, let and const?
- Describe when variable hoisting occurs.
- Describe the temporal dead zone and how it is similar and dissimilar to how variable hoisting works?
Understand the function and its characteristics
- How to control the context of a function.
- What are the differences between named and anonymous functions?
- Implement currying at least one time and think about how to work with arguments. Where might a pattern like currying be helpful (Hint: Redux)?
Understand the characteristics of the Object
- Understand the various ways objects may be created, including the Object API.
- Understand how are methods inherited from one object to another.
- Understand how to instantiate an object while excluding a prototype.
- Explain what writable, enumerable, or configurable means to someone.
- What is the significance of
- Understand methods that provide introspection or validation on values an object may contain. For example, explore
hasOwnProperty. Knowing that methods that are accessed by the prototype what would be a reasonable strategy for ensuring that the code execution is what was intended. For example, what if the object that was asked to perform
hasOwnPropertywas assigned a new
- Understand what objects OWNED property is and how it plays a role in the property access flow when accessing values on an object.
- Understand how to set or get dynamic fields on an object using bracket notation.
- Understand Garbage collection and how references to objects have an impact on the memory footprint of a program.
- Understand how to select all of the existing object's keys or values using methods like
Working into the strengths of objects and the object API will yield better programs through optimized memory usage and safety while providing more straightforward solutions.
Understand the underlying inheritance model
Know what the "own" space is in objects, understand references, and prototype chaining. Understanding prototypal inheritance may require taking a step back into the basics of computer science to learn more about how memory is allocated for a program and how pointers works, but this knowledge is transferable to other topics as well.
A thorough understanding of prototypal inheritance will clearly describe the following:
- Understand what prototype fields are eligible for enumeration.
- Develop an opinion as to why Douglas Crockford considers the
- Practice overwriting methods inherited by the prototype chain. Overwriting methods in this way is commonly considered a bad practice, but there is nothing wrong with experimenting with what the language allows (mainly for debugging).
Enumeration, iteration, and relevant data structures
Programs commonly require the manipulation of data, and in many cases - a significant amount of data. While we explore objects, we understand key-value pairs. We learn how to store and organize information, but iteration and enumeration in many ways bring these concepts to life and make programs possible. Iteration techniques are also areas of programs; many of us will spend time to design means for optimization. Professional programmers and engineers will seek out places iteration occurs in applications and design strategies that mitigate the amount of computing (work) that is required to achieve the goal of a routine.
- Understand big O notation. Big O notation provides us a language to describe the performance of algorithms. Time is the target measure here and O is seeking to understand the worst case scenario.
- Understand stack and queue data structures.
- Understand the different ways of creating arrays, for example, create an array with no elements, a collection with some items, and create a new array comprised of elements from the two other arrays.
- Understand the native array methods, such as
some. Pay close attention to the return types; for instance, many folks do not realize that the result of some of these array methods returns a new array or value.
- Understanding looping like the for, for each, for in and while loops.
- Understand how to break out of a loop early. Breaking out early from loops will prevent other work from happening, and less work means better performance.
- What type of data structure is the DOM? (Tip: this a common gateway interview question).
Understand asynchronous programming
- Know the difference between blocking and non-blocking workflows.
- Spend time with the fetch API.
- Read up on Promise and Promise.all.
- Understand async/await.
- Practice: loop to 500,000 in an nonblocking manner.
- Understand Promises and the A+ promise specification.
- Spend a little bit of time on the event loop in Node.js.
Practice Test (Design) Driven Development
The benefits of TDD are only felt through practice. Those of us that argue against TDD is typically not well-practiced, and those of us that say for it have felt its benefits. Practicing TDD is not enough. TDD is littered with mixed practices and struggles to make itself apparent as a discipline.
- Understand mocking.
- Learn the difference between an assertion language like Jasmine and a testing framework like Jest.
- Explore the phrase "Do not Mock What you Do not Own."
- Understand the spy.
- How to work with testing asynchronous code.
- What is a good test?
- Identify whether or not a test is covering what is expected.
For fun, take a look at mutation testing. Advanced teams consider the quality of their test suite by test accuracy, when and how the tests run.
Study programming design patterns
Patterns come from the continued practice of programming. In computer languages, patterns help humans organize their thoughts around different types of problems in similar ways. While working on medium to large size applications, the use of patterns will help a team stay consistent and their programs extendable.
Finding the next step
Here are some thoughts on where to go next based on experience level:
Reading this is overwhelming
Those of us that may be confused, a better place to begin, will be in an entry-level programming lesson. A couple of great places to get started could be:
The topic of writing programs is complicated, but it is within the grasp of any consistent person's ability to learn.
How to learn more about X
There are many topics covered here, and we very well may explore then more deeply in future posts. However, do not be afraid to read the ECMAScript language specification. Learning from the language spec may take a few tries to understand, but with practice, things will make more sense. Some resources include:
About web development
Web development requires several additional topics that are worth exploring. For instance, the DOM and CSS. While these are disciplines onto themselves, they are essential to understand as separate topics.
This is missing a few things
Of course, some things were missed! Feedback may be provided in the comments on this platform or through email.