How to handle bad interviews and stay motivated.
Hello there! How often do you experience rejections when you look for a job? How do you react?
I want to bring an important topic: dealing with rejections and dealing with bad interviews overall. So bear with me on it. Here I have a video. But if you are not up for a video but prefer reading, be my guest and explore the text transcript as well.
Simple share button. But not that simple.
Recently I had inqusite encounter with a task to try experementaly use Web Share API. This is a cool feature that can invoke your device internal sharing mechanizms. In nutshell, it would open Android or iOS native share menu. In fact it works with a few more devices/browsers, you can check it out here.
Here is a simple example that could help you use it.
Note that when you want to invoke this API you should invoke it using some user events (user should invoke it manuall i.e. press a button). Otherwise it wouldn’t work and display an error that the request is not permitted/blocked by user.
You can use these user activation events:
* change
* click
* contextmenu
* dblclick
* mouseup
* pointerup
* reset
* submit
* touchend
So, just put a button where you need it:
<button class="test-share">Share</button>
And then on example with jQuery, you could do it this way:
$('.test-share').off().on("click", async function() {
var obj = {
"title": "test",
"url": window.location.href,
"text": "Text you want to display along with shared link"
}
try {
await window.navigator.share(obj);
} catch(err) {
console.log(err);
}
});
Actually, the part with window.navigator.share(obj)
would be the same no matter what you use (TS, Dart, pure JS) as you basically need to work with native JS here.
After you implement it, pressing on the “share” button will open the native share menu of your device.
Please, do check whether this API is available for the device it would be used on. E.g. hide this button if there is no share
function available: if (typeof window.navigator.share !== "function") { // hide button }
.
Cheers!
No-hello Policy: How not be annoying
Imagine a situation when you have a task and you’re focusing on it for a while. Then you receive a message “Hi John”.
What is it about? All puzzles broke down.
Create an interactive tags widget with HTML, CSS, and JS
A few days ago I just had a need to create some plain tags widget with possibilities to add and remove tags in the form.
I only had HTML, CSS, and JS (In fact there were also jQuery and Bootstrap 4).
Continue reading “Create an interactive tags widget with HTML, CSS, and JS”
Check file newline characters
Sometimes you definitely can face issue with newline characters in your project, some configuration files in the system, or elsewhere. The point is that we don’t bear this stuff in the mind all the time and sometimes just can omit obvious solution. Mostly we don’t even check what newline characters in our files are. But there are cases when these characters might be a root cause of some bug.
I faced the same issue the other day and would like to share the solution.
Continue reading “Check file newline characters”
TDD or no TDD? That’s the question.
Your project is going to be a big mess and every new functionality is hard to implement? You don’t remember or don’t know how this mass of code works? If you ask these questions sometimes you better take a look at this article.
I believe you’ve heard of the TDD. It’s a methodology that gives you a lot of advantages if used correctly. In this article, I’m going to share my experience with TDD, reasons to use TDD, examples, and more.
Why should we use services like StackOverflow?
There are a lot of services like Stack Overflow, Quora, and so on. I’m pretty sure you did hear about one at least. Probably you use these services to ask for some help, do you? Anyway, my point isn’t about using these services to get some kind of answers. I’m talking about writing answers by yourself. No, I know that reading existing answers and questions is absolutely helpful practice. But also you should give as many answers as you can.
Continue reading “Why should we use services like StackOverflow?”