Lead Data Scientist
Cyber Security Researcher">
Currently besides all other activities, I am developing a habit of programming following Test Driven Development (TDD) methodology. This is a perfect time because I continue to explore Rust, a new programming language to me. Moreover, this language encourages you to cultivate this best practice by providing great documentation and well-thought ecosystem.
In our programs, we often face with exceptional situations (e.g., lack of space when you try to write a file, or absence of a resource), and we need to handle them. If you follow the TDD approach, you need to ensure that these exceptional situations are also properly covered in your tests. Id est, you have to develop tests that reproduce these exceptional situations and make sure that your code detect and handle them correctly. In this post, I want to discuss how to test exceptional situations in Rust.
Hugo 0.56.0 introduced one notable feature called “Hugo Modules”. Hugo Modules allow you to add more flexibility to your Hugo project organization. Using this feature, you can import different modules that will implement one or more Hugo component types. For instance, you can use one module that provides layout for your website, and another one to add more shortcodes, etc. Moreover, this feature enables you to mount your own directories or files that are not necessary tracked by Hugo.
For my webpage, I use a modified “Academic” theme that has been recently renamed to Wowchemy. As a part of the rebranding, the author migrated it to use Hugo Modules. I have devoted some time to understand how Hugo Modules work and how to migrate my website to use this feature. This blog post is mostly a memo for myself, however, it may be useful for others as well.
Recently, I have updated my operating system, and as a part of this process I have installed the latest poetry version (a tool for Python dependency management). When I have started a new project using my typical routine, I have discovered that poetry cannot install development dependencies exiting with a weird