<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Maggio on Medium]]></title>
        <description><![CDATA[Stories by Michael Maggio on Medium]]></description>
        <link>https://medium.com/@mmaggio89?source=rss-6d84a52bbac4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*h7wgDWV54QvyIVQ7.</url>
            <title>Stories by Michael Maggio on Medium</title>
            <link>https://medium.com/@mmaggio89?source=rss-6d84a52bbac4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:20:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mmaggio89/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Last Week In Programming, A Month Ago]]></title>
            <link>https://medium.com/@mmaggio89/last-week-in-programming-a-month-ago-10e72c32ee96?source=rss-6d84a52bbac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/10e72c32ee96</guid>
            <dc:creator><![CDATA[Michael Maggio]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 16:10:19 GMT</pubDate>
            <atom:updated>2023-06-26T16:14:39.691Z</atom:updated>
            <content:encoded><![CDATA[<p>Since publishing my first post (10 days ago at the time of beginning this draft. Still working on the weekly rhythm), this is what I’ve worked on:</p><ul><li>I continued tweaking my homebrewed Pomodoro timer (The project for Day 28 of Angela Yu’s <em>100 Days of Code</em> python course).</li><li>During a refactor in which I attempted to remove the need to use the global keyword in order to access global variables in my functions by moving toward an object oriented design, I wound up breaking the app in several ways. Timers stopped indefinitely at 01 seconds.</li></ul><p><strong>What remains to be done:</strong></p><ol><li>While I successfuly removed the need to use and modify global variables in my functions, the code is still a mess. More can be done to tidy it up.</li><li>I need to get the timer to display 00:00 instead of switching over after 00:01.</li></ol><p><strong>What remains to be done:</strong></p><ul><li>I suffered the embarrassing experience of sharing a github repo that still has my personal email in it. Since then, any time a project requires me to enter my email or other sensitive personal information, I keep it in a separate CSV file, which I turn into a pandas dataframe and then extract the relevant information from the dataframe. This way, as long as I don’t accidentally commit the CSV file, the source doesn’t contain any personal data.</li><li>I began the Day 34 project, which builds upon a quiz app we made for Day 17. This time, instead of hardcoding the questions in, the questions are pulled from the open-trivia API. So far I have managed to get the request working, and started the UI.</li></ul><p><strong>What remains to be done:</strong></p><pre>import re<br>def number_format(n):<br>   # Cast the number to a string<br>   number_string = str(n)<br>   <br> # Was n negative? If so, remove the sign temporarily so it doesn’t throw off the counting of 3&#39;s<br>   if n &lt; 0:<br>     number_string = number_string.replace(“-”,””)<br>   <br>   # If the len of the unsigned integer is not divisible by 3, we store the first 1–2 digits to be<br>   # added back at the end<br>   first_characters = number_string[:(len(number_string)%3)]<br>   <br>   # Reverse the number string, since the grouping of 3 digits starts from the right<br>   reversed_number_string = number_string[::-1]<br>   <br>   # Use regex to find the 3-digit groups<br>   pattern = re.compile(r”[0–9]{3}”)<br>   <br>   # Create an empty list, to which we will add our three digit groups with the commas added<br>   with_commas = []<br>   <br>   # Get a list of the matches found<br>   match_list = pattern.findall(reversed_number_string)<br>   <br>   # Add a comma to each match, then add the new string to with_commas<br>   for m in match_list:<br>     with_commas.append(m+”,”)<br>   <br>   # Create a string from the contents of with_commas and reverse it back to its original sequence<br>   last_characters = “”.join(with_commas)[::-1]<br>   <br>   # Add the characters we stored in the beginning to the string with commas<br>   result = first_characters + last_characters<br>   <br>   # remove trailing commas if necessary<br>   result = result.strip(“,”)<br>   <br>   # If we removed a sign, put it back:<br>   if n&lt;0:<br>   result = “-” + result<br>   return result.strip(“,”)```</pre><p>There is ample opportunity to simplify this without even resorting to the concise f-string technique. There is no need to remove the sign, if I reconsider what I strip and when. The final strip() call is completely unnecessary. I don’t need to break the number up into first_characters and last_characters. Clever use of strip() will also make that step unnecessary. I was onto something with using %3, but failed to explore that solution space deeply enough.</p><p>But despite this flaws, I am happy with the results of my labor. I got to practice a little regex, as well as breaking a problem down into smaller problems. Exposing the hidden complexity of something that seems so trivial on first glance was very satisfying.</p><p>There is not much else to report now. Hopefully I will find some time tonight to continue building out the new version of my quiz app. This draft was started on 5/18/23. Perhaps I will have it published before June.</p><p>Well, this file sat on my hard drive unopened for over a month, so I’m simply publishing it as is. Maybe next week h I will tell you about the project I am working on now, that scrapes the billboard top 100 chart for a given day, then makes a spotify playlist with the scraped data.</p><p><em>Originally published at </em><a href="https://gist.github.com/Taky0nDon/9ea1da635567294792ae4ae9f3f2aa5f"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10e72c32ee96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Journey Begins…]]></title>
            <link>https://medium.com/@mmaggio89/a-journey-begins-3c7120fefef2?source=rss-6d84a52bbac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c7120fefef2</guid>
            <category><![CDATA[upskilling]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Michael Maggio]]></dc:creator>
            <pubDate>Mon, 08 May 2023 13:02:44 GMT</pubDate>
            <atom:updated>2023-05-08T13:02:44.204Z</atom:updated>
            <content:encoded><![CDATA[<p>I began the first copy of this rough draft in the from seat of a car I hope I can afford the payments on. Putting the pen to paper, I think about my sore feet and the 10,843 steps I’ve taken in the last 6.5 hours. The morning snow turned to rain before I could finish sheltering the for-sale plants from the elements. I like snow, and wish it managed to stay solid a little longer.</p><p>I don’t harbor resentments for the situation in which I presently find myself. No one is out to get me. I only hope to change what I can, and that is why I’m writing this. This is going to be the first entry in the public diary of my effort to better myself, learn new skills, and improve my life.</p><p>More than a decade of being my own worst enemy has left me with a strange optimism. If I can be half as competent as an ally to myself, I feel like there is no telling what I can achieve.</p><p>The skill I am focusing on is the creation of computer code. Before I formally begin the journey and discuss specifics of this endeavor, I feel a compulsion to explain what programming has come to mean to me since I embarked 20 days (at the time of first writing, longer now) ago.</p><p>I am not living my best life right now. I haven’t for a very long time. In fact, I’ve only recently been blessed with the capacity to imaging what a best life might even look like.</p><p>I’m not exactly sure what about programming attracted me in the first place. Maybe growing up in the ’90s, when computers were presented as a panacea for all out analog ailments, had a lot to do with it. I’ve dabbled in it before, but never persisted beyond trivialities. This time I have succeeded in taking it much, much farther than ever before. And the reason I have persevered is clear to me: I found a concrete method of, even if only temporarily, banishing the ennui which has haunted me since my age took on a second digit.</p><p>My first experience with code happened before I became a teenager. At that time, there was much fewer resources available for the aspiring programmer. So it should be no surprise that my attempt to learn C++ was short lived. I managed to make my first Hello, World! program, which I then modified to display a fictitious error message. I successfully convinced my mother I had broken our computer. It was not hard to make her think this, because I had managed to cause issues as I explored the machine via trial and error. Today, this memory still brings a smile to my face. It was such a delightfully childish act.</p><p>The second time I dabbled in learning code I was working through an online edition of Elegant JavaScript. One of the exercises was to write a program to calculate x^y, without using pow(). My solution presented plenty of constraints: y had to be a positive integer, and x had constraints I can’t recall. I think. Honestly it was so long ago the specifics of my final algorithm have dissolved in the sands of time. But there is one thing about that experience has crystallized in my mind, and from which I continue to draw strength: I really liked figuring things out, building things, and making them work.</p><p>I set out attempting to come up with a solution, recklessly scribbling pen on paper. I puzzled out the steps necessary to calculate the (positive integer) power of another number. Once I had accomplished that, I began a new struggle: to express those findings in JavaScript. I had a revelation that day, for the struggle was not in vain. before long I had a primitive HTML page with forms for the user to enter their own x and y, and be shown the result.</p><p>It felt <em>very</em> good. What was this strange feeling? Contentment? I was proud of myself? This was a sensation I rarely had the opportunity to savor. If I had become aware then of what I know now, I might have spared myself from a great deal of pain. But at least that experience showed me one important thing. Solving problems felt good. It was a precious resource in a life dominated by doubt, a spring of pleasure, something I struggled to find elsewhere.</p><p>And yet, back then, I lacked the wisdom to double down on this newfound source of good feeling. Instead I continued to seek pleasures elsewhere, often in places I shouldn’t have. This lead me to dead end after dead end, and regrets that long outlived whatever pleasure I was able to conjure.</p><p>I am currently working through Angela Yu’s 100 Days of Code course, and supplementing that by working out problems on codewars.com. The extent to which I have continued to devote time to honing this craft has astonished me. I was worried it was just a whim, an interest that would be discarded before I was really able to achieve the proficiency I dream of. But, so far, my enthusiasm hasn’t waned. On good days, it feels like I was made to do this. On bad days, I force myself to keep up the momentum, hoping another good day is around the corner.</p><p>This post has sat in a <a href="https://github.com/Taky0nDon">github</a> repo labeled “roughDraft” for far too long already, so I am going to publish it as is, with the intention of making myself accountable for continuing to add content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c7120fefef2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>