0% found this document useful (0 votes)
9 views62 pages

Ebook Preview

Uploaded by

B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views62 pages

Ebook Preview

Uploaded by

B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

How To

Survive The
Tech
Industry: A
Handbook
99 Essential Tips for Surviving in
the Digital World

Stuart Todd
How To Survive The Tech Industry Page 1 of 62
How To
Survive The
Tech
Industry: A
Handbook

Stuart Todd
How To Survive The Tech Industry Page 2 of 62
TO CHERYL,

THANKS FOR ALWAYS HAVING MY BACK AND


SUPPORTING ME IN EVERYTHING I DO.
BEHIND EVERY GOOD MAN IS A SLIGHTLY
ANNOYED WOMAN SHAVING HIS BACK.

LOVE YOU SCONEHEAD X

How To Survive The Tech Industry Page 3 of 62


Table of
contents
1. Hello, there. ............................................................................6
Foreword ..................................................................................................................7

A little about me ......................................................................................................8

2. The Job Market. .....................................................................9


Tip 1: Red ags to make you think twice. ..........................................................10

Tip 2: Green ags to look out for. .......................................................................14

Tip 3: Being ghosted. ...........................................................................................18

Tip 4: How to prep for an interview. ...................................................................19

Tip 5: Common interview questions and how to answer them. .....................22

Tip 6: Questions you can ask them. ...................................................................28

Tip 7: The technical test. ......................................................................................34

Tip 8: Your CV checklist........................................................................................36

Tip 9: How to stand out in a competitive market. .............................................37

Tip 10: Learn from your mistakes........................................................................38

Tip 11: Don’t settle. It’s okay to turn down job offers.......................................39

3. Working with others............................................................40


Tip 12: Don’t be a dick. ........................................................................................41

Tip 13: Don’t be afraid to ask for help. ..............................................................43

Tip 14: Don’t become stagnant. .........................................................................44

How To Survive The Tech Industry Page 4 of 62


fl
fl
Tip 15: It’s okay to make mistakes. .....................................................................45

6. Code Stuff ............................................................................46


Tip 87: SOLID Principles. .....................................................................................47

Tip 91: Should you use if-else statements? .......................................................54

How To Survive The Tech Industry Page 5 of 62


1. Hello, there.

How To Survive The Tech Industry Page 6 of 62


Foreword
A standard gloomy Monday morning. I dragged myself out of bed, brushed my
teeth, threw some half decent clothes on, quickly styled my hair, jumped in my
car and set o for work.

I wasn’t happy but that was normal, I hadn’t been happy for years, everyone
knew it - people avoided me, I was miserable, the old me had somehow slowly
faded away, as hard as I tried to be that guy, he was gone, this shell remained.

Coding wasn’t fun anymore, gone where the days where I’d code for fun, where
i’d wake up and just start coding for the hell of it. It used to be exciting and fun.
I loved it. I’d always wanted to be a coder since I was a kid.

But now, I was churning out sub-standard work, cutting corners, working 12
hours a day despite only being paid for 8. Working for a toxic company who
only cared about their bottom line.

I sat down at my desk, opened up my computer and felt sick to the bottom of
my stomach, I couldn’t do this anymore, I dreamt about quitting, about
standing up and walking out.

I typed out my resignation email, deleted it, typed it out again, deleted it, typed
it one last time... thinking ‘Just hit send’. I stared it for another few minutes,
then thought, screw it.... why not?

Hands down the BEST decision I ever made. Years later I can look back and
analyse it, I was completely burnt out, I was stagnant, my skills were massively
out of date. I was lost.

I gured I’ll take a few weeks to clear my head, weeks turned into months,
months turned into years. I stopped coding for 3 years, I couldn’t face opening
my laptop.

These days, I love coding again! The pre-burnout me is long gone, I’ve accepted
I’m not that guy anymore, a new maturer version emerged and he wanted to
help others.

Within the industry, the trick is knowing how to separate the good from the bad
and the ugly. Knowing what skills you need to survive and thrive so you don’t
repeat the same mistakes I’ve made during my career.

My hope is that this book helps...

How To Survive The Tech Industry Page 7 of 62


fi
ff
A little about me

It’s important to strive for excellence in software engineering and not settle for
less. As software engineers we have to continually learn to stay relevant in an
ever evolving industry.

Companies need to be better, stop being so greedy and champion quality over
the need to make as much money as possible.

Lets stop screwing people over and be better. I hold myself and others to a high
standard.

I’ve honed my skills at distinguished development companies, implementing


design patterns, supervising developers, and ensuring adherence to SOLID
principles and industry best practices.

Over the years for worked for some good companies and some (really) bad
companies! My focus is delivering quality work and helping others do so.

I run Half Shell Studios. A software development house.

I love coding (yes, even outside of work), drawing, cooking, working out and
writing.

I’m happily married (most of the time) with two children and two dogs. My
favourite Spider-Man is Andrew Gar eld and my all best time ever video game
is Final Fantasy Tactics.

Yep, I’m pretty cool.

If I wasn’t a Software Engineer I’d be an Alpaca farmer or a Postman.

How To Survive The Tech Industry Page 8 of 62


fi
2. The Job Market.

The Job Market.

How To Survive The Tech Industry Page 9 of 62


Tip 1: Red ags to make you think twice.

Red ags are everywhere--during your interview, on promotional material or from


the horses mouth, here’s a few:

We’re family.
Unless your boss is Vin Diesel or you’re actually working for a family run
business then work isn’t your family. I’m not saying you can’t be friendly but
you’re there to do a job, you’re not going to ask your boss to bring you a
McDonalds breakfast when you’re hungover or watch your dogs while you go
on holiday.

The lines between the professional and personal can blur. An exaggerated
sense of loyalty can be harmful and creates an environment where employees
can be taken advantage of. Avoid.

A ‘fast paced’ working environment.


You can usually pull this from the job description itself. If it says stu like ‘fast
paced’, ‘work fast and try not to break stu ’ or ‘we get shit done’ plastered all
over the job posting, it’s a concern.

But why? Well, they’re most likely cutting corners and rushing projects. Which
in itself is ne, as long as the technical debt is paid back, be sure to nd out
during the interview. If their response is unsatisfactory, my advice? Don’t
bother.

How To Survive The Tech Industry Page 10 of 62


fl
fi
fl
ff
fi
ff
A drawn out interview process.
An excessive number of interviews or a drawn-out interview process is a red
ag and a sign that you might be dealing with a company you should avoid.
Such practices can indicate ine ciency, poor organisation, and a lack of
respect for candidates' time.

