Полезно Flashcards

1
Q

Что вы изучили вчера/на этой неделе?

A

I learned about what are progressive enhancement and graceful degradation.

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

Что вас привлекает в программировании?

A

I think that this is very interesting, when you can write certain code, and then computer executes it, giving certain result.
This is exciting for me when you can use few rows of code do things that were kind of magic even hundred year ago.

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

Can you describe some SEO best practices or techniques you have used lately?

A

Okay… Unfortunately, I don’t have practical experience of SEO, but I know few things that is recommended to do to get best results.

Of course, first is meta-tags on pages. This is important to provide relevant information about page, I mean, its keywords, description, language, etcetera.

Second thing that we can do, is reduce page loading time.

And last I remember, is HTTPS certificate. As I know, safe websites are rated better by search engines.

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

Talk about your preferred development environment.

A

Currently I am using PHPStorm IDE. This IDE provides good support for languages like PHP, JavaScript, TypeScript, for Vue.js files, for example. I also can easily search for files or certain code pieces inside files.

Finally, I can say that this IDE perfectly fits my needs on my current job place.

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

How many resources will a browser download from a given domain at a time? What are the exceptions?

A

Usually this is around six threads at a time. We can have more than six threads, if we use subdomains to load some things, because this way each of subdomains will give us another 6 connections. Also, we can use HTTP/2 or SPDY protocols for establishing connection between server and client, because in these cases we can have multiple threads inside one TCP connection.

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

Have you used different HTML templating languages before?

A

No, I don’t have experience of working with HTML templating languages.

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

Are you familiar with styling SVG?

A

Well, I don’t have practical experience of working with SVG styling, but I know that we can apply CSS styles and classes to shapes elements inside SVG element.

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

Что такое мета-теги HTML?

A

Мета-теги это вспомогательная информация, предоставляемая в основном браузеру и поисковикам. Исключением является только тег title, который влияет на видимое название вкладки.

Мета-теги дают, например, такую информацию как ключевые слова страницы сайта, краткое описание, тип документа и его кодировку, или язык страницы.

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

What is difference between HTTP request and response?

A

Well… I think, the difference is in their structure.
In HTTP request we must have method of request, is it GET, POST, PUT or another, and of course, URL of server to what we send this request. We also have headers, which are some kind of meta-data about our request, and contain information about content type or authorization parameters, for example. Finally, we can have a body in HTTP request, which is main content of the request.

HTTP response also has headers and body, but instead of URL or method, it returns response status code, which indicates, what is going on with our request, and was it successful or not.

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

What hook functions are provided by directives?

A

When we create a new directive, we have access to few hooks.
These hooks are:
- created, which is called after component is created, but none of its attributes or event listeners applied.
- beforeMount, called right before component is mounted into DOM tree
- mounted, called when component is mounted
- beforeUpdated, called before component itself is updated
- updated, called when component is updated
- beforeUnmount, called before component is unmounted
- unmounted, called after component is unmounted from DOM tree

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

What is Domain Driven Design?

A

Domain Driven Design is a design, where we rely on business processes to define our project structure. The idea is to separate business processes into domains, which are minimally connected to other domains, and then based on these domains needs we create separate project modules, each responsible only for one domain. All data and algorithms needed for each separate domain are placed inside this certain domain module.

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

How you can handle all errors on the page?

A

Inside synchronous script you can catch this using try / catch block.
Errors inside timeouts and similar asynchronous things you can catch by adding “error” event listener to window object.
Errors inside promises you can catch by adding “unhandledrejection” event listener to window object.

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

How we can stop fetch request execution?

A

We can do this through creating new instance of AbortController and then providing its signal inside fetch config.

After that, we will be able to use this AboutController instance to drop connection

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

What XSS is?

A

XSS in cross-site scripting. This is a situation, when somebody somehow adds malicious code on a certain web-page, and then this code is executed on other users devices. This can lead to certain private information leak.

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

How we can insert text into HTML element without XSS danger?

A

We can add it using textContent property of HTML element.

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

How we can remove side marker from list in HTML & CSS?

A

By setting list-style-type to none.

17
Q

What property is used to convert text into lower case or upper case in CSS?

A

We can use text-transform property.

18
Q

How we can make our CSS animation to endlessly repeat?

A

Through setting property animation-iteration-count value to infinite.

19
Q

How you can make text or element to have a shadow in CSS?

A

You can use text-shadow for text and box-shadow for elements.

20
Q

Why this is not good practice to use eval()?

A

Well, first of all, this is totally safe to use eval with verified data, but not all data that looks verified is actually verified. For example, a server may send something written by another user, which contains a third-party script.

Second moment, is that eval has quite bad performance.

Third, an indirect eval call executes code in the global context.

Finally, code minifiers cannot handle eval correctly.