General Web Dev Flashcards

1
Q

How do you speed up a slow app?

A

Run Lighthouse, and Network tab in dev tools check speed diagnostics. Gives you speed index, first paint (from critical render path) Check if JS bundles are working correctly. Have images been optimized? Are we making too many HTTP requests? Mobile-first improves performance. Use CDN’s where possible, caching content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a dependency injection?

A

Separate parts of our business logic into service objects, and then inject them into classes we are using. Keeps code DRY, modularized. Instead of re-writing logic in multiple places, just call it from one place when needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are SOLID principles?

A

Mostly in OOP space, but also applies to functional programming.

S - Single responsibility principle. - “A class should only have a single responsibility, that is, only changes to one part of the software’s specification should be able to affect the specification of the class.”

O - Open/Closed Principle –> functions should be closed for modification, open for extension.

L - Liskov Substitution Principle - “Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.”

I - Interface Segregation Principle - “Many client-specific interfaces are better than one general-purpose interface.”

D - Dependency Inversion Principle - “One should “depend upon abstractions, [not] concretions.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Tell us about a time you have a conflict and how you resolved it?

A

I was working with on an application with a partner who lived on the other side of the country and had also had a quite different sleeping schedule than mine, and was sleeping through our scheduled meetings, which strained our communication, and created some code conflicts and double-work. We were running on a tight deadline, so as soon as I realized that this was becoming an issue, I spoke to him about how we could better communicate and re-align, what times worked best for him to work together, and how we wanted to split up all the remaining tasks. From then on, the project went much more smoothly and we were able to complete everything we set out to do in time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you go about debugging?

A

my code never has bugs! (joke)

real - checkout dev tools, use debuggers, network tab, Lighthouse, console.log, console.table, step debugging with node debugger, writing tests for how you expect the code to work. proactive whenever possible, but also using all reactive methods available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you make sure things in multiple browsers?

A

test on all browsers, use things like BrowserStack, use sass auto-prefixers, use css-reset and/or normalize, check caniuse.net, progressive enhancement. think about target audience, what browsers are most of your users using? on mac, run IE through Safari. automated test suites like Selenium, BrowserStack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a web page work?

A

when you go to a site and it’s loading the url, it’s going to use Domain Name System to lookup the address. it then goes on the internet to find the server where that address lives. the server then “serves” up the content. server may ask for additional info before returning anything else back. first serves up index.html, then serves dependencies - assets, stylesheets, javascript files, call other servers if needed (3rd party dependencies).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Static type vs dynamic type languages?

A

JS is dynamically typed. don’t need to declare types, there is no type checking. makes dynamically typed languages versatile, can cut corners when needed if you know what you’re doing. TypeScript changes this.

statically typed - need to be explicit about types and when you are changing them. allows for less type errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is OOP?

A

The main paradigm for architecting code, using SOLID principles. Based off object and class setup, constructing objects to encapsulate logic. May have properties, methods, private/public methods available, can have control over what is available to public. Inheritance - pass properties/methods from parent objects to children objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is functional programming?

A

A paradigm for coding, useful for JavaScript. Creating pure functions (no side-effects). Immutability, managing state management (Context/Redux in React).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are components?

A

Can refer to React. HTML5 now has Web Components if you don’t want to work with framework. Concepts are the same. Build component once, re-use multiple times, just changed properties/data. keeps code DRY, modular, re-usable, extensible, lends itself to composition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to stay up to date?

A

Twitter, youtube channels, Udemy, LevelUp Tuts, talking to other devs and designers, reading articles, scotch.io, smashing magazine, for design - dribble. talk about working group joined to learn MongoDB and GraphQL. Syntax.fm podcast - wes bos, scott tolinski

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Do you follow clean code principles?

A

Yes - DRY, SOLID principles. keep things modular, maintainable, self-commenting code when possible, otherwise write comments for other devs. Single-use principle, test code, keep things organized.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you test code?

A

Run through it, make sure it compiles, check multiple browsers, write unit tests, integration tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why use SPAs?

A

core functionalities - Single Page Applications. Exist to solve problems - easy property binding, from view to controller (HTML to JS), easy dynamic content updating. also routing (virtual DOM in React) only load what’s needed. very fast, performant. can talk about components, composability, extensibility. self-contained, re-usable pieces of logic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Have you ever worked with a designer? What is your workflow?

A

I have worked with designers in other projects, like album campaigns with my record label, but as far as web development goes, for the most part, I have also been in charge of design for any project I was developing. I do have plenty of experience coding up sites based on mockups designed by other people though, which is how I learned to get comfortable with HTML and CSS when I was first learning how to code. There was an 8 week course I was taking where I was coding websites from designs in Figma, which got me very comfortable both with Figma and CSS. I have read up a lot on how developers and designers can effectively work together, as I’ve known there will come a time when I’m not developing something based off my own design, but working with another designer or design team. I think early and constant communication is key, which is a skill I’ve learned not only in working with other developers, but also when I was managing multi-faceted projects for my record label.

follow up: based on what Erica said, with a designer and developer and project manager assigned to each project, it seems like that lends itself to easier communication than one design team and one development team, with designers tossing things over the fence to developers. I was wondering how that process tends to go at Wide Eye?

17
Q

Improve SEO?

A

Use Yoast SEO plugin, use internal links referencing other pages of the same site, make sure meta tags include all relevant content, use clear/descriptive permalink names, use semantic HTML (especially use headers correctly), use a sitemap, build your content around keywords, tag posts with relevant tags, make design responsive, optimize images.

18
Q

Improve security?

A

protect against XSS attacks, use HTTPS/SSL, keep PHP and plugins up to date, use SiteCheck to scan for backdoors, use secure hosting service, always backup site.

19
Q

workflow for creating a website?

A

Figuring out what the core user stories are (if there’s a client, then both for the client and what the client is envisioning as an ideal user experience for people visiting their site - so both end admin and end user stories), wireframing the site in XD or Figma (back of napkin sketch for more complex apps to make sure understanding the basic functionality). From wireframes fleshing out mockups, and then putting into code, first start with semantic html markup, then applying styles, and adding any necessary scripts for interactivity. With Wordpress, making any custom post types, custom fields that are needed, integrating plugins and widgets, getting feedback from user’s testing across browsers, running Lighthouse checks (accessibility especially),