<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniele Falchetti</title>
    <description>The latest articles on DEV Community by Daniele Falchetti (@falcosan).</description>
    <link>https://dev.to/falcosan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F698217%2F66ec75de-b8c8-49a6-b75f-3342e921b6a3.gif</url>
      <title>DEV Community: Daniele Falchetti</title>
      <link>https://dev.to/falcosan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/falcosan"/>
    <language>en</language>
    <item>
      <title>An Equally Driven Second Choice</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Tue, 14 Nov 2023 14:53:49 +0000</pubDate>
      <link>https://dev.to/falcosan/an-equally-driven-second-choice-4p3f</link>
      <guid>https://dev.to/falcosan/an-equally-driven-second-choice-4p3f</guid>
      <description>&lt;h3&gt;
  
  
  Starting your digital career with the idea of a new beginning. Are you sure?
&lt;/h3&gt;




&lt;p&gt;We know well that, for some years now, many people have found themselves directly or indirectly dealing with this situation, trying to understand as quickly as possible what could be the best way to find a solution. The pervasive problem is always at the top of the trending topics list: "And now what do I do?" The question is not the real problem, but rather the context of the person asking it, namely the human being who wants to or needs to quickly find a new job, perhaps one that is easy to reach and learn, well-paid, maybe in the market that has been expanding the most in the last ten years, perhaps in the industry with the highest hiring rate ever. The &lt;strong&gt;IT sector&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These are all habits, realities well assimilated and ingrained in everyday life, where everyone is free to switch from a traditional job to a digital one, and that's fine. But what does it really mean to do a digital job? Those who embark on this path must start somewhere, first by choosing the type of job, understanding which role is the right one. Initially, acquiring the necessary skills through a school or a course where you can gain the essential knowledge to be minimally appealing in the market. Later, with the CV in hand, all that remains is to knock on the doors of technology companies, hoping that someone will answer. Introductory interview, technical interview, skill test, and you're in, welcome to the world of information technology.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FpUgwLxmGW3S7K%2Fgiphy.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FpUgwLxmGW3S7K%2Fgiphy.webp" width="400" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After this ironic introduction, we need to explain why all this is wrong.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Not a fallback job
&lt;/h3&gt;

&lt;p&gt;Many people, eager to pursue a career in IT, may not fully realize the magnitude of their choice. It is imperative to understand that this decision requires more than a mere aspiration: it implies total dedication and the willingness to invest time and energy to acquire the necessary skills.&lt;/p&gt;

&lt;p&gt;It is important to note that there are computer science degree programs that attract students who are aware of their future in the industry. No, it is not necessary to have a degree to work as a Software Engineer, Data Scientist, or similar roles, but one must recognize that the existence of specific university degrees in computer science has a reason for being. Whether through a university course of study or through self-learning, a solid theoretical and practical foundation must be established, which cannot be completely acquired in a few months through online courses or private institutes.&lt;/p&gt;

&lt;p&gt;To enter the IT field, it is essential to be prepared, and this requires passionate study. Passion for this world not only fuels motivation but also the ability to adapt to the rapid changes in the industry.&lt;/p&gt;

&lt;p&gt;Before being influenced by trends, it would be better to ask oneself some questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Do I really have an interest in technology?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do I intend to continuously deepen the subject, recognizing the importance of each concept and its frequent intrinsic connection to other concepts?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do I know where to find the necessary resources to acquire the required knowledge?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Am I ready to start over?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Learn and Teach
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more sheep there are, the more wolves are lurking. Novice digital workers are the sheep, while some of the online courses and private institutes mentioned earlier act like wolves. In this case, one must understand the intentions and needs of both entities involved.&lt;/p&gt;

&lt;h4&gt;
  
  
  What should happen
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Those who learn&lt;/strong&gt; must dedicate themselves to studying and gaining a thorough understanding of the actual dynamics of the role they aspire to. It is essential to assimilate both technical and transversal skills, such as problem-solving adaptation, communication skills, and proactivity. From the beginning, it is crucial to apply what has been learned through personal projects or, even better, group projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Those who teach&lt;/strong&gt; must act as guides, presenting students with a careful study plan and accompanying them throughout the completion of the course. Teachers must provide students with the necessary material to enable them to independently develop the skills acquired during the course. They also have the challenging task of instilling in students a certain fascination for the subject, trying to generate enthusiasm in the classroom and creating an atmosphere similar to that of a small IT company.&lt;/p&gt;