If a company can't handle its hiring process e ciently, it's probably having
trouble with other parts of its operations as well. So, unless you love endless
rounds of 'tell me about a time when...', it might be better to pass on these
interview marathons.

Poor interview questions.


Poor questions can highlight a company's lack of preparation, professionalism,
or understanding of the role they’re hiring for.

Watch out for overly generic questions, such as "What is your biggest
weakness?" or "Where do you see yourself in ve years?". These questions
o er little insight into a candidate's true t for the position.

Additionally, questions that are irrelevant to the job at hand, like "If you were
suddenly transformed into a sh, what would you do?" are just annoying and
ridiculous.

Lack of transparency.
When a company is vague about job responsibilities, growth opportunities, or
the speci cs of compensation and bene ts, it can indicate potential
disorganisation or a lack of commitment to employee satisfaction.

Candidates should be wary of employers who evade questions about team


dynamics, management styles, or why the position is open, as these could be
signs of high turnover rates or unresolved internal con icts.

No growth opportunities or a non-existent dev culture.


A glaring red ag! Accepting a job without any growth or dev culture can spell
trouble for your long-term career prospects.

If a company doesn’t o er clear paths for advancement or doesn't invest in


professional development, it might suggest that they view employees as
expendable rather than valuable assets.

Imagine joining a ym and the weights max out at 10kg. Growth isn’t impossible
but gainz are going to be harder to come by.

How To Survive The Tech Industry Page 11 of 62


fl
ff
fi
fl
g
ff
fi
ffi
fi
fi
ffi
fi
fl
General toxic behaviour.
General toxic behaviour, such as gaslighting, disregarding, or ignoring
interviewees and sta , is a major red ag that should make you reconsider any
potential job opportunity.

Imagine being at a party where people pretend you’re not even there, or worse,
make you question your own reality and experiences. Anyway, enough about
my social life (cries), but you get the picture, right?

Just remember... that’s the kind of environment you might be walking into if
you encounter these toxic behaviours during the hiring process.

Resistance to change.
If an organisation is rigid and unwilling to adapt, it could indicate a lack of
innovation and a reluctance to evolve with industry trends. This resistance can
sti e progress, leading to outdated practices and missed opportunities for
growth.

Imagine working in a place where every new idea is met with the same
response: “We’ve always done it this way.” If you’re passionate about bringing
fresh perspectives and driving improvements, you’re in for an uphill battle.

Lack of communication.
Delays and poor communication can suggest that the company is disorganised
or that they don't prioritise the candidate experience. If they can’t manage
timely updates during the interview stage, it might indicate that they struggle
with e ective communication and respect for employees once they're on
board.

Look for companies that value clear, prompt communication.

No formal o er.
A formal o er letter is not just a formality; it's a crucial document that outlines
the terms of your employment, including salary, bene ts, and job
responsibilities. Without it, you're left in a state of limbo, with no concrete
agreement or protection.

A formal o er letter ensures that both parties are on the same page and
provides a clear, binding understanding of the employment terms. If a
company can't manage this basic step.... actually, why am I still going on about
this? If there’s no contract, run a mile (or don’t take the job). End of.

How To Survive The Tech Industry Page 12 of 62


fl
ff
ff
ff
ff
ff
fl
fi
Too pushy.
I’ve been caught out by this one recently, actually. After receiving a job o er, I
asked for a few days to review it. What followed was an angry response:

“We need to know today. If you haven’t decided by tomorrow, we’ll


move on to other candidates.”

Under pressure, I hastily accepted the o er on the spot. What followed was
possibly the worst job I’ve ever had. I won’t go into details, but imagine
stubbing your toe but the pain never ends—also it’s ten times worse and
someone is stabbing forks into your eyeballs (if they’re reading this, hiya!)

How To Survive The Tech Industry Page 13 of 62


ff
ff
Tip 2: Green ags to look out for.

Hey! It’s not all bad, there’s GOOD companies out there, but how do you
separate the good from the bad and the ugly?

Well…

The company respects your time.


Timely responses to interview scheduling and clear communication the next
steps are huge green ags. A company that values your time demonstrates
professionalism and consideration.

This respect for your time isn’t just about e ciency; it’s a re ection of the
company's broader culture. When they manage the hiring process e ectively
and promptly, it suggests that they value their employees' time and
productivity once you’re on board.

Job description isn’t outrageous.


The job description doesn’t list every skill that’s ever existed; instead, it stays
focused on the actual job title and what the role entails. I’ve seen junior
development positions with job descriptions that read like those for technical
leads—an obvious mismatch that sets unrealistic expectations.

An e ective job description provides a clear and honest overview of the role,
highlighting key responsibilities, essential quali cations, and core skills needed.

How To Survive The Tech Industry Page 14 of 62


ff
fl
fl
ffi
fi
fl
ff
Workplace is diverse and inclusive.
In a truly inclusive workplace, you’ll see tangible e orts to ensure that all
employees feel comfortable and supported. This includes having policies and
practices that promote equality, provide support for di erent needs, and
celebrate di erences.

If the workplace culture actively encourages participation from all employees,


o ers equitable opportunities for advancement, and genuinely respects and
values each individual's unique contributions, it's a strong indicator that the
company isn’t full of crap-- no empty promises or buzzwords.

Interviewer asks follow-up questions.


When an interviewer asks follow-up questions and doesn’t rigidly stick to the
script, it’s a positive sign that they’re genuinely engaged and interested in
understanding your t for the role.

This approach not only makes for a more engaging and insightful interview but
also suggests a work environment that values open dialogue and adaptability.

You: ‘I’ve recently been learning something new after work.’


Interviewer: ‘Oh really? What are you learning? How do you nd time?’

Interview feels more like a conversation.


When an interview feels more like a conversation than a formal interrogation,
it’s a great sign that the company values genuine interaction and open dialogue.

There's a natural ow to the conversation, with both sides sharing insights and
asking questions that delve deeper into each other’s experiences and ideas.

The back-and-forth exchange allows you to discuss your skills and experiences
in a more relaxed and authentic manner.

Plenty of growth opportunities and career progression.


In such an environment, you’re not just performing a job but actively
advancing and developing new skills. This means clear pathways for
promotion, ongoing training, and diverse projects that help you build your
expertise and reach new professional heights.

Imagine, being part of a company where every challenge is an opportunity to


grow and every success opens doors to new roles and responsibilities. Where
do I sign?

How To Survive The Tech Industry Page 15 of 62


ff
ff
fl
fi
ff
ff
fi
There’s emphasis on work-life balance.
Imagine a workplace that o ers exible hours, remote work options, and
encourages you to unplug when you’re o the clock? They’re supportive of
your need for time with family, hobbies, and self-care, rather than expecting
you to be always on call.

