NJ
Reflections, Code

11 in 11: Concepts Learnt or Relearnt from Zero Day

@nerajno
#javascript#career#typescript#learning

13 min read

Cover Image of a garden

As of the first of this month, it’s been 11 months since I have been in my current position. It took exactly 1 year between “We are sorry ” and “Welcome to the team”. Eventually, someone will speak to the emotional toll of the job hunt in this current market but not me. This job hunt consisted of upskilling, networking, re-learning and unlearning stuff. Overall, I tracked somewhere in the neighbourhood of 700-ish applications, what I will say is that job-hunt 2023 was different from all the previous timelines. A new career opportunity, as always, brings a new set of challenges but also provides a lot of insights, here are 11 insights learnt thus far :

1: Comfortable Discomfort

Staying current in software development requires one to embrace a state of “comfortable discomfort” - which lends itself to always learning and adapting. This means on average based on your skill level, will spend anything from 3 to 6 months annually, learning something completely new or digging deeper into what you already know. To strengthen and enhance my skill set, I have done the following :

2:Enums

Enums (short for enumerations) are a way to define a set of named constants. They’re instrumental in TypeScript for creating more expressive and type-safe code. In my head, they have the same features as objects. Here is another way of explaining them, ” imagine you have a box of coloured pencils. You know that in this box, you can only have certain colours - let’s say red, blue, green, and yellow. You can’t suddenly have a purple pencil appear in the box. An enum (short for enumeration) in programming is like that box of coloured pencils. It’s a special way to create a group of named values that don’t change. Just like you know exactly what colours are in your pencil box, an enum lets programmers define a set of named values that they know will always be the same. My takeaways include :

I also found this resource and this video to be extremely helpful.

3:Container Queries

Container queries allow you to apply styles based on the size of a containing element, rather than the viewport size. Here are some key points :

My references were this CSS tricks article and this video.

4:Slots

I became aware of slots as we utilize this feature in our codebase and @abbeyperini’s talk on said topic. Slots can be best described as a powerful feature in web components and some frameworks that allow for flexible content composition.

5:Take Care of You

Prioritizing Self-Care in the Tech Community

It’s often overlooked, but taking care of yourself is essential, especially in the fast-paced tech world. The culture of hustle and grind can be alluring, and many of us have indulged in that mindset. However, the reality is that pushing yourself too hard can lead to burnout, and your body will inevitably demand a break. Here’s some crucial advice for anyone navigating this landscape:

Essential Self-Care Tips

Bonus Tip

By embracing these self-care practices, you can maintain a healthy balance in your life while thriving in the tech community. Remember, taking care of yourself is not just an option; it’s a necessity for long-term success!

6:Demonstrated Learning

Demonstrating your learning through projects and sharing knowledge is crucial for career growth.

7:Personal Note Taking (explain it to you => Use examples)

Effective note-taking is crucial for retaining and organizing knowledge in the fast-paced world of web development.

8:Learning How to Asking For Help (Timeline and Method)

Knowing how and when to ask for help is a crucial skill in development.

9:Reading Docs and Books to Understand Stuff (Basic and Complex)

Efficient reading and comprehension of technical material is a key skill for developers.

10:Styling Choices: Tailwind CSS vs Regular CSS

The choice between utility-first CSS frameworks like Tailwind and traditional CSS depends on various factors. Let it be known that I have a certain amount of dislike for Tailwind due to its accessibility issues.

11:How to use AI assistants to solve problems

AI assistants can be powerful tools for developers when used effectively. In a lot of ways my questions got better with time, thus I tend to do or observe the following when using “Geeps” or the other cousins :

Bonus: All Hail Zod

A year or two ago, a friend of mine mentioned Zod in a conversation and explained it to me, sorta kinda made sense to me then. But now the best way is explain Zod is that it is a TypeScript-first schema declaration and validation library. Think of it as a powerful tool that helps you ensure your data is exactly what you expect it to be. Here’s a more detailed breakdown:

Schema Declaration: Just like we described checking if names are text and ages are numbers, Zod lets you define these rules clearly:

import { z } from "zod";

const friendSchema = z.object({
  name: z.string(),
  age: z.number(),
  email: z.string().email()
});

This schema says: “A friend should have a name that’s a string, an age that’s a number, and an email that’s a valid email string.”

Type Inference: One of Zod’s superpowers is that TypeScript can automatically figure out the type from your schema:

type Friend = z.infer<typeof friendSchema>;
// TypeScript now knows Friend is: { name: string; age: number; email: string }

Validation: Remember our “friendly robot assistant” that checks if data looks right? Here’s how that works in Zod:

const result = friendSchema.safeParse({
  name: "Alice",
  age: 12,
  email: "alice@example.com"
});

if (result.success) {
  console.log("Data is valid!", result.data);
} else {
  console.log("Oops, something's wrong:", result.error);
}

Advanced Features: As you get more comfortable, Zod offers more advanced tools:

Why Use Zod?

In practice, Zod is super useful for:

Think of a LEGO analogy; Zod is like having a master builder’s guidebook that not only shows you how pieces should fit together but actively helps you assemble them correctly. It gives you confidence that your data structures are solid, just like a well-built LEGO castle.As you grow as a developer, you’ll find Zod or tools like it become an invaluable tool in your toolkit for building robust, type-safe applications.

Still With Me

Remember, your journey in tech is uniquely yours. Embrace the challenges, celebrate the victories (no matter how small), and never underestimate the power of perseverance. Remember that even the most daunting job hunts can lead to opportunities for tremendous growth and learning. As you continue on your path, keep pushing your boundaries, stay curious, and most importantly, take care of yourself. The future of tech is bright, and with the insights and attitudes I outlined here, here is to hoping that you will be better equipped to be a part of it. I can be found on the socials (LinkedIn and Twitter) and my dms should be open if you want to drop a line.

Disclaimer

This was originally published on dev.to in October 2024. I am currently migrating my main source of publication to a personal self-hosted blog (developer growth).

← Back to Blog