&lt;h4&gt;
  
  
  What really happens
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Those who learn&lt;/strong&gt; try to understand the course content but often struggle to follow the program. This may be because, during the course, the student has to balance studies with their current job, managing to dedicate only 1 or 2 hours to study and practice. In the event that the student has achieved some success before completing the course, they may already start looking for a job in the IT sector, thinking they are ready to face the challenge. This perspective is not wrong, provided the student is truly prepared with solid knowledge. Often, however, the only driving force is the urgent desire to change professions and obtain better compensation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Those who teach&lt;/strong&gt; show a preference for sales rather than real education. Some paid courses aim to attract students with the intention of teaching them what the market requires at that specific historical moment, completely ignoring the theory and the foundations of the subject. They promise an educational journey by presenting the most advanced technologies as the only knowledge needed to excel. In free schools, different problems emerge. In the worst cases, teachers may have deficiencies in technical skills, while in other situations, incompetence manifests itself in the wrong teaching methodology. This naturally contributes to creating an ambiguous context for students, generating a sense of frustration and abandonment.&lt;/p&gt;

&lt;p&gt;Making a recap without generalizing, those who are about to start studying must be careful with how and where they do it. Absolutely no, not all trainers have hidden or even fraudulent intentions. However, it is equally true that unprepared or inadequately oriented digital training institutes should refrain from promising what they are unable to deliver.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding when and if to give up
&lt;/h3&gt;

&lt;p&gt;The first two steps have been taken: it has been understood that acting impulsively and venturing into an uninformed choice of pursuing a career in the IT sector is counterproductive. The importance of having the right teachers during the learning period as a decisive element for being ready to seek employment has been recognized.&lt;/p&gt;

&lt;p&gt;Fast forward to the first day of work...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0NwF1dnk7GRz3pK0%2Fgiphy.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0NwF1dnk7GRz3pK0%2Fgiphy.webp" width="439" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;"And now what do I do?" The same question with which all this began could echo.&lt;/p&gt;

&lt;p&gt;The first day of work in the IT sector, in the end, is similar to any other first day in any other job. What varies, depending on the role, the size of the company, and many other factors, are the following days. Spending time as a Software Engineer, for example, one will be faced situations that could disrupt the initial idea of the profession, but all of this is part of the game. In most cases, discovering realities different from academic knowledge should not be a reason for dismay or resentment; the further you go, the more it will translate into experience. What should be a cause for concern is not feeling comfortable with constantly staying informed, knowing all the latest news in the field you are working in. If the task, in the eyes of the person performing it, is reduced to the monotonous activity of clocking in and out, intervention is necessary.&lt;/p&gt;

&lt;p&gt;There are several reasons for a loss of motivation; if this is caused by a lack of passion or, worse, if a real passion for the activity has never been nurtured, it is the right moment to consider a change of profession.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>company</category>
      <category>it</category>
    </item>
    <item>
      <title>Redundancy of Roles</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Tue, 19 Sep 2023 10:04:54 +0000</pubDate>
      <link>https://dev.to/falcosan/redundancy-of-roles-2ie5</link>
      <guid>https://dev.to/falcosan/redundancy-of-roles-2ie5</guid>
      <description>&lt;h3&gt;
  
  
  Are there roles in companies that could be considered superfluous or counterproductive?
&lt;/h3&gt;




&lt;p&gt;In today's corporate vision, having two or more figures performing the same or similar job function is considered unnecessary, if not harmful, as it involves role redundancy. This redundancy can manifest through the presence of duplicate positions, tasks, or skills. But is this the right approach? Recently, we have witnessed a large number of layoffs in various companies, regardless of their size. This "layoff" phenomenon occurs for various reasons, including role redundancy.&lt;/p&gt;