Actively promoting and practicing work/life balance, re ects a commitment to


creating a sustainable and enjoyable work environment.

Need to source out your cosplay out t, for the upcoming weekend of LARP?
Hey, no bother, take the afternoon, make up the hours another time.

They rarely need to hire.


When a company rarely needs to hire, it’s often a sign of a stable and healthy
work environment.

It suggests that the company invests in its employees, fosters a positive culture,
and provides opportunities for growth, making it a place where people want to
stay long-term. This stability also indicates that the company is likely well-
managed and successful, creating a reliable and supportive atmosphere for
everyone.

Interview process is smooth.


When the process ows seamlessly, it not only makes a positive impression but
also minimises stress for candidates, allowing them to focus on showcasing
their skills and t for the role rather than navigating a confusing or disjointed
procedure.

It demonstrates that the organisation is capable of managing its hiring needs


e ectively and respects the e ort and enthusiasm that candidates bring to the
table. Like Ace Ventura says ‘Like a glove!’

It’s well paid.


A clear sign that a company values its employees and recognises the
importance of fair compensation for their skills and e orts.

Employees feel appreciated and motivated to perform their best. When a


company o ers a well-paid role, it re ects their commitment to investing in
their workforce and maintaining a satis ed and productive team.

P.S - if the job description states ‘competitive’ salary - it probably isn’t (shocker!).
You need to actually see the salary amount.

How To Survive The Tech Industry Page 16 of 62


ff
ff
fi
fl
ff
ff
fl
fi
fl
fi
ff
ff
fl
Excellent perks.
A company that truly values its employees and goes beyond the basics to create
a supportive and enjoyable work environment o ers excellent perks!

These perks often include comprehensive health bene ts, generous retirement
plans, wellness programmes, exible work arrangements, free hugs (maybe...)
and professional development opportunities.

By the way, pizza every other month ISN’T a perk, although never turn down free
pizza, unless it’s got pineapple on it....

How To Survive The Tech Industry Page 17 of 62


fl
ff
fi
Tip 3: Being ghosted.

For every success I’ve had many more failures. Sometimes you don’t
even know you’ve failed at all. Sometimes you’re ghosted and left in the
dark as to why, left alone to your own thoughts.

Unfortunately, it's a common experience for many candidates, and it can be


frustrating and disheartening. Sometimes, companies receive an overwhelming
number of applications and simply don't have the resources to respond to
everyone.

Other times, they may not follow up as a matter of practice, leaving candidates
in the dark about their application status.

While it's never a pleasant experience, it's important to remember that being
ghosted or rejected isn't necessarily a re ection of your quali cations or
potential. It could be due to a variety of factors beyond your control.

And yeah, those companies / recruiters who intentionally ghost candidates are
100% dicks, a big bunch of love sausages who don’t deserve a second thought,
move on, forget them.

Remember, you’re awesome, you ain’t afraid of no ghost(ing). The key is to


remain resilient, learn from each experience, and keep moving forward.

How To Survive The Tech Industry Page 18 of 62


fl
fi
Tip 4: How to prep for an interview.

Congratulations! You’ve been invited to attend an interview. Maybe you’re


nervous, maybe you aren’t but either way, here’s a few tips and ideas to how
you better prepare:

Look them up.


Typically, you can see the names of the guys who’ll be interviewing you. Use
this to your advantage. Connect with them on LinkedIn, google them, have they
written any articles? Do they post? Great, go give them a read. You get the
picture.

Find out all their dirty little secrets beforehand, remind them that if they don’t
o er the role you’ll destroy them... or maybe it’ll give you some talking points
to help the conversation ow more naturally, either way... do it.

Research the company.


Do your research. Have a look through the company website, watch
promotional materials etc. It’s extremely useful, not only to aid you in your
interview, but to get a feel for the company culture. Does it align with your
own?

Learn about the history of the company, how long they have operated? Did
they have any ties to illegal sweat shops? What do they specialise in? The more
information you have, the better you can tailor your responses to their
questions.

How To Survive The Tech Industry Page 19 of 62


ff
fl
Study the job description.
I’ve given interviews before, they’ll be working from the job description and
typically working their way down each point. Why not do the same?

List out each of the skills and write notes beside each one. What’s your skill
level? Are you keeping up to date with industry standards? When did you last
use those skills and why? Is this a weakness? What are you going to do about it
if it is?

They’re going to ask you questions to determine if you’re quali ed enough,


study the job description to your advantage.

Come up with questions.


So by now, you’ll have researched the interviewers, the company and the job
description, you SHOULD have some idea of what questions you’re going to ask
them.

At some point in the interview you’re going to be asked, ‘Do you have any
questions for us?’. Be armed with a list of questions, when they’re answering
those questions, actively take notes and hit them with a follow-up question. It
shows you’re actually listening and are interested in the role itself.

STAR method.
‘’Tell me about a time where you’ve experienced a challenge, did you overcome
it? If so, how?’

Don’t panic, use the STAR method:

• Situation - What was the issue/obstacle you faced?


• Task - What plan did you come up with to address it?
• Action - How did you implement this plan?
• Result - How e ective was it? What changes/results occurred?

During the interview.


First impressions matter; wear clothes. You’ll probably be asked to give a quick
walkthrough your CV, pull out relevant experiences that compliment the job
spec.

When talking about yourself, keep it concise, they don’t want to know the ins
and outs of the junction system in FF8 or how much you enjoy gardening.

How To Survive The Tech Industry Page 20 of 62


ff
fi
If you’re in a video call, set up two screens, one hosting the conference call, the
other with a bunch of notes to help you get through the interview, you’re going
to be nervous, having those notes to fall back on can be a lifesaver (it’s worked
for me a few times!). Oh and remember to ask those questions!

After the interview.


Follow up the interview with a thank you note / email. You’ll be amazed how
many people don’t do this.

This can help set you apart in a competitive job market. I would recommend
waiting one business day before sending this note out.

Thank them for their time, don’t be too pushy but highlight how your skills
match the role they’re trying to ll.

Oh and don’t forget to subtly hint that you’ve kidnapped their spouse and if
they ever want to see them again you expect a job o er by the end of the day.

How To Survive The Tech Industry Page 21 of 62


fi
ff
Tip 5: Common interview questions and
how to answer them.
Before you start reading…

You should use the generic answers below as a foundation and


customise them based on your personal experiences, the job
description, and the hiring company. Add your own personality to
make your answers stand out. After each interview, re ect on any
feedback or reactions you received and adjust your responses
accordingly to improve for future opportunities.

