<?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: Max Montesino</title>
    <description>The latest articles on DEV Community by Max Montesino (@m-nt-s-no).</description>
    <link>https://dev.to/m-nt-s-no</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%2F1380231%2F9e3519b0-b746-48af-a85f-3d5c37176e51.png</url>
      <title>DEV Community: Max Montesino</title>
      <link>https://dev.to/m-nt-s-no</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/m-nt-s-no"/>
    <language>en</language>
    <item>
      <title>Automated Google News Search</title>
      <dc:creator>Max Montesino</dc:creator>
      <pubDate>Wed, 10 Sep 2025 15:51:35 +0000</pubDate>
      <link>https://dev.to/m-nt-s-no/automated-google-news-search-3fb8</link>
      <guid>https://dev.to/m-nt-s-no/automated-google-news-search-3fb8</guid>
      <description>&lt;p&gt;Welcome to the first draft of a personal project I've been working on for a few weeks! This project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;performs a search query using a Google Programmable Search Engine (limited to news sites) and a Custom Search JSON API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Formats the results into HTML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Emails results once a day&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;includes automated tests that run whenever new code is added&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This has been a good opportunity to learn more about &lt;strong&gt;continuous integration&lt;/strong&gt; and &lt;strong&gt;test automation&lt;/strong&gt;, while also keeping my &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;API&lt;/strong&gt; skills sharp. Stay tuned, because this is just the first draft; I plan on adding filtering, a database, and maybe even a user interface. &lt;/p&gt;

&lt;p&gt;Check it out and let me know what you think!&lt;br&gt;
&lt;a href="https://github.com/m-nt-s-no/google-news-search" rel="noopener noreferrer"&gt;Google News Search Automation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>python</category>
      <category>api</category>
      <category>ci</category>
    </item>
    <item>
      <title>The @dataclass Decorator In Python</title>
      <dc:creator>Max Montesino</dc:creator>
      <pubDate>Tue, 19 Aug 2025 14:23:23 +0000</pubDate>
      <link>https://dev.to/m-nt-s-no/the-dataclass-decorator-in-python-h26</link>
      <guid>https://dev.to/m-nt-s-no/the-dataclass-decorator-in-python-h26</guid>
      <description>&lt;p&gt;Decorators: when used well, they make code cleaner. But to the uninitiated, they can turn the mysterious into the totally inscrutable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait, What's a decorator?
&lt;/h2&gt;

&lt;p&gt;A decorator is essentially a function that can alter the behavior of another function or class, without altering its code. You can add functionality like timing a function or logging its output, or completely change what the function does.&lt;/p&gt;

&lt;h2&gt;
  
  
  @dataclass
&lt;/h2&gt;

&lt;p&gt;The @dataclass decorator, added before a class meant to hold data, automatically adds common methods for dealing with that data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an &lt;code&gt;__init__()&lt;/code&gt; constructor that accepts parameters to create a class instance&lt;/li&gt;
&lt;li&gt;a &lt;code&gt;__repr__()&lt;/code&gt; method that outputs a string representation of the instance&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;__eq__()&lt;/code&gt; for testing equality of two class instances&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;__hash__&lt;/code&gt; allows the data in your class to serve as dictionary keys--assuming the data is hashable and &lt;code&gt;frozen=True&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;if you set &lt;code&gt;order=True&lt;/code&gt;, you can use comparison methods such as &lt;code&gt;__lt__&lt;/code&gt; (less than), &lt;code&gt;__le__&lt;/code&gt; (less than or equal to), &lt;code&gt;__gt__&lt;/code&gt; (greater than), &lt;code&gt;__ge__&lt;/code&gt; (greater than or equal to)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First you &lt;code&gt;from dataclasses import dataclass&lt;/code&gt; in your code, then you add &lt;code&gt;@dataclass&lt;/code&gt; right before your class definition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@dataclass
class Article:
    title: str
    author: str
    description: str
    url: str
    source: str
    published_at: datetime.now.strftime("%Y-%m-%d %H:%M:%S")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your class now comes with all of the above methods, saving you the headache of writing them all out.&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>datascience</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>wget vs. curl: when to use which?</title>
      <dc:creator>Max Montesino</dc:creator>
      <pubDate>Tue, 05 Aug 2025 19:22:50 +0000</pubDate>
      <link>https://dev.to/m-nt-s-no/wget-vs-curl-when-to-use-which-fn2</link>
      <guid>https://dev.to/m-nt-s-no/wget-vs-curl-when-to-use-which-fn2</guid>
      <description>&lt;p&gt;Both curl and wget are powerful command line tools for obtaining data, but their strengths are slightly different. Let's compare and contrast their features to understand which tool is best for which scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  wget: The Trusty Retriever
&lt;/h2&gt;

&lt;p&gt;wget stands for "web get," and it is primarily used for &lt;strong&gt;non-interactive downloading&lt;/strong&gt; of files from the web. You tell it, "fetch this file from the web," and off it goes, gets it, and comes back with it. Boom, easy peasy. Well, life is rarely that simple, but wget can roll with the punches too! &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You want not just a file, but an entire website, &lt;em&gt;including subdirectories?&lt;/em&gt; wget has got you covered with the &lt;code&gt;-r&lt;/code&gt; flag for recursive downloading!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your internet connection drops while downloading? You can pick right back up with the &lt;code&gt;-c&lt;/code&gt; flag! &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You want to close your terminal while downloading? Tell wget to go to the background once it starts with &lt;code&gt;-b&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;wget is all well and good, but what if you're sending data rather than receiving it, or interacting with an API? That's when you reach for curl.&lt;/p&gt;

&lt;h2&gt;
  
  
  curl: The Master Diplomat
&lt;/h2&gt;

&lt;p&gt;curl stands for "client for URL," and should actually be written "cURL." But it goes by curl on the command line, so we write it that way here (with all due respect). curl's key strength is &lt;strong&gt;handling POST or PUT requests.&lt;/strong&gt; If you need to send JSON, form data, or upload a file, curl is there for you! &lt;/p&gt;

&lt;p&gt;curl can also handle many more protocols than wget. Basically, if you're dealing with anything other than HTTP, HTTPS, or FTP, you want to use curl. Here are some of curl's flags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-X&lt;/code&gt;: specifies the HTTP request method (GET, POST, PUT, DELETE, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-d&lt;/code&gt;: to send data. Combine it with &lt;code&gt;-X&lt;/code&gt; as in this example: &lt;code&gt;curl -X POST -d "param1=value1&amp;amp;param2=value2"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-F&lt;/code&gt;: sends form data! Use &lt;code&gt;-F&lt;/code&gt; before each form field. It can also be used to upload files, with &lt;code&gt;@&lt;/code&gt; before the file path, like so: &lt;code&gt;curl -X POST -F "username=ran.doe" -F "profile_pic=@/path/to/pic.jpg" http://example.com/upload&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;wget&lt;/code&gt; to get data from the web, &lt;code&gt;curl&lt;/code&gt; to upload it!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>data</category>
      <category>dataengineering</category>
    </item>
  </channel>
</rss>