&lt;p&gt;Taking the role of the recruiter as an example, a position present in almost every company, an &lt;a href="https://www.forbes.com/sites/brianbushard/2023/09/14/2023-layoff-tracker-airtable-cuts-over-25-of-its-staff-as-google-lays-off-recruiters/" rel="noopener noreferrer"&gt;article&lt;/a&gt; in Forbes magazine lists some companies that have implemented a series of personnel reductions, specifically in the Human Resources sector.&lt;/p&gt;

&lt;p&gt;Having clarified the general concept of role redundancy, I would now like to delve deeper and define two types of redundancy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Principle redundancy&lt;/strong&gt; : occurs when two or more figures are hired with the same role title, such as two Recruiters or two Software Engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Objective redundancy&lt;/strong&gt; : occurs when two or more professionals, despite starting their careers with different tasks, end up performing the same activities aimed at the same corporate objectives.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two types of redundancy can often coexist within a working environment, even if applied in different contexts. For example, consider the case of an IT company working on a complex software development project. The team might include two Software Engineers who share the same role, thus manifesting a principle redundancy. This might seem like a duplication, but it actually provides greater flexibility and response capacity to emergency situations or work peaks. Different perspectives and opinions may arise, creating positive synergies towards achieving the purpose. In the same example, an objective redundancy also manifests, as the team includes a Product Manager and a UX/UI Designer. Despite having different skills, both roles work to achieve a common goal, which is the success of the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  But then, where's the problem with redundancy?
&lt;/h3&gt;

&lt;p&gt;The real problem with this phenomenon lies in the &lt;strong&gt;pride, incompetence,&lt;/strong&gt; and &lt;strong&gt;inconsistency&lt;/strong&gt; of some companies.&lt;/p&gt;

&lt;p&gt;Within corporate dynamics, situations of confusion and inefficiency are created: for example, in the process of integrating a new resource (onboarding). When a new employee joins a company, it's up to the latter to help them integrate, perhaps by assigning them a tutor to accompany them throughout the journey. However, it is common for company employees, such as Software Engineers, Product Managers, or UX/UI Designers, to be chosen as tutors. In addition to achieving the goals for which they were hired, they must also perform this function, in most cases, without any additional economic reward.&lt;/p&gt;

&lt;p&gt;Another form of redundancy is found in some company policies that prevent employees from contacting the human resources department. This dynamic is especially typical of large companies and is justified and "solved" by appointing a worker from the company as Career Manager for a predetermined number of people. Although it is the employee themselves who chooses to take on this additional responsibility compared to their original duties, it is indeed the company that strongly encourages the employee to accept, since, in addition to the already heavy workload, there is also a reward in terms of visibility and prestige. In practice, it is about being considered the best among the exploited.&lt;/p&gt;

&lt;p&gt;Reading these examples, we can say that the inadequate management of resources causes the loss of identity of some corporate figures, thus contributing to entropy and sometimes triggering indignation and dissent among employees.&lt;/p&gt;

&lt;p&gt;Therefore, I add a third type of redundancy, namely &lt;strong&gt;overload redundancy&lt;/strong&gt; , and I define it as the real culprit of this phenomenon.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;p&gt;The solution for the most "cunning" companies is to do a deep soul-searching. For other companies, which may make mistakes but not necessarily out of dishonesty, there are practical solutions, below are some:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Role review:&lt;/strong&gt; Companies should regularly conduct a role review to identify any overlaps and redundancies. This should include a detailed analysis of the responsibilities of each position.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Organizational restructuring&lt;/strong&gt; : Based on the role review, the company can implement a restructuring. This could involve merging redundant roles, reassigning responsibilities, or creating new positions to manage new needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review of planning methodologies&lt;/strong&gt; : It is vital to start, continue and conclude any process and corporate dynamic by adopting a studied strategic planning method. Even more important, however, is to cyclically check that this method is actually applied in the right way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Continuing education&lt;/strong&gt; : Companies should invest in mandatory continuous training for their employees. This can help ensure that team members have the necessary skills to adapt to new roles and responsibilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clear communication&lt;/strong&gt; : Effective communication is essential to prevent role redundancy. Companies should clarify the responsibilities of each role and ensure that this information is easily accessible to all team members.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>career</category>
      <category>company</category>
      <category>productivity</category>
      <category>hr</category>
    </item>
    <item>
      <title>Track Your Expenses with Splitwired</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Tue, 18 Jul 2023 18:52:05 +0000</pubDate>
      <link>https://dev.to/falcosan/track-your-expenses-with-splitwired-1ldo</link>
      <guid>https://dev.to/falcosan/track-your-expenses-with-splitwired-1ldo</guid>
      <description>&lt;h3&gt;
  
  
  Do you use Splitwise? Monitor Expenses &amp;amp; Unlock Free Premium with Splitwise APIs!