And hey, just imagine if Nic Cage was a software engineer—how


would he handle this?

Question Answer

Please tell me Well, where do I start? I'm Nic Cage, but in this reality,
about yourself? I'm a software engineer. So picture this—it's like 'Face/
O ,' but instead of swapping faces, I swap between
programming languages. One minute, I'm writing
pristine PHP, the next, I'm deep into React, building
interfaces faster than a Ferrari.

I've got over 15 years of experience, but, you know, it’s


not about the years—it’s about the passion. I've fought
through bug-infested codebases like I fought through
the streets in 'Gone in 60 Seconds.

How To Survive The Tech Industry Page 22 of 62


ff
fl
Question Answer

Great.. Err.. Why Why do I want to work here? Well, let me tell you, it's
do you want to like when I read a script and I just feel it—you know
work here? what I mean? It’s not just about the paycheck or the
prestige, it’s about being part of something bigger.

When I looked at this company, it was like seeing the


Declaration of Independence—there’s a treasure map
underneath. I can see the potential, the innovation, and
the opportunities to do something crazy good. I want to
be in a place where I can not only bring my skills to the
table but also take some wild, bold swings and make a
real impact.

Love it! What are For strengths—let's talk versatility. Just like my lm
your strengths career, I can adapt to any environment. Now,
and weaknesses? weaknesses? Well, I’d say my biggest weakness is that I
sometimes dive too deep. I get so invested in solving a
problem or improving a system that I’ll spend hours
chasing the ‘perfect solution’ but I’ve learned to lean on
my team more, trust them to share the load, and remind
myself that sometimes, ‘good enough’ is, well, good
enough.

I see. Can you Oh, let me take you back to a time when the codebase
describe a was in absolute chaos, like the Wild West of spaghetti
challenging code—untamed, unpredictable, and just waiting to
situation and implode. It was an e-commerce platform, handling
how you thousands of transactions a day, but the architecture
handled it? was ancient, like something you'd nd in the basement
of a museum.

I handled it by keeping the team focused, breaking the


big, scary problem into smaller, manageable tasks. We
rewrote key modules, improved e ciency by nearly
50%, and by the end of it—boom—that platform was
humming like a nely-tuned engine.

Nice. Where do I want to mentor. Guide the next wave of developers,


you see yourself teach them that coding isn’t just lines on a screen—it’s a
in ve years? way of solving problems, of creating art in a digital
world.

How To Survive The Tech Industry Page 23 of 62


fi
fi
ffi
fi
fi
Question Answer

Moving on. How First, I get a clear picture of the chaos. What’s the
do you prioritise deadline? What’s the impact? I start by tackling the
your work? urgent and the important. These are the high-octane
moments that need immediate action.

Next, I break down the tasks into smaller, manageable


chunks and I set up a timeline that ensures I’m not
running against the clock with a last-minute explosion.

Finally, I stay adaptable. The landscape can change


faster than a car chase scene, so I’m always ready to
pivot and adjust my priorities based on new information
or shifting project needs.

That’s quite For me, it’s a combination of factors that keep my


interesting. engine revving: Problem-solving, innovation,
What motivates collaboration and trying to make a di erence.
you?

Can you describe We were in the midst of developing a complex


a time when you application with a tight deadline. Our team was a mix of
had to work as developers, designers, and project managers, and we
part of a team? were facing a critical issue: a signi cant performance
bottleneck that was threatening to derail our project.

We organised a series of brainstorming sessions where


every team member could contribute their insights. We
identi ed the bottleneck as an ine cient database
query and implemented several performance
improvements. Each team member took ownership of
their part, and our combined e orts led to a signi cant
enhancement in performance.

How To Survive The Tech Industry Page 24 of 62


fi
ff
fi
ffi
ff
fi
Question Answer

How do you When I receive feedback, my rst step is to remain calm


handle criticism and absorb the information. It's essential to listen
or feedback? carefully, like a seasoned spy gathering intel before a
critical mission. I take the time to understand the
feedback fully without letting my emotions cloud my
judgment.

Once I’ve processed the feedback, I evaluate its validity


and relevance. This is like assessing whether a new clue
ts into the larger puzzle. I re ect on how it aligns with
my work and identify areas for improvement. If the
feedback is constructive, I embrace it as an opportunity
for growth.

Why are you I'm leaving my current job because I’m at a juncture
leaving your where I’m eager to explore new horizons and challenges
current job? that align more closely with my long-term career goals.
Over the years, I’ve had the chance to work on some
incredible projects and learn from a talented team,
which has been immensely rewarding. However, I’ve
reached a point where I feel I’ve hit the limits of what I
can achieve in my current role.

Can you describe In my previous role, I led a project to revamp our


a time when you internal reporting system. I coordinated a cross-
demonstrated functional team, set clear goals, and assigned tasks
leadership skills? based on each member’s strengths. I facilitated regular
check-ins to address challenges and ensure we stayed on
track. By fostering collaboration and providing support,
we completed the project ahead of schedule and
improved reporting accuracy.

What do you do When I nd myself in disagreement with a coworker, I


if you disagree see it as an opportunity to delve deeper into the
with a narrative rather than as a con ict. My approach is to
coworker? handle it with the same nesse as negotiating a tricky
script change.

I listen rst, communicate openly, try to nd common


ground and seek solutions togethers. If all that fails, I
agree to disagree, re ect and move on.

How To Survive The Tech Industry Page 25 of 62


fi
fi
fi
fl
fi
fl
fi
fl
fi
Question Answer

Can you explain During that period, I took time o to focus on personal
this gap in your growth and re ection, which is as vital to a career as
CV? character development is to a lm. I used this time to
explore new interests, engage in self-improvement, and
recharge my creative energies. Think of it as a character
arc where I had to step away from the spotlight to
rejuvenate and return with a fresh perspective.

What is your One of my greatest professional achievements was


greatest leading a team to revamp a critical, outdated system
professional that was causing signi cant operational ine ciencies.
achievement? We faced the challenge head-on, employing agile
methodologies and modern frameworks to orchestrate a
seamless upgrade. Through meticulous planning and
execution, we improved system performance by 50%,
boosted user satisfaction by 35%, and signi cantly
reduced operational costs. This accomplishment is a
proud testament to my ability to lead complex projects,
solve intricate problems, and deliver impactful results,
showcasing my dedication and passion for engineering
excellence.

What’s your My superpower? Oh, that’s easy—I’d be the Code


superpower and Whisperer. Imagine me walking into the o ce, and with
why? just a glance at a tangled mess of code, I’d calm it down
and make it behave. It’s like having a magical ability to
soothe code into submission, transforming chaotic
spaghetti into pristine, organised elegance.

