<?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: Antoine</title>
    <description>The latest articles on DEV Community by Antoine (@tomatowizard).</description>
    <link>https://dev.to/tomatowizard</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%2F736399%2F0c5d2c98-3d37-4916-a327-b307d63295bc.gif</url>
      <title>DEV Community: Antoine</title>
      <link>https://dev.to/tomatowizard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tomatowizard"/>
    <language>en</language>
    <item>
      <title>Hi, I'm back! 👋</title>
      <dc:creator>Antoine</dc:creator>
      <pubDate>Wed, 05 Oct 2022 13:09:00 +0000</pubDate>
      <link>https://dev.to/tomatowizard/hi-im-back-42g3</link>
      <guid>https://dev.to/tomatowizard/hi-im-back-42g3</guid>
      <description>&lt;p&gt;Well... to the ones who read my one and only article at least 👋&lt;/p&gt;




&lt;p&gt;I created my profile when I started studying development in my new&lt;br&gt;
school and when I got hired for my &lt;em&gt;alternance&lt;/em&gt; (kind of&lt;br&gt;
apprenticeship in France). I wanted to write a kind of journal to keep&lt;br&gt;
track of my progress and new journey to this world I was introduced in&lt;br&gt;
and wanted to improve in also. As you can see, I went pretty much&lt;br&gt;
silent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where am I today?
&lt;/h2&gt;

&lt;p&gt;I'm still studying web development and working in that same field. A lot happened and I improved in a lot of aspects (backend, frontend and even some more specific things...). What I've been enjoying the most so far is being able to control pretty much everything I use, from my desktop environnement, to the apps and scripts I could make to have a more &lt;em&gt;flowy&lt;/em&gt; workflow.&lt;/p&gt;

&lt;p&gt;I also started some side projects with a developer friend (ex: a&lt;br&gt;
tournament web/app with some social functionnalities, a note taking app aiming towards user-friendly use without losing on functionnalities etc...).&lt;/p&gt;

&lt;p&gt;So today, in order to publish something I decided to describe some of the projects I've been working on and also talk about things I learned and habits I created. I'll also talk about what inspired me, and creators I've been watching and who had an influence on my&lt;br&gt;
work.&lt;/p&gt;

&lt;h2&gt;
  
  
  October to February
&lt;/h2&gt;

&lt;p&gt;That's when I went silent. Back then I was mainly focusing on studies, I also got a part time job that I would do on sunday mornings in a bakery. I went through the school projects without much problems and started to plan more before writing any code (planning the database, thinking about the project architecture etc..). Also back then in my company I was handed the development of a notification system on our new project (first started with a typescript/Vue stack, and then had to communicate with another php/Angularjs project that we had to connect to that system). That was the biggest project I've ever done yet.&lt;/p&gt;

&lt;p&gt;I also started to read and watch content about development more than I used to. Obviously as a french person I was already watching &lt;a href="https://www.youtube.com/c/grafikart"&gt;Graphikart's&lt;/a&gt; videos. I discovered &lt;a href="https://www.youtube.com/c/devaslife"&gt;craftzdog&lt;/a&gt; and started to fall on the neovim trend around that time too. That's also when I started giving a shot to React, nextjs and some other well known tech for these kind of stacks that I would be using for my side projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  March, finding the real reason why
&lt;/h2&gt;

&lt;p&gt;When I started my journey, whenever I needed to use or interact with a Linux system, I would mainly use a VM or WSL with Ubuntu. That's what I learned in school and what I got familiar with for a few months. But then as for my side projects I started digging more and switched to Arch (Manjaro arm for my RPI4, and Arch with qtile for one of my laptops). I felt more free in some way using Arch, and with my customization addiction, it just felt great.&lt;/p&gt;

&lt;p&gt;One of the first big side project I started was a note taking app using Electron, React and typescript along with remark librairies. As of today, it's still at a project state and in pause because of more advanced other projects.&lt;/p&gt;

&lt;p&gt;I also went through the end of my first year of school and finals&lt;br&gt;
without any problem. The main finished project during that period before summer was the final project for the end of the first year. It was a full functionnal website for a bakery with an admin page letting the allowed people to manage the app's data (users, products etc...).&lt;/p&gt;