&lt;/h3&gt;




&lt;p&gt;About a year ago, I started following some blogs that talk about personal finance. I immediately became interested in the topic and, after reading a lot of stuff, I felt the need to start putting into practice what I had learned from all those articles. The first obstacle was that I didn't have any data on my expenses, no Excel sheet, no database... or maybe I did. Actually, yes, because practically my wife and I have been using this fantastic application called &lt;a href="https://secure.splitwise.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Splitwise&lt;/strong&gt;&lt;/a&gt; on a daily basis. It simplifies our lives a lot.&lt;/p&gt;

&lt;p&gt;Okay, I have the data, but (second obstacle) I can't read it dynamically. The only thing Splitwise offers me with a free account is the ability to download a CSV file containing all the expenses of a single group. It's not enough for me to create graphs, apply formulas, and so on.&lt;/p&gt;

&lt;p&gt;I immediately thought of using the Splitwise APIs, which are available for free: &lt;a href="https://dev.splitwise.com/" rel="noopener noreferrer"&gt;https://dev.splitwise.com/&lt;/a&gt; ❤️ ... and so the &lt;a href="https://github.com/falcosan/Splitwired/tree/main" rel="noopener noreferrer"&gt;&lt;strong&gt;Splitwired&lt;/strong&gt;&lt;/a&gt; project began.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Backend
&lt;/h4&gt;

&lt;p&gt;On the official &lt;a href="https://dev.splitwise.com/" rel="noopener noreferrer"&gt;Splitwise API page&lt;/a&gt;, there is a list of SDKs created by the community. While using these kits is not mandatory since Splitwise provides everything necessary, I chose to use the library by &lt;a href="https://github.com/namaggarwal" rel="noopener noreferrer"&gt;@namaggarwa&lt;/a&gt;. The SDK is written in &lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;Python&lt;/a&gt;, has good &lt;a href="https://splitwise.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;, is continuously updated, and therefore, I consider it the best in the list.&lt;/p&gt;

&lt;p&gt;The project was built with &lt;a href="https://flask.palletsprojects.com/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt; and served with &lt;a href="https://flask.palletsprojects.com/" rel="noopener noreferrer"&gt;Gunicorn&lt;/a&gt; on &lt;a href="https://render.com/" rel="noopener noreferrer"&gt;Render&lt;/a&gt;. The backend part is entirely located within the &lt;code&gt;/app&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;auth.py&lt;/code&gt; file is used to create the user authentication system in Flask using &lt;a href="https://flask-login.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;Flask-Login&lt;/a&gt;. An instance of &lt;code&gt;LoginManager&lt;/code&gt; is initialized and added to the Flask application. The &lt;code&gt;Authentication&lt;/code&gt; class is defined, which contains a dictionary of authenticated users and two class methods to verify the presence of the user and match the username and password. The user_loader function loads the data of the authenticated user, while the unauthorized function handles &lt;code&gt;unauthorized&lt;/code&gt; users by redirecting them to the login page.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;config.py&lt;/code&gt; file contains the &lt;code&gt;Config&lt;/code&gt; class used to initialize four attributes: &lt;code&gt;api_key&lt;/code&gt;, &lt;code&gt;environment&lt;/code&gt;, &lt;code&gt;consumer_key&lt;/code&gt;, and &lt;code&gt;consumer_secret&lt;/code&gt;. These attributes are required to authenticate the Splitwise instance.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;data.py&lt;/code&gt; file provides basic methods to access shared expense data using the &lt;code&gt;splitwise&lt;/code&gt; library. After creating an instance of &lt;code&gt;Splitwise&lt;/code&gt; using the values of the aforementioned &lt;code&gt;config&lt;/code&gt; attributes, there are two functions for retrieving data: the &lt;code&gt;data_groups&lt;/code&gt; function to get the data of the groups the user belongs to, and the &lt;code&gt;data_expenses&lt;/code&gt; function to return the shared expense data.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;utils.py&lt;/code&gt; file contains functions related to data manipulation and the final creation of the expense list. The &lt;code&gt;generate_expense&lt;/code&gt; method serves this purpose. Based on a series of parameters, it generates an expense table, graphs, and a CSV file with the expense data.&lt;/p&gt;

