<?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 Pedro S. Lopez on Medium]]></title>
        <description><![CDATA[Stories by Pedro S. Lopez on Medium]]></description>
        <link>https://medium.com/@pedroslopez?source=rss-dd303674e5c0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y4wsrngXpqr-tWa8N_GVzw@2x.jpeg</url>
            <title>Stories by Pedro S. Lopez on Medium</title>
            <link>https://medium.com/@pedroslopez?source=rss-dd303674e5c0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 12:45:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pedroslopez/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[Using Git Hooks to Support Configuration Management]]></title>
            <link>https://medium.com/@pedroslopez/using-git-hooks-to-support-configuration-management-27c952bbd78f?source=rss-dd303674e5c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/27c952bbd78f</guid>
            <category><![CDATA[git-hooks]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[configuration-management]]></category>
            <dc:creator><![CDATA[Pedro S. Lopez]]></dc:creator>
            <pubDate>Wed, 18 Sep 2019 07:47:29 GMT</pubDate>
            <atom:updated>2020-05-29T03:06:30.899Z</atom:updated>
            <content:encoded><![CDATA[<p>Git Hooks are an interesting and powerful feature built in to any git repository that allow you to run scripts when certain commands are executed. These allow you to “hook in” to the git lifecycle, which makes them quite useful when trying to keep things organized and preventing common errors.</p><p>Teams should always have clearly defined practices and standards in place for their developers to ensure things stay in check. These practices can include things like making sure commit messages reference a tracked issue, preventing pushes to certain branches or making branches follow descriptive naming patterns. While developers should have these things in mind when working, tooling can greatly reduce or even stop the number of errors made.</p><p>Git provides a wide variety of hooks, but the most common are the following:</p><ul><li>pre-commit</li><li>prepare-commit-msg</li><li>commit-msg</li><li>post-commit</li><li>post-checkout</li><li>pre-rebase</li></ul><p>They’re pretty self-explaining. Basically, pre-commit runs right before a commit is made, prepare-commit-msg modifies the commit message, commit-msg checks the commit message, so on so forth. Let’s take a look at some examples of what can be done.</p><h4><strong>Issue </strong>tracking</h4><p>According to software configuration management guidelines, all changes to be made need to be documented and approved via a software change request. These change requests should point to issues tracked in some tool like Jira, GitHub Issues or something similar. As these issues are given unique identifiers, commit messages can be used to track as the change gets implemented in the code base and what branches it’s on. Hooks can be leveraged to support this measure in a variety of ways. The commit-msg hook could be used to verify that a correctly-formatted issue number is included in the message. Furthermore, this number could be checked against a service for validity.</p><h4><strong>Automated Testing</strong></h4><p>When developing using methods like Test Driven Development (TDD), unit tests are absolutely required. Even if a TDD strategy is not being used, all unit tests must pass before committing or pushing to ensure bad code never even gets to the server. You could use hooks to ensure that tests are run and block pushes that introduce changes that don’t pass tests.</p><h4><strong>Small, Frequent Commits</strong></h4><p>There are many reasons why you may want commits to be kept small. Small and frequent commits help code changes be better documented, prevent merge conflicts caused by changing too much at once and allows you to track when bugs were introduced more easily, among others. Hooks can be created to ensure the amount of files or modules touched remains under a certain range.</p><h4>Continuous Deployment</h4><p>When changes are merged to specific branches, hooks can be created that automatically deploy a new version of the software to staging or testing servers, greatly reducing user error by removing that manual deploy step.</p><h4><strong>Limitations</strong></h4><p>As you can see, hooks can be used for a variety of things and their ability to execute any script makes them really flexible and powerful. However, while these hooks can be used to help the user abide by certain practices, they are not a way to enforce them. While there are some hooks that run server-side, all the hooks mentioned here run on the client. This means that you can’t rely on them completely, since they can be altered or completely disregarded by each user should they choose to do so.</p><p>Of course, there can be a policy that requires the team to use these hooks, but you can never trust something client side will be enforced. If these things need to be absolutely followed and can’t be left to the user, checks need to be put in place on the server side as well as in the process of accepting changes that have been made.</p><p>Furthermore, hooks live in the hidden, untracked /.git directory of a local repository, which means making all developers use the hooks isn’t as easy as just cloning the project and getting all the hooks set up. This would require extra configuration, possibly setting up a symlink to a file that <em>is</em> tracked on the repository.</p><p>Most git platforms like GitLab and GitHub provide features that assimilate certain hooks, but run on the server side and do not depend on a client. <a href="https://docs.gitlab.com/ee/ci/pipelines.html">GitLab’s Pipelines</a> and <a href="https://github.com/features/actions">GitHub’s recently introduced Actions</a> allow you to automate your workflow by allowing you to define tracked scripts that get executed on the server-side. On the other hand, using either platform’s built-in issues solution allows you to reference commits and issues and implement things like automatically closing tasks with ease.</p><p>—</p><p>Git Hooks are a powerful feature that can help developers follow guidelines and best practices <em>before</em> (and after) their code is even pushed. It lends itself to some pretty interesting and useful applications, but they should not be relied on to absolutely enforce hard rules and execute critical validations. These should be complemented by CI/CD tools like those included in most git providers in order to fully cover all needs.</p><p>For more information on hooks, including all hooks I did not mention in this article, check out <a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks">https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks</a>.</p><p><em>This article was written as part of a Configuration Management class at INTEC University.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27c952bbd78f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration Management of Third Party Services]]></title>
            <link>https://medium.com/@pedroslopez/configuration-management-of-third-party-services-4e7d2745a041?source=rss-dd303674e5c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e7d2745a041</guid>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Pedro S. Lopez]]></dc:creator>
            <pubDate>Mon, 19 Aug 2019 07:11:29 GMT</pubDate>
            <atom:updated>2020-05-29T03:05:34.467Z</atom:updated>
            <content:encoded><![CDATA[<p>SCM in a cloud-centric world</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*ApAp0_cKHwzS2A9Huz4h-g.jpeg" /><figcaption>Image from <a href="https://www.tcc-technology.com/en/page/49/Cloud%20Services">tcc-technology.com</a></figcaption></figure><p>The core pillar of Configuration Management is to ensure continuity when something goes wrong. One of the measures taken by CM is to keep track of which version is being used of all software or tools the business depends on, enabling you to handle things like breaking changes with relative ease and making builds reproducible.</p><p>When talking in a traditional sense where applications are installed, upgraded, and managed locally and manually, keeping track of which version is being used and deciding when to upgrade is trivial. You have control of everything, so you can make the decision to upgrade a particular piece of software when you’re ready to. But how would this work with cloud services?</p><p>Increasingly, businesses are becoming more and more dependent on cloud services, whether it’s a managed database, log management tool, or even a simple cloud-based text editor. Most of the time, you have no choice with regards to when a particular version of the software you’re dependent on will be deprecated and no longer maintained. So how can we ensure continuity and smooth sailing of our business when the software and its upgrades are out of our control?</p><p>The answer, it turns out, is quite simple: make sure the service’s support policy is clearly defined, stating explicitly their obligations with regards to supporting old versions and how much time they give their customers to upgrade.</p><p>A lot of times we skim through or completely ignore the terms of service of things we use or purchase, but I’d encourage you to actually take some time and read through the fine print before subscribing to something your business may depend on. The good news is that you’ll find that many services have a clause that states the vendor’s responsibilities. If they don’t, however, I’d be very weary of contracting them, and would actually make sure it’s added into the contract before purchasing.</p><p>In our Configuration Management class we recently had a debate on what the appropriate support terms should be, which resulted in a quite interesting conversation. Coincidentally, I’d just received an email earlier that day from MongoDB Atlas (managed database provider) stating that a version will no longer be supported, linking to their <a href="https://www.mongodb.com/support-policy">support policy</a> in the process. In the document, they state the following terms:</p><blockquote>7. MongoDB only provides Support for the Stable Release of the Software. Support is effective immediately upon the release of a new Generally Available (“GA”) Stable Release of the Software, and Support will be in effect for a period of eighteen (18) months after this release date or one year from the release date of the next Update (excluding Maintenance Versions), whichever is longer.</blockquote><p>Basically, you’re covered if you’re using the current version, eighteen months from the release of your version or a year after the next version is released. I actually find this pretty sensible, giving you at least one year to upgrade.</p><p>Let’s also take a look at the Amazon Web Services support policy for managed databases as well, outlined in their <a href="https://aws.amazon.com/rds/faqs/">FAQ</a>:</p><blockquote>We intend to support major version releases (e.g., MySQL 5.6, PostgreSQL 9.6) for at least 3 years after they are initially supported by Amazon RDS.</blockquote><blockquote>We intend to support minor versions (e.g., MySQL 5.6.37, PostgreSQL 9.6.1) for at least 1 year after they are initially supported by Amazon RDS.</blockquote><blockquote>When a minor version of a database engine is deprecated in Amazon RDS, we will provide a three (3) month period after the announcement before beginning automatic upgrades.</blockquote><blockquote>When a major version of database engine is deprecated in Amazon RDS, we will provide a minimum six (6) month period after the announcement of a deprecation for you to initiate an upgrade to a supported major version.</blockquote><p>This time a little more detailed, differentiating between major and minor versions, it’s still pretty similar to the MongoDB Atlas terms, giving this crucial information:</p><ul><li>Defined support period per release</li><li>Defined support period after the next version is released or after the version is deprecated</li></ul><p>In general, when choosing a cloud provider make sure the points above are clearly stated in the agreement and that the period outlined is long enough for your team to upgrade to the latest version.</p><p>You’ll notice that there’s still no way to stop the update from happening or delaying it indefinitely. The truth of the matter is that it costs money for these providers to keep maintaining old versions of software for a declining customer base. It’s just something you don’t have control of when you don’t manage the software, which is why having sensible upgrade deadlines is so important.</p><p>Some platforms may also provide additional support for deprecated versions by paying an extra “Extended Support” fee, which I’ve seen specifically with <a href="https://www.ionos.com/help/hosting/troubleshooting-for-php/11-php-extended-support/">1and1 Ionos</a> when they deprecated certain PHP versions, but even then there’s always a risk that the extended support will end at one point regardless.</p><p>So what’s the ideal upgrade period these cloud providers should give you? It depends. Some types of software are more difficult to replace than others, and your team or work force isn’t the same as mine. It’s something that should be evaluated on a case-by-case basis, taking into account how dependent on the particular software you are and how easy it would be to upgrade everything it depends on. Of course, you don’t know how big the breaking change will be, but as they say “plan for the worst, hope for the best”.</p><p>I’d say both support policies outlined in this article are great places to start.</p><p>—</p><p><em>*Note: The Amazon RDS and MongoDB Atlas terms are as of 19 august 2019, and may be subject to change at any time. Please check with the providers for updated terms.</em></p><p><em>This article was written as part of a Configuration Management class at INTEC University.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e7d2745a041" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Web Scraping to Solve Problems and Create Value]]></title>
            <link>https://medium.com/@pedroslopez/using-web-scraping-to-solve-problems-and-create-value-843763bfbae5?source=rss-dd303674e5c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/843763bfbae5</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[web-scraping]]></category>
            <dc:creator><![CDATA[Pedro S. Lopez]]></dc:creator>
            <pubDate>Sat, 19 May 2018 18:16:01 GMT</pubDate>
            <atom:updated>2018-05-19T18:16:01.013Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*fhf7OhmyYTEmJYsvd6OGxg.jpeg" /></figure><p>This past year I’ve used web scraping as a tool in different software projects, and have really loved the possibilities it brings to the table — So much so that I’ve had the chance to develop products that revolve around it, using it as a main source of value. In this article, I’ll talk a bit about my experience and how you can leverage web scraping to add value to your projects.</p><p>For the uninitiated, <em>web scraping</em> is basically how you can analyze a web page’s source code to retrieve some data of interest. There’s a way to do it in practically every language, and there are nice tools and libraries available that make this process really easy. I won’t go into the technical details of how to do this because there’s a lot of resources out there for the different languages you may be interested in learning about, but a simple google search for <em>“web scraping in X language”</em> should suffice.</p><h4>A brief introduction</h4><p>Let’s say you want to display conversion rates for different currencies in your website, and no public API exists that you can use to get these rates. You <em>could</em> go to your local bank’s site, look at the rates they’re buying or selling for and then update your database or website accordingly, but let’s be honest… Ain’t nobody got time for that. Furthermore, you’d have to do this every morning to ensure that the rates for the day are correct.</p><p>Obviously, there’s a better way. Web scraping allows you to make a program that scans that website for changes and automatically updates your database with the relevant information.</p><h4><strong>Practical example: Gas Prices app</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*iyLkXD0lsO5qi8RJs2GqJA.png" /><figcaption>Finished gas prices app</figcaption></figure><p>In my country, the prices for different fuel types are released by the government every Friday to be applied the following week. I saw myself having to search for the website every Friday morning to check if the prices were going up or down, so I decided I’d make it easier on myself by making <a href="https://github.com/pedroslopez/PreciosCombustiblesRD">an app</a> that would <a href="https://github.com/pedroslopez/Combustibles-Notification-Server">notify me</a> when the prices changed, and I could easily check if they went up or down.</p><p>This is a pretty simple example of a way you can use web scraping to solve a problem. I need a way to get the current and previous prices to display them in the app and constantly check them to send notifications if they’ve changed. To achieve this, I simply set up a script to run every hour on a server to handle the notifications, and implemented scraping on the client app as well to load the latest information when the user opens the app.</p><p>All we’re doing here is practically relaying the information from the website directly to our app and notification server. Nothing too interesting, but we can start to see how having web scraping as a tool in our arsenal could be valuable to develop new ideas.</p><h4>Generating value</h4><p>Web scraping is really powerful when rather than using the scraped data outright, you use it to make something that wasn’t possible before.</p><p>In my university, lots of students use empty classrooms as a quiet place to study and do homework since the library fills up pretty quickly. However, to see which rooms aren’t holding classes at the moment, the student needs to go room by room, building by building until they find a suitable room. We identified a need for an app that could easily show you which rooms are available for use. Right away, I thought of web scraping as a way to get the data we needed.</p><p>The university publishes a list of classes containing the schedule for different sections, along with the room and building they’re in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEDYTq5FCnJWynmlBqCnTQ.png" /><figcaption>Example of the list published by the university</figcaption></figure><p>To get available rooms, all we had to do was make a program that scrapes this page and then use this data to figure out when a particular room was empty. I could explain more about how this was done, but I think you get the idea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*2A6dRS5wNr1mm-cpBuvY7g.png" /><figcaption>Hive, the available room finder app</figcaption></figure><p>Since we had information about all the classes in a particular room, we could also display a schedule for any given room, which was something you could see posted on each room’s door, but you couldn’t see online or anywhere else.</p><p>This is a case where we were able to use scraped data to create an entirely new product that’s not a substitute of the scraped one, but rather something that gives you extremely valuable information that you couldn’t get any other way.</p><p>It’s still not a very complex use case, but you can easily see how powerful this tool can be when you use it to make things that weren’t possible before.</p><h4>Scraping as an API alternative</h4><p>Nine times out of ten, if something has an API available you’ll want to use it over making a scraper. However, scraping is really useful as a way to programatically access data provided by other services when they <em>don’t</em> have a public API available.</p><p>I’ll be writing a post soon about the legal gray-area web scraping is in, as well as some experience I’ve had dealing with the “scraped” party not wanting to be scraped, so stay tuned for that.</p><p>Thanks for reading, and if anything I just wanted to introduce the concept of web scraping and tried to get you to think in ways that you can leverage this to make new things. Would love to know your thoughts in the comments below! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=843763bfbae5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>