&lt;p&gt;After that I reunited with card games and started playing more &lt;em&gt;Magic the Gathering&lt;/em&gt;. Which made me wander around functionnality lacking tournament websites. It made me remember how unpractical it was to go to tournaments for card games, having either to listen to a speaker annoucing the rounds pairing or look at a paper printed where everyone had to go to to know where to go. So a new project started for me: Koma project (named after one of my favorite cards). The idea is to develop a tournament website with social functionnalities such as following users, chatting, commenting events and also collecting data for user statistics&lt;br&gt;
etc... During the time I've been thinking about this project I&lt;br&gt;
recalled one of the lessons I learned from &lt;a href="https://www.youtube.com/c/devaslife"&gt;craftzdog&lt;/a&gt; that really resonated within me. During all this journey up until today I've mainly been developing apps/solutions (as for my side projects at least) that I would be using or be happy that it existed. That became my moto and motivated me to dive into that web tournament app. A friend joined me on it and we are slowly planning on deadlines to keep us motivated and working towards a product launch someday.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm planning to do
&lt;/h2&gt;

&lt;p&gt;As I said, I wanted to publish on my profile at a regular pace at first, doing some sort of log of my life as a new developer. I still want to do that but without putting pressure on me with a regular publishing schedule. Instead I want this to remain fun while still acting as a log of my activities and progress. Of course I'll also use it to post about progress of my different projects and Koma in particular for the moment (more detailed illustrated articles will come).&lt;br&gt;
I hope that you will be a lot to join in reading my logs and I'll be happy to see your reactions throughout all that I will publish in the future. Also don't hesitate to ask me any questions or submit ideas of things you would like me to talk about (tech or life as a junior developer related).&lt;/p&gt;

&lt;p&gt;Thank you for reading me and bearing with my french english 😊&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>life</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My Dev's Life Story #1 (Part 1) | My introduction to code</title>
      <dc:creator>Antoine</dc:creator>
      <pubDate>Sun, 31 Oct 2021 19:14:08 +0000</pubDate>
      <link>https://dev.to/tomatowizard/my-devs-life-story-1-part-1-my-introduction-to-code-gf7</link>
      <guid>https://dev.to/tomatowizard/my-devs-life-story-1-part-1-my-introduction-to-code-gf7</guid>
      <description>&lt;p&gt;Hi bonjour 👋&lt;/p&gt;