Picture me in a leather jacket, dramatically waving my


hands over the keyboard while the code rearranges
itself into perfect harmony. It’s not just about xing
bugs; it’s about doing it with air and a touch of
cinematic air, like I’m starring in my own blockbuster
coding adventure!

How To Survive The Tech Industry Page 26 of 62


fl
fl
fi
fl
fi
ff
ffi
fi
ffi
fi
Question Answer

Can you provide I’m in the middle of a high-stakes project, John Travolta
an example of a somehow managed to steal my face. I’ve got meetings to
time you worked attend, deadlines to meet, and a whole lot of confusion
well under to sort out.
pressure?
Now, I’m faced with a dilemma: how do I navigate
through this bizarre, face-swapping situation while still
maintaining my sanity and getting things done? I dive
into problem-solving mode, making quick decisions and
managing tasks.

After an intense few hours, which felt like a marathon of


twists and turns, I manage to resolve the chaos.
Travolta’s face is back where it belongs, and I’m left with
a story that’s as epic as it is bizarre. So, in the end, not
only did I handle the pressure, but I also walked away
with a tale that’ll make anyone do a double-take.

How To Survive The Tech Industry Page 27 of 62


Tip 6: Questions you can ask them.

Questions Answers

Can you describe Understanding the company’s strategic direction helps


the company’s you gauge whether your career aspirations align with
long-term vision their objectives. It also reveals how your role will
and goals? contribute to the company’s future.

Follow-up Questions:
• How does this role t into the company's long-
term goals?
• What are the key milestones or projects that the
company aims to achieve in the next few years?

How does the This question uncovers how the company manages its
company handle technical challenges and ensures the sustainability of its
technical debt technolo y stack. It shows whether they proactively
and prioritise address tech debt or only react to issues as they arise.
tech
improvements? Follow-up Questions:
• Can you provide an example of a recent tech
debt issue and how it was resolved?
• How often do you review and address technical
debt?

What does a This question helps you understand the daily


typical day look responsibilities and expectations, providing insight into
like for someone the role’s routine and whether it matches your
in this role? preferences.

Follow-up Questions:
• What are the main tasks or projects I would be
working on daily?
• How much of the day is spent on meetings
versus individual work?

How To Survive The Tech Industry Page 28 of 62


g
fi
Questions Answers

Can you describe E ective documentation is crucial for maintaining


the company’s clarity and continuity within a team. This question
approach to reveals how the company values and manages
documentation documentation practices.
and knowledge
sharing? Follow-up Questions:
• How is documentation maintained and updated?
• What tools or platforms does the company use
for knowledge sharing?

What are the Understanding recent challenges provides insight into


biggest the company's resilience and adaptability, and it helps
challenges the you assess if you are prepared to face similar issues.
company has
faced recently, Follow-up Questions:
and how have • How did the company overcome these
they been challenges?
addressed? • Are there any ongoing issues that the team is
currently working on?

What qualities or This question helps you assess if your skills and
skills does the attributes align with what the company values most for
ideal candidate the role.
for this role
possess? Follow-up Questions:
• Can you give an example of how these qualities
contribute to success in this role?
• How do you measure success in this position?

How To Survive The Tech Industry Page 29 of 62


ff
Questions Answers

What Knowing about growth opportunities helps you


opportunities for understand how the company supports career
professional advancement and whether there are pathways for your
growth and future development.
development are
available within Follow-up Questions:
the company? • Are there any speci c training programs or
mentorship opportunities available?
• How do employees typically progress within the
company?

How does the This question is crucial for understanding the


company company’s culture and how they prioritise employee
support work- well-being and balance.
life balance?
Follow-up Questions:
• Are there exible working hours or remote work
options?
• How does the company handle work demands
during peak periods?

What is the team Understanding the team dynamics and who you will
structure, and interact with regularly helps you assess how well you
who would I be might t into the existing team structure.
working closely
with? Follow-up Questions:
• How are team roles and responsibilities de ned?
• Can you describe the team’s working style and
communication practices?

How To Survive The Tech Industry Page 30 of 62


fi
fl
fi
fi
Questions Answers

What kind of E ective onboarding and training are crucial for a


onboarding and smooth transition into a new role. This question helps
training you understand how well the company supports new
processes are in employees.
place for new
hires? Follow-up Questions:
• What does the onboarding process include?
• Are there any ongoing training or development
programmes?

How does the Understanding performance metrics and evaluation


company processes helps you know how your work will be
measure and assessed and how you can align your goals.
evaluate
employee Follow-up Questions:
performance? • What are the key performance indicators for this
role?
• How often are performance reviews conducted,
and what do they typically involve?

What is the Understanding the company culture gives you insight


company culture into the working environment, values, and social
like, and how dynamics. It helps determine if the culture aligns with
does it in uence your own values and work style.
day-to-day work?
Follow-up Questions:
• How does the company support a positive and
inclusive culture?
• Can you provide examples of how the culture
has impacted recent projects or initiatives?

How To Survive The Tech Industry Page 31 of 62


ff
fl
Questions Answers

How does the This question sheds light on the company’s approach to
company stay staying relevant and leading in its sector. It shows how
competitive and proactive they are about innovation and industry
innovative trends.
within the
industry? Follow-up Questions:
• What recent innovations or initiatives has the
company implemented?
• How does the company gather and incorporate
feedback from customers or industry
developments?

What are the This question helps you understand the immediate
current focus of the team and how your role would contribute
priorities or key to current objectives. It provides clarity on what to
projects for the expect if you join the team.
team I would be
joining? Follow-up Questions:
• How do these projects align with the company’s
overall goals?
• What role would I play in these projects, and
who will I be collaborating with?

What is the This question is important for understanding how the


company’s company supports employees in managing stress and
approach to maintaining overall well-being. It re ects on the
handling work- company’s commitment to a healthy work
related stress environment.
and employee
well-being? Follow-up Questions:
• Are there any speci c programmes or resources
available for managing stress?
• How does the company support employees
during high-stress periods or workload peaks?

How To Survive The Tech Industry Page 32 of 62


fi
fl
What if their answers aren’t good enough?

If the interviewer isn’t sure of the answer or gives you some generic lip service,
something like... ‘Erm... yes this is something we’re aware of and it’s
something we need to do better’, they basically don’t know how to answer the
given question. Imagine if you did that??!

What should you do if they give poor answers?

Good question.

Well, nothing unless you get a job o er, then you need to consider if it’s the
right move for you (sometimes you’ve got no choice and the reality is that
money pays the bills at the end of the day).

How To Survive The Tech Industry Page 33 of 62