&lt;p&gt;The parameters of the function are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;csv&lt;/code&gt;: a boolean value indicating whether to generate the CSV file or not.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;expenses&lt;/code&gt;: the list of "expense" objects obtained from the &lt;code&gt;getExpenses&lt;/code&gt; function of Splitwise.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;filename&lt;/code&gt;: a string indicating the name of the CSV file to generate if &lt;code&gt;csv&lt;/code&gt; is True.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;category&lt;/code&gt;: an integer value indicating the ID of the category to filter expenses to include in the table (only applies to the CSV file table since, in the application, I prefer to do the category filtering on the client side).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;personal&lt;/code&gt;: a boolean value indicating whether to generate the table and chart only for personal expenses (i.e., all expenses from all groups the selected user is involved in).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;chart&lt;/code&gt;: a string or a list indicating the types of charts to generate.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's important to note that the computational cost for executing the function with the &lt;code&gt;personal&lt;/code&gt; parameter activated will be quite high. This is because this parameter triggers the process of creating the expense table by checking all the groups where the specified user ID is present, thus obtaining all the expenses in which that user has participated.&lt;/p&gt;

&lt;p&gt;A recently added feature is the currency converter. I often go to the United States, and when I'm there, I prefer to pay in dollars rather than euros to avoid paying currency exchange fees. Therefore, I added the &lt;code&gt;costs_conversions&lt;/code&gt; function that allows me to convert and record my expenses in euros that I made and added to Splitwise in dollars. The conversion is done by scraping the &lt;a href="https://finance.yahoo.com/" rel="noopener noreferrer"&gt;Yahoo Finance&lt;/a&gt; portal using the &lt;a href="https://pypi.org/project/yfinance/" rel="noopener noreferrer"&gt;yfinance&lt;/a&gt; library, which provides currency values at a specific historical moment. By providing the expense date, I can obtain the desired result. It is possible to convert any currency to euros. If you want to convert an expense to a currency other than euros, you just need to modify the &lt;code&gt;ticker&lt;/code&gt; variable in the &lt;code&gt;set_currency_conversion&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;yfinance&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;yf&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;set_currency_conversion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;curr_from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;conv_date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;ticker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;curr_from&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;EUR=X&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;currency_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;yf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Ticker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ticker&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;history&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;period&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;conv_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;conv_date&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;currency_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;empty&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;currency_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;set_currency_conversion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;curr_from&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;conv_date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;conv_date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;exchange_rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;currency_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exchange_rate&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well, in the end, the &lt;code&gt;generate_expense&lt;/code&gt; function returns a dictionary with three keys: &lt;em&gt;table&lt;/em&gt; for the table, &lt;em&gt;data&lt;/em&gt; for the data, and &lt;em&gt;chart&lt;/em&gt; for the chart (if &lt;code&gt;chart&lt;/code&gt; is specified). If &lt;code&gt;csv&lt;/code&gt; is set to True, the &lt;code&gt;generate_csv&lt;/code&gt; function will be executed, generating a CSV file containing the expense data. The file can be downloaded from the download area at the top of the page.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Frontend
&lt;/h4&gt;

&lt;p&gt;From the frontend perspective, there isn't much to say, just a few notes.&lt;/p&gt;

&lt;p&gt;I started by configuring &lt;a href="https://webpack.js.org/" rel="noopener noreferrer"&gt;Webpack&lt;/a&gt; and setting up &lt;a href="https://react.dev/" rel="noopener noreferrer"&gt;React&lt;/a&gt;. Then, I installed &lt;a href="https://tanstack.com/table/v8/docs/adapters/react-table" rel="noopener noreferrer"&gt;TanStack Table&lt;/a&gt; for table management and &lt;a href="https://plotly.com/javascript/react/" rel="noopener noreferrer"&gt;Plotly&lt;/a&gt; for creating graphs.&lt;/p&gt;

