React: PHP, but with javascript Webpack: Devops work, but with frontend pay Redux: global variables dressed up to feel less embarrassing when using iOS: webviews that cost more Rails: web framework built so DHH could flex his ability to code in a language no one cared about Elixir: Erlang, but for Rails devs that don’t want to earn a new language C#: white paper on how to steal from Sun Microsystems, put out by Microsoft to shame Google’s inability to do the same Scala: when you want a functional language, but are stuck with the JVM Kotlin: when you wanted Swift, but are stuck as an Android dev Machine learning: spreadsheets that you hide in code Data Scientist: statisticians who figured out that a change in title can double your pay Kubernetes: Trusting Google’s advice, even if you are not sure what it actually means AWS: Paying more for servers so that you can pretend you’re ready for hidden scaling events Cloud Functions: easy method to trade money for not having to deal with sysadmin work Jira ticket: placeholder for incomplete ideas Confluence: where to hide stuff that was really important one time, and forgotten soon after Agile: waterfall, but with hidden steps Refactor: small changes to a code base that objectively improve it over time Standup: a short meeting where everybody shares what they’re working on, but no one listens Retro: a meeting where managers listen to developers, then feed them false hope of positive change Slack: black hole of important conversations and decisions that you kind of remember, but can never find
So there are different types of algorithms and different times to choose each. The common answer is to say “my language implements this already, all I have to do is something like myArr.sort() or myArr.indexOf(x)”. So why learn things that are already implemented in your toolset of choice?
The truth is, algorithms are one of the fundamentals of computer science, and as such they shape the way you think about problems before they even come up.
function binarySearch(arr, seekNum) { let startIndex = 0; let endIndex = arr.length - 1; while (startIndex <= endIndex) { const middle = startIndex + Math.floor((endIndex - startIndex) / 2); if (seekNum === arr[middle]) { return middle; } if (arr[middle] < seekNum) { startIndex = middle + 1; } else { endIndex = middle - 1; } } return -1 } How it works split array in half determine if the thing you are looking for is in the left half or right half make the winning half the new base array that you are searching for repeat 1-3 until base array can not be split any further if item remaining is the search key, then give it’s position.
function sort (arr) { const len = arr.length; for (let i = 1; i < len; i++) { const key = arr[i]; let j = i - 1; while (j >= 0 && arr[j] > key) { arr[j+1] = arr[j]; j = j - 1; } arr[j+1] = key; } return arr; } How it works grab an item from a set insert it in the result array grab a new item from the set find where it fits in the result array insert it there repeat steps 3-5 until no more items in the original set Info simple to implement algorithm builds the resulting sorted array one item at a time efficiency/speed slower than quick/heap/merge sort faster than selection/bubble sort caveat: fast on very small arrays faster than quicksort good quicksort implementations will default to insertion sort when the array is under a certain threshold fast on already sorted arrays not all sorting algorithms are best case O(n) worst case O(n^2) average case O(n^2) memory O(1) only requires a constant amount of memory is a quadratic sorting algorithm whatever that means stable this means that it doesn’t change the order of elements with equal keys online means it can sort one at a time, rather than needing the whole set up front can be done in place by just keeping track of which part of the array is already sorted (assuming a mutable array)
General :source-file ~/.tmux.conf // Reload .tmux.conf Sessions C+b s // list sessions C+b $ // name session From Command Line tmux // start tmux new -s myname // start new with session name tmux attach -t # // attach tmux a -t myname // attach to named tmux ls // list sessions tmux kill-session -t myname // kill session Windows C+b c // new window C+b , // name window C+b w // list windows C+b & // kill window Panes C+b % // horizontal split C+b " // vertical split C+b o // swap pane focus C+b x // kill pane C+b q // show pane numbers :swap-pane -s 2 -t 1 // Swap pane 1's position with pane 2's :set-option -g pane-active-border-style "bg=red" // set the pane divider background color :set-option -ag pane-active-border-style "fg=black" // set the pane divider foreground color Resize :resize-pane -D (Resizes the current pane down) :resize-pane -U (Resizes the current pane upward) :resize-pane -L (Resizes the current pane left) :resize-pane -R (Resizes the current pane right) :resize-pane -D 10 (Resizes the current pane down by 10 cells) :resize-pane -U 10 (Resizes the current pane upward by 10 cells) :resize-pane -L 10 (Resizes the current pane left by 10 cells) :resize-pane -R 10 (Resizes the current pane right by 10 cells) Color Palette
Kubernetes is a terrible tool to use, but it’s still better than what came before it React Hooks are redux for devs that can’t be trusted to use redux. I still like them Site speed only matters in so much as: A) google uses it to rank you, and B) it impacts your users ability to use your product The hard part about iOS development was never Objective-C but rather the cocoa libraries it has to interact with.
So I actuallly had a really hard time working remotely for the first few months, typically working long hours for little billable work. Eventually my wife and I realized that it wasn’t sustainable and we had to come up with a better strategy for handling the work life balance. What follows is the product of trying many different things, to separate the messiness of having my job and my office exist in the same physical location.
What is ‘functional composition’? Functional composition is when you take two or more functions, and make one a single function out of them. When you compose functions into a single function call, you can start using them as pipelines of specific behavior. These pipelines can then take the result of each function that comprises it, and use it as the argument to the next function in the pipeline. This approach of making a pipeline of functions might seem more cumbersome, but it ends up giving you more flexibility in how you work with your data, while also aiding predictability/readability/testability/etc.
Nailing down the roles and responsibilities a company expects from their engineers is one of the most over-looked, but important, areas of a company’s organization. It’s often talked about when hiring or promoting, but rarely at other times. When it is talked about, it’s usually more of a gut feeling by individual stakeholders rather than objective criteria. The conversation usually resembles something like this:
Person A: I feel like what I’m looking for in a senior is someone who has a real hacker mentality and isn’t afraid to tackle the difficult problems
Search through history You’re trying to remember how to do something you did in the recent past, but can only remember generally what it’s about
joe$ history | greg foo this takes all of your command line history, and pipes it to grep for any line that has the word “foo”. What you end up with, is a set of results like…
123 foo -bar 145 foo --name="bizz"
Squash Commits Sometimes you have made multiple commits as you go, but in reality the work would have made more sense as one commit. This is probably most common when you are fixing spelling errors, or backing out code that didn’t end up working out after all.
Here’s a basic example of how to squash multiple commits together into a single one
git rebase -i HEAD~3 The -i flag is for interactively rebasing.
Summary Focuses on understanding the business needs of the company, and translates that into a consistent and forward-thinking vision for the tech team as a whole
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity? Responsibilities: What are the type of things that they need to take ownership of and not let fall to the floor?
Summary Works closely with the Chief Architect to understand the tech vision for the company, provide feedback based on the platform of their focus, and help others understand and follow the companies tech vision
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity?
Summary Work with the architecture team to make sure they have the information they need to make wise choices for the company, work closely with engineers to surface the root of important problems before they become systemic
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity?
Summary Able to look at the whole project, and figure out how to best implement the vision from the architect team. Helps co-ordinate tasks between engineers so that the technical decisions are consistent throughout the project
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity?
Summary Able to to do all task, along with helping mentor the junior/mid engineers, and also see past the individual tasks they are given to accomplish the true objectives of the company
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity?
Summary A capabale engineer that has a good understanding of the necessary technologies and how to accomplish 95% of the tasks given to them.
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity? Responsibilities: What are the type of things that they need to take ownership of and not let fall to the floor?
Summary Able to do basic tasks, and is familiar with the necessary technologies, but frequently needs steps explained and laid out for them.
Expectations and Abilities Responsibilities Needs Considerations and Concerns Abilities: What are the basic types of task that they can excel in? What can you trust them to learn on their own? How are they able to handle situations of various severity? Responsibilities: What are the type of things that they need to take ownership of and not let fall to the floor?
The React context api is a simple messaging system similar in concept to the Publish/Subscribe pattern. It has three main parts you need to implement to use it: Context, Provider, and Consumer
Context: the store of value. Also where the Provider and Consumer come from Provider: the publisher/emitter of the value aka the source Consumer: the subscriber/listener for the value to be received to aka the destination What about Redux?