“Life moves pretty fast. If you don’t stop and look around once in a while, you could miss it.”
— Ferris Bueller’s Day Off
A thought crossed my mind. “Am I rushing to die?” I had this thought before. I used to brush it off. The Ferris Bueller quote encapsulates the essence of life, to open up to live. “Am I missing life?”
Yet, I have an urge to rush to the end. But I risk not thinking through consequences. Rushing through my day, I jump into solutions without thinking about other options and alternative outcomes. When coding, it’s jumping into a solution without thinking about intentions. The implementation could have an immediate problem within the technical details. Or it can have an ethical one. For example, if we have a selection input for gender, you may assume the world operates on a gender binary. That is not the case.
To rush is to deny room to be aware. And thats a decision. It’s my decision if I treat work like race to exhaustion. It’s my decision to rush out of the door every morning, without checking if I have my essentials, to catch the early train. It’s my decision if I prolong getting my eyes checked. It’s my decision to stop working out.
These scenarios lead to stress. Our bodies give us indication of stress. I have made myself numb to some of it. When the neglect goes too far, the body prevents us from moving forward. I’ve been close to passing out the last time I pulled an all nighter at work.
The past few weeks of writing about failures is a reflection of what I’ve neglected in my life and why I stopped paying attention. These letters are to kick myself in the ass and ask, “what I’m going to do about this?”
Let’s say the solution is as simple as slowing down; be present. This is my invocation to begin. I’m standing firm not to neglect the mind and body’s needs. I will let that guide my present intentions.
My hope is for my future self to read this. My hope is my future self has slowed down. And if he has, please follow up and tell everyone how you did it. And say Bueller was right.
In the frantic rush of the morning, I’m scrambling many things. I’ve got to shower, eat breakfast, work-out, gather my things for work. In this scramble I inevitably ask myself, “where are my keys?”. If I was wise, they would be in my bag. If I was unwise, I start my descent into madness.
In my key’s perspective, it’s a journey through my room. First, they’ll be in my pocket, ready to open a door. Then they will be on my work table, eager to see me when I’m ready to leave. Then they’ll be on top of the drawer because I’m changing my pants. Then they’ll be god knows where because I was in the middle of another activity and decided to place them wherever was convenient. Then I’ll spend an inextricable amount of time looking for them.
It’s times like these I feel helpless to my lack of coordination. I hate my forgetfulness because I lack the foresight to place things in proper places. My keys have a place in my bag, and should always be there. And for the scenario where I don’t bring my bag, it should be in my pocket. But therein lies the problem. If I know I won’t bring my bag, where do I place my keys when I change my pants?
A System
When I was working in manufacturing, we implemented a 5 step program to achieving lean manufacturing. One of those steps was setting things in place. In one scenario, say you use a hammer. You take the hammer from its proper placement, use it for a bit, then place it back. To make things easier, one of our technicians placed an outline of a hammer so it is easy to place the hammer in its proper place. The alternative is placing the hammer wherever, which would be harder for the next person who wants to use the hammer.
With this practice, I should be able to implement it in my personal life. However, I am rarely open to the idea of changing my space. This is prompted by a stubborn attitude that I should remember everything. Added to that, I find moving things around my room to be a chore. And it’s all over when I consider something to be a chore because I’ll try to wiggle out of it any way I can.
Applied System
Back to they keys. Because I lack a system to place my keys in the same place for every scenario, I find it difficult to find them when I’ve placed them in a spot at the time I thought was memorable. I’ve thought about a cubby, or a bowl, but haven’t acted on it. I’m skeptic it works for me.
Question for those readers. Do you follow a system for placing your things at home. How do you remember where you put your things? Does your system cover all scenarios?
Addendum
I’ll be honest. After drafting this letter, I’m going to give the bowl a try. At least I can cross it off my list if it really doesn’t work. Then it’s back to the drawing board.
If it’s meaningful to you, share it with the world.
If it means something to someone else, your work has legacy.
Live your work
Your work has meaning when you have breathed life in it.
Like a blacksmith beating a piece of metal, you too beat your life into your work.
Give your work away
If your work has copies, give those copies away.
If the original is worth something to you, giving your work away gives that someone a piece of yourself.
Memory may fade, but if your work is a legacy, it can stand the test of time.
Destroy your work
Every life and creation can be destroyed. Your work is no different.
If you set your work free, your work can be crushed.
This is not a bad thing. Nature is agnostic to the forces of good and evil.
Notes
The piece of prose is inspired by the book, “Show Your Work” by Austin Kleon.
My bestie has a romanticized version of my life where I am a perky, social butterfly always engaging in social activities. This isn’t true. I spend most days alone when I’m outside of work. I tend to keep my personal life in solidarity.
I’m not averse to being around people. I’ve made the decision to be content being alone. My state of solidarity allows me to relish my life in different ways than super extroverts.
In practice, I hang out with friends, spend time on the phone with family, and rest around a fire pit with my housemates. To my bestie’s credit, I am a social butterfly at social events. But those are anomalies in my daily routine.
I wasn’t always at peace with this idea of being alone. I grew up in a large household where everyone shared everything. There weren’t enough restrooms to go around and weren’t enough space to spend alone. I was reliant on the people around me; I would get sad if I was alone too long.
Once, my grandmother took forever to pick me up from school. Turns out, she fell asleep at the wheel a few moments after she entered her car. This was before everyone had cell phones, so there was no way of reaching her. I was close to tears waiting at the school steps, contemplating whether I should walk home alone.
In college, I had times where no one wanted to grab lunch or dinner, so I would go to the campus cafeteria alone. I found the experience miserable because I didn’t socialize with strangers at other tables. My resolution was I brought food back to the dorm and eat in the common area instead where there would always be people hanging out.
This habit continued into my early working life. I had some of these same fears eating at restaurants alone. In a conversation with my housemate’s cousin, she told me about her experience after beating cancer. She said she had no worries about being alone anymore. There’s too little time in life not to appreciate good restaurants, so if that means going alone, so be it. Her motto in life made me re-think the way I approach being alone.
And being alone doesn’t mean one-on-one time with your phone. Quite the opposite. I like to bring a composition notebook and write or draw if I’m in a restaurant. Or people watch. Or talk to the waiter.
I was on a business trip this past week. There was two days there was no one around to grab dinner with. I’ve used the “alone” mantra to justify eating alone. It was a great experience because I got to talk with a sushi chef and an bar tender about their experiences. Also, there was a lot of people watching. So the big lesson learned is not every activity alone has to be depressive. Look past your ego, suck it up, and enjoy yourself alone.
The emotional mind is an elephant and the reasoning mind is the elephant rider. The rider has limited control over the elephant. The elephant is heavy and not always willing to listen to the rider. The rider might not listen to the elephant and demand the elephant follow orders by sheer will. The internal conflicts come when neither can work together.
When I was younger, I thought age tames emotion. But after years of watching my dad get angry at little things, I threw that assumption in the waste basket.
I have been misguided by my emotional mind. If I thought about death, my emotional side kicked in and took over reasoning.
Think about the people who will miss you. Think about your body decaying. Think about the future without you.
Even as I got older, those worries lingered. Depression set and anxiety attacks appeared.
Similar feelings arose when I received rejection letters from grad school, isolated myself from loved ones, and after nasty break-ups.
Meditation, Part 1
So, I tried meditation. I learned emotion can be examined and felt. My emotional side can overwhelm me, and I have fought the feeling head on. Instead, meditation says to examine the feeling and to let it happen. You achieve this through a non-judgment lens.
I witnessed the elephant the first few times I meditated. I approached meditation through a book I read. It stressed posture, breathing, and examination of the body. After the second week, my rational mind didn’t see the elephant. It imagined the daydream version of it. Unable to relax as I had with the previous week, I quit.
Seneca
I applied philosophical thought to the response of my elephant. Seneca, Roman philosopher from two millennia ago, taught his pupils to engage in a morning ritual of telling themselves what was the worst possible thing that could happen that day. Imagine it in detail, trying to put yourself in your own shoes. Imagine what you will be doing, how you’ll be feeling, etc. If the worst were to happen, you would be mentally prepared.
This exercise could be morbid, like imagining you or your significant other’s demise. This might be trivial, like getting angry at drivers who cut you off. Whichever end of the spectrum your imagination takes you, you are experiencing that feeling in a controlled dose.
I did this exercise a bunch at my last job. My manager pulled the rug from our projects a few too many times, and I kept feeling wrecked. In the parking lot before going in the building, I’d ask myself what’s the worst thing that could happen that day.
I could be fired. My project could be pulled. I could receive a demotion.
And after a few days of this exercise, imagining what it would feel like to be first, I wasn’t scared of that prospect any more. And I took that insight and wrote my resignation letter.
Meditation, Part 2
I revisited meditation last year when I got a guided meditation app. This was a lot more relaxing as I placed myself in the guide’s practice. I dedicated a chunk of time each morning to practice. If I couldn’t practice at home, I’d take the time on my train ride to work to do it. The app was more motivating, obtaining badges and tracking my progress.
My practice was less examination of emotion than it was a stress reliever. The rider was able to spend more time working with the elephant, and the elephant sensed the rider was less stressed.
After a long vacation, I stopped. I didn’t want to meditate around friends. When I came home, I dropped the practice. But now as I’m writing this, I may give it a 4th chance because I recognize the benefits.
Conclusion
The rider holds the reins of the elephant, but the elephant overpowers the rider. When the rider is too stubborn to acknowledge the elephant, the elephant dictates the outcome. Many times, this is the voice of instant gratification.
When the rider can notice the elephant’s resistance, the rider’s best option is to roll with it. Now, ask yourself, how can I work with the elephant, and not against it? As the rider, we have the ability to plan ahead and take lessons learned from past failures. Now apply that to your everyday conflicts.
in the morning ready to go home. I punched in my confirmation code in the kiosk, but my ticket wouldn’t print. I pulled up the itinerary email. The flight was marked with tomorrow’s date. I made the mistake of buying the wrong ticket.
I asked the ticketing agent if I could grab an earlier flight. She told me it would cost an extra $400 with charges and fees for a flight that left in a few hours. To add salt to the wound, only middle seats were available.
My body said to stay put, but my mind said to go home. I bit the bullet and paid the extra amount. A few moments later, I regretted my decision. But I went through with it, and I cursed myself because it was the worst decision I made all year.
That was four years ago. Today, I wonder what prompted me to make such a mistake. Everything that ticket agent said was rational, yet my thoughts were caught in a sea of emotions. I was afraid I wasn’t going to make it to work the next day. In reality, I would have made it to work on time given there were no flight delays.
I was reacting to my situation without thinking about the long-term consequences. This feeling goes by many names, like fire-fighting, and if you are surrounded by this behavior, you are likely to adopt this frantic role. The behavior is anchored by the perception of time. “There’s not enough time to think” could be the slogan. And in this slip of time, I’m out of control.
Control / Out of Control
Busy Mind
Growing up, I remember watching “The Price is Right”. Each contestant on the game show must make decisions within a short time frame.
Many can’t think straight with the flashing lights, the potential prizes they could have, and the emotional burst of being on television. They look out to the crowd and try to take the advice of other audience members, likely the ones they came with, in hopes their shouting could be the right answer.
This environment promotes a chaotic mind. How can you think straight with the noise? The show’s producers know this and tell the game developers to use common price biases to throw the contestant off.
For example, there’s a game where the contestant has four items to determine if the item is higher or lower than the tagged price. You can bet the game developers take advantage of anchoring, a bias where the contestant will be affected by the first price they see. When the contestant plays this game, the short decision window clouds their judgment, and that’s susceptible to anchoring.
Online shopping is a similar experience. I have many temptations to buy things I don’t need because of the convenient factor. For this reason, I’ve turned off one-click shopping on Amazon as a safe guard.
My weakness is making decisions around limited time deals, like flash sales, items at the checkout line, and Black Friday. If you’ve read my newsletter on catalogs, my seeds catalog was an instant buy.
The recurring solution I’ve found to all of these decisions is to bench the decision for a certain amount of time. For instant shopping, it’s 24 hours. For the flight change, it’s ten minutes. This time period is reserved for calming time — to get rid of extra baggage and emotion when making my decision.
We’ll explore more next week on anger and the calming down effect.
Whitest Kids You Know - Abe Lincoln telling John Wilkes Booth to calm down
I fail to look past how spotty my memory is. It’s embarrassing how often I give in to the temptation that I will always remember everything pertinent in the future.
While perusing the video store, a stranger walked up to me and asked for some movie recommendations. We got to chatting and it turns out we had similar tastes in movies and video games. I found out we were both around the same age. We were both teenagers; he was a year older. He told me he had moved to this area a month prior and was looking for new friends. I told him I’d be happy to be his friend, and he invited me to come to his place to play video games. Yet I had this tinge I was forgetting something. When I got home later that evening, my dad was furious I had missed my piano lesson.
Surely my memory should be better today. Nope. I’m still failing to remember meetings, engagements, and birthdays. There are some differences between my teenager self and how I operate today. I have a set of strategies to minimize these spots in my memory.
Using a Calendar
I’ve hated time-boxing when I was younger. Chunking time made me feel like I couldn’t have any unstructured time. But I’ve looked past it after I saw how much benefit I got out of it. The important thing is to have the calendar ubiquitous. For example, if I am planning to attend an event next month, I will put it on the calendar immediately.
There’s a major flaw. I forget to do mark my calendar every now and again, especially if I’m busy that moment. Take last weekend as an example. I scheduled to have brunch with some friends, but I forgot to mark it on the calendar. Another friend asked me to help him out around the same time. I agreed and put that in the calendar instead. It was the night before when I had my “a ha” moment.
Calendars don’t work for everyone. You will have to use the tool you feel most comfortable with. It could be a bullet journal, or a paper calendar, or a wad of post-it notes shoved in your pocket.
Delegate When You Can
I suck at the follow-up. I’ll be at a meet-up and forget reach back to people who gave me their card. Let me let you in on a secret about productive people. They are great at delegation. There’s not enough time throughout the day to do everything you can imagine. At most, I can reliably do one thing a day. Anything more is a godsend. So ask the other person to reach back instead. Or ask them to do something they can’t refuse for you. An example can be to make the other person text you when they get home so you don’t get worried about them.
Write Personal Messages
I love personal messages to myself. I have trouble listening to other people, so I listen to myself a lot better if I wrote them in a tone I’d listen to. Here’s a calendar event I set for Saturday, March 3rd, 2018.
Dear Jeremy,
I know you have a tendency to neglect your taxes until April. Don’t do that. Instead, this is a reminder for you to get started on them today.
By now, you should have all of your tax documented gathered. Most likely, you’ve piled them in the corner of your desk. Here’s a checklist of all of the documents you should have.
— List of Documents —
Next steps is to login to Turbo Tax and log in the data. You have kept your donation receipts in this folder.
In case you need it, here’s last year’s tax return.
Cheers, and happy tax filing,
Ghost of Past Jeremy
Automate When Possible
An extension of all three of these ideas culminate to a set it and forget it mindset. If I set the email for next year, why can’t I have it recurring every year?
Or automation could be behavioral. For example, if someone gives me a book recommendations, I have an automatic response to write it down. Developing routines saves us mental energy. Automated strategies are not always technological.
Final Thoughts
These strategies are guidelines, not a matter of fact. Adopt one or all if you so choose. Or modify them to fit your needs. The world’s too much for a one-size-fits-all approach.
I’ve gotten too cozy on the sidelines. Ive justified my position by lame excuses, like “I wouldn’t know how to help. A moment from middle school stands out.
Help to Acquaintances
On the journey to school, I noticed a group a guys harassing a girl from my school. They were across the street, so I stopped and stood there watching. I was one of many bystanders watching my fellow school-mate get angry at these boys. She was screaming at them to stop teasing and calling her name’s. I could have run across the street and intervened, but I didn’t, thinking one of the other kids would help. They didn’t either. After several minutes of heated escalation, a teacher intervened and had the crowd scramble.
Help to Family
These events of “should haves” and “could haves” filled me with regret. The most painful one happened a few months later. One night, as my grandmother was leaving my parent’s house, she fell down on our front porch steps. My parents rushed outside as I watched from the window. They carried her back in the house and my father called emergency services. My grandmother had lost some blood and was loopy.
During the brief time before the ambulance came, I sat in another room frozen. I didn’t offer to help; I was crying because I thought I was losing my grandmother. During the time leading up to this event, I was going through my first major depressive period.
The ambulance came and did some initial diagnosis. They determined my grandmother was fine. The EMT took her to the hospital just in case.
When the chaos subsided, my mom asked me why I didn’t help out. I couldn’t answer her. I couldn’t sleep that night, wondering why I froze up. My belief was I couldn’t bear witness to someone dying. But my grandmother didn’t die that night.
It was after my depressive period that I could see more clearly the problem. My resolution to any similar situations would be to set aside emotions and focus on the task at hand. People involved in a crisis matter beyond my emotions. And I know that line’s not always clear, but let’s not open that set of moral ambiguities.
Help To Strangers
Two years ago, I was challenged with a different dilemma. I was with a date walking around at night when we met a beggar. The beggar was younger than us, a woman with disheveled hair and ragged clothes. She was begging for food for her daughter and her.
The fraud center of my brain began to whirl. My date looked at me to see what I would do. I decided to help this young woman, so we bought her a pizza at the restaurant nearby. As we were waiting, she told us about her money situation, how embarrassing it was to ask for help, and how many people ignored her. She thanked us profusely when the food arrived and we went on our separate ways.
Takeaways
I’m not going to talk about how to evaluate panhandlers and beggars. That’s its own article. Instead, here are two takeaways.
1
My college economics professor started each lecture with a simple saying. “Doing nothing is always an option.” At the time, he was explaining financial opportunity costs. I’m translating it to everyday decisions. If you are on the crossroads of sideline and intervention, choosing the sidelines is a choice. It is up to you to determine if it’s the right choice.
Cartoon at Heaven's Gate
2
I was at the National Civic Day of Hacking event in San Francisco, and the organizer captain, Jesse Biroscak, delivered an outro. To paraphrasing a point I thought was important, “You are the only ones who can help. Look around the room. This is it. There is no one else.” I looked around the room and saw around 30 people.
“Oh my gosh,” I thought, “he’s right. If I want to see change, I’m going to need to start the campaign.”
Jesse was talking about projects for the SF Brigade. One can easily translate that to everyday situations. See debris in the middle of the road? Call highway patrol. A blind person is judging if they should cross the road? Tell them if the coast is clear. Have the skills to help out a non-profit? If you can make the time, do some pro-bono work.
A friend asked for my help with an upcoming interview she’s preparing for,
so I thought it’s a good time to write-up the interview preparation process.
Interview Help Request
The following is the initial exchange of what areas she wanted to focus on.
Here are the areas and key points (I know of) that they will be asking me about during the interview.
For some additional context, the interview itself will have the interviewers seated and me standing in front of a whiteboard I can use when I am trying to explain a concept as well.
Definitely meant to help them get a feel for how a candidate would present the information to a group of students.
1. Explaining the HTTP Request and Response Cycle
This is what [the interviewers] like to start with.
I should be able to comfortably navigate through the [HTTP Request & Response] cycle at its simplest.
[For example, explain a GET request].
Accurately describe major components:
HTTP
DNS
the Client & Server
HTTP request and response anatomy
[And] note possible variations of a particular step.
For example, naming a few common HTTP request and/or response headers that may be included and why.
You must mention when & how a set-session token/key fits into this.
Not sure whether or not I will need to get into the difference between handling a request for static content vs. a request requiring server-side processing.
[They may want me to cover] server-side processing in the next topic.
Additionally, I wouldn’t be surprised if they wanted to test my general knowledge of the server setup.
I would probably touch on this in my explanation, however they may want me to further clarify the role of the load balancer/proxy server software
we typically install during deployment, such as Nginx/Phusion Passenger, and how its role differs from the server where the actual application/site resides.
Or, just throw out a question to test that I know what it is.
While listening to my presentation they will be making sure that I properly refer to the different parts and how they relate to each other.
Interviewers are likely to interject asking for clarification on a point I glossed over, or if they want to see whether I have further knowledge of a component mentioned.
From what I was told they try to make some questions somewhat similar to how a student may probe a new teacher during a lecture.
2. Explaining MVC pattern architecture
I wasn’t asked this in the first interview, however know I will be asked about this on the second.
I am not sure exactly about the depth they will want me to go into. I think it mainly pertains to my understanding purpose of this architecture as well as being able to explain what each component/part does and how they interact.
Finally, they will probably want my presentation to touch on request handling within an MVC pattern framework as well, definitely heard the motto “fat models, skinny controllers” a lot when I was being taught.
I think they want me to be able to provide a good 1-3 sentence definition of each of the three pillars. They will likely ask me to define some basic components and throw in trivial questions regarding classes, objects, method overriding, etc.
In addition to above, they may want me to write out an example of one or possibly all the 3 pillars in Python/Ruby. (for this specific position, they will likely want some verbal/written examples to be provided for most of the topics mentioned)
4. REST APIs & RESTful Routing
These areas I am more unsure about, in regards to what kind of information they would want.
We didn’t go very deeply into the concept of REST APIs during the bootcamp itself, any explanations were usually in optional sections of the platform.
My best guess, based on the curriculum, is they would be satisfied with a well-rounded-sm overview/definition of what REST is and why its used.
Additionally, explaining implementation of RESTful Routing in a framework such as Rails or Django (more semi-RESTful for the latter).
And there is a small chance they may ask me about APIs, which can be as general as “What is an API?” and “How are they used?” or as specific as providing an example of API usage with AJAX and jQuery.
5. JavaScript Algorithms
There is a 75% chance they will ask me to do up to 2 of the following,
however depending on the interviewer there is an off-chance I can get an algorithm I have never seen before or one they know I can’t solve.
Basic Data-type Manipulation (strings/arrays/dictionaries) - eg; reversing an array in place
Popular Sorting Algorithms (Bubble, Selection, Insertion or Merge). most likely culprits, but Quick Sort is on the table as well
Algorithms using Linked Lists or Binary Search Tree data structures. Could be Push/Shift/Unshift/Pop methods, linked lists algorithms & find/search with a BST
Based on the advice I was given, they would first want me to explain how a particular algorithm works/show I understand the objective (eg, that the Push method would mean adding a node to the end of the linked list in question, or that I can explain how the Bubble sort actually sorts an array rather than how the Selection sort would accomplish that), next psuedo-code and say how I plan to approach the solution, then writing out the code (last two parts can be combined, like explaining as I write out the code).
Sample Questions
From this scope, I’m taking a stab at formulating questions I would ask if I was interviewing this candidate.
Questions about HTTP Request & Response Cycle
Explain what happens when a user hits enter after typing a URL in a browser.
What is the difference between latency and bandwidth?
What is DNS?
What is an IP address?
Explain the HTTP request & response cycle
Explain an AJAX request
What are the drawbacks of using cookies? What are alternatives?
What is session management?
Networking Questions
What would you check if a website is slow?
What is a load balancer? What are some examples of solutions?
What are some ways to optimize the payload sent from the server? (For example, gzip, uglfying js, minimizing css/js, shortening header content length, etc.)
What is a CDN?
Security Questions
What is CORS? What can you do with CORS to secure your website from cross-site request forgery (CSRF)?
Questions about MVC Model
What is the MVC model?
How does the model, controller, and view interact with each other in Django?
How about in Rails? How about in any front-end framework?
Have you heard of variations on the MVC model, like MVVM or MVP?
stackoverflow
What are some examples of frameworks with MVC on the back-end?
What are some examples of having MVC or MVC-like frameworks on the front-end?
What are the pros and cons of having MVC all on the back-end?
Extra database questions
What is ORM?
What is a Store Procedure and how is it different to ORM?
Can you write SQL queries in Rails Active Record?
What is NoSQL?
Why use a Document Database over a Relational Database?
What are some purposes of a key-value store like Redis?
Why use placeholders in SQL queries? (Answer: defense against SQL Injections)
Better Question: What is a placeholder and why would you use them in SQL queries?
Questions about JavaScript Algorithms
Write a function that receives an argument for prime # and return the prime in that position.
Example:
getPrime(2); // 3getPrime(5); // 11
Given a nested array, [1, [2, 3, [4]], flatten the array, [1, 2, 3, 4].
In recursion, what is a base condition?
Without using Javascript’s map function, please write your own map implementation.
Write a select function that takes an array of objects and finds the first entry of the object with a given name.
Given an array from 1 to 100, write a binary search which takes a target. What is the O notation of your solution?
(I personally hate this question)
Given a class that mimics linked list data structure, write an add function for it.
(I also hate this question)
Write a function that is a closure, i.e. a function that returns a function, for adding.
The input is how much to add by.
The return is a function that takes a number input that returns the sum of that number
and the first input.
Write a debounce function.
Debouncing is when you stop firing the same function for a certain amount of period after firing for the the first time.
For example, if you had a “resize” function, you would not fire “resize” if you set the debounce for 500ms.
What is the purpose of this keyword in Javascript?
Explain scoping in Javascript.
Explain variable hoisting in Javascript.
Given a list of U.S. states and a list of capital cities, how would you merge these two lists to return one list?
The common factor between these two are state codes.
State collection example entry:
Follow-up: How could you filter this so you only return states that start with “North” or “South”?
Could you do this using the reduce function for Javascript Arrays?
What is a cache and how would you write a simple key-value cache?
What is a lambda and why use this over blocks? How are lambdas and closures related?
What are the differences between private and protected methods?
Other Questions
What is your favorite open source framework? Why is it your favorite? Are you a contributor to that project?
What are the pros and cons of choosing an open source framework over a custom solution? When is it valid for a custom solution?
What are some principles you have to error handling?
Follow-up: What are some common exception types?
Why would you use a try...catch block and should you use this in production?
What are some general use-cases for logging?
What are common failures that would cause your server to crash?
Sample Criteria
Here’s some criteria I look at when interviewing a new candidate. This is from past experience.
Knowledgable: Can the candidate explain the content? Can the candidate solve the whiteboard problem? Can the candidate explain their own code? Can the candidate explain a foreign topic? (BS monitor)
Presentation: Is the candidate concise? Or do they ramble? Can they explain concepts in a minute or less? Do they gauge the interviewer for comprehension? Is the candidate audible?
Personality: Is the candidate asking questions and are they probing on open ended questions? Does the candidate exude humility, like saying “they don’t know” when they don’t know something?
Seriousness: Is the candidate serious about the position? Did they do any research prior?
Team player: Is the candidate’s prior work long-standing at a single company or jumping around a lot in short-term gigs? Can the candidate work well with others?
My glasses were falling apart. I owned them for 4 years and couldn’t persuade myself to get a new pair. To obtain a new pair, I’d need a new prescription. And being sensitive about my eyesight and didn’t want to face the prospect of the optometrist diagnosing me a stronger prescription.
Broken Glasses
So I did the insensible. I neglected to replace the pair of glasses. And I had no excuse. I had health insurance. There was a hurdle in my mind I couldn’t jump over.
The hurdle started with facing the news I will have a stronger prescription. Which leads to being deemed legally blind because my eyesight had deteriorated. Which triggered my fear of being blind.
At that point, I’d think about something else. When the topic came up again, I’d repeat this cycle of worry, hesitation, and negligence.
I broke down when bad became worse. On of the nostril pads came off, so I needed a replacement. I came to my senses and figured out the first actionable step.
Breaking the Cycle
I went online to determine how to schedule an appointment with an optometrist. My hospital website had had online booking. Bingo.
I went in for the appointment and to my surprise, my eyes were the same as they were 4 years ago. By letting myself slip, I failed to see the absurdity of my own bias. All the moments of worry were for nothing. All the times I wondered what if, wasted.
Not broken glasses
An Introduction
We all make mistakes. We all fail to do, or sometimes not do, the important things in life. I want to raise the bar and stop this repetition.
The negligence problem is one of my failures. It’s one of many failures. Each week I’ll break down a different repeated mistake. My aim is to generalize failures common to everyone, although my intent is to write it for my future self if I were to relapse. If this model helps other people, that’s an added benefit.
Bookmark this for later. Re-read often. We’re going to have a fun two months exposing my weaknesses.
The Polish television series "Dekalog" revolves around the theme of the First Commandment, "I am the Lord thy God; thou shalt have no other gods before me". The characters grapple with their beliefs and the role of technology in their lives. The story explores the importance of spirituality and the search for meaning in a world dominated by technology and rational thought.
The film revolves around two Chinese youth gangs and the experiences of a 14-year-old boy named S'ir. The story is divided into two halves: the first half traces S'ir's experiences in the gang, while the second half focuses on his home and love life. Both halves culminate in unexpected violence
Single responsibility means one unit of code does one thing.
It should not be responsibility for many different things.
In other words, it adheres to “separation of concerns”.
In dynamic languages like Javascript, there’s no typechecking what a function can return.
So, a function could take any arguments of any type and return any type.
In general, we want to avoid this. Take the following code example.
Our function, getPlayerBehavior, takes one input that should be a number
However, the first return statement returns a type String,
while the second return returns a type Array.
This is an example where the function is doing two different things in one
unit of code. We want to avoid this behavior and evaludate what this function should do.
Should it pass back the list of behavior names
or should it find the behavior given the index.
Take the following solution as a guideline.
// Same constantfunction getPlayerBehaviors() { return PLAYER_BEHAVIORS.map(playerBehavior => playerBehavior.name);}function findPlayerBehavior(index) { if (Number.isInteger(index)) { const playerBehavior = PLAYER_BEHAVIORS.find(playerBehaviour => playerBehaviour.id === index); if (playerBehavior) { return playerBehavior.name; } else { // Could not find player behavior return ''; } } else { throw new Error('index should be type Number:Integer'); }}
In this example, we have separated the function into two functions because they are doing two separate things.
Depending on how we called this function before, we will have to determine
which function to use before we make the function call.
I left 2015 with optimism. I leave 2016 with mixed feelings. I slowed down my steam for writing. I ramped up with watching classic and contemporary films. We lost some world-changing people. Of course, this is inevitable.
To free me from the past, I must recognize the ups and downs of the year. Hence, the retrospective list.
Obligatory List
I ran my second marathon in San Francisco. Under 6 hours.
Revisited Thailand and Mexico. First-time to the UK.
I wrote 12 letters, far less than the previous year.
I meditated for 60 non-consecutive days. I stopped after traveling to Thailand.
I read 26 books, or one every 2 weeks
I participated in 4 hackathons - two corporate sponsored, the other two more hack for the sake of hacking. That’s how I’d have it. One continues to be a small project about the Zika Virus
I am working on another side project that will not be named at this current time, but has been taking a lot of time
Beginning of the year, I finished a course on The History of Classical Music, up to the beginning of the 20th Century.
The rest of the year was spent learning the history of film. Kicked off by watching the 15 hour documentary, “The Story of Film”. Final tally: 129 films. This has been the highest the past decade. Large contrast to last year being the lowest in a decade.
Continued to go to talks, topics ranging from Time Travel 101 to Gut Bacteria
Add North and South Carolina to list of states visited. Total Count: 33.
I started a papers reading club at work, inspired by “Papers We Love”
Along with many, I helped raise over $1,000 for charity this holiday season
My parents used to leave me at the public library for an hour. It was there I stared at a poster hung in the children’s section, showing what each hundred numbers meant. This was my introduction to the Dewey Decimal system. I was in awe at how every topic in life, the universe, and everything could fit within these 10 category brackets. But alas, they don’t. That was revealed when I asked, “Why are there books on suicide near language learning books?”. Much later, I discovered the field of library science, and I realized librarians curated non-fiction books to fit between 000 to 999.
Seed Catalog
I was fascinated with cataloging systems ever since. So it doesn’t come to anyone’s surprise at my obsession with the 358 page, encyclopedic catalog called “The Whole Seed Catalog from Baker Creek Heirloom Seeds.”
Each plant entry has a crips image, an item code, and a short description from the farmer on why you should grow this plant. Each image whispers in your ear, “this is what your garden can look like.” The curators determined the selection by the limited supply of Baker’s Creek, as well as compatibility with the North American climate. So even with the limited selection, it’s exhilarating to see what exotic or heirloom varietal lie with each page turn.
select page from seed catalog
The catalog has a lot of character. There are photographs of strange vegetable sculptures and children that could be the poster child for “Future Farmers of America”. I love it when you have someone’s personality injected into these catalogs. Counter that with the department store’s 600+ page catalog of generic items.
This same elation came to me as I flipped through the Cool Tools Catalog. Kevin Kelly, co-founder of Wired, published this catalog and helps run the website by the same name along with and a slew of editors. Each page is full of interesting gems about topics I wouldn’t have thought about, like world traveling to cartoons that help you learn. For most items, the reviewer has used the item and shared what use they got out of it. For all other items, they are not vetted for, but the the reviewer describes why the item is cool and why they want to buy it at a future date.
Cool Tools
The selection of oddities feel like the curators were scratching an informational rabbit hole. Why would I want books on beekeeping? Or tiny homes? Or astrology? Because alluring and voyeuristic, like looking through someone else’s grocery cart. It opens my curiosity and sometimes gets me to dig deeper.
Then there’s the catalog of mythic proportions to a machinist. The McMaster-Carr catalog. Every mechanical part you’d ever want appears in this tome. Over a thousand pages, this catalog has a limited print release. I found a copy at The Crucible in Oakland when I took a general machining class. Gears, nuts, bolts, screws, vinyl tubing, and much more. It has everything.
While that’s an incredible feat, McMaster-Carr has created an orderly website. While the website can’t show the catalog’s size and weight, it adds features to the website you can’t translate to a physical object. They share CAD files so you can integrate their products into your 3D models. They make ordering easy.
McMaster Website
Instead of looking at an index in the back of a paper catalog, you can locate any item with the search bar. You lose the unintended discoveries if you were flipping through the catalog. Same same, but different. What you gain is order to their catalog without having to flip through unnecessary details of all possible selections of items you don’t care about.
Filmstruck Website
I am concluding with Filmstruck, the new movie streaming service by TCM, in partnership with Criterion. One of Netflix’s challenges is providing the right content to an individual subscriber. Filmstruck’s solution is to catalog their films by curated themes, like “Classic Bollywood” and “A Smidgeon Of Religion”. And if those are not your flavor of curation, they also have typical genre categories. But you can spend more time viewing short movie descriptions than starting the movie, so let the cinephiles tell you what’s good.
Curation ties all of these catalogs together. Each catalog contextualizes and gives order to multitude of items. Thinking about this helps me think how to organize my work, from determining hierarchy in my code or organizing my thoughts in essays. Don’t think of catalogs are this passive thing we’re given. Think why they are being given to us.
After a year working with JSX syntax in React, I’ve learned a few things reviewing my code as well as other developer’s code.
I am taking the perspective of a code review in these following code samples.
Last fix I would like to see is to alphabetize the tag properties.
I don’t want to find a property if the list is random.
This is more so when the property list is greater than 10.
Some of you may notice the two self-closing tags are unnecessary.
As you may or may not be aware, we are using Bootstrap.
Bootstrap contains “offset” classes that can be used to replace those first two column <div>.
I didn’t address this because the developer may plan to use it.
It’s more simple for me to note that in my review notes to the developer than to tell them to make those changes.
If that developer chooses to keep it, they can leave a comment as to why it is left that way.