&lt;p&gt;Finally, I added a service worker and a manifest.json file to enable installing the Progressive Web App (PWA) on a smartphone.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;Splitwise is truly a valuable application. Over the past few years, it has made my life easier by handling all the calculations of debts and credits for me. Now, with this new little "extension" I created, I have achieved much more comprehensive control over my finances.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>splitwise</category>
      <category>finance</category>
    </item>
    <item>
      <title>IndexedDB in TypeScript</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Wed, 09 Nov 2022 10:36:44 +0000</pubDate>
      <link>https://dev.to/falcosan/indexeddb-in-typescript-1nea</link>
      <guid>https://dev.to/falcosan/indexeddb-in-typescript-1nea</guid>
      <description>&lt;h3&gt;
  
  
  TypeScript's configuration of IndexedDB
&lt;/h3&gt;




&lt;p&gt;A quick description from &lt;a href="https://javascript.info/indexeddb" rel="noopener noreferrer"&gt;Javascript.info&lt;/a&gt; on what IndexedDB is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;IndexedDB is a database that is built into a browser, much more powerful than &lt;code&gt;localStorage&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores almost any kind of values by keys, multiple key types.&lt;/li&gt;
&lt;li&gt;Supports transactions for reliability.&lt;/li&gt;
&lt;li&gt;Supports key range queries, indexes.&lt;/li&gt;
&lt;li&gt;Can store much bigger volumes of data than &lt;code&gt;localStorage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That power is usually excessive for traditional client-server apps. IndexedDB is intended for offline apps, to be combined with ServiceWorkers and other technologies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As confirmed by virtually everyone,  the API of IndexdDB is difficult to manage for most people, although in TypeScript it could be worse.&lt;/p&gt;

&lt;p&gt;For this, I created a repository with a standard IndexedDB configuration in TypeScript. I hope to help someone.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://github.com/falcosan/TS_IndexedDB" rel="noopener noreferrer"&gt;The repository&lt;/a&gt; 🫡
&lt;/h4&gt;

</description>
      <category>typescript</category>
      <category>indexeddb</category>
      <category>database</category>
      <category>react</category>
    </item>
    <item>
      <title>React: Considerations and References</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Mon, 17 Oct 2022 12:50:11 +0000</pubDate>
      <link>https://dev.to/falcosan/react-considerations-and-references-36i2</link>
      <guid>https://dev.to/falcosan/react-considerations-and-references-36i2</guid>
      <description>&lt;h3&gt;
  
  
  Miscellaneous guides on the main aspects and patterns of React
&lt;/h3&gt;




&lt;h4&gt;
  
  
  React Hooks VS Class component: Opinion
&lt;/h4&gt;

&lt;p&gt;Starting with version 16.8 React Hooks have been introduced. Hooks allow functional components (which already existed) to access state and other features of React. For this reason, class components are generally no longer needed. However, Facebook does not formalize the "death" of Class components because, quoting verbatim:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;At Facebook, we have tens of thousands of components written as classes, and we have absolutely no plans to rewrite them. Instead, we are starting to use Hooks in the new code side by side with classes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So who wins?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/60134270/react-hooks-stateless-component-vs-class-component-in-the-era-of-hooks-which/60134353#60134353" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/60134270/react-hooks-stateless-component-vs-class-component-in-the-era-of-hooks-which/60134353#60134353&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Use React Hooks Instead of Classes
&lt;/h4&gt;

&lt;p&gt;I strongly believe in the necessary general change in React's philosophy by totally abandoning Class components. Although class components are more conducive to routing management, there are many reasons for a radical change. I believe that for React to remain a good competitor, it must favor the ease of learning its syntax and handling written code with simplicity. Vue takes this into account by handling all of its major releases as a new chapther. If you have to refactor a technology, you have to refactor it, whatever it costs. Here are six more practical reasons to switch to React hooks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.bitsrc.io/6-reasons-to-use-react-hooks-instead-of-classes-7e3ee745fe04" rel="noopener noreferrer"&gt;https://blog.bitsrc.io/6-reasons-to-use-react-hooks-instead-of-classes-7e3ee745fe04&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Class Component
&lt;/h4&gt;