ff
Tip 7: The technical test.

Technical tests are a critical component of many job interviews, designed to


assess your coding skills, problem-solving abilities, and how you approach
complex problems.

Later in the book, we cover best practices and design patterns that’ll give you
the edge over the competition and help you nail the test, but for now here’s
some basic tips:

1) Write readable code.


Ensure your code is clean and easy to read by using meaningful variable and
function names that clearly describe their purpose. Avoid overly complex or
convoluted solutions; instead, aim for straightforward, well-organised code.
While comments can be helpful, don’t overuse them; let your code be self-
explanatory where possible.

2) Write unit / feature tests.


Writing tests for your code is crucial to verify its correctness and ensure it
meets the speci ed requirements. Unit tests, integration tests, and edge case
tests help catch bugs early and validate that your code performs as expected.

3) Include explainer videos or comments.


Providing an explainer video (Loom etc) or detailed comments (explaining
‘why’ not ‘how’) can o er valuable context about your solution. A video can
walk reviewers through your thought process, showing how you arrived at your
solution and why you made speci c design choices

How To Survive The Tech Industry Page 34 of 62


fi
ff
fi
4) Add a README.
A well-crafted README le is essential for any project you submit. It should
include a summary of the problem you solved, an overview of your solution,
instructions on how to run your code, and any dependencies required.

5) Detail potential improvements.


Even if your solution is functional, acknowledging areas for improvement
demonstrates a critical understanding of your work. Outline any limitations or
potential enhancements you’ve identi ed, such as performance optimisations
or additional features.

6) Embrace feedback.
Once you’ve walked them through your tech test, ask for their feedback.
Feedback is a valuable tool for growth and improvement. Approach feedback
with an open mind and use it to re ne your skills and enhance your work.

How To Survive The Tech Industry Page 35 of 62


fi
fi
fi
Tip 8: Your CV checklist.

• Skip the sel es, especially the holiday snaps—no one needs to see your abs
when they're trying to assess your skills!
• If your CV includes lines like, “With the fervour of Hemin way and the
precision of a Swiss watch, I orchestrate projects with an unparalleled zest,”
it might be a sign you’ve gone a bit overboard and / or you’ve used ChatGPT.
Don’t.
• Include a personal statement summarising your skillset and abilities. Don’t
forget to mention that your passionate and self-motivated, is it even a
personal statement if you don’t?
• List your skills. Don’t go overboard here, if you’ve listed every skill then most
likely you’re exaggerating and it’s not a good look. Include the skills,
frameworks, languages etc you’re competent in.
• Skip the ‘References Available Upon Request’ Line. It’s like telling everyone
you’re a human being. Everyone already knows!
• Add your contact details. Include your name, phone number, email address
and national insurance number ( joke.. actually don’t).
• The education section is important. List all your education with associated
dates. Learning how to change a car tyre doesn’t count (unless you’re a
mechanic).
• Avoid Using Buzzwords Like ‘Guru’ or ‘Ninja’. Just don’t.
• Don’t forget your work experience. Stick to the facts, include dates, job title
and a few bullet points summarising your responsibilities.

How To Survive The Tech Industry Page 36 of 62


fi
g
Tip 9: How to stand out in a competitive
market.

• Build a portfolio: Showcase your skills. Make sure it’s professional and easy
to navigate!
• Build a network: Building an online presence is powerful. You open
yourself up to possibilities which might otherwise have passed you by.
• Open source projects: Contribute to or start open source projects. It not
only boosts your pro le but also connects you with other developers.
• Be social: Post regularly about your tech journey, share your experiences
with like-minded people.
• Local networking events: Attend tech meet-ups and conferences. Get in
with the local tech scene - you never know!
• Develop a personal brand: Create a memorable online persona, complete
with a catchy handle and consistent branding across social media platforms.
• Build in public: Include wins, struggles, and what you’re learning.
Authenticity can be very engaging.
• Start a YouTube channel: Produce a series of tutorials or “how-to” videos
on niche topics you’re passionate about.
• Interactive CV: Create a web-based resume that includes interactive
elements like clickable projects or live demos of your work.

How To Survive The Tech Industry Page 37 of 62


fi
Tip 10: Learn from your mistakes.

I used to get seriously annoyed when people said something like this to
me. My internal response was always something like, “Yeah, try saying
that after yet another rejection.” or “Yeah, you haven’t had to waste yet
another afternoon taking tech tests.”

The truth is, after a while, rejection feels like a second job. If you’re not pushing
yourself or striving to improve, rejections won’t come knocking at your door.

But if you’re genuinely aiming for growth, you'll need to take those rejections
like a champ (that said, I get it, it still stings!).

So, here’s the deal: every failure is basically an opportunity to growth and
learn.

How do we make the most of this?

Actually listen to the feedback—yes, even if think they’re not seeing your true
potential and there’s chance in hell you’re going to share your last Rolo with
them.

Embrace it, set aside some quality time to address your weaknesses, and maybe
—just maybe—next time you’ll get that little bit of luck you need to land the job
of your dreams. You got this!

How To Survive The Tech Industry Page 38 of 62


Tip 11: Don’t settle. It’s okay to turn down
job o ers.

Absolutely, it's okay to turn down job o ers. Of course, the necessity to work
and earn money is a reality for most of us. However, if you're in a position to be
more selective, it’s perfectly ne to decline job o ers. Trust me, it beats the
alternative.

Imagine accepting a job o er, showing up on your rst day full of excitement
for this new chapter in your career, only to be completely let down.

Picture this: the person who interviewed you has left under mysterious
circumstances. Mentioning their name leads to awkward silence, until the CEO
steps in and blames them for all the company’s issues.

And it doesn’t end there. There’s zero quality control—no code reviews, no unit
tests. You’re dealing with legacy code over 15 years old, no documentation, sta
are happy lying and overcharging clients. To top it o , the CEO makes anti-
Semitic jokes, and everyone laughs.

This actually happened to me. I ignored major red ags because I was enticed
by the higher salary. My advice: be cautious. Don’t ignore red ags like I did. If
something doesn’t feel right, it’s okay to walk away.

I handed my notice in after 2 months. I couldn’t face another day working for a
company like that. Don’t be like me, turn down jobs that look a little shady, be
sure to check out their accounts on Companies House and sta review sites.

Don’t settle, keep looking--the right job for you is out there!

How To Survive The Tech Industry Page 39 of 62


ff
ff
fi
ff
ff
fi
fl
ff
ff
fl
ff
3. Working with others.

Working with others.

How To Survive The Tech Industry Page 40 of 62


Tip 12: Don’t be a dick.

