- project 59
- learning 43
- management 41
- tips 39
- code 38
- Elixir 36
- teamwork 28
- explanation 16
- TIL 14
- team 6
- security 6
- business 6
- Phoenix 5
- automation 5
- Ecto 4
- DevOps 3
- remote work 2
- home office 2
- blog 2
- interesting facts 2
- books 1
- TimescaleDB 1
- domain driven design 1
- release 1
- selling 1
- health 1
project
Features of well-prepared tests
Software development is often a test creation process. To achieve success, it is worth considering what features good tests have. Well-written tests should document the implemented functionality and check the tested function well.
TIL: Only one server will run your migrations
Ecto uses SHARE UPDATE EXCLUSIVE lock to ensure that only one instance is running a migration at a time and only once. Internally stored version and inserted at allows you to modify and improve created files.
Refactoring is the key to success
Refactoring should be an integral part of a developer’s day. Systematic refactoring allows for reducing the process of self-degradation of the project. This change makes our code easier to understand and cheaper to maintain.
TIL: Regex with name bindings
In Elixir, regular expressions can extract a lot of useful information. Using Regex and named_captures/3 function, we can parse the input data based on the prepared regex.
Should Team Lead continue to code?
Being promoted from Programmer to Team Leader is not unusual. Should Team Lead continue to code? Managing people becomes your job, among other things. You do not have to stop coding completely. Unfortunately, it will be less than before.
Take care of your health
It is one of the few “things” that will ultimately happen to everyone. How well are you using your life? Do you like your job and the people you work with? Instead of postponing it, just start acting!
Use dbg to check your Elixir code
Debugging Elixir code has become even more accessible thanks to the dbg
function. Thanks to the latest version, your work may become more pleasant and the search for errors even easier. Check how to apply new possibilities in your code. A simple one-line can facilitate your error analysis.
TIL: Correctly comparing dates in Elixir
Special functions are used to compare dates. With it, you can prepare a comparison based on semantics. Simple functions can solve your problems with incorrect results.
Let’s get to know before you start changing the world
Every change is hard. Before making changes, get to know yourself from the best side. Try to understand it as quickly as possible, at least in general terms.
Preventing reuse of the same password
Safe passwords are a very important aspect of application security. How can you check if the password has not been used before? Compare passwords in Elixir thanks to Bcrypt.
Solving problems is not easy
The initial solution we wanted to apply may turn out to be insufficient. Try to provide as much helpful information as possible. Make sure you understand all the requirements well. Don’t be afraid that something will go wrong. Failure isn’t fatal, but failure to change might be.
Health status without log request
Sometimes our application collects more logs than we would expect. Especially in the case of endpoints responsible for the server status. Thanks to a simple plug, you can inform about the system state all the time without logging this request.
The Twelve-Factor App methodology
The Twelve-Factor App methodology is a methodology for building software-as-a-service applications. It allows you to eliminate the most common problems with our applications. Some of them have already become the industry standard, so you should get to know them all. The methodology constitutes design guidelines strongly focused on cloud-native, portable, and resilient applications.
KLT principle can save your sales and business
Selling is not an easy job. The customers don’t care about you. What matters is how you can solve their problems. People often recommend and buy from people they know well, like, and trust. See how to use the KLT principle in your business.
Make it as easy as possible
Freedom of choice is often the biggest curse. Sometimes the basics are enough, and the rest is just an addition. Don’t overcomplicate, don’t add maintenance, and keep it simple to be less sensitive.
Easy SSH connection management with configuration file
When connecting to the server with SSH, you may need to use a certificate other than the default one. Additionally, often the username is also more complicated. How do you remember it all? Special configuration file that will help us solve the problem.
Your personal security checklist
Protecting confidential data is a daily task. Thanks to a good web browser, a strong password, and other security measures, you can mitigate the risk of your identity being stolen. Use this personal security checklist to be even more secure!
Guards - simple restriction checking
Guards are a great way to check data limits. They are safe and can make the everyday work with the project more pleasant and, at the same time, limit the duplicated code. And it’s all in pattern matching!
Find leaked credentials with TruffleHog
One of the possible vectors of an attack on the system is the disclosure of the used keys, certificates, or other access data. I found TruffleHog as a tool to verify your project. The tool can scan projects on GitHub or GitLab, including entire organizations! You can attach them to your CI/CD pipeline to verify that no confidential information has been published.
Using JSON Web Tokens and their security
JSON Web Tokens known as JWT, are a great way to ensure security in communication between system parts. Remember not to trust the user and verify the data before use. JWT contains a lot of information about the user and his permissions. It is also a well-thought-out structure. It indicates in an accessible way for whom and by whom the token was prepared. Also, check out the topic of key rotation and its benefits.
Delegate tasks, and don’t be afraid to say no!
Feeling overwhelmed by work is quite a common feeling. Especially if we work on the project for a long time. Good planning can make your work more pleasant and simplified. You don’t have to complete all tasks (alone). Some tasks can even be removed. With the Eisenhower matrix you can manage your priorities.
Good error message
Error handling is an integral part of any project. However, only a few can do it well. What makes an error message good? Take care of the language of the message, its length and indicate how to mitigate errors. Have automatic bug reporting tools to quickly respond to system problems.
Speed up your daily work with Elixir console tricks
I would like to present some useful tricks to speed up your work. Elixir’s interactive shell is a great tool to make your work comfortable. You don’t need to use a browser to check function errors. You have everything available in the console!
TIL: wrapping an execution in a tuple
One of the advantages of Elixir is its openness. You can get more readable code with the command wrapped in tuple. You don’t need to modify the response from functions itself.
What is Open Graph protocol and how to use it for your website?
The presentation of extra details about your website is straightforward. All you need to do is use Open Graph protocol. Any web page can become a rich object in a social graph. You can use it to show a thumbnail, author details, or even a short description.
Ecto Changeset for verifying parameters used in your API
You can use Ecto to check any information from the user. Extra, we have another layer of security. Only the supported parameters are passed to the domain layer. Using Ecto to verify parameters from the user is not difficult and can be part of your API verification pipeline.
How to feel less overwhelmed as a developer
A lot is happening in the IT world. Instead of jumping from one topic to another nervously, it’s worth concentrating on one thing. Stop for a moment and identify the problems. Also, remember that there is no right way in life. One is faster, and the other is slower. Don’t be afraid to ask for help.
Elixir tap and then macros - life-saving helpers
Elixir 1.12 introduced two very useful macros. They can be life savings helpers in your codebase. Instead of write extra functions, you can have nice logging and executing actions based on given data.
Check your password security with Have I Been Pwned?
Users often do not see the dangers of a weak password. Often, they reuse the same passwords on different sites to make their daily lives easier. Security is one of the critical aspects of any project. With Have I Been Pwned? it is possible to check passwords based on various leaks.
Zero downtime deployments
Not so long ago, to release the application, it was necessary to modify the binary files on the servers. Thanks to good DevOps practices, the entire process can be changed. It is possible to achieve tens or hundreds of releases each day. Everything without the downtime of the application.
A ways to be a more effective engineer
Start from understanding the needs and point of view of the organization. Take care of good communication with customers. Don’t be afraid to develop both technical and soft skills. You will have a lot of battles at work. Choose wisely what you can engage in, given your limited time capacity. Act locally, think globally to change the project in small steps. Use non-hanging fruit to be successful and avoid burnout.
Skills development as the best investment in life
In my opinion, the best investment is our development. It allows us to achieve better results, receives promotions, and increase our remuneration. By investing in ourselves, we invest in our future. You didn’t know everything (and you still don’t know everything). It is worth trying to help others and learning at the same time.
Using View as a way to simplify your system
Many applications introduce some kind of status to make it easier to share data. However, more and more modules in your codebase need to be explicit about these assumptions. Views can eliminate the problematic SQL query. It’s also great way to introduce well-defined entities.
Understand the domain of your project
Understanding the business is critical. It allows you to achieve better results in a shorter time. Don’t try to be an expert right away. Learn and don’t be afraid to ask when something is unclear. A common language is an opportunity for discussion with the client.
Automatic tests won’t solve all your problems
Automated testing can unburden Quality Assurance teams from the monotonous manual review of every change. They can also be a great acceleration for programmers. But they won’t make your organization or product great overnight. It would help if you had people’s support, a clear plan, and an understanding of expectations.
Parkinson’s Law
The more time we have to do the job (especially in the office), the longer it takes. Work complicates to fill the available time. Check out Parkinson’s Law and understand why!
You will not avoid mistakes while creating the software
Don’t be afraid to make mistakes. Even the best programmers make mistakes. However, minimize their impact and react quickly to the most critical problems. It is much better to make mistakes but fix them quickly than to delay the development phase and not provide functionality.
Phoenix 1.6 released!
We have a new version of the most popular Elixir framework - Phoenix framework. New generators, fixes and improvements are now available. Find out more about the new HEEx engine.
Recruitment and IT - when two worlds meet
A good recruitment process starts with a personalized message selected for a specific candidate. Worth mentioning which technologies are used in the project. Try to keep the first conversations short but very meaningful so that neither party feels like wasting their time.
Faster test execution in Elixir
Try to use setup_all
to prepare the data once and re-use it in tests. Use tags to have a better context and be able to exclude some tests. Prepare a processing pipeline to check the quick tests first, and when they do not fail, take care of the more time-demanding tests.
Code review is not for catching bugs
Code review can be an opportunity to sharing knowledge. Finding errors is a side effect of the entire code review process. Thanks to code review, you can promote one standard style of changes to the entire team. Don’t be afraid to ask if you don’t understand something.
Response status and the security of your API
Have you thought about the response statuses of your endpoints? Some of them can be used for scanning your architecture. Some attacks on IT systems target the weakest areas, which may be addresses used for internal purposes.
Take care of your customers
Instead of focusing solely on our business, we should try to understand the client’s expectations. Your client’s success is your success. A satisfied customer is our primary source of recommendations. Treat others as you would like others to treat you.
Principles of estimating
We expect our estimates will have a positive impact on the implementation. The most significant value of the estimation is not the value itself. It is a better understanding of the project, and a consistent view of the tasks carried out.
You don’t always have to be right
It is not always possible to be right every time. It didn’t really matter who’s the solution was chosen. What counts for the customer is a well-implemented project that meets his expectations.
GitHub Copilot - a way to automatically generated code
GitHub Copilot tries to understand the programmer’s intentions and generate the code closest to the expectations. Aside from generating code, understanding the programmer’s intentions can be a much bigger problem. The use of the code created by this tool remains controversial.
Personal roadmap - find your way
Companies often create strategy plans called roadmaps. In the case of a personal roadmap, the plan is for a specific person - you. It can be a great way to achieve your goals and expectations.
Empirical approach to refactoring
We don’t touch the code in our projects with equal frequency. The tool for automatically discovering candidates comes in handy by identifying the most frequently modified files with high cyclomatic complexity. Then we can focus on these files and make changes to work with better codebase.
Knowledge sharing is important
Knowledge sharing can be a great way to grow faster. It’s also an excellent opportunity to build the image of the expert. There will always be someone we can help. Our knowledge can be helpful and a huge step in personal development.
Business doesn’t understand technical debt
Developers and business misunderstand the concept of technical debt. Building on weak foundations can result in losses and risks to your business. Instead of talking about debt, we should talk about missed opportunities.
Take notes during the meetings
Taking notes and summaries of meetings can provide a better engagement in discussions. Notes can also be a source of truth and a good reference while working. Do it on paper or immediately digitally, depending on your preferences.
How to overcome task delay?
You don’t want to postpone tasks? The best way is to change your approach and set the time window for the project. Instead of dividing up into tasks and thinking about everything right away, you can accomplish as much as you can.
The enemy of good work and code
We spend most of our life at work. Work should not be a place where we are forced to go. Have you considered the enemies of our work? Blame culture, ego, responsibilities - these are only some of the topics worth paying attention to.
TIL: Personal development
I love podcasts because they can change a lot in our lives. Recently I was analyzing one, and I would like to share something that seems extremely important to me.
Document your learning
Recently I came across the topic of learning and documenting progress. Sharing our development with others can be done in many ways. I want to share my opinion about the advantages I see.
Top things that annoy programmers
Daily work provides many situations to upset, surprise, and even laugh. I asked my friends who are programmers what annoyed them. Please don’t take it as a complaint, but rather as an opportunity to change.
Don’t use Elixir modules in migrations
Most of our projects use databases. We often do not realize that incorrectly used functionality may block our applications. Simple changes can save us from unpleasant consequences.
The most important thing in the project
No project is perfect from the start. The real problems are very complicated. While something seems simple and fits perfectly, it may not be. I want to present the most critical and unchanging aspect of each project.
Get noticed at a new project
Changing your job or team often means changing the current project. It can be a difficult situation for most, especially at the beginning. The first impression can only be made once. It’s worth doing it right. See what we should do to get noticed at a new project.
learning
Customize outputs with Inspect protocol
The latest changes to the Inspect protocol can help you change the way data is presented. With the new optional
option, you can only indicate information when the data has changed.
Features of well-prepared tests
Software development is often a test creation process. To achieve success, it is worth considering what features good tests have. Well-written tests should document the implemented functionality and check the tested function well.
Use GitHub discussion to have comments on your Jekyll blog
I introduced the possibility of commenting on posts directly on the page. With giscus, we can use Discussions on GitHub to store comments. In this simple way, you can add comments to your Jekyll blog!
TIL: Using phash2 for data partitioning
In programming, we often need fairly distribution of data. Using phash2 we can get the same hash for the same Erlang term regardless of machine architecture and ERTS version. This fast function should always be used for hashing any data and limiting the result to a range of integers.
TIL: Only one server will run your migrations
Ecto uses SHARE UPDATE EXCLUSIVE lock to ensure that only one instance is running a migration at a time and only once. Internally stored version and inserted at allows you to modify and improve created files.
TIL: Regex with name bindings
In Elixir, regular expressions can extract a lot of useful information. Using Regex and named_captures/3 function, we can parse the input data based on the prepared regex.
Take care of your health
It is one of the few “things” that will ultimately happen to everyone. How well are you using your life? Do you like your job and the people you work with? Instead of postponing it, just start acting!
Your GitHub professional card
GitHub offers a great opportunity to create our card for everyone visiting our profile. Best of all, even this card uses a version control system.
Use dbg to check your Elixir code
Debugging Elixir code has become even more accessible thanks to the dbg
function. Thanks to the latest version, your work may become more pleasant and the search for errors even easier. Check how to apply new possibilities in your code. A simple one-line can facilitate your error analysis.
TIL: Correctly comparing dates in Elixir
Special functions are used to compare dates. With it, you can prepare a comparison based on semantics. Simple functions can solve your problems with incorrect results.
Let’s get to know before you start changing the world
Every change is hard. Before making changes, get to know yourself from the best side. Try to understand it as quickly as possible, at least in general terms.
The Twelve-Factor App methodology
The Twelve-Factor App methodology is a methodology for building software-as-a-service applications. It allows you to eliminate the most common problems with our applications. Some of them have already become the industry standard, so you should get to know them all. The methodology constitutes design guidelines strongly focused on cloud-native, portable, and resilient applications.
KLT principle can save your sales and business
Selling is not an easy job. The customers don’t care about you. What matters is how you can solve their problems. People often recommend and buy from people they know well, like, and trust. See how to use the KLT principle in your business.
Make it as easy as possible
Freedom of choice is often the biggest curse. Sometimes the basics are enough, and the rest is just an addition. Don’t overcomplicate, don’t add maintenance, and keep it simple to be less sensitive.
TIL: Cancel the scheduled send_after message
Sending a message to yourself as a process is an easy way to schedule an action to retry. However, it is not always necessary to send this message. Find out how easy it is to cancel a scheduled message.
Your personal security checklist
Protecting confidential data is a daily task. Thanks to a good web browser, a strong password, and other security measures, you can mitigate the risk of your identity being stolen. Use this personal security checklist to be even more secure!
Find leaked credentials with TruffleHog
One of the possible vectors of an attack on the system is the disclosure of the used keys, certificates, or other access data. I found TruffleHog as a tool to verify your project. The tool can scan projects on GitHub or GitLab, including entire organizations! You can attach them to your CI/CD pipeline to verify that no confidential information has been published.
Good error message
Error handling is an integral part of any project. However, only a few can do it well. What makes an error message good? Take care of the language of the message, its length and indicate how to mitigate errors. Have automatic bug reporting tools to quickly respond to system problems.
Speed up your daily work with Elixir console tricks
I would like to present some useful tricks to speed up your work. Elixir’s interactive shell is a great tool to make your work comfortable. You don’t need to use a browser to check function errors. You have everything available in the console!
What is Open Graph protocol and how to use it for your website?
The presentation of extra details about your website is straightforward. All you need to do is use Open Graph protocol. Any web page can become a rich object in a social graph. You can use it to show a thumbnail, author details, or even a short description.
How to feel less overwhelmed as a developer
A lot is happening in the IT world. Instead of jumping from one topic to another nervously, it’s worth concentrating on one thing. Stop for a moment and identify the problems. Also, remember that there is no right way in life. One is faster, and the other is slower. Don’t be afraid to ask for help.