&lt;p&gt;Although with React hooks we are already in the future, it does not mean that we must exclude the past. In my opinion, it is important to know the Class components well, at least as well as the hooks. Knowing the logic of the &lt;em&gt;this&lt;/em&gt; concept, clashing with its redundancies to understand firsthand what React is in its entirety.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/samirasaad/class-component-with-react-typescript-3948"&gt;https://dev.to/samirasaad/class-component-with-react-typescript-3948&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Folder Structure
&lt;/h4&gt;

&lt;p&gt;Each technology has its own best practice regarding folder structure. Below I add a good starting point for a mid-sized React project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://profy.dev/article/react-folder-structure" rel="noopener noreferrer"&gt;https://profy.dev/article/react-folder-structure&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  PropTypes: Validation
&lt;/h4&gt;

&lt;p&gt;One of the fundamental patterns of any frontend technology is the passing of data between parent and child components. React uses the concept of "prop" which, for those who do not know, means property. As a property, it is strongly recommended to define certain aspects of it, for example, the type or need for existence of that property. To do this, in my opinion the best solution is directly using TypeScript, but for obvious reasons sometimes it cannot be done. So in these cases I recommend the use of &lt;em&gt;PropTypes&lt;/em&gt;. Below I add an article where it carefully explains the use of this tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.logrocket.com/validate-react-props-proptypes/" rel="noopener noreferrer"&gt;https://blog.logrocket.com/validate-react-props-proptypes/&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Nested Routes
&lt;/h4&gt;

&lt;p&gt;Understanding how routing works in React is fairly easy. In this sense, I like the fact that &lt;em&gt;React Router&lt;/em&gt; frequently changes the game with the addition of new features in almost every release. Despite its easy understanding, React Router may have dichotomies about &lt;em&gt;nested routes&lt;/em&gt;. I add below a guide on how to handle nested routes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ui.dev/react-router-nested-routes" rel="noopener noreferrer"&gt;https://ui.dev/react-router-nested-routes&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  React with TypeScript
&lt;/h4&gt;

&lt;p&gt;Working with TypeScript rather than JavaScript in a React project means choosing short-term pain and long-term reward. When starting a TypeScript project, you may find it very difficult and time-consuming to establish all the authoring tools. However, as your application grows, you will find that these boilerplates are enormously helpful and speed up and reduce the likelihood of errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.sitepoint.com/react-with-typescript-best-practices/" rel="noopener noreferrer"&gt;https://www.sitepoint.com/react-with-typescript-best-practices/&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  React for Vue developers
&lt;/h4&gt;

&lt;p&gt;I don't believe in choosing between technologies, React or Vue, I do not belong to either team. In the end, they are like different windows of the same house. It is a fact though, that one of my first approaches to the world of frameworks and frontend libraries was with Vue, so my foundation comes from there. So I add below a guide for Vue developers and aspiring React developers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sebastiandedeyne.com/react-for-vue-developers/" rel="noopener noreferrer"&gt;https://sebastiandedeyne.com/react-for-vue-developers/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Entropy of States</title>
      <dc:creator>Daniele Falchetti</dc:creator>
      <pubDate>Sat, 02 Oct 2021 11:21:10 +0000</pubDate>
      <link>https://dev.to/falcosan/the-entropy-of-states-5gbi</link>
      <guid>https://dev.to/falcosan/the-entropy-of-states-5gbi</guid>
      <description>&lt;h3&gt;
  
  
  Can the entropy change the perspective of our project or even ruin it?
&lt;/h3&gt;




&lt;p&gt;Those who program know what it means to manipulate data, explaining it briefly means to manipulate a certain value through mathematical processes (such as a function for example) to define a second value. If this process is replicated many times, inserted as a set and structured in the best way, then a program will be created. Generally, this is the standard way to program, but sometimes something is missing: the consciousness of entropy.&lt;/p&gt;

&lt;p&gt;Here is an example in temporal sequence:&lt;/p&gt;

&lt;h5&gt;
  
  
  Background:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Dev is a good developer.&lt;/li&gt;
