typeofjustin-posts's People
typeofjustin-posts's Issues
Starting with TypeScript
TypeScript gives you some superpowers when you work with JavaScript.
JavaScript is a dynamically typed language. Let's see what I mean by that with an example.
Let's say you have a variable called name
.
let name = 'JavaScript';
The data type of name
is a string, but you can still assign values of other data types, number
for instance.
let name = 'JavaScript';
console.log(typeof name) // string
name = 11;
console.log(typeof name) // number
This might feel like a superpower, but it could lead to confusion about valid values and inconsistencies.
Typescript can help you to identify these at development time and show warnings if you try to assign different data types.
The first time I started with Typescript, I got annoyed and ended up giving the type
any
to everything 🫣, which negates the power of TypeScript. But this time, I'm more focused on learning it 🏁.
Basic data types
Basic data types like string, number, and boolean can be used with TypeScript like below.
let name: string = 'JavaScript';
let version: number = 2015,
let isDeprecated: boolean = false;
Now, if you try the following thing, which is totally acceptable in JavaScript,
let name: string = 'JavaScript';
name = 123; // ⛔️
typescript will show you a warning Type 'number' is not assignable to type 'string'.
Arrays
If you have an array of numbers, you can use the following syntax to add type safety to them.
const numbers: number[] = [1, 2, 3, 4];
// If you try to add a string to the array, TypeScript will show you a warning, Type 'string' is not assignable to type 'number'.
TypeScript will warn you in other operations like push and contact.
const languages: string[] = ['JavaScript', 'Java'];
languages.push(2015) // ⛔️ _Argument of type 'number' is not assignable to parameter of type 'string'._
What do you do if your array can contain both numbers and strings?
let mixedArray: Array< string| number> = [];
mixedArray = ['1', 2, 3]
Object
Consider the below object,
const language = {
name: 'JavaScript',
version: 2022
}
You can try to modify the value of version to a string, language.version = '2022'
and JavaScript won't complain. To add type safety, you can create a type for your language
object.
type Language = {
name: string,
version: number,
isDeprecated: boolean
}
const language: Language = {
name: 'JavaScript',
version: 2022
}
The type safety of your object is assured, but we have an error now.
Property 'isDeprecated' is missing in type '{ name: string; version: number; }' but required in type 'Language'.
In the Language
type, isDeprecated
is present, but that key is missing from the language
object. Either you can add isDeprecated
to the language,
const language: Language = {
name: 'JavaScript',
version: 2022,
isDeprecated: false
}
or make isDeprecated
optional using ?
type Language = {
name: string,
version: number,
isDeprecated?: boolean
}
Union type
At times, a variable could have 2 types of value. What we've seen so far, assigning only one data type to a variable, but with the help of union type, you can have the option to add multiple possible data types.
let fruit: string | null;
fruit = null;
fruit = 'apple';
TypeScript will allow you to have null
or any kind of string value to the fruit
variable.
Intersection type.
With intersection type, you can build new types, by extending or combing your existing other types. See the example below. Both User
and Employee
can act as independent types, and we created a new type UserEmployee
from both of them.
type User = {
name: string,
age: number
}
type Employee = {
id: number
};
type UserEmployee = User & Employee;
const employee: UserEmployee = {
name: 'Ben',
age: 20,
id: 102222
}
Literal types
If your variable can have only a defined set of values, literal types can be used to define those values.
let position: 'initial' | 'absolute' | 'fixed';
position = 'relative'; // ⛔️ Type '" relative"' is not assignable to type '"initial" | "absolute" | "fixed"'
In the above example, position
can have only values from 'initial', 'absolute', and 'fixed'
.
Enums
Enums are useful when you have to define a set of constant values.
const enum Position {
RELATIVE = 'relative',
FIXED = 'fixed'
}
const divPositino = Position.RELATIVE;
Numeric values are also allowed inside enums
const enum Room {
ONE = 1,
TWO,
THREE
}
const room = Room.ONE; // 1
One cool thing about numeric enum is that it has auto-incrementing behavior. In the Room
enum, only ONE
has the value. But subsequent keys will have auto-incremented values.
const room = Room.THREE; // = 3 🔥
Few benefits of using TypesScript,
- Avoid surprises by defining types, and catching errors at development time.
- When you work with a large team, setting a base expectation with types can be helpful and scalable. The initial learning curve can be justified with readable and predictable code.
- Autocomplete suggestions with IDE. If you have a variable of type
string
, your IDE can help you with possible operations you can do on that.
Checkout TypeScript official documentation for more features, and play around with TypeScript here
Atomic Habits - Book summary
Atomic Habits talk about how you can achieve remarkable results with tiny changes to your habits. We have the practice of tying everything to goals. I'll lose 10 pounds in 1 month, I'll learn a new programming language, etc.
There are 2 problems with goals.
- If the journey to your goals is long, you might get demotivated soon if you don't see instant results. In a week, if you've managed to reduce only 1 pound, 10 pounds might seem very far. And if you get demotivated, you might end up abandoning your goal.
- If you achieve your goal, what do you do after that? Your journey is accomplished and you might not have anything more to look forward to, and you are back where you started.
Setting goals is good. But you have to back that up with a system. The system is tiny portions that'll help you to reach your goal. If you want to achieve your goal, set a system in place.
If you plan to learn a new language, set up a system
- pick a language you find interesting
- allot a specific time every day for your studies
- Understand what topics are important for you to lean
- find projects you can build to practice your skills
etc.
If you have a system in place, you can apply the same to different goals and not necessarily get rid of it after you reach your goal. You can focus on getting 1% of your goal regularly. Initially, 1% might sound very less, but over time that compounds to a more significant portion.
Atomic Habits is a book by James Clear, an easy & proven way to build good habits and break bad ones.
If you want to build better habits, it's important to focus on your identity more than the goal itself. Another way to put it, instead of focusing on what you want to achieve, emphasize who you wish to become. If you want to become an athlete, think about what an athlete would do in their life.
- They will train every day
- Have a diet plan and stick to it.
- Work on their mental and physical well-being.
- Get good sleep
Now that you know the habits of an athlete, work toward developing them in your daily life.
The most effective way to change your habits is to focus not on what you want to achieve, but on who you wish to become.
Laws of behavior change
Law 1: Make it obvious
If you decide I'll study for 1 hour every day, there are a lot of uncertainties. When will I study? What will I study ? and you could drift off from making a new habit because of these uncertainties.
Habit stacking is a good strategy to start new habits. If you want to start something new, stack it with your current habits. If you want to create a pattern of learning every day, you can stack this new habit like this.
I wake up → Brush my teeth → Have a cup of coffee → Complete 1 lesson in JavaScript from Udemy → Go for a walk.
When you stack it like this, it allows you to create a set of simple rules that guide your future behavior.
Your environment is vital to building good habits and staying away from bad ones. If you want to sleep early every day, identify what in your environment doesn't allow you to do that.
Maybe it's the mobile phone or Television. Before going to bed, try keeping your mobile phone in some other room, or keep the TV remote inside cabinet instead of keeping them in your bed.
If you want to eat healthily, keep healthy food in the most accessible places. When you are hungry, you go for what you can grab faster.
Organize your room/house/environment to build better habits and stay away from bad ones.
Law 2: Make it attractive
To build better habits you have to make them attractive and to get rid of bad habits, make them unattractive.
Most of the time, we give preference to our "wants" over "needs". You want to watch YouTube instead of exercising. Build a positive habit of exercising (need), and pair it with something that you want to do (watch YouTube).
1. After I open YouTube, I'll do ten push-ups
2. After 10 push-ups, I'll watch YouTube for 15 mins
If you make your habits attractive this way, there's more likely to end up doing them.
Similarly, to get rid of a bad habit you have to make it unattractive. Highlight the benefits of avoiding a bad habit and making it seem unattractive.
1. If I watch YouTube for a long time, I'll feel tired and have no energy to go for a walk afterward.
Law 3: Make it easy.
Prepare your environment so you to do your habits more easily.
If you want to study more, keep distractions out of your study room. Avoid studying in the living room where there's a television. If you want to work out, ready your gym bag ahead of time.
At times it could be intimidating when you look at a habit as a whole. For example, reading a chapter every day or running a 5k every day is challenging to start. Instead of that, make the smallest part of these activities your habit.
I'll read one page of a book every day, I'll walk for 10 minutes every day, and I'll study for 15 minutes every day. When you start small, you'll end up continuing the activity for longer than you envisioned.
Similar to how you make it easy to start a habit, you should make it difficult to continue a bad one. Consider you are spending too much time on social media. You could ask your spouse or friend to set an App Password for you. Now, if you have to use social media, you've to go to them to unlock the app. And slowly you might stay away from social media to avoid the hassle of unlocking the phone.
Law 4: Make it attractive
We are more likely to repeat something when that experience is satisfying. Whenever we get that instant reward, we are more likely to repeat the same activity in the future.
Habit tracking is another way of making habits attractive. After completing a habit and when we check it off in the calendar, that is a pleasurable moment that gives you a positive vibe. Habit tracking can be helpful to make sure you don't mess up with the habit history unknowingly.
For example, it is impossible to remember all the days you worked out in the past month, you might've missed a few. But if you keep a habit tracker, you can precisely notice your habit history and make it better.
Making a pact with somebody to stay with the habit can also help you. You can make a pact with your spouse/friend, if you miss out on a workout day, you'll do something in return for them. Like, washing their dishes, or giving them $100.
Life happens and there will be times we have to set aside our habits for a day. But try not to miss 2 days continuously, because bouncing back from a long gap can be difficult.
Takeaways
- Habit building is not done in a day or a week. Start slowly, be consistent, and improve.
- Reward yourself when you complete a habit.
- Make bad habits unattractive and difficult to do. Make good habits easy to do.
- Try not to miss on your habits two days in a row.
Even before reading the book, I had 2 goals in mind, for myself.
- Read more books in 2023 (12 books).
- Learn more things in 2023.
The plan I had in mind fits perfectly well within the framework of atomic habits.
- After every chapter, I'll note down the summary.
- After every topic I learn, I'll either note down the summary or share what I've learned with my colleagues.
And so far, it's going very well.
How I built this blog
With all the new technologies, libraries, and frameworks, it isn't easy to stay simple. I evaluated a few options before building the blocks, from a development and hosting point of view.
Next.js was the choice for the front end. Few reasons for that,
- I'm familiar with React
- Simple hosting with Vercel, Netlify
- Inbuilt SSR support
For the backend, there are 2 key problems to solve.
- The writing experience
- Data management, how and where to store the data.
Problems in detail
I've built a few other applications with editors like editor.js and markdown editors. These are pretty good, but you have to deal with the data storing, CRUD operations, etc, which are cumbersome for a simple blog.
I evaluated a few headless CMSs, but again, you have to host those somewhere.
Write blogs inside the project
Writing every new blog inside the pages
directory (this is how you create new pages in Next.JS). This is the easiest way to address this problem. Few problems I noticed with this approach are,
- Editing experience will not be very smooth
- A deployment is needed whenever a new blog is created.
- If at all this blog has to be migrated to somewhere else in the future, it might involve extra manual efforts.
Supabase
Supabase was a good option. Supabase offers a few cool things.
- Easily connect your frontend to the database
- They'll take care of the availability.
- Simple SDKs.
- Modify the DB directly if needed. Not necessary to have a view to creating blog posts. But this approach can take a hit on the writing experience.
A drawback with supabase was, while you are in the free plan if your application doesn't get any requests for about 7 days, it goes to sleep mode. This helps the Supabase team prioritize their resources for free plan users. But for me, it means that when the application goes to sleep mode, I have to log in to Supabase and resume the application.
Solution
I decided to keep it simple and integrate GitHub issues with my Next.js application. This helped with
- Ease in editing blog posts (issues) with markdown support and image hosting.
- Availability of the application.
- Unlimited and painless data (issues) storage
- Give access to other authors if needed (solved team collaboration)
- If needed to add comments and reactions, GitHub issues can be used, which is a plus.
For the blog, I'll be fetching only closed issues, which gives the freedom to do as many revisions to the post before publishing.
The codebase for the blog can be in GitHub repo 1 and blog posts can be found in GitHub repo 2.
Side project endeavours
Finding other people who love the products you build brings great joy. And that's what led me to create side projects. I do not deny all the glitters of entrepreneurship, the MRR, ARR, etc.. impacted me, but the passion for building things was the driving force, always.
I've built a few products, some were paid, and most were free. But all of them have something in common. None of them really took off.
Sharing all the projects I've released (there are more, which did not see the public light), and what has happened to them.
PaperOak, a free RSS reader, for web and Android
I came across Feedly, an RSS reader. I found it very useful, articles from multiple blogs in one place. But one problem, the search in Feedly was limited. If you need a better search, upgrading to premium was the solution.
Inspiration
Simple things like search should not be a paid feature.
This is not a strong enough reason to build something, but sometimes, this is enough as well. There are products out there that provide free services to their paid counterparts.
Launch and growth
With the help of my friend, we started the development. We decided to take Laravel PHP for the backend, React for the web app, and the android app on the side.
After developing for a couple of months, the app was released in the play store, and a PWA (Progressive Web App) also. Things went smooth for a while, we had about 2000 users in about 7 months and we even pitched the idea to a local startup accelerator (we didn’t get that though 😀).
What happened then
In the next 2 months, we received an email from Google talking about paperoak violating Google’s privacy policy, and our developer account was terminated, taking our app offline.
That was s surprise, and chasing Google‘s team for what policies we violated was futile.
It didn’t make sense to continue without a native app. And that was it, Paperoak was dead.
Lessons learned
- Big companies can screw you. Businesses that are built on top of third-party services (Google Play, App store, Facebook games, etc...), these providers have the capacity and capability to modify the rules, pull the plug, and offer no real justification.
Raileo, website monitoring tool
Raileo is a tool that does monitor different aspects of a website. It was a feature-rich product with capabilities like
- Uptime
- SSL validity
- Pagespeed scores
- Keyword monitoring
- Team-based billing
Inspiration
I was working as a Front-end developer at Stayabode. We started measuring the webpage performance impact after each release, using the lighthouse tool. We maintained this in an excel sheet for about 2 months, and it was not easy to maintain. So, I decided to build something small to tackle this challenge.
Launch and growth
I started working on pagespeed scores, using lighthouse API, a neat dashboard was built to measure the performance, accessibility, and SEO and it worked well for us.
To offer a complete package (website monitoring), I decided to add more features (that would bring users they said). While introducing features like keyword monitoring and status pages, I started a complete rewrite of the codebase, considering maintainability and as a startup. Within 2-3 months, launched it to the world.
What happened then
Raileo had about 800 users on the free plan (in 1 year), and none of them upgraded. I forgot to mention, that I’m so bad at marketing.
As an A/B test, I removed the free plan and moved to a 14-day free trial. And in a month, Raileo got 1 paying customer ($10/month), and I couldn’t be happier.
I continued working on it, improving the UX, and bringing various settings into modules. But after about 1.5 years of working on it, I realized that I cannot make this a success. The product was solid, but no one to sell it.
I decided to put Raileo for acquisition in microacquire. Surprisingly I got 30+ requests. And I went with the one where they had a team to maintain the project and I’ll not have to support this any longer. And I got out.
Raileo will have a special place in my mind. Raileo helped me to think from a user perspective, to build a better and mature system, to build a system that does about 5000+ URL monitoring every 5 seconds, a journey that I’ll never forget
Lessons learned
- Release sooner. Roll out the basic features that your product requires and see if that raises any interest among users.
- Go lean. Stop adding features you think someone needs. Unless you have users, spend your time marketing instead of adding new features.
PWA inside, a directory of Progressive Web Apps
Progressive Web app are websites that behave more or less like a native app. Users can install them, access them offline, etc...
Inspiration
We have a marketplace or store for android apps and iPhone apps. PWA has been around for a while, but they have not gained that much visibility. A store/marketplace that lists all these PWA sounded useful, a place where people can find apps that can be installable.
Launch and growth
I started building a solution. Started collecting PWAs from other directories and added them. Slowly gave the power to users to add their own PWAs. PWA Store had around 1000 submissions and minimal daily visitors.
What happened then
There was some manual work in adding new submissions. And I couldn’t (didn’t) spend any time marketing this, except for the Product Hunt launch. And most of all, I started losing interest in the idea (how typical). I stopped adding new PWAs and that was it. After a year, I discontinued PWA Inside
Lessons learned
- Unless the process can be automated, the tasks become tedious and less interesting.
- I think there's an education gap when it comes to PWA. Definitely, developers and tech enthusiasts might know about it, but not everyday users.
Stats PH, Product Hunt launch statistics
Product Hunt is a community where makers/entrepreneurs/indie hackers launch their projects/products/side hustles (there are a lot of names).
By the way, I'm not very happy with the name (Stats PH) I came up with 😀
Inspiration
This was a fun project, not with a business idea in mind. I wanted to see the launch data, trends, and statistics inside the Product Hunt platform. If you search the internet, there are lots of articles sharing "tips" on how to do a Product Hunt launch. I thought some backing these claims would be nice to see.
Launch and growth
Stats PH is still active. Almost all activities are automated, so no daily efforts are required (lesson learned). Average monthly users are around 250. You can see the public analytics dashboard here
Visit StatsPH here
These are a few of the projects rolled out to the public. There are at least 5+ other projects which are fully built but not rolled out for various reasons (I have the developer-entrepreneur curse. Diving right into code whenever you get some project idea, without doing any idea validation ).
I would rather be a failed entrepreneur than someone who never tried. Because even a failed entrepreneur has the skill set to make it on their own. — Naval
A good interviewer
🚧 This article talks about engineering interviews, but certain points can be applicable across industries.
For me, the worrisome thing about changing careers is interviews. Learning new things, and preparing for the interview is easy compared to taking the actual interview.
Interviews are hard enough for the candidate without the interviewer making them harder. The interviewee has all kinds of thoughts that are making them nervous.
- What if I don’t crack this interview?
- What if I suck at this, I’ll look like a fool in front of the interviewer.
- If I don’t crack this, my friend who referred me, what will they think?
And the list goes on and on.
Interviewers can’t do much about these thoughts. Except make the interview not intimidating and a pleasant experience for the candidate.
A pleasant interview will set the right tone about your company. Because, after HR, the interviewer is the next person the candidate talks to. I will never join a company if the interviewer is arrogant, or rude.
Starting the interview
Most of the time, when the candidate joins the interview, they are tense. A relaxed mind can think better, communicate better, and be more confident about themselves.
It’s a good idea to start with small talk.
- Where are they from and what’s unique about the place?
- How are they enjoying remote work/coming back to the office?
- Anything else you found from the resume, like hobbies or side projects they worked on.
A 2-3 minute small talk can calm the candidate and fill them with some positivity.
Diving to interview topics
Job Interviews shouldn’t be like a quiz, but more conversation should be added.
Why so?
When you do a quiz format, you end up getting mugged-up book answers. But when you converse, you can have a real talk about things from the same level.
- How would you do so-and-so?
- What’s your thought process for doing something, what would you use for it, and why would you choose those tools?
- when was the last time you faced something similar?
You get the gist.
🚧 These questions might differ for a fresher as they might have less exposure to real-world implementation. In that case, I resort to some problem-solving questions. I’m more interested in the pseudo-code, doesn’t have to be in any programming language.
Working with the candidate
It is possible that the candidate gets stuck on certain questions. Reasons for that could be, that they are not familiar with the scenario explained, or terminology, or just forgot it.
If you feel the candidate has misunderstood, It'll help to rephrase the question to make sure the candidate understands what you're talking about.
If you feel the candidate is stuck at a certain point or at some stage in problem-solving, give them a slight nudge. Try to see where they are stuck and giving small clues gets them going. After all, as developers, we take help from online communities on daily basis.
And if all of this is not working out, better move on to the next question.
Taking the decision after the interview.
The decision-making can be the hard part of the interview.
At times, it is pretty clear the candidate is not a good fit for the role. And sometimes you find the right candidate for the role.
Rewind
- Take a hard look at the job responsibilities for the role candidate is interviewing. How good would the candidate be in that role?
- Even though the candidate might’ve missed a few details in the interview, do you see the potential in them to pick up things and be ready for the role?
- Would you be ready to accept them to your team, and work with them?
If the answer for all the above points is yes, it’ll be good to move them to the next round.
And if it’s a NO, it's best not to proceed with the next rounds. There’s no reason to feel bad for the candidate, it’ll work out for everybody. The candidate doesn’t have to stick with a role that he’s not a good fit for, and the company should not end up with somebody who’s not a right fit.
It is much, much better to reject a good candidate than to accept a bad candidate - Joel Spolsky,
The Guerrilla Guide to Interviewing
Improving your interview
You always have room to improve your interview process. The interview methods and questions keep evolving, and you should make sure you keep up with them.
- Talk with your peers about their interview process and discuss your methods as well. Learn from the methods that have worked well for them, and avoid the mistakes they made.
- Let someone with interview experience shadow your interviews. An experienced peer of yours can join your interview, and observe the process. After the interview, you both can talk about how did the interview process go.
- Do research about your questions. You should know your questions and answers well. And that'll help you to judge the answers better. Not every candidate answers the question in the same way.
HTTP Cookies
When you work with Web applications, cookies are useful to store some pieces of information in the browser.
Some common use cases for cookies are,
- Storing authentication tokens to authorize requests
- Has the user closed a Subscribe to Newsletter modal?
- User preference on dark theme vs light theme.
- Used by most analytics tools such as Google Analytics, Facebook Pixel, Quora Pixel etc.
ℹ️ Few of the above examples can be stored in local storage or session storage.
Cookies can be set from both the server and the client.
Adding new data to the cookie
How to set cookies from the browser, using JavaScript code.
// adding new value to cookie
document.cookie = "theme=dark";
// reading cookie value
console.log(document.cookie) // 'theme=dark'
Setting cookie, from server
Similar to how your client code can create cookies, your server/API also can add new values to cookies.
Let's say you are authenticating a user. User consent is sent to the server, the server validates the user, and sends back a Session Token to the client.
The client will use this session to authorize further API requests.
When your server responds to login requests, it can send a session token as a cookie in response headers.
Set-Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Why would I use cookies over local storage or session storage?
- Cookies are sent to API Calls automatically (unless settings prohibit), so there's no reason to explicitly send them in case of authorization tokens and other necessary cookies.
- Unlike local storage and session storage, you have more control over cookies. You can set which pages can access them, how long should it live, and domain accessibility as well.
- Cookies provide security options which will be discussed in this post.
Lifetime of a cookie
It is possible to set a time limit for cookie expiry.
// setting expiry on client side
document.cookie = "theme=dark; expires=Mon, 09 Jan 2023 12:00:00 UTC";
// setting expiry from server response
Set-Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9; Expires=Mon, 09 Jan 2023 12:00:00 UTC;
Cookies that have an expiry time are called permanent cookies.
Another type of expiry is when the browser session ends. These are called session cookies.
Cookie accessibility in domains
Similar to how you set an expiry time, you can set the Domain attribute as well.
Set-Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9; Domain=typeofjust.in
If you set a domain value, your cookie will be accessible to the specified domain and its subdomains. If you do not specify a domain, a cookie will be only accessible to the host that sets the cookie.
Cookie path
The path attribute is helpful to determine what pages should access your cookie.
Set-Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9; Path=/posts
With the above example, if I set a cookie on the /posts
path,
🚫 cookie cannot be read from `/about`.
✅ cookie accessible from `/posts/1`
Cookie Security
SameSite
Cookie has a SameSite
directive which can be used to control security. This directive is helpful to make sure your cookies are available only to the site that matches the domain which created it.
SameSite directive has 2 possible values.
- None
- Lax (default)
- Strict
SameSite=Lax
- Cookies will not be sent to cross-site subrequests, but are sent when the user is navigating to the origin site. If your site (Site A) has a backlink on another site (Site B), when the user clicks on the Site A link in Site B, Site A cookies will be sent with the request.
SameSite=Strict
- Cookies will be sent only in a first-party context (host which set the cookie) and not sent with requests initiated by other sites.
SameSite=none
- Sent in both first-party context and cross-site requests.
- Secure is required to have this setting.
Secure; HttpOnly
- HTTP can’t set cookies with Secure directives.
Cookie limits in different browsers
Browser | Cookie count | Max cookie Size |
---|---|---|
Firefox 108.0.2 | > 30000* | |
Chromium: 109.0.5414.87 | 180 | |
Safari Version 16.2 | > 10000 * |
* Firefox was getting pretty hung up with 30000 cookies.
* Unlike Firefox, Safari had problems at 10000
Resources
Say more than Hi
In 2021, remote work took over the software industry. After year long experiment, lot of companies decided to embrace remote work, and hybrid.
Even with a more than a year remote work, people still miss a key thing about asynchronous work. And a key part of this how you start a conversation with your co-worker.
People are no longer working during the same hours. Everybody try to make the best out of remote work and except few overlapping hours, people get things done at their own leisure.
This is a common pattern I’ve seen while communicating via Slack/MS Teams.
Jim: Hi
// after 2 hours
Dwight: Hello
// after 30 minutes
Jim: I wanted to know about so-and-so...
// after 10 minutes
Dwight: This is how you do so-and-so...
If you look at the above conversation, to get to the point more than 2 hours is wasted. I’m not saying every conversation is like this, but some of them are.
What’s missing here?
- When the communication is started, there’s no context.
- A good amount of time is wasted without getting to the point
- If Jim had communicated what they wanted to know in the first message, Dwight could’ve had some time to think about it and reply.
How can this be better?
Jim: Hi, I wanted to know about so-and-so...
// after 2 hours
Dwight: This is how you do so-and-so...
Before I talked about having no context for these type of communication, and that could be problematic. When Jim pings Hi
to Dwight, a lot of things could run in Dwight’s mind.
Dwight have no clue why Jim is messaging, and Dwight can think all sorts of things.
- Why is Jim messaging me, he hasn’t messaged me in a long time?
- is it about the last thing he requested, I had told him I’ll give this next Friday?
- or did I/he mess up something?
Your brain is wicked thing, it starts running wild at times. Let’s not do that. Let’s be more wise and embrace asynchronous work.
The Manager's Path - Book summary
The Manager's Path is a book by Camille Fournier, a guide for tech leaders navigating growth and change.
This post summarizes the following sections.
- How to be managed
- Mentoring
- Role of a tech lead
- Managing people
How to be managed.
If you want to be managed right at your workplace, you should have some level of expectations in place.
One-on-One meetings
It's a good practice to have a call regularly to talk about your suggestions, feedback, and any other concerns. If your company does not have this system in place, talk to your manager and explain the benefits of One-on-One meetings.
One-on-One meetings can be a great place to discuss,
- Feedback you have for your manager, and your expectations from the manager. If you think certain items are overlooked, this might be the right time to point them out.
- Ask for feedback, and grow from it. If the feedback is positive or negative, learn to take it gracefully, understand how that can be improved, and learn from it.
- Like it or not, you might have to work with your managers for a long time. So, it is important to build a good relationship. Both of you should be in a comfortable place for you to share the tough things you might be going through. Being open about challenges will help your manager to understand your struggle and help you in the workplace, maybe with leaves, or adjusting the work allocations.
- Share your plans for your career, and ask your manager for suggestions. Understand their point of view on how to achieve that, what to look for and what to learn.
- If you have any concerns about your team or teammates, let your manager know. If your co-worker is lacking in teamwork or skills, your manager should handle that. Managers might not have noticed some things your teammate is going through, but bringing some light to it on this One-on-One will not only help your teammate but benefit your entire team.
Sometimes One-on-One can feel forceful, boring, or redundant. But you must practice and perfect it. Prepare your points before going on one-on-ones, and update your notes after each One-on-One. Make sure you are making progress after each One-on-One, both career-wise and relationship-wise with your manager.
Mentoring
A lot of companies have a mentoring program, especially if they are hiring interns or students right after graduation, as freshers. A good system for mentoring plays a key role for the mentor, mentee as well as the company.
For the Company
When an intern/fresher joins a company for real-world experience, they have a lot of expectations. They will be excited and motivated to start a new journey and show the company what they are capable of.
The company needs to keep in mind,
- Interns should not be hired to do jobs for less pay. Goal should be to train them, and give them a good experience so that, they'll be impressed with your company and be willing to work for a longer time.
- A good internship program can reflect well on the company as that will improve the relationship with the college, and thus open a window to hire talented graduates.
For the mentor
Mentors are usually people with greater than 2 years of experience in the company, who have an understanding of how things work and looking to climb up their career ladder.
An efficient mentoring system is essential for the mentor as much as it is for the mentee.
- Mentoring helps mentors to develop new skills, in their communication, networking, and overall technical understanding.
- Manager/company has trusted the mentor to do the right set of training and shape up the interns for a career within the company. Doing well on the expectations can bode well for the mentor in the upcoming appraisal cycle.
- Mentoring is a chance for the mentor to come out of the daily engineering tasks and bond with interns and be a role model for them.
To do the job well,
- Mentors should have a system for training. By the time an intern joins, the mentor should be well prepared with the set of learning materials and projects to build. Without a proper curriculum, the internship could be disoriented and it'll end up unfruitful for the intern and the company.
- Listening to mentees is crucial. While in college, students are not trained well enough to work within a job environment. A good mentor should listen to the challenges of mentees adjusting to the system and extend a helping hand. It is important for the interns to feel comfortable and welcomed within the company.
- Spoon feeding will hurt in the long run. Empower interns by letting them explore task-related things. Instead of asking questions without any research, educate them to explore and find their answers. You'll have to listen to those answers and correct them if needed.
- Mentoring will help mentors develop communication skills and networking skills, which is helpful if they are looking for management roles in the future.
Role of a tech lead
A tech lead is often one with strong technical skills and good managerial skills. A tech lead doesn't have to be the senior person within the team but managed to show potential beyond technical areas.
Tech lead is a position with a lot of responsibilities and a lot of expertise.
As a tech lead, you are expected to,
- Manage a team, deliver features and enhancements, and take care of the technical debut.
- Break down given product roadmaps, understand the architectural implementation and challenges, bring solutions and lead the development.
- Listen to your teammates, value their opinions, and make sure they are recognized in their roles.
- Often acts like a product manager, even when you have a product manager. Go in-depth about the technical implementation and educate your managers and peers about the challenges and solutions.
- Be part of standup calls and update meetings, so that your team can focus on the development part and you represent them in various meetings.
- Empower your teammates to get things done. When shit goes wrong, instead of doing things on your own, guide your team in the right direction and help them to get things done.
- Share your time between coding and managing projects. Even though you might be a talented developer, you will end up spending less time on coding than you usually do.
With all of this going on, it is important that you find time to improve your technical skills and encourage your team to do the same.
Managing People
New hires
- When you have new people join your team, have an open conversation with them. What do they like, why did they decide to join the company, and what ticks them off? All of these could help build trust between both of you and build a strong relationship.
- Have a clear training plan for the new joiners. Create a 30/60/90 days training plan. Put forth realistic expectations and see if the new hires live up to them. If the new hire doesn't meet those expectations, it is possible that you have misfired.
- Prepare an onboarding/training guide and keep them up-to-date. Setting clear expectations for training can make sure everyone is on board. And with changing tech stacks and systems, keep updating those guides.
- Get feedback from new hires, after their training period. New to the system, they'll have a fresh take on the system and raise points like an outsider.
- Do regular 1-on-1. Use this meeting to understand your team member's career goals and ambitions. Don't make this meeting a status update, Use this platform to understand their concerns, and feedback, find out if they need assistance, etc.
- Create a culture of continuous feedback. Be it positive or negative, don't wait for performance time for these discussions. Make sure you appreciate your team members when they do something right, and guide them if things are not going the planned way.
- When companies do performance reviews put genuine effort into doing the assessments. When you have to assess your team members, instead of trying to Irish through it, allocate time and provide genuine feedback. Vague statements in the review will help your peers to grow, it'll just confuse and throw them off. Keep your feedback clear and back it up with examples.
- It is necessary to have a clear plan for your team members, on how they can grow. What can they do to climb up the career ladder or reach their dream job? If they are not performing well, have a conversation with them about what are your expectations and how to get those levels.
Managing teams
Managing a team is a bit different than managing individuals. You have to focus on the collective output rather than the individual outcome.
- For an engineering manager, it is very important to stay updated with technical skills. Even though they'll be writing less code, they are responsible for taking decisions, assessing the feasibility of certain implementations, understanding bottlenecks, and code review. This does not mean that you have to be smarter than all of your team members in technical skills. Having the right balance of technical skills and management skill is necessary for an engineering manager. As an engineering manager, if you don't stay updated with your technical skills, you'll become obsolete.
- It is important to keep up the team's mental health. If the team is not doing well and is down, take them out for lunch or dinner, and let some pressure out. If there are too many deliverables that are stressing your team out, it is important to break them down and take a look at task vs resource allocation. If it's not possible to shop certain things within the given timeline due to acceptable reasons, talk to your product manager, identify priority items and ship them.
The book has 3 more sections.
- Manging multiple teams
- Managing managers
- Bootstrapping culture.
I'm not summarizing them here, as I don't want this post to get lengthy. But I recommend giving this book a read if you are a tech lead, engineering manager, or aspiring to be one.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.