&lt;p&gt;Last week I was introducing myself briefly and explaining the concept of my idea for this blog. Today is the first episode! (&lt;em&gt;I'm so excited!&lt;/em&gt;). In this episode I'll tell you about my first lines of code and my long research for an apprenticeship. This episode will go over six months and will be divided into three chapters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;#1.1 | My introduction to code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;#1.2 | The choice&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;#1.3 | Looking for a company&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every post will be released on sundays from now on. I hope y'all have a fun time reading 😉&lt;/p&gt;

&lt;h1&gt;
  
  
  My introduction to code
&lt;/h1&gt;

&lt;p&gt;As you may have read in my &lt;a href="https://dev.to/tomatowizard/little-introduction-2909"&gt;Little introduction&lt;/a&gt;, code and devs were always around me even before I was born. My parents work in this field and as far as I remember my dad wanted everybody to run their PC on a linux dist (the one he was using back then was ArchLinux). But my first lines of code were written when I was 22 years old (at the time I'm writing this I'm 23 and going toward my 24th birthday). I remember my younger sister coming back from highschool with a coding exercise her teacher gave her to do on python. I was kinda jealous, I never had classes that introduced me to code. Though I remember coding on my TI 84 Plus in 2013, I never took that hobby seriously until I started stealing my sister's exercises sheets and tried solving every problem on python.&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="c1"&gt;# Example of problems that were given on my sister's papers.
&lt;/span&gt;
&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter the height of the rectange: "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter the width of the rectangle: "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;surface&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;surface&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The surface is equal to 100m²"&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;surface&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The surface is bigger than 100m²"&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;surface&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The surface is smaller than 100m²"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These exercises piqued my interest and I went to look deeper into them. My step-dad then challenged me on the well-known &lt;em&gt;Fizz-Buzz&lt;/em&gt; problem, telling me he used to give it during interviews just to test briefly the logic of the candidates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick reminder of the Fizz-Buzz challenge and the solution I wrote:
&lt;/h3&gt;

&lt;p&gt;Print integers 1 to N, but print “Fizz” if an integer is divisible by 3, “Buzz” if an integer is divisible by 5, and “FizzBuzz” if an integer is divisible by both 3 and 5.&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;fizzbuzz&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;fizzbuzz&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;fizzbuzz&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"fizzbuzz"&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="s"&gt;', '&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;fizzbuzz&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"fizz"&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="s"&gt;', '&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;fizzbuzz&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"buzz"&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="s"&gt;', '&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fizzbuzz&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="s"&gt;', '&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quick note: Nowadays we could use the new addition of case in python right ?&lt;/p&gt;

&lt;p&gt;This leaded me to search for more and learn more while I was still studying philosophy and struggling knowing what I would do after graduating. But I needed a more challenging problem.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The first project
&lt;/h2&gt;

&lt;p&gt;Something that got confirmed the more I started getting involved into coding was that building something that had a use also for other people was a really big motivation for me. Back then I was really involved in a card game community (mix of &lt;em&gt;Yu-Gi-Oh!&lt;/em&gt; and &lt;em&gt;Magic The Gathering&lt;/em&gt;). We had a community discord where players would come and join groups to enjoy a moment together and play games. That's when I wanted to try and build a bot with useful command related to card game. I didn't know yet how to host nor use a database so I wanted to do something simpler with still some interactions for the people using it. Giving that I already experienced python, I decided to use this language to build this project with the library &lt;a href="https://discordpy.readthedocs.io/en/stable/"&gt;discord.py&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In paralell of learning how to use this library and build the bot, I also was coding in advance the functions that I wanted to integrate to the project. Like a probability calculator. Here you might say 'That's a good idea, seems not that hard to do!', and you would be right if only I wasn't a literature and art student 🎥&lt;/p&gt;

&lt;p&gt;Welcome to the world of &lt;em&gt;STA-TIS-TICS&lt;/em&gt;! Before I start on this part, I don't want to be too long on this as I might say some wrong things, so it's more about the progression of my mindset and the approach I take toward the final function and the rendered output. The reason why I'm explaining this in detail is because it was the main function/attraction of the bot I was building, the rest was more &lt;em&gt;gadget-like&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Firstly, let's eliminate the bleeding, here is the first version of my calculator:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;prob_draw&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;deck_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of cards in the deck : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;n_draw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of card drawn (sample) : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;n_copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of the target card (population) : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;prob_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'Deck size : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;deck_size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; cards'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'Number of card drawn : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n_copy&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; target(s) in the deck'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;draw&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n_copy&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;deck_size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prob_result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;prob_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_copy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;deck_size&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;prob_result&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"For &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;draw&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; copy(ies) in starting hand : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prob_result&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;%"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;n_copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_copy&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;deck_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deck_size&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;n_draw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n_copy&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;break&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;deck_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;break&lt;/span&gt;

&lt;span class="n"&gt;prob_draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well... it looks okay right? Sure Antoine, sure.&lt;/p&gt;

&lt;p&gt;The problem of this solution is that already the first result is not completely accurate. AND! Bigger the population is, bigger the sample is and farther the result will be from accurate probability. So now I'm facing a problem, I don't know accurately the probablity of drawing my &lt;em&gt;Sol ring&lt;/em&gt; in my commander deck (which is 7.07% chance in a 7 cards starting hand). I started to read about probability in card games (shoutout to all the crazy good guys that play poker and have to do this in their head all the time). So I discovered the existence of &lt;em&gt;hypergeometric probability&lt;/em&gt; (I'm not really exactly sure it's really called that way but that &lt;a href="https://stattrek.com/online-calculator/hypergeometric.aspx"&gt;site&lt;/a&gt;/or &lt;a href="https://aetherhub.com/Apps/HyperGeometric"&gt;this one&lt;/a&gt; were using this term). Even if I could use these sites to do the work for me, where is the fun in not doing something I don't know how to do ?&lt;/p&gt;

&lt;p&gt;Thanks to the &lt;a href="https://docs.scipy.org/doc/scipy/reference/stats.html"&gt;scipy.stats&lt;/a&gt; library, I saved myself the trouble of writing to much code I wouldn't be able to go over again later. So now, I have the library to write my solution and integrate my function finally accurate and reliable for bigger numbers.&lt;/p&gt;

&lt;p&gt;Here is the final function I wrote for this homemade card probability calculator (note that at this moment I'm still in my first month of learning how to code):&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;from&lt;/span&gt; &lt;span class="nn"&gt;scipy.stats&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hypergeom&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_prob&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;deck_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of cards in the deck : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;n_draw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of card drawn (sample) : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;n_copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Number of the target card (population) : "&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;min_success&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deck_size&lt;/span&gt;
    &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_copy&lt;/span&gt;
    &lt;span class="n"&gt;N&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_draw&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;min_success&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;pval&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hypergeom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&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="n"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'For &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;min_success&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; copy(ies) in starting hand : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pval&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;%'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;n_copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_copy&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;deck_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deck_size&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="n"&gt;n_draw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_draw&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n_copy&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;break&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n_draw&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;break&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;deck_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;break&lt;/span&gt;

&lt;span class="n"&gt;test_prob&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that my main function for the bot was ready, I was going to start building it and testing it before finally showing it to my friends to integrate it in their server.&lt;/p&gt;

&lt;p&gt;This project taught me a lot of things, production environment, secret variables (damn, I once uploaded an API key directly on my public GitHub repo...) and also creating local imports of my own functions (like a regex text cleaner).&lt;/p&gt;

&lt;p&gt;To spare you the long reading of how to build a discord bot I'm linking you a &lt;a href="https://github.com/lbAntoine/MDL-1.1"&gt;public repo&lt;/a&gt; I made and where I uploaded the source code of this project if you're really curious about it, cause I mainly want to focus on what this experience taught me and how it will bring me to the following chapters.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take away
&lt;/h2&gt;

&lt;p&gt;It's actually quite fun to look back at these lines of code as I'm writing this post. It seems like an eternity, while it's only been barely more than six months. It was my first encounter with the developer's field and also my first &lt;em&gt;big application&lt;/em&gt;. I take away a lot of things from it, positive and self criticism (not in a negative meaning).&lt;/p&gt;

&lt;p&gt;As a positive take away, I'm happy I started this journey on python cause I think it's one of the easiest language to get into (the learning curve gets harder though). I also loved to have to search for various subject not directly related to code and have to translate them into code in order for my functions to work. I, as a very curious person about a lot of subjects, had a lot of fun while building this bot and also a lot of frustrations when it came to do harder things that I didn't know how to do back then, and also how hard it is sometimes to promote a solution to a public that maybe don't know how much work you put into it.&lt;/p&gt;

&lt;p&gt;Like I said, it was hard to make people use this bot, mostly cause they were used to go on old websites that were doing the same thing for a long time, and with time the bot came to an end as I decided to stop hosting it. It was probably not attractive enough to be used the way it was intended initially, so I see it more as a token of my journey that continues today. Also taking a look at it I would have done it differently, mostly in term of architecture. But I can not take away the fun memories I made and also the knowledge I gained during all this time.&lt;/p&gt;

&lt;p&gt;After this period I took a brief break away from coding as my finals were approaching and I had to get back into reading &lt;em&gt;Plato&lt;/em&gt;. As soon as I could I wanted to learn new things, start a new project as I was already looking for schools, preparing my next year in advance. I took the choice that led me here today... I want to become a developer!&lt;/p&gt;

&lt;p&gt;And this led me to a choice...&lt;/p&gt;

&lt;p&gt;Part 2: My Dev's Life Story #1.2 The choice coming on sunday november 7th.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>devjournal</category>
      <category>story</category>
    </item>
    <item>
      <title>Little introduction</title>
      <dc:creator>Antoine</dc:creator>
      <pubDate>Mon, 25 Oct 2021 20:41:13 +0000</pubDate>
      <link>https://dev.to/tomatowizard/little-introduction-2909</link>
      <guid>https://dev.to/tomatowizard/little-introduction-2909</guid>
      <description>&lt;h2&gt;
  
  
  My name is Antoine
&lt;/h2&gt;

&lt;p&gt;Hi bonjour 👋&lt;br&gt;
I'm Antoine, a french junior developer. I'm 23 years old and I hoped on the developer train this year in 2021. I'm currently working as a web developer in a french company that creates solutions for managing temporary worker (I'm also studying at the same time -It's a french study system called &lt;em&gt;alternance&lt;/em&gt;-).&lt;br&gt;
&lt;br&gt;A little bit about me... I studied literature and arts in high-school. After graduation I studied cinema as a major but felt it was more a passion than a place I wanted to live for. So after drifting by 2 years of philosophy in university, I decided to take on the journey of becoming a developer. What motivated me was that I've always lived in this field (both my parents are developers) and I also always had an interest and curiosity for solving problems, creating my own solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The point of my dev.to profile
&lt;/h2&gt;

&lt;p&gt;I decided recently to write down my journey for me to remember and be able to see where I'm coming from. I also figured that it could be interesting to some people, as an inspiration or just for the pleasure to read like a story.&lt;br&gt;
&lt;br&gt;To save you the trouble of my really early beginnings (discovering programming through python) I will start telling my story from when I started looking for a job as someone without any experience and then quickly follow up with my first days at the company. Then the posts will logically follow the course of time I'm living.&lt;br&gt;
&lt;br&gt;Lastly, I want to mention that in future posts, there might be some code and also mistakes in it. Even if correction is welcome (please it is), I consider it as a part of my journey I'll be telling. I hope I won't make your eyes bleed too much 😶&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you can reach me
&lt;/h2&gt;

&lt;p&gt;Obviously you can reach me directly here on my &lt;a href="https://dev.to/tomatowizard"&gt;dev.to&lt;/a&gt;, either by commenting or by DMs. But you can also find me on:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/lbAntoine"&gt;GitHub - lbAntoine&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/antoine-le-bras/"&gt;LinkedIn - Antoine Le Bras&lt;/a&gt;&lt;br&gt;
&lt;br&gt;I hope some of you can find this journey interesting and worth the follow~ thank you for reading me and see you next post 😉&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>story</category>
    </item>
  </channel>
</rss>
