Полезно Flashcards
Что вы изучили вчера/на этой неделе?
I learned about what are progressive enhancement and graceful degradation.
Что вас привлекает в программировании?
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.
Can you describe some SEO best practices or techniques you have used lately?
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.
Talk about your preferred development environment.
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 many resources will a browser download from a given domain at a time? What are the exceptions?
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.
Have you used different HTML templating languages before?
No, I don’t have experience of working with HTML templating languages.
Are you familiar with styling SVG?
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.
Что такое мета-теги HTML?
Мета-теги это вспомогательная информация, предоставляемая в основном браузеру и поисковикам. Исключением является только тег title, который влияет на видимое название вкладки.
Мета-теги дают, например, такую информацию как ключевые слова страницы сайта, краткое описание, тип документа и его кодировку, или язык страницы.
What is difference between HTTP request and response?
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.
What hook functions are provided by directives?
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
What is Domain Driven Design?
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 you can handle all errors on the page?
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 we can stop fetch request execution?
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
What XSS is?
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 we can insert text into HTML element without XSS danger?
We can add it using textContent property of HTML element.