&lt;/ul&gt;



&lt;h5&gt;
  
  
  Process:
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Dev does some brainstorming thinking about the final vision of his project defining all his goals.&lt;/li&gt;
&lt;li&gt;Dev starts programming and becomes aware of what he will need to do in practice to make it all work.&lt;/li&gt;
&lt;li&gt;Dev finishes programming and releases his first version of his application.&lt;/li&gt;
&lt;li&gt;Dev is happy.&lt;/li&gt;
&lt;li&gt;Having done everything right, many people start using Dev's application.&lt;/li&gt;
&lt;li&gt;Dev's work is not finished, he needs to keep on improving by taking advantage of users' feedback and enthusiasm for the success of the project.&lt;/li&gt;
&lt;li&gt;Dev has succeeded, his application becomes super popular and attracts people from other platforms similar to the one created by him (he wins over the competition).&lt;/li&gt;
&lt;li&gt;Dev is an open source lover, his code is public and some contributors start submitting codes to fix or add features (useful, but difficult to manage beyond a certain volume).&lt;/li&gt;
&lt;li&gt;Dev can't control people and their “sometimes” conflicting ideas.&lt;/li&gt;
&lt;li&gt;The social pressure is unsustainable and Dev, influenced by all this, is forced to revise the final vision of his project and replace it with a democratic vision.&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;It’s not necessary to have an opinion about whether to change your plans is right or wrong, I think it's relative. The question is another, with this example, what I would like to share is how important it is to know and control the entropy. As a great developer, Dev has managed to do what we all desire, to achieve our goals. As I described, from a specific point in the process, entropy starts to be relevant, a variable that Dev had not considered. But what is entropy in this area? In the simplest possible way, entropy can be explained as a measure of chaos that remains unchanged or increases over time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzudb43yc3t6mtvta7ox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzudb43yc3t6mtvta7ox.png" alt="Img" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By checking this sketch I ask myself a question: is there a better way to capture the variables Z, S, and X and consequently manage them?&lt;/p&gt;

&lt;p&gt;To arrive to a possible answer, I first thought about answering myself through a smaller context, with fewer variables than those present in Dev's situation. As a great user of the Vue.js framework, I stopped to reflect on the store of this framework, Vuex.&lt;/p&gt;

&lt;p&gt;For those who don't know what I'm talking about, Vuex, Vue's store, is a set of globally defined variables, through which these variables can be changed or simply read.&lt;/p&gt;

&lt;p&gt;It is very easy to manipulate the data with Vuex but it is also risky because such data is accessible from any component/page/plugin... You must have the foresight to manage the various manipulations of the data correctly while maintaining zero entropy. In this case, to manage entropy it is necessary to define in each component a copy of the global data with an internal variable, so all the operations carried out on the new variable will remain in the context in which the latter was defined. This strategy is not always valid, if the modification of global data occurred in the Header component must be listened to by the Footer component, then we do nothing with the internal variable.&lt;/p&gt;



&lt;p&gt;The same concept is summarized in the very definition of the encapsulation principle in object-oriented programming.&lt;/p&gt;



&lt;p&gt;OK .. extrapolating from the Vuex example I more or less achieve to understand that the best way to manage entropy is the abstraction.&lt;/p&gt;

&lt;p&gt;Now how do I apply the concept of abstraction to Dev's situation?&lt;/p&gt;

&lt;p&gt;Trying to get there with associations: if our Dev is the Vuex store, the contributors are the components/pages/plugins, and the feedback and ideas of the users of the Dev's application are the operations done on the global data, defining the "internal variable" would mean representing this process: creating various beta versions of Dev's application where each of them adopts one of the contributors' ideas.  These parallel versions, formed from dissatisfaction with the original vision of Dev's product, are consequently tested by some beta testers. These beta testers are composed of groups of people selected on the basis of a shared idea of what they think the philosophy of Dev's application should be. In the end, the version that is most popular with the public is chosen as Dev's application release 2.0.&lt;/p&gt;

&lt;p&gt;This representation, while utopian and ignorant of the limits of reality, is my response to the application of abstraction for entropy control.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>entropy</category>
      <category>database</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
