r/javascript • • Jul 11 '17

help What 10 Things Should a Serious Javascript Developer Know Right Now?

I'm inviting pure opinion here, but what's your list of ten things that everyone looking for a good javascript role should know and understand. Personally, I'm in a role where what I know is adequate, but I want to be somewhere better; somewhere that has some flippin standards. I'm learning outside of work requirements at the moment, but there is so much shit to learn out there.

The objective is to do good work in a good place.

Narrow it down to your ten for me, or for you.

Can be your own "I must learn x" list too. I'm very interested to hear what people think.

348 Upvotes

223 comments sorted by

View all comments

Show parent comments

97

u/cosinezero Jul 11 '17 edited Jul 11 '17

I've been full stack for 20+ years in web dev, including my current job where I work on an app where people upload and download files, and I can't say that reading files from the file system is something I've needed for more than a week of that career. The code to read, modify, delete, chunk, stream, etc. is important for the apps that need it, for sure, but you skipped over database access or even web services for file operations? Most apps talk to a database or service. Surprisingly few of them talk to a file system directly; there are great libraries and frameworks in every language for almost every read/write operation you might want. Any more than that is a task for a specialist, not a generalist.

Accessibility is a really nice addition here. But many companies don't even begin to consider this a priority unless they -have to-, which means it becomes a nice-to-have (and how often do we get to those?) I would strongly prefer Internationalization over Accessibility, if I had to pick one; even if your app is english-only right now the future pain is worth the extra time.

Security is important, but best left to the experts. Get your app reviewed by the experts, and fix the issues they identify - otherwise you're left with a false sense of security from your in-house "expert" on security - who once read about SQL injection and thinks you're fine because you have parameterized queries. This is definitely a task for the specialists and not generalists.

40

u/phpdevster Jul 11 '17 edited Jul 11 '17

Sorry, but I disagree that security is best left to experts. Any worthwhile developer should not be writing software with the attitude that security isn't their problem, that another developer then has to make secure after the fact. Security isn't something you just bolt on later...

Knowing the basics like how to avoid SQL injection, provide CSRF protection, and avoid XSS attacks are fundamentally important, and are NOT so complex that you need to be a specialist.

29

u/[deleted] Jul 11 '17

You need security-conscious devs, but you also need experts. Your business guarantees about security should rest on the experts' shoulders, not the devs who do security part-time. Security-conscious devs save the experts a lot of time from pointing out obvious SQLi/CSRF/XSS so that the experts can continue staying on top of security news and info, because that can change daily.

A dev's guarantee for security is worth much less than someone doing security full time.

15

u/pier25 Jul 11 '17

This.

It's like devs implementing their own shitty crypto instead of using solutions developed and peer reviewed by experts who have dedicated their whole life to crypto.

9

u/cosinezero Jul 11 '17

I agree knowing the basics of any best practices are good, but that tends to lead to being satisfied enough. With security you should never assume you've done enough. Always have a security review step in your reviews, always have it tested by an expert... and never think that "the basics" get you even part of the way there.

2

u/almondbutter Jul 12 '17

Knowing the basics like how to avoid SQL injection

Here is an excellent video describing this. Jump specifically to a solve after the cartoon at 5:22.

6

u/thiscoolhandluke Jul 11 '17

Accessibility is a really nice addition here. But many companies don't even begin to consider this a priority unless they -have to-, which means it becomes a nice-to-have

For those who are doing work where a business considers accessibility a "nice-to-have", consider:

  • Organic SEO is directly affected by this.

  • Sales, Ads, conversions are directly affected by this.

  • It is sometimes a legal requirement, and fines or penalties are potential risks.

  • It is often harder and more expensive to add it in later.

At least consider the basic steps/requirements during the architecting phase. If you know that your project will be requiring SEO, marketing, or compliance with local laws, then communicate and at least plan ahead and include some basic parts that will make it easier down the road. I would agree that most stakeholders I have worked with add this to the "later pile" during the initial MVP stage. 99% of the time, scumbag "I told you so" thoughts just love to /rant about this when all of a sudden they want you to scramble to add this.

