Skip to content

Instantly share code, notes, and snippets.

// JavaScript
!!0 // returns false
# Ruby
!!0 # returns true
var dividend = 18;
var numbers = [2, 3, 4, 5, 6, 7, 8, 9];
var idx;
for (idx = 0; idx < numbers.length; idx++) {
var factor;
var divisor = numbers[idx];
if (dividend % divisor === 0) {
factor = true;
var arr = [1, 2, 3, 4, 5];
arr.splice(0, 1);
console.log(arr.length);
var arr = [1, 2, 3, 4, 5];
delete arr[0];
console.log(arr.length);
 
Prior Experience Mastery of fundamentals and an understanding of how they are used and constructed. Must have sound mental models of atomic and lightly-integrated concepts.
Goal The professional phase is where we can start challenging learners and push them to their limits to discover their engineering capability. Learners at this stage should try to develop a deeper intuition about tradeoffs and context, and focus on engineering patterns and architectures. At this point, performing the task is relatively easy, but when to perform the task and to what depth is now the focus.
@LSStaff
LSStaff / study.md
Last active August 21, 2019 01:40
 
Prior Experience Been dabbling and exploring for a bit, and ready to transition from "explore" to "study" mindset.
Goal The goal at this stage is to understand concepts one level deeper. It's not enough to play with the topic, but a search for some deeper insight or order commences. The focus switches from getting a feel for the topic to studying how things work by taking concepts apart. This is the process of deconstruction and it's from this careful taking-apart process that you slowly build up progressively more accurate mental models. The key actions at this stage are understanding and deconstructing, so that you understand not only how to use a tool, but also how and why that tool is constructed the way it is.
 
Prior Experience None. Absolute beginner in the field
Goal The main goal is to get your feet wet at this stage and developing some hands on feel for the topic. Play is encouraged, and it's just time to have fun and feel like you're making progress. The focus is on exploration, discovery, and awe and not on deep understanding - build and play and launch without worrying about how it works under the surface.

PEDAC

Objective Step Description
Process the Problem Understand the Problem
  • Identify expected input and output
  • Make the requirements explicit
  • Identify rules
  • Mental model of the problem (optional)
Examples/Test Case Validate understanding of the problem
Data Structure How we represent data that we will work with when converting the input to output.
Algorithm Steps for converting input to output
Code with Intent Code Implementation of Algorithm
Pitfall Description
Missed requirements Missed requirements can lead to unnecessary refactoring, especially if the initial implementation cannot accommodate the missed requirements.
Unforeseen edge cases Unforeseen edge cases can also lead to unnecessary refactoring or the insertion of new code that obscures the intent of the code.
Hard to understand code When you refactor code to accommodate a new and better understanding of the problem, the resulting code is often harder to understand since your revised logic may be more complex than otherwise.
Difficult to maintain code The refactors can sometimes lead to unintended dependencies that make it difficult to change the code.
Difficult to scale code Not planning for scaling can lead to inefficiencies and complexity.