Ok, listen up! The tech industry can be a jungle, and if you want to
survive—and thrive—you've got to avoid being the dick everyone dreads
working with.

But how? It’s simpler than you think. Even the biggest dick can learn not to be a
dick (or learn to be a smaller dick). Remember, being a decent human being
isn’t just good for your career; it makes the tech world a better place for all of
us. So, don’t be a dick—be awesome!

Be punctual:
Time is money, people! Show up on time for meetings and hit those deadlines.
Your colleagues aren’t just sitting around waiting for you to grace them with
your presence (unless they actually are... anyway, moving on!).

Communicate Clearly:
Nobody has time for cryptic messages. Say what you mean, mean what you say,
and let’s keep the confusion to a minimum.

Acknowledge Contributions:
Give props where props are due. If someone does a killer job, let them—and
everyone else—know it.

Listen:
Your opinion isn’t the only one that matters. Tune into other perspectives and
ideas—you might learn something!

How To Survive The Tech Industry Page 41 of 62


Constructive Criticism:
Critique the work, not the person. Help them improve, don’t tear them down.
Use your manners! A little courtesy goes a long way.

Integrity:
Don’t be shady. Honesty is the best policy, and cutting corners only gets you
into trouble.

Accountability:
Own your mistakes and x them. Playing the blame game isn’t a good look on
anyone.

Transparency:
Be open and clear about what you’re doing. It builds trust and makes
everyone’s life easier.

Stay Humble:
Arrogant dicks think they know it all. Be open to learning from everyone, even
the most junior members of the team—you might learn something!

How To Survive The Tech Industry Page 42 of 62


fi
Tip 13: Don’t be afraid to ask for help.

• Embarrassment is the cost of entry. If you aren't willing to look a foolish


beginner, you'll never become a graceful master.
• Without seeking assistance, you might struggle to nd solutions to problems,
leading to ine ciencies and prolonged challenges.
• Without the bene t of others' insights, you are more likely to make errors
that could have been avoided with collaborative input.
• Avoiding help can lead to missed opportunities for learning from others'
experiences and insights, slowing your personal and professional growth.
• Without input from others, the quality of your work may su er due to a lack
of diverse perspectives and expertise.
• Basically. Drop the ego, dude. No one knows everything. Ask for help. If
people make you feel bad for asking, then it sounds like bad dev culture. Not
your fault.
• Tackling tasks alone can be time-consuming and overwhelming, reducing
your overall e ciency and productivity.
• Taking on too much without support can lead to increased stress and the risk
of burnout, negatively impacting your overall well-being and performance.

How To Survive The Tech Industry Page 43 of 62


ffi
ffi
fi
fi
ff
Tip 14: Don’t become stagnant.

It’s by no means easy but if you can set aside a few hours a week, you won’t go
far wrong.

• Continuous Learning: Regularly take courses and attend workshops to


learn new programming languages, tools, and technologies.
• Stay Updated: Post regularly about your tech journey, share your
experiences with like-minded people.
• Teach Others: Conduct workshops or write tutorials and blog posts to teach
others what you’ve learned, reinforcing your own knowledge.
• Networking: Attend conferences, meet-ups, and networking events to
connect with other professionals and exchange ideas.
• Mentorship: Seek out mentors who can provide guidance and insights, and
also consider mentoring others to reinforce your own learning.
• Set Goals: Regularly set and review personal and professional goals to
ensure you’re progressing and staying motivated.
• Side Projects: Work on personal projects outside of your regular job to
experiment with new technologies and methodologies.
• Read Books: Regularly read books on software development, project
management, and other relevant topics to deepen your understanding.
• Re ect and Adapt: Regularly re ect on your work and experiences, and be
willing to adapt your strategies and approaches.

How To Survive The Tech Industry Page 44 of 62


fl
fl
Tip 15: It’s okay to make mistakes.

I've seen junior developers face harsh criticism for making mistakes,
crashing production, or introducing bugs into the system. However,
these issues are often not the fault of the individual but rather a
symptom of team-wide shortcomings.

Software engineering teams should prioritise understanding the root causes of


mistakes and implementing measures to prevent them in the future.
Conducting blameless post-mortems can help teams learn from incidents
without singling out individuals.

Here are some key questions to consider:

• Is automated testing in place?


• Are code reviews carried out?
• Are any monitoring systems currently active?
• Are junior developers mentored?
• Are people comfortable asking for help?

Don’t beat yourself up too much if you make a mistake.

The real problem is an environment where making mistakes aren’t seen


as a learning opportunity.

How To Survive The Tech Industry Page 45 of 62


6. Code Stu

Code stu

How To Survive The Tech Industry Page 46 of 62


f
ff
Tip 87: SOLID Principles.

Apply the SOLID Principles to achieve better object-oriented design by ensuring


single responsibility, open/closed, liskov substitution, interface segregation,
and dependency inversion.

Single Responsibility Principle (SRP).

"Every class should have one, and only one, reason to change.”

In essence, the Single Responsibility Principle states that a class should do one
thing and one thing only. When a class has more than one responsibility,
changes in one area may a ect the other, making the code brittle and harder to
maintain.

How To Survive The Tech Industry Page 47 of 62


ff
Let’s say we have a class that handles user registration and also sends a
welcome email to the user.

This violates SRP because the UserRegistration class is doing two things—
registering a user and sending an email.

A better approach would be to separate these responsibilities:

Now, each class has only one responsibility, making the code easier to change
and extend.

How To Survive The Tech Industry Page 48 of 62


Open/Closed Principle (OCP).

"Software entities should be open for extension, but closed for modi cation."

The Open/Closed Principle means that you should be able to extend the
behaviour of a class without modifying its existing code. This is essential for
creating systems that can evolve without breaking existing functionality. Let’s
assume we need to calculate discounts for di erent types of customers, and we
currently have a single Discount class.

To follow OCP, we can refactor the code to make it open for extension but
closed for modi cation. By using inheritance or polymorphism, we avoid
changing the Discount class itself and instead create new discount types.

How To Survive The Tech Industry Page 49 of 62


fi
ff
fi
Liskov Substitution Principle (LSP).

"Objects in a program should be replaceable with instances of their subtypes


without altering the correctness of the program."

The Liskov Substitution Principle ensures that derived classes can stand in for
their base classes without causing issues. This principle helps maintain
polymorphism and prevents surprises in your code when objects are
substituted. If we have a base class Bird and a subclass Penguin, substituting
Penguin in place of Bird should not break the functionality.

This violates LSP because Penguin can't y, but it’s still inheriting the y
method from Bird.

A better approach is to avoid this kind of hierarchy or to use composition