4

u/cosinezero Jul 11 '17

Well, SEO, sales, and marketing isn't usually a factor for a lot of business software, especially not intranet / enterprise applications (unless in healthcare and government). But legalities and expense to implement later are absolutely a concern, and should be thought-through. It's certainly a worthwhile addition on the list, and having it on your resume is a big bonus to companies that know what accessibility is... but I've found internationalization to be a much more frequent concern in the industries I've worked in.

1

u/danshumway Jul 15 '17

I work on an enterprise-level app where we make legal guarantees about accessibility (specifically around screen readers).

If we don't get accessibility right, it's not just a PR hit, it means we're engaging in false advertising. Outside of Silicon Valley accessibility does matter, not just because we care about blind people but because if we do it wrong, we could get in a LOT of trouble. We put a lot of work into stressing that point to new developers, because otherwise they ignore Severity 1 bugs and skip checking whether tab indexes work when they build UI elements.

Internationalization is something we set up once and put a process around. When a new string needs to go into the app, we run it through the doc team and stick it in a database. I don't rate it particularly highly on the list of features people should know because I think even for enterprise-level massive apps, you really only need one or two developers at most who can set that system up.

But I have limited experience, so maybe that's not as common as I suspect.

1

u/cosinezero Jul 15 '17

You're not wrong. Some industries and some applications must have accessibility. Plenty does not, though.

3

u/turkish_gold Jul 12 '17

People add aria-label all the time because they care about SEO. That it helps with accessibility is just incidental.

I'd say all the 'side benefits' of making your site accessible are the real drivers here. Often you'll see a site that hits just enough for organic SEO and sales, but no more.

2

u/calligraphic-io Jul 11 '17

even if your app is english-only right now

Absolutely. Sites reaching Canadian users often need (and are often required to provide) French versions. America is rapidly becoming bilingual English/Spanish - it's hard to live in Florida or Southern California without some basic Spanish knowledge.

1

u/almondbutter Jul 12 '17

Actually the USA has more Spanish speaking citizens than any other country after Mexico.

EDIT: went to check, and Mexico currently has more.

0

u/shanita10 Jul 12 '17

Sorry, if everyone doesn't follow security best practices, you are going to have endless exploits. It cannot be left to experts.

0

u/cosinezero Jul 12 '17

Zero-day exploits aren't always stopped by best practices. Have you ever performed a security audit?

1

u/shanita10 Jul 12 '17

Who said they always are ? Your suggestion is still wrong and reckless: Security is for everyone, it's one of the basics.

1

u/cosinezero Jul 12 '17

You're misreading me if you think I am saying security should be ignored. But it isn't an aspect that you should ever feel you have enough proficiency in unless you specialize in it. That overconfidence is considerably more dangerous than what I am suggesting.

2

u/shanita10 Jul 12 '17

Overconfidence is exactly what I'm cautioning against. I've seen far too many centralized sec groups and audits miss key flaws. There is no substitute for best practices and broad understanding of the basics. Overly depending on one group is dangerous.

0

u/[deleted] Jul 11 '17

[deleted]

2

u/[deleted] Jul 11 '17

I started working as a front-end developer 10 years ago, and it was firmly established by then.

I'd say there was merit in separating the roles since css 2 came out.

1

u/cosinezero Jul 11 '17

Ummm... yes, "full stack" existed 20 years ago. I was writing ASP in '97, connecting to ODBC sources. We even had client-side rendering with "Dynamic HTML" and ActiveX controls in IE, though arguably "full stack" does not require you to render in the client.

Backend and frontend were most definitely separated long before 5 years ago.

0

u/[deleted] Jul 12 '17

[deleted]

1

u/cosinezero Jul 12 '17

It isn't "wrong", the number of non-english speakers vastly outnumber the blind, even in any given country. And especially using applications that cannot possibly serve the blind, like instagram or even photoshop.