Size matters
I've recently read about interesting studies from Microsoft. According to them, if you are looking for a technological solution to boost your productivity, almost the only effective way is to buy a large monitor or even two of them.
I found it intriguing because I'm still working on my 13-inch laptop and have recently started to think it's not enough anymore.
Another study from the University of Utah has shown that people using 24-inch monitors complete a series of tasks faster than people with 18-inch monitors by around 52% working with text documents and 26% with spreadsheets. They've also found that taking something more than 24-inch doesn't actually improve users' performance anymore.
Of course, users from experimental group may not have known hotkeys for switching between windows or their tasks can't be compared to programming. So, one may say it doesn't work this way.
But I see some obvious reasons for such results and how bigger monitor can increase my productivity as a programmer.
A bigger screen:
1. Decreases switches between windows.
I usually have 3-4 windows opened at once while working: code editor, phone simulator or browser, UI design, and StackOverflow. For now, I have 3 macOS desktops with needed apps in full-screen mode. Switching from one to another takes time and mental energy.
2. Allows seeing more information at once.
"When people have to remember more, they tend to focus on fewer possibilities and fewer possible solutions. In other words, when people can only see a limited amount of their data, they have to remember the rest, which tends to limit them to fewer solutions and fewer strategies." You can focus on solving the problem instead of remembering some parts of your program.
3. Takes more space in my vision field, which results in better concentration, because I become less distracted. (Personal point)
I've also read from some authoriative sources, that 24-inch is not the limit. The perfect size and configuration depends on type of tasks you have to complete and your working style. So, choose your own path to happiness.
What's your current setup? Are you happy with it?
#efficiency
I've recently read about interesting studies from Microsoft. According to them, if you are looking for a technological solution to boost your productivity, almost the only effective way is to buy a large monitor or even two of them.
I found it intriguing because I'm still working on my 13-inch laptop and have recently started to think it's not enough anymore.
Another study from the University of Utah has shown that people using 24-inch monitors complete a series of tasks faster than people with 18-inch monitors by around 52% working with text documents and 26% with spreadsheets. They've also found that taking something more than 24-inch doesn't actually improve users' performance anymore.
Of course, users from experimental group may not have known hotkeys for switching between windows or their tasks can't be compared to programming. So, one may say it doesn't work this way.
But I see some obvious reasons for such results and how bigger monitor can increase my productivity as a programmer.
A bigger screen:
1. Decreases switches between windows.
I usually have 3-4 windows opened at once while working: code editor, phone simulator or browser, UI design, and StackOverflow. For now, I have 3 macOS desktops with needed apps in full-screen mode. Switching from one to another takes time and mental energy.
2. Allows seeing more information at once.
"When people have to remember more, they tend to focus on fewer possibilities and fewer possible solutions. In other words, when people can only see a limited amount of their data, they have to remember the rest, which tends to limit them to fewer solutions and fewer strategies." You can focus on solving the problem instead of remembering some parts of your program.
3. Takes more space in my vision field, which results in better concentration, because I become less distracted. (Personal point)
I've also read from some authoriative sources, that 24-inch is not the limit. The perfect size and configuration depends on type of tasks you have to complete and your working style. So, choose your own path to happiness.
What's your current setup? Are you happy with it?
#efficiency
Caching strategies
Why do we need caching? It's simple. People don't like loaders*. Moreover, people don't like waiting. So, caching some data to instantly show it next time a user asks for it without requesting the server increases app's UX. Which increases user retention. Which increases app's profit.
I have once stumbled upon a problem related to caching and cache invalidation in a mobile app. My main problem was that I'd never done it before and tried to reinvent the wheel. Luckily, my caching strategy was not so tricky. The cache had an expiration date, so I could invalidate it after a day/week/month, and the app could force an update from the server if needed by the "pull to refresh" thing.
After a while, I've found a talk from a mobile conference about different caching strategies. I'll shortly describe all of them, so you don't need to waste 30 minutes of your precious time watching the video. If you're interested in the theme or feel that something is still unclear after reading the post, then go to YouTube and watch the video (it is not boring at all, I promise).
Thanks to the guy who has even drawn block schemes for every strategy. I'll attach them in the comments.
Okay, let's start.
1. Lazy cache
The most basic one. If user request's some data, we try to find it in cache. If it is there, give it to user. If not - make a request to the server and update the cache with data from successfull response.
Pros:
- easy to implement
- instant data delivery
- cached data is independent of internet connection
Cons:
- no cache invalidation
When to use it:
- apps with immutable data that you should upload once a while like book readers, offline apps, etc.
2. Synchronized cache
The same thing as a previous one, but there are two new steps for invalidation. Local (by expiration date for ex.) and server (by status code 304 NOT MODIFIED for ex.) invalidation. If cache is valid we return data to the user.
Pros:
- faster delivery time for up to date data
- invalidation
Cons:
- dependent of connection
When to use:
- apps with not idempotent data*** where user can't add or edit this data. For example: news and booking apps
3. Write-through cache
The most difficult one to implement. However, the reading process is the same as in synchronized cache. But when we apply some changes, we need to synchronize them with our server database.
Pros:
- faster delivery time for up to date data
- invalidation
- full synchronization with server
Cons:
- dependent of connection
- after failed write we should go back to the initial state
- complex implementation
When to use:
- messenger is a best example
4. LRU cache
It speaks for itself. Least recently used cache is removed when we are out of cache memory, so we can put new piece of data in the cache. However, the invalidation now is in write process. MRU and other algorithms can be used.
Pros:
- instant data delivery
- cached data is independent of internet connection
- customizable invalidation mechanism
- not inflating the size of cache data
Cons:
- complex implementation
- you should be careful with invalidation. For example, you may remove some cached data, that user will need in a second.
When to use:
- apps with heavy content like instagram
* those annoying spinning things, which indicate that we are waiting for data from the server
** if there is no connection, we can't properly invalidate our cache
*** the data may update if you refresh the page
#dev
Why do we need caching? It's simple. People don't like loaders*. Moreover, people don't like waiting. So, caching some data to instantly show it next time a user asks for it without requesting the server increases app's UX. Which increases user retention. Which increases app's profit.
I have once stumbled upon a problem related to caching and cache invalidation in a mobile app. My main problem was that I'd never done it before and tried to reinvent the wheel. Luckily, my caching strategy was not so tricky. The cache had an expiration date, so I could invalidate it after a day/week/month, and the app could force an update from the server if needed by the "pull to refresh" thing.
After a while, I've found a talk from a mobile conference about different caching strategies. I'll shortly describe all of them, so you don't need to waste 30 minutes of your precious time watching the video. If you're interested in the theme or feel that something is still unclear after reading the post, then go to YouTube and watch the video (it is not boring at all, I promise).
Thanks to the guy who has even drawn block schemes for every strategy. I'll attach them in the comments.
Okay, let's start.
1. Lazy cache
The most basic one. If user request's some data, we try to find it in cache. If it is there, give it to user. If not - make a request to the server and update the cache with data from successfull response.
Pros:
- easy to implement
- instant data delivery
- cached data is independent of internet connection
Cons:
- no cache invalidation
When to use it:
- apps with immutable data that you should upload once a while like book readers, offline apps, etc.
2. Synchronized cache
The same thing as a previous one, but there are two new steps for invalidation. Local (by expiration date for ex.) and server (by status code 304 NOT MODIFIED for ex.) invalidation. If cache is valid we return data to the user.
Pros:
- faster delivery time for up to date data
- invalidation
Cons:
- dependent of connection
When to use:
- apps with not idempotent data*** where user can't add or edit this data. For example: news and booking apps
3. Write-through cache
The most difficult one to implement. However, the reading process is the same as in synchronized cache. But when we apply some changes, we need to synchronize them with our server database.
Pros:
- faster delivery time for up to date data
- invalidation
- full synchronization with server
Cons:
- dependent of connection
- after failed write we should go back to the initial state
- complex implementation
When to use:
- messenger is a best example
4. LRU cache
It speaks for itself. Least recently used cache is removed when we are out of cache memory, so we can put new piece of data in the cache. However, the invalidation now is in write process. MRU and other algorithms can be used.
Pros:
- instant data delivery
- cached data is independent of internet connection
- customizable invalidation mechanism
- not inflating the size of cache data
Cons:
- complex implementation
- you should be careful with invalidation. For example, you may remove some cached data, that user will need in a second.
When to use:
- apps with heavy content like instagram
* those annoying spinning things, which indicate that we are waiting for data from the server
** if there is no connection, we can't properly invalidate our cache
*** the data may update if you refresh the page
#dev
YouTube
Дмитрий Васильев — Как кэшировать информацию в Android-приложении и не стрелять себе в ногу
Подробнее о конференции Mobius: https://jrg.su/ojGU3B
— —
. . .
. Дмитрий расскажет, чем руководствоваться при выборе предпочтительной стратегии кэширования для вашего проекта, и поделится опытом своей команды в реализации по-настоящему быстрого и гибкого…
— —
. . .
. Дмитрий расскажет, чем руководствоваться при выборе предпочтительной стратегии кэширования для вашего проекта, и поделится опытом своей команды в реализации по-настоящему быстрого и гибкого…
English from zero to hero (or from anywhere to hero)
Hi everybody, today I'd like to recommend a YouTube channel for those who want to get better at English regardless of their current level. In case you are C2, don't forget to suggest it to your friends when they ask you how to learn English.
I've heard about it from a programmer's interview who moved to the US, checked it out because I'm still on my long and complicated way to watching movies without subtitles (currently somewhere between B2 and C1). And it appeared to be a godsend.
There are 3.2k videos in total with 1.3m subscribers on the channel for Russian-speaking people. The guy has plenty of playlists of all kinds: Grammar from zero to hero (649 videos), 50 lessons for each level (A0-C1), English by formulas (398 videos), and much more. Here is the same channel, but completely in English. By the way, he also has many other channels, which partly duplicate the content of the main one. I've heard he also owns a mobile app "Engish Galaxy".
I've watched just a couple of vids from a C1 playlist and can say that I've enjoyed the process. If we take into account that all of these videos are high-quality, just imagine the amount of work done by Alexander Bebris.
Not afraid to call him Pavel Victor of the English education world.
However, you shouldn't forget to practice other skills like writing and speaking to improve your English.
If you are already acquainted with this man or his channel(s), I'd like to hear your thoughts about it. If you know any other good resources for learning English, it is a great chance to share them with others.
#english #career
Hi everybody, today I'd like to recommend a YouTube channel for those who want to get better at English regardless of their current level. In case you are C2, don't forget to suggest it to your friends when they ask you how to learn English.
I've heard about it from a programmer's interview who moved to the US, checked it out because I'm still on my long and complicated way to watching movies without subtitles (currently somewhere between B2 and C1). And it appeared to be a godsend.
There are 3.2k videos in total with 1.3m subscribers on the channel for Russian-speaking people. The guy has plenty of playlists of all kinds: Grammar from zero to hero (649 videos), 50 lessons for each level (A0-C1), English by formulas (398 videos), and much more. Here is the same channel, but completely in English. By the way, he also has many other channels, which partly duplicate the content of the main one. I've heard he also owns a mobile app "Engish Galaxy".
I've watched just a couple of vids from a C1 playlist and can say that I've enjoyed the process. If we take into account that all of these videos are high-quality, just imagine the amount of work done by Alexander Bebris.
Not afraid to call him Pavel Victor of the English education world.
However, you shouldn't forget to practice other skills like writing and speaking to improve your English.
If you are already acquainted with this man or his channel(s), I'd like to hear your thoughts about it. If you know any other good resources for learning English, it is a great chance to share them with others.
#english #career
YouTube
English Professionally - phrasal verbs in English, English grammar lessons and English words
We learn English grammar lessons for beginners (full course) and other levels (elementary, pre-intermediate, intermediate and advanced). We study how to learn English speaking easily. You'll also see lessons for English speaking pratice, tenses in English…
👍2
Efficient programmer's notes pinned «Hello, my fellow friends. I'm on detox now. It means that I'm trying to read books instead of scrolling the newsfeed, watching online courses instead of Instagram stories, eating fruits/vegetables/nuts/otherHealthyStuff instead of trashy snacks, walking every…»
Efficient programmer's notes pinned «Some thoughts on this channel Hello, my friends. It's been about a month since I've started this channel. And there are already 10 posts in here. These posts mostly are about good habits + efficiency. I appreciate all of you who were reading them. Hope it…»
The Broken Window Theory or Why Technical Debt is an Evil
Have you ever heard about the broken windows theory?
It states that any visible signs of crime and civil disorder, such as broken windows, vandalism, loitering, public drinking, create an urban environment that promotes even more crime and disorder.
"One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment—a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short period, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality." - Andrew Hunt & David Thomas in "Pragmatic Programmer"
Therefore, we may conclude that policing these relatively small misbehaviors will decrease or prevent an increase of the crime rate in the area.
I hope you've already noticed where I'm going.
If you leave "broken windows" (bad designs, wrong decisions, or poor code) in your codebase, very soon it'll become a "dangerous place to live in". So, don’t leave them unrepaired. Fix them as soon as they are discovered, otherwise, all of a sudden, you'll need to get a dumpster, or move to another neighborhood.
Easier said than done, yeah?
#dev #thoughts
Have you ever heard about the broken windows theory?
It states that any visible signs of crime and civil disorder, such as broken windows, vandalism, loitering, public drinking, create an urban environment that promotes even more crime and disorder.
"One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment—a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short period, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality." - Andrew Hunt & David Thomas in "Pragmatic Programmer"
Therefore, we may conclude that policing these relatively small misbehaviors will decrease or prevent an increase of the crime rate in the area.
I hope you've already noticed where I'm going.
If you leave "broken windows" (bad designs, wrong decisions, or poor code) in your codebase, very soon it'll become a "dangerous place to live in". So, don’t leave them unrepaired. Fix them as soon as they are discovered, otherwise, all of a sudden, you'll need to get a dumpster, or move to another neighborhood.
Easier said than done, yeah?
#dev #thoughts
👍5
Stop using those annoying spinners
I've been catching myself thinking that loading spinners really piss me off lately. It's okay when I see them while logging in to some service, but it becomes a living hell when I see them everywhere afterward. In some mobile apps, you may encounter them on each and every screen. Moreover, I've seen a web app with 10-15 different sections on one screen with 10-15 spinners. One for each section.
I do understand why people use them. It is the easiest way to show that something is loading. And it's even worse when you don't give your user any feedback. But these spinners have some serious flaws.
In The Psychology of Waiting Lines, David H. Maister describes the psychology of queueing. The concepts from his research can be applied to any situation when people are forced to wait for something.
Here are my three takeaways:
1. Unexplained waits feel longer than explained waits.
2. Unoccupied time feels longer than occupied time.
3. Anxiety makes wait feel longer.
And now you can see why bare loading spinners are garbage:
1. They don't explain to us what we are waiting for.
2. We can only watch at the spinning wheel, which is boring. You can compare it to looking at the clock.
3. We don't know when it'll end.
Here is what you can do to fix it:
- Explain the wait. Put some text like: "We are looking for available tickets so you can forget about your work and chill out on the Miami beach. This might take up to a minute." below the spinner.
- Occupy your user with additional information, a short survey, fan fact, or motivational quote.
- Show progress indicator, which will display the actual progress. You can estimate the speed of the progress bar using historical data if you aren't able to get real-time feedback from the application.
- Remove the spinner if it is a placeholder for other content. You might have noticed how Google, Facebook, Instagram, and other big services handle such situations. Google shows low-quality images while high-quality ones are on their way. Facebook and Instagram often use Skeleton UI*. Facebook has even developed an open-source library Shimmer for Android and iOS that make these skeleton screens even more appealing.
*A skeleton screen is a UI that doesn't contain actual content; instead, it shows the loading elements of a page in a shape similar to the actual content.
#dev #thoughts
I've been catching myself thinking that loading spinners really piss me off lately. It's okay when I see them while logging in to some service, but it becomes a living hell when I see them everywhere afterward. In some mobile apps, you may encounter them on each and every screen. Moreover, I've seen a web app with 10-15 different sections on one screen with 10-15 spinners. One for each section.
I do understand why people use them. It is the easiest way to show that something is loading. And it's even worse when you don't give your user any feedback. But these spinners have some serious flaws.
In The Psychology of Waiting Lines, David H. Maister describes the psychology of queueing. The concepts from his research can be applied to any situation when people are forced to wait for something.
Here are my three takeaways:
1. Unexplained waits feel longer than explained waits.
2. Unoccupied time feels longer than occupied time.
3. Anxiety makes wait feel longer.
And now you can see why bare loading spinners are garbage:
1. They don't explain to us what we are waiting for.
2. We can only watch at the spinning wheel, which is boring. You can compare it to looking at the clock.
3. We don't know when it'll end.
Here is what you can do to fix it:
- Explain the wait. Put some text like: "We are looking for available tickets so you can forget about your work and chill out on the Miami beach. This might take up to a minute." below the spinner.
- Occupy your user with additional information, a short survey, fan fact, or motivational quote.
- Show progress indicator, which will display the actual progress. You can estimate the speed of the progress bar using historical data if you aren't able to get real-time feedback from the application.
- Remove the spinner if it is a placeholder for other content. You might have noticed how Google, Facebook, Instagram, and other big services handle such situations. Google shows low-quality images while high-quality ones are on their way. Facebook and Instagram often use Skeleton UI*. Facebook has even developed an open-source library Shimmer for Android and iOS that make these skeleton screens even more appealing.
*A skeleton screen is a UI that doesn't contain actual content; instead, it shows the loading elements of a page in a shape similar to the actual content.
#dev #thoughts
👍4
Easy money or How not to get followers
It was a long time ago. It was a time when every other article on the internet was about getting easy money, or at least it was just my filter bubble. I didn't have any skills besides playing tennis, though an idea of even insignificant online income seemed attractive.
So I've found a way. My work was to subscribe to other communities in VK* via a special platform. Every subscription gave me a couple of cents. At the end of the week, I had around 1k communities in my subscriptions and some dollars that I exchanged for a VK's internal currency and happily spent on online poker. I felt contended. Soon, I've cleaned up my community list.
I was wondering why did they pay me for such easy tasks. I've realized their business model not so long ago when I got interested in marketing. The platform I was using applied the CPA (cost per action) model.
Advertisers want to get more subscribers for their communities. They pay 0.2$ dollars for a subscriber to this service. Service offers you 0.02$ for a single subscription and earns 0.18$**. Advertisers get their subscribers, you and service earn money. Win-Win-Win.
Not so fast. Remember, I said that I'd cleaned up all my subscriptions after the experiment? Here's the catch. Advertisers get a disloyal and non-target audience.
Do you need these people as an advertiser?
Maybe, if your channel targets the general public (memes, news, funny cats&dogs). Probably, many people will stay with you if you have decent content. If your channel is domain-specific, every other subscriber coming from such a platform will unsubscribe ASAP as they get money or hide your posts from the feed because he/she most likely doesn't give a damn about you and your topic.
So, the conclusion is to make people subscribe to you because they are interested in you and the content you produce, not the money you offer them to subscribe.
You'll ask me how it's connected to programming. I've prepared two points for this case:
1. Every developer should be a bit of a marketer to sell his ideas, solutions, projects, and himself/herself***. So from now on, you may see posts about marketing on this channel.
2. I've considered this info interesting and worth writing about.
*Russian analogy for Facebook
**Numbers may vary
***During the job interview or working as a freelancer
#marketing #thoughts
It was a long time ago. It was a time when every other article on the internet was about getting easy money, or at least it was just my filter bubble. I didn't have any skills besides playing tennis, though an idea of even insignificant online income seemed attractive.
So I've found a way. My work was to subscribe to other communities in VK* via a special platform. Every subscription gave me a couple of cents. At the end of the week, I had around 1k communities in my subscriptions and some dollars that I exchanged for a VK's internal currency and happily spent on online poker. I felt contended. Soon, I've cleaned up my community list.
I was wondering why did they pay me for such easy tasks. I've realized their business model not so long ago when I got interested in marketing. The platform I was using applied the CPA (cost per action) model.
Advertisers want to get more subscribers for their communities. They pay 0.2$ dollars for a subscriber to this service. Service offers you 0.02$ for a single subscription and earns 0.18$**. Advertisers get their subscribers, you and service earn money. Win-Win-Win.
Not so fast. Remember, I said that I'd cleaned up all my subscriptions after the experiment? Here's the catch. Advertisers get a disloyal and non-target audience.
Do you need these people as an advertiser?
Maybe, if your channel targets the general public (memes, news, funny cats&dogs). Probably, many people will stay with you if you have decent content. If your channel is domain-specific, every other subscriber coming from such a platform will unsubscribe ASAP as they get money or hide your posts from the feed because he/she most likely doesn't give a damn about you and your topic.
So, the conclusion is to make people subscribe to you because they are interested in you and the content you produce, not the money you offer them to subscribe.
You'll ask me how it's connected to programming. I've prepared two points for this case:
1. Every developer should be a bit of a marketer to sell his ideas, solutions, projects, and himself/herself***. So from now on, you may see posts about marketing on this channel.
2. I've considered this info interesting and worth writing about.
*Russian analogy for Facebook
**Numbers may vary
***During the job interview or working as a freelancer
#marketing #thoughts
👍5
Learn blockchain, bitcoin, and web 3.0
What is the hypest thing in software development nowadays?
I bet it is Web 3.0 that includes topics like blockchain, dApps*, smart contracts, and other buzzwords.
I've connected my diploma thesis with blockchain and its security features because I've been wanting to figure out how this works for ages.
I've dug a bit deeper than blockchain and can't stop satisfying my curiosity. I believe these technologies are still in their early stages of a long-term trend, so you and I are not missing the boat yet.
If you've always wanted to understand blockchain and how/why bitcoin works under the hood, here are only two videos I want you to watch (1,2). These are visual demos that explain basic concepts like hashing, blocks, transactions, coinbase, distributed ledger, digital signature, and how it all works in tandem.
Here are some other resources that I found valuable:
1. MIT course on blockchain and money (en, ru). Learn fundmentals with Gary Gensler - an American government official and former investment banker. Btw, I've skipped the first two lectures about the history of money just because they're boring.
2. Binance academy - "your one-stop guide to all things crypto." If you like reading articles more than watching YouTube.
3. Polygon** academy for developers. It seems to be a fast start to developing decentralized apps.
4. How to DeFi beginner/advanced and How to NFT. I've not got around to these yet but heard only positive feedback.
If you have something to add to the list, write it in the comments. I'm still quite a dummy in the theme, and will appreciate every suggestion.
*Decentralized apps
**A scaling solution for the Ethereum blockchain
#crypto #blockchain #learninpublic
What is the hypest thing in software development nowadays?
I bet it is Web 3.0 that includes topics like blockchain, dApps*, smart contracts, and other buzzwords.
I've connected my diploma thesis with blockchain and its security features because I've been wanting to figure out how this works for ages.
I've dug a bit deeper than blockchain and can't stop satisfying my curiosity. I believe these technologies are still in their early stages of a long-term trend, so you and I are not missing the boat yet.
If you've always wanted to understand blockchain and how/why bitcoin works under the hood, here are only two videos I want you to watch (1,2). These are visual demos that explain basic concepts like hashing, blocks, transactions, coinbase, distributed ledger, digital signature, and how it all works in tandem.
Here are some other resources that I found valuable:
1. MIT course on blockchain and money (en, ru). Learn fundmentals with Gary Gensler - an American government official and former investment banker. Btw, I've skipped the first two lectures about the history of money just because they're boring.
2. Binance academy - "your one-stop guide to all things crypto." If you like reading articles more than watching YouTube.
3. Polygon** academy for developers. It seems to be a fast start to developing decentralized apps.
4. How to DeFi beginner/advanced and How to NFT. I've not got around to these yet but heard only positive feedback.
If you have something to add to the list, write it in the comments. I'm still quite a dummy in the theme, and will appreciate every suggestion.
*Decentralized apps
**A scaling solution for the Ethereum blockchain
#crypto #blockchain #learninpublic
👍6
Pardon me for not writing for a while. I remember my New Year's resolution to write a post every week, but everybody needs a little break today, and I hope you can understand.
I still feel overwhelmed by what's happening in the world today. But life goes on. I can't just sit down reading the news and freaking out. I still have work to get done by the end of the next sprint, relatives that I must support during these difficult times, a diploma subject to get researched, posts to be written, and much more.
As Mark Twain (not quite sure if it was him) once said: “If you don't read the newspaper, you're uninformed. If you read the newspaper, you're misinformed.”
I prefer to read the news believing no one and focus on my day-to-day life.
I hope you and your families are safe and healthy and everything's gonna be okay very soon.
I still feel overwhelmed by what's happening in the world today. But life goes on. I can't just sit down reading the news and freaking out. I still have work to get done by the end of the next sprint, relatives that I must support during these difficult times, a diploma subject to get researched, posts to be written, and much more.
As Mark Twain (not quite sure if it was him) once said: “If you don't read the newspaper, you're uninformed. If you read the newspaper, you're misinformed.”
I prefer to read the news believing no one and focus on my day-to-day life.
I hope you and your families are safe and healthy and everything's gonna be okay very soon.
Sentry
Today I want to tell you about an amazing tool I didn't know existed when I was starting out as a developer. Luckily, I got acquainted with it as soon as I got into a company with numerous web and mobile apps in production.
Its main purpose is to track errors in your apps. In other words, if the app throws some weird exception in production, you instantly get notified and receive a stack trace*. So, you can see when and why your app crashes and release a patch before all of your users abandon you.
Moreover, there is another feature, that I didn't have a chance to benefit from. It is performance monitoring. Sentry allows you to measure metrics like throughput, latency, failure rate, number of users impacted, and user misery. On top of that, you get a lot of graphs that visualize these metrics, so you're able to keep an eye on changes in performance over time.
What I especially love about Sentry is that there is a well documented library for almost every platform (language/framework/library) which allows you to use it in all of your projects both on frontend and backend. The second thing is that it has a free plan, so you can always try it out if there is no need for third-party integrations or other team members to join.
*In Flutter you can also get info about recent screen transitions
#dev
Today I want to tell you about an amazing tool I didn't know existed when I was starting out as a developer. Luckily, I got acquainted with it as soon as I got into a company with numerous web and mobile apps in production.
Its main purpose is to track errors in your apps. In other words, if the app throws some weird exception in production, you instantly get notified and receive a stack trace*. So, you can see when and why your app crashes and release a patch before all of your users abandon you.
Moreover, there is another feature, that I didn't have a chance to benefit from. It is performance monitoring. Sentry allows you to measure metrics like throughput, latency, failure rate, number of users impacted, and user misery. On top of that, you get a lot of graphs that visualize these metrics, so you're able to keep an eye on changes in performance over time.
What I especially love about Sentry is that there is a well documented library for almost every platform (language/framework/library) which allows you to use it in all of your projects both on frontend and backend. The second thing is that it has a free plan, so you can always try it out if there is no need for third-party integrations or other team members to join.
*In Flutter you can also get info about recent screen transitions
#dev
Sentry
Application Performance Monitoring & Error Tracking Software
Application performance monitoring for developers & software teams to see errors clearer, solve issues faster & continue learning continuously. Get started at sentry.io.
👍4
To do != to get done
I won't pretend that it's my original idea. I've decided to borrow it from a cool book on project management because it resonates with me.
Let's imagine a simple task you have to get done.
Your wife asks you to buy a loaf of bread for dinner. In other words, your goal is to have tasty bread on your table, so you and your wife enjoy it with a soup today. When a task is so trivial, nobody doubts if it's is done or failed.
❌ You forget to buy a loaf.
❌ You buy some old bread that nobody wants to eat.
❌ You get hit by a car on your way home, and an ambulance takes you to the hospital.
✅ You enjoy bread today during the evening meal (at some X time).
To get something done is to get the result by the specified deadline with the specified quality. Everything else has nothing to do with "getting done" even if the sun has exploded.
What if we have a more complex and undetermined task?
A client asks you to design a landing page by the end of the week. Today is Monday. The task's deadline is 18:00 Friday - you should present your design that meets all requirements given by the client on Zoom meeting.
❌ You did nothing.
❌ You have nothing to show during the call, but you've been working hard all week.
❔ You came up with a great design (at least you and your mom like it) and even implemented it. You think the client will be more than happy.
The last point has a small probability that everything will be fine. But:
❌ What if you or your client forgets some small but cruical detail or your design doesn't actually meet all of the requirements?
❌ What if nobody else appreciates your genuis idea? After all, you have no more time to fix all the issues.
How we could have avoided this situation?
By setting control points.
You could schedule a call with a client on Wednesday, so he could validate your concept and point out the flaws. This way, you have just enough time* to fix everything by the Friday. Moreover, this intermediate call is another deadline that should stimulate you to not put the task off until the last minute.
*If you set an adequate deadline in the first place.
#career #books #projectmanagement
I won't pretend that it's my original idea. I've decided to borrow it from a cool book on project management because it resonates with me.
Let's imagine a simple task you have to get done.
Your wife asks you to buy a loaf of bread for dinner. In other words, your goal is to have tasty bread on your table, so you and your wife enjoy it with a soup today. When a task is so trivial, nobody doubts if it's is done or failed.
❌ You forget to buy a loaf.
❌ You buy some old bread that nobody wants to eat.
❌ You get hit by a car on your way home, and an ambulance takes you to the hospital.
✅ You enjoy bread today during the evening meal (at some X time).
To get something done is to get the result by the specified deadline with the specified quality. Everything else has nothing to do with "getting done" even if the sun has exploded.
What if we have a more complex and undetermined task?
A client asks you to design a landing page by the end of the week. Today is Monday. The task's deadline is 18:00 Friday - you should present your design that meets all requirements given by the client on Zoom meeting.
❌ You did nothing.
❌ You have nothing to show during the call, but you've been working hard all week.
❔ You came up with a great design (at least you and your mom like it) and even implemented it. You think the client will be more than happy.
The last point has a small probability that everything will be fine. But:
❌ What if you or your client forgets some small but cruical detail or your design doesn't actually meet all of the requirements?
❌ What if nobody else appreciates your genuis idea? After all, you have no more time to fix all the issues.
How we could have avoided this situation?
By setting control points.
You could schedule a call with a client on Wednesday, so he could validate your concept and point out the flaws. This way, you have just enough time* to fix everything by the Friday. Moreover, this intermediate call is another deadline that should stimulate you to not put the task off until the last minute.
*If you set an adequate deadline in the first place.
#career #books #projectmanagement
👍3
Push it harder (Part 1)
Recently, during a technical interview, I was asked about push notifications. I was expected to talk about the developer's steps to set up and handle push notifications in the app, like registering a device, subscribing to a particular topic, getting and storing a token, receiving messages. So I wanted to refresh my memory and make a small overview of this feature.
There are services like Firebase cloud messaging (FCM), OneSignal, Amazon SNS, Pusher, and others that come into play when you need to enable push notifications. I will focus on FCM as it is a very popular cross-platform messaging solution developed by Google, and, also, it is the only service I have experience with) The information bellow is a condensed form of the FCM docs.
Key capabilities
- Sending up to 4000 Kb of payload in one message
- Sending notification or data messages
- Three different ways of targetting: to single devices, to groups of devices, or devices subscribed to topics
- Analytics
- Supports Android, iOS, web
Architectural overview
There are four components in the chain of building, delivering and receiving messages (picture 1 in comments):
The notification request builder.
1. It can be a GUI-based notification composer in the Firebase console, Admin SDK or the FCM server protocols used in the trusted environment*
2. FCM backend - accepts requests, performs fanout of messages via topics, and generates message metadata, like message id.
3. Platform-level transport layer - routes the message to the targeted device and handles its delivery.
- Android transport layer (ATL) for Android
- Apple Push Notification service (APNs) for Apple devices.
4. SDK on a device.
Lifecycle flow
1. An instance of the client app registers to receive messages, obtaining a FCM token that uniquely identifies the app instance. Several additional steps are needed to register Apple devices in FCM:
1) First of all, you should get the APNs device token.
2) Register it in FCM.
3) Get FCM device token which is associated with APNs device token. So when you need to send a notification, FCM searches for the corresponding APN's device token and sends a message request to APNs. (picture 2 in comments)
2. You'd probably want to send this FCM token to your server and store it on the device.
3. Your backend decides that a certain device should get a push notification, so it takes its FCM token, composes a message, and sends this request to FCM.
4. FCM backend gets this request, generates metadata, and sends it to the platform-specific transport layer.
5. When the device is online, the message is sent to the device.
6. You're able to react to the notification in your client app by overriding certain methods (onMessage, onBackgroundMessage). App behavior when receiving messages depends on whether the app is in the background or the foreground.
7. When a user logs out, you probably want to unsubscribe him from notifications. Login -> Subscribe.
8. You'd better update your token every once in a while, so you know that the device is still active and you aren't wasting resources by sending messages to inactive users.
*Firebase cloud functions or app server
Recently, during a technical interview, I was asked about push notifications. I was expected to talk about the developer's steps to set up and handle push notifications in the app, like registering a device, subscribing to a particular topic, getting and storing a token, receiving messages. So I wanted to refresh my memory and make a small overview of this feature.
There are services like Firebase cloud messaging (FCM), OneSignal, Amazon SNS, Pusher, and others that come into play when you need to enable push notifications. I will focus on FCM as it is a very popular cross-platform messaging solution developed by Google, and, also, it is the only service I have experience with) The information bellow is a condensed form of the FCM docs.
Key capabilities
- Sending up to 4000 Kb of payload in one message
- Sending notification or data messages
- Three different ways of targetting: to single devices, to groups of devices, or devices subscribed to topics
- Analytics
- Supports Android, iOS, web
Architectural overview
There are four components in the chain of building, delivering and receiving messages (picture 1 in comments):
The notification request builder.
1. It can be a GUI-based notification composer in the Firebase console, Admin SDK or the FCM server protocols used in the trusted environment*
2. FCM backend - accepts requests, performs fanout of messages via topics, and generates message metadata, like message id.
3. Platform-level transport layer - routes the message to the targeted device and handles its delivery.
- Android transport layer (ATL) for Android
- Apple Push Notification service (APNs) for Apple devices.
4. SDK on a device.
Lifecycle flow
1. An instance of the client app registers to receive messages, obtaining a FCM token that uniquely identifies the app instance. Several additional steps are needed to register Apple devices in FCM:
1) First of all, you should get the APNs device token.
2) Register it in FCM.
3) Get FCM device token which is associated with APNs device token. So when you need to send a notification, FCM searches for the corresponding APN's device token and sends a message request to APNs. (picture 2 in comments)
2. You'd probably want to send this FCM token to your server and store it on the device.
3. Your backend decides that a certain device should get a push notification, so it takes its FCM token, composes a message, and sends this request to FCM.
4. FCM backend gets this request, generates metadata, and sends it to the platform-specific transport layer.
5. When the device is online, the message is sent to the device.
6. You're able to react to the notification in your client app by overriding certain methods (onMessage, onBackgroundMessage). App behavior when receiving messages depends on whether the app is in the background or the foreground.
7. When a user logs out, you probably want to unsubscribe him from notifications. Login -> Subscribe.
8. You'd better update your token every once in a while, so you know that the device is still active and you aren't wasting resources by sending messages to inactive users.
*Firebase cloud functions or app server
👍3
Push it harder (Part 2)
Message types and attributes
There are two types of messages: notification and data.
- Notification messages are automatically displayed to end-user devices on behalf of the client app. They have a predefined set of keys and an optional data payload of custom key-value pairs.
- The client app is responsible for processing data messages. Data messages have only custom key-value pairs with no reserved key names.
You can also configure whether your notification message should be collapsible or not by using the collapse_key parameter.
- A collapsible message is a message that may be replaced by a new message if it has yet to be delivered to the device. Common use cases of collapsible messages are messages used to tell a mobile app to sync data from the server.
- A non-collapsible message denotes that each individual message is delivered to the device. Notification messages are always collapsible and will ignore the collapse_key parameter.
- Important! FCM does not guarantee the order of delivery.
A notification has a priority level.
- For Android, there are two options: normal and high.
- Apple's max priority is 5.
- Normal is the default priority for data messages. Messages are delivered immediately when the app is in the foreground. When the device is in Doze, the delivery may be delayed to save some battery.
You may also want to set a TTL for a message. There are some situations when instant delivery is impossible*. So, FCM stores messages and sends them as soon as it is feasible. But, there are some cases in which you may want to drop those undelivered messages. For example, video chat incoming calls or expiring invitation events.
*Device could be turned off, offline, or otherwise unavailable
#dev
Message types and attributes
There are two types of messages: notification and data.
- Notification messages are automatically displayed to end-user devices on behalf of the client app. They have a predefined set of keys and an optional data payload of custom key-value pairs.
- The client app is responsible for processing data messages. Data messages have only custom key-value pairs with no reserved key names.
You can also configure whether your notification message should be collapsible or not by using the collapse_key parameter.
- A collapsible message is a message that may be replaced by a new message if it has yet to be delivered to the device. Common use cases of collapsible messages are messages used to tell a mobile app to sync data from the server.
- A non-collapsible message denotes that each individual message is delivered to the device. Notification messages are always collapsible and will ignore the collapse_key parameter.
- Important! FCM does not guarantee the order of delivery.
A notification has a priority level.
- For Android, there are two options: normal and high.
- Apple's max priority is 5.
- Normal is the default priority for data messages. Messages are delivered immediately when the app is in the foreground. When the device is in Doze, the delivery may be delayed to save some battery.
You may also want to set a TTL for a message. There are some situations when instant delivery is impossible*. So, FCM stores messages and sends them as soon as it is feasible. But, there are some cases in which you may want to drop those undelivered messages. For example, video chat incoming calls or expiring invitation events.
*Device could be turned off, offline, or otherwise unavailable
#dev
❤3
Job interviews are cool when you're not a junior anymore
If you're still a junior with no commercial experience, it's quite tricky to land a job.
- You have almost nothing to put in your resume (at least you think so).
- The competition is damn high.
- You probably have to complete a test task before a technical interview.
- You can be sure that you'll be asked many technical questions, so you have no choice but to prepare for everything*.
- When it finally comes to the interview, you feel nervous: shaking knees, sweaty palms. I know, I've been there. The only way to beat this feeling is to pass more interviews.
Everything changes once you've convinced yourself that you're no longer an immature junior.**
- There is no water in your resume because you now have an experience you're not ashamed to talk about. Like, "I've developed several apps from scratch, here're the links to them. Implemented this and this. Here is my tech stack."
- No test tasks anymore. The choice is rich while the competition is pretty low, so you can afford to decline companies that require you to do a test task.***
- The interview looks more like a pleasant conversation rather than an interrogation. If you've been preparing for interviews being a junior dev, you're probably ready for all these techy questions. Some people won't even ask you these questions - they are more interested to hear about things you've done, technologies and approaches you've used.
- You have a bit of experience in interviews, so you know that you should be able to talk about yourself and your projects for 2-4 minutes, prepare questions for the company, etc.
- You finally have an answer to the question: "What is the most interesting/challenging task you've been working on?"
*Language, framework, libraries, OOP, basic CS things, algorithms, and data structures
**You probably have to work for 1-2 years before doing this
***If you're interested in a particular job, then go for it, do whatever it takes
#career #thoughts
If you're still a junior with no commercial experience, it's quite tricky to land a job.
- You have almost nothing to put in your resume (at least you think so).
- The competition is damn high.
- You probably have to complete a test task before a technical interview.
- You can be sure that you'll be asked many technical questions, so you have no choice but to prepare for everything*.
- When it finally comes to the interview, you feel nervous: shaking knees, sweaty palms. I know, I've been there. The only way to beat this feeling is to pass more interviews.
Everything changes once you've convinced yourself that you're no longer an immature junior.**
- There is no water in your resume because you now have an experience you're not ashamed to talk about. Like, "I've developed several apps from scratch, here're the links to them. Implemented this and this. Here is my tech stack."
- No test tasks anymore. The choice is rich while the competition is pretty low, so you can afford to decline companies that require you to do a test task.***
- The interview looks more like a pleasant conversation rather than an interrogation. If you've been preparing for interviews being a junior dev, you're probably ready for all these techy questions. Some people won't even ask you these questions - they are more interested to hear about things you've done, technologies and approaches you've used.
- You have a bit of experience in interviews, so you know that you should be able to talk about yourself and your projects for 2-4 minutes, prepare questions for the company, etc.
- You finally have an answer to the question: "What is the most interesting/challenging task you've been working on?"
*Language, framework, libraries, OOP, basic CS things, algorithms, and data structures
**You probably have to work for 1-2 years before doing this
***If you're interested in a particular job, then go for it, do whatever it takes
#career #thoughts
👍5🥰1
Meditation
I've been struggling last several years to make a habit of meditating for at least 10 minutes a day. My longest streak is about 1.5 months so far. And still, I witnessed some positive shifts in my life at that time, such as increased self-awareness and focus on work, reduced stress and anxiety levels. But somehow, this practice doesn't stick with me.
Yesterday, I stumbled across a review [RU] of the book on meditation. This book is full of studies on how this simple process changes your mind, brain, and body. It answers the main question: "Why should one meditate?". Moreover, the author of the review gave it 10/10. So, if you still think that meditation is only for people who believe in the supernatural or yogis that want to learn to levitate, then you definitely need to read the book.
After reading the review, I've decided to give this habit another shot. Probably, I'll also read a book sooner or later. So, I'm officially starting a new challenge. From now on, I'll meditate for 10 minutes every single day.
I don't plan to write daily reports on how things are going, but I do plan to post my thoughts after 1/3/6 months in the comments under this post.
#habits #books
I've been struggling last several years to make a habit of meditating for at least 10 minutes a day. My longest streak is about 1.5 months so far. And still, I witnessed some positive shifts in my life at that time, such as increased self-awareness and focus on work, reduced stress and anxiety levels. But somehow, this practice doesn't stick with me.
Yesterday, I stumbled across a review [RU] of the book on meditation. This book is full of studies on how this simple process changes your mind, brain, and body. It answers the main question: "Why should one meditate?". Moreover, the author of the review gave it 10/10. So, if you still think that meditation is only for people who believe in the supernatural or yogis that want to learn to levitate, then you definitely need to read the book.
After reading the review, I've decided to give this habit another shot. Probably, I'll also read a book sooner or later. So, I'm officially starting a new challenge. From now on, I'll meditate for 10 minutes every single day.
I don't plan to write daily reports on how things are going, but I do plan to post my thoughts after 1/3/6 months in the comments under this post.
#habits #books
👍5