instead of inheritance when behaviour di ers fundamentally.

How To Survive The Tech Industry Page 50 of 62


fl
ff
fl
Interface Segregation Principle (ISP).

"Clients should not be forced to depend on interfaces they do not use."

No class should be forced to implement methods it doesn't need. Instead of


large, monolithic interfaces, it’s better to have smaller, more speci c ones.
Consider an interface with too many responsibilities:

Now, if we have a class RobotWorker, it will have to implement both work() and
eat(), even though robots don’t eat. A better design would be to split this
interface into smaller, focused interfaces:

How To Survive The Tech Industry Page 51 of 62


fi
Dependency Inversion Principle (DIP).

"High-level modules should not depend on low-level modules. Both should depend
on abstractions."

The Dependency Inversion Principle encourages you to depend on abstractions


not on concrete implementations, making your code more exible and easier to
maintain. Without DIP, a class might directly depend on a concrete class like so:

Now, if we want to switch to another database, we simply create a new class


that implements DBConnection without modifying PasswordReminder.

How To Survive The Tech Industry Page 52 of 62


fl
Conclusion.

The SOLID Principles are a set of design guidelines that help developers create
software that is easier to maintain, understand, and extend. These principles
were introduced by Robert C. Martin (Uncle Bob) and form the cornerstone of
modern object-oriented design.

If you can internalise these principles, you'll be well on your way to writing
code that's robust, scalable, and adaptable.

The SOLID Principles provide a strong foundation for writing maintainable,


exible, and scalable code. By adhering to these principles, you can reduce
technical debt, avoid unnecessary complexity, and create systems that are
easier to evolve as requirements change.

Mastering SOLID will push your career forward, equipping you with the skills
needed to build well-structured, high-quality software that stands the test of
time.

Whether you’re a junior developer or a seasoned professional, applying


these principles will signi cantly enhance the reliability and
maintainability of your code.

How To Survive The Tech Industry Page 53 of 62


fl
fi
Tip 91: Should you use if-else statements?

Evaluate alternatives to complex if...else logic, such as polymorphism


and array maps, to improve code clarity.

They’re actually useful but…

if...else and switch statements are essential tools in any programmer's toolkit.
They exist because they serve a fundamental purpose: handling conditional
logic in a clear and straightforward way.

These statements are highly e ective for scenarios where the logic is simple
and doesn’t involve a large number of conditions, such as:

How To Survive The Tech Industry Page 54 of 62


ff
However, consider a scenario where this conditional logic is applied in di erent
contexts across your application.

For instance, you might use similar logic to determine access permissions, send
noti cations, or log user activities.

If you needed to modify, remove, or add conditions, would you have to update
each occurrence manually? What if you missed one? Imagine if there’s 20 of
these conditionals around the codebase?

Moreover, as the conditions grow more complex or become nested, readability


can degrade, making it harder for others (or even yourself ) to quickly grasp
what the code is doing.

How To Survive The Tech Industry Page 55 of 62


fi
ff
Ok, ne... so you’re probably thinking... but how do we avoid the mess?

How To Survive The Tech Industry Page 56 of 62


fi
Use an associative array.

If the conditions are simple and map directly to speci c actions or values, an
associative array (or map) can be an e ective alternative. The rst example
below is basic but you could use closures, maybe specify them in con guration
les?

It’s not ideal but it’s an alternative.

How To Survive The Tech Industry Page 57 of 62


fi
ff
fi
fi
fi
Polymorphism.

For more complex scenarios, using object-oriented principles like


polymorphism can replace else-if chains. Each role can be represented by a
class that implements a common interface.

How To Survive The Tech Industry Page 58 of 62


Lets break this code down…

Concept: An interface de nes a contract that classes must follow if they


implement that interface. In this case, the Role interface requires any
implementing class to have a getAccessMessage method that returns a string.

Bene t: This enforces consistency across all roles, ensuring that every role
class has a getAccessMessage method. It also allows for polymorphism,
meaning the client code can interact with di erent role objects through the
same interface.

How To Survive The Tech Industry Page 59 of 62


fi
fi
ff
Concept: Each class (Admin, Editor, Viewer) implements the Role interface and
provides a speci c implementation of the getAccessMessage method.

Bene t: This allows for clear separation of responsibilities. Each class handles
the logic speci c to its role, making the code more maintainable and extensible.
If a new role is needed, you can simply create a new class that implements the
Role interface without modifying existing code.

How To Survive The Tech Industry Page 60 of 62


fi
fi
fi
Concept: The getRoleInstance function uses the match expression to return
the appropriate role instance based on the input string.

Bene t: This approach centralises the logic for creating role instances, making
the code easier to manage. If you need to add or change a role, you only need
to update this function. The use of match makes the code concise and readable.

Concept: The client code interacts with a Role object, but it doesn't need to
know the speci c type of the role. It simply calls the getAccessMessage method,
and the appropriate message is returned based on the actual object type.

Bene t: This is a classic example of polymorphism. The client code is


decoupled from the speci c role implementations, making it more exible and
easier to maintain. You can swap out role implementations or add new ones
without changing the client code.

How To Survive The Tech Industry Page 61 of 62


fi
fi
fi
fi
fl
Overall Bene ts.

• Code Reusability: The interface and the getRoleInstance function promote


code reuse. New roles can be added with minimal changes.
• Encapsulation: Each role class encapsulates its behavior, reducing the
likelihood of errors when modifying the code.
• Maintainability: The code is easy to understand and maintain because each
class has a single responsibility and the role creation logic is centralised.
• Extensibility: The design is easily extendable. If a new role is needed, you
just implement the Role interface in a new class and update the
getRoleInstance function if necessary.

This structure promotes clean, scalable, and maintainable code, which is


crucial in software development.

Conclusion.

When choosing between polymorphism and traditional control structures like


else-if or switch, it's essential to consider the context and requirements of your
application. Polymorphism, by leveraging interfaces and class inheritance,
o ers a clean and scalable approach that enhances code maintainability and
extensibility. It allows you to adhere to the Open/Closed Principle, making your
codebase more adaptable to future changes.

However, else-if and switch statements are not inherently bad. They can be
highly e ective for simpler scenarios where the logic is straightforward and
unlikely to change frequently. These control structures can provide clarity and
e ciency in cases where the number of conditions is small and well-de ned.

Ultimately, the choice between these approaches depends on what you're


doing. Each has its place and purpose, and the best solution is the one that
aligns with your speci c needs and the complexity of your application.

It’s all about nding the right tool for the job.

How To Survive The Tech Industry Page 62 of 62


ffi
ff
ff
fi
fi
fi
fi

You might also like