I used to think that interviews would be more towards how well you do what you do in your day-to-day job. If you don't know how to solve some of the complex DSA problems you are not a good candidate. Any advice for someone who is trying to get better frontend opportunities in future?
This question was taken from Siddharth Kshetrapal's newsletter
Michael J. Ryan
Alpha Geek
You'll definitely need to know the stuff for interviews. I recently interviewed for a ReactJS position. The very first question was about the time-complexity of a binary search. Sure, I learned this stuff in school, but that was 5-6 years ago. I haven't needed to use that knowledge in the 4 years I have been doing front-end development.
Needless to say, the interview didn't go well.
No matter is it backend or frontend. How can you write JavaScript if you have no idea what DS is?
You, of course, don't need to remember all state of the art DS, but you should be able to know basics and write few basic algorithms from scratch.
A problem I've been seeing an increase in the past decade or so is an increase in overspecialization. The end result has been "graphic artists" under the DELUSION they are designers when they don't know enough about HTML, CSS, or accessibility to hand a front-end coder what they need. Back end coders who don't know enough HTML/CSS/JS to slice up what the front end coders hand them, or the knowledge to recognize when what the front-end guy handed them is junk.
Worst of all are the front end coders who know nothing of actual design OR the back-end so they are incapable of keeping the artist inline, or to hand the back-end people what they need.
Everyone in the process should have at least a general knowledge of what the others they're working with NEED, as well as the things that should be avoided due to screwing over some other part of the process.
If all you know how to do is spank it on the screen in a paint program like Photoshop, you're not a designer no matter how pretty the result. If all you know how to do is slice up images and slop it together with HTML/CSS frameworks, your not competent at front-end development no matter if the result looks like what the artist handed you. If you don't know how your HTML and CSS is going to be split up, how to develop to leverage caching models to the best, and so forth you aren't going to be giving people on the back end what they should have... and really if you're working on the back end where the result is being shown on a website, if you say "Well I don't really know HTML we have a front-end person for that" then you have ZERO blasted business using any server-side language for that task.
This becomes evident whenever you see someone slopping the STYLE tag and STYLE attributes all over the place, using presentational classes, presentational markup, or crapping out bloated graphics heavy pages that tell users with accessibility needs to go plow themselves!
Basically as the front end developer you have ONE job. ONE FLIPPING JOB!!! Take the data -- CONTENT!!! -- and to present it to the user in as accessible, useful, and speedy a manner as possible. Knowledge of how the data is stored, can be accessed, and how it is processed can greatly improve your ability to do this.
To paraphrase the Vulture, (Red Baron to you normies): "Find the data and deliver it to users, anything else is rubbish!"
Admittedly, I just had it out with a marketing director who keeps insisting they need to spice up the pages we're working on to "Draw in the users" -- It's a banking portal where people access their accounts; if the user is there YOU ALREADY WON THAT FIGHT!!!
I think a basic understanding of the popularly used data structures is important for all developers. I'm not advocating that everyone should understand niche structures such as AVL trees, Trie etc. But, if you know how a map works as compared to an array list, it'll help you make a better decision w.r.t which one you want to use for your use-case. This knowledge becomes doubly important when you are writing a performance sensitive application.
Also, having a deeper understanding of some data structures may also help in designing a better structure for your next codebase.
Side note: While knowledge of data structures can help in interviews, that's not why I would learn something. It's akin to studying just for the exam and not because you want to get better.
Seems to me that the difference between front-end and back-end is increasingly smaller in terms of logic that they handle. Both are developers, just with a different stack. Front-end development isn't just cut-the-.PSD anymore, therefore the job requires more knowledge to get.
"Should" as in, is it in their best interest? It might be I think; such questions are indeed popular in programming interviews.
"Should" as in, is it a good way to become better developers? I think beginners can spend their time better. You should know the runtime complexity of popular things like array and linked lists, maps, sets, trees and maybe BSTs.
This seems to be about taste in the end.
The question what a frontend developer should be will most likely be different with each person you ask.
Personally I would like them to understand it. But to me it's way more important that the person has a clear opinion on how things should look, behave and if possible understand what she/he is using and how it works.
The rest is teachable and will be done anyway in code-reviews / live coding sessions.
In general I am not the classic asshole throwing random shit at you in the interview. It most likely reflects in the level of payment. Even there I just want to here why I should pay a person more and we can actually define baselines for raises.
Anyhow ... my opinion is yes every dev should know data-structures it's important, but it's way more important that they learn from, communicate with and educate each other.
Like most things in a developers life, it depends. Even on the front end, especially in a browser context, understanding patterns is important. It helps to understand why certain behaviors happen and how to avoid bottlenecks. It also depends on the complexity of what you are working with. There's a reason why certain patterns become more popular than others.
Beyond this, I personally hate being pigeon-holed as a "front end developer." I understand database structures and why certain approaches are better in some situations vs others. I know how communication channels work, and why one might implement things in a certain way on the middle-tiers. I can work across the stack. Most "full-stack" developers are weak on the front end. And many "front-end" developers are weak all around. I think it's up to each individual to be the best they can be across as broad a field as is appropriate for them.
Even in the front end, it's important to understand how and why certain things work. Why you'd use an object as a dictionary, instead of a lookup on an array. The little things add up. When you understand many of the typical patterns, you see them take shape in what you touch, even if you aren't writing them.