<?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 introdev.io on Medium]]></title>
        <description><![CDATA[Stories by introdev.io on Medium]]></description>
        <link>https://medium.com/@introdevio?source=rss-e3d53d86280b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*YKAxwDNE0E4agTaAkNEKJQ.png</url>
            <title>Stories by introdev.io on Medium</title>
            <link>https://medium.com/@introdevio?source=rss-e3d53d86280b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:59:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@introdevio/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[Implementing the Strategy Pattern With Spring]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/javarevisited/implementing-the-strategy-pattern-with-spring-de2bad3abc2f?source=rss-e3d53d86280b------2"><img src="https://cdn-images-1.medium.com/max/1920/1*eGgeDSIYyez8vBaA9oLorA.jpeg" width="1920"></a></p><p class="medium-feed-snippet">Using Spring&#x2019;s Magic to implement the Strategy Pattern in your API</p><p class="medium-feed-link"><a href="https://medium.com/javarevisited/implementing-the-strategy-pattern-with-spring-de2bad3abc2f?source=rss-e3d53d86280b------2">Continue reading on Javarevisited »</a></p></div>]]></description>
            <link>https://medium.com/javarevisited/implementing-the-strategy-pattern-with-spring-de2bad3abc2f?source=rss-e3d53d86280b------2</link>
            <guid isPermaLink="false">https://medium.com/p/de2bad3abc2f</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[introdev.io]]></dc:creator>
            <pubDate>Sun, 29 Mar 2020 06:07:41 GMT</pubDate>
            <atom:updated>2020-03-29T15:14:33.867Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The 5 most useful Java 8 Stream functions to improve your code]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/javarevisited/the-5-most-useful-java-8-stream-functions-to-improve-your-code-4abf11da7d1d?source=rss-e3d53d86280b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*XK3sn3ogktYhh1V7W4nT7A.jpeg" width="5727"></a></p><p class="medium-feed-snippet">I have been programming with Java 8 since it was released in 2014. I also pride myself with being proficient in Java, and have Java 8 in&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/javarevisited/the-5-most-useful-java-8-stream-functions-to-improve-your-code-4abf11da7d1d?source=rss-e3d53d86280b------2">Continue reading on Javarevisited »</a></p></div>]]></description>
            <link>https://medium.com/javarevisited/the-5-most-useful-java-8-stream-functions-to-improve-your-code-4abf11da7d1d?source=rss-e3d53d86280b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4abf11da7d1d</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[introdev.io]]></dc:creator>
            <pubDate>Wed, 11 Mar 2020 00:15:08 GMT</pubDate>
            <atom:updated>2020-03-20T03:11:46.611Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[OOP Good Practices: Coding to the interface]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/javarevisited/oop-good-practices-coding-to-the-interface-baea84fd60d3?source=rss-e3d53d86280b------2"><img src="https://cdn-images-1.medium.com/max/1920/1*YeOjk5wvk_MKwhQZYlyaTw.jpeg" width="1920"></a></p><p class="medium-feed-snippet">&#x201C;Coding to the interface,&#x201D; &#x201C;coding against the interface,&#x201D; &#x201C;interface-based programming&#x201D; and more&#x2026; are just a few names given to a, in my&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/javarevisited/oop-good-practices-coding-to-the-interface-baea84fd60d3?source=rss-e3d53d86280b------2">Continue reading on Javarevisited »</a></p></div>]]></description>
            <link>https://medium.com/javarevisited/oop-good-practices-coding-to-the-interface-baea84fd60d3?source=rss-e3d53d86280b------2</link>
            <guid isPermaLink="false">https://medium.com/p/baea84fd60d3</guid>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[oop]]></category>
            <dc:creator><![CDATA[introdev.io]]></dc:creator>
            <pubDate>Thu, 12 Oct 2017 03:17:18 GMT</pubDate>
            <atom:updated>2022-12-16T11:03:07.215Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Using a containerized database for testing Spring Boot applications.]]></title>
            <link>https://introdevio.medium.com/using-a-containerized-database-for-testing-spring-boot-applications-56ad38d39e15?source=rss-e3d53d86280b------2</link>
            <guid isPermaLink="false">https://medium.com/p/56ad38d39e15</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[introdev.io]]></dc:creator>
            <pubDate>Thu, 14 Sep 2017 21:03:51 GMT</pubDate>
            <atom:updated>2020-01-20T07:25:08.675Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*7a8Qffxkg7WuePBZUebYSw.png" /><figcaption>Credits: <a href="https://www.docker.com/brand-guidelines">Docker Website</a></figcaption></figure><p>In this post, I will explain how to create and use a Mysql docker image for testing Spring Boot Applications.</p><h3><strong>Why not an in-memory database?</strong></h3><p>If you have developed applications using Spring Boot, you might relate to using in-memory databases for testing; mostly because it is a quick and easy way to have the same testing environment (at least the DBMS) on different machines and have it always initialized to a clean state. However, as in-memory databases are not recommended for production environments you should not be using them for testing either. One of the reasons is that you loose the possibility of using platform-specific features that could potentially bring benefits to your project; Therefore, to be able to run tests, one might end up modifying test code to accomplish the features or just by avoiding tests that use them.</p><p>Exceptions are another important factor, after all, we are testing to get as much as possible now and avoid them in production. When using a different database, there is a fair possibility that exceptions are not the same and as features are not completely compatible you might get exceptions on one that you would not get on the other. This makes deployment much difficult as you will likely have to deal with these exceptions on deployment or even worse after your code is in production.</p><h3>Why a Gradle plugin?</h3><p>I have been using docker for a while already, but having to run a container, stop it, remove it, all through a dockerfile just for testing was becoming such a long process that I ended up installing the Mysql server on every machine and just leave it running while using it. The problem? No consistent environment across all my computers (and my team’s) that also made me dependent on installation. Researching on how to automate Docker, I found this fantastic <a href="https://github.com/chrisgahlert/gradle-dcompose-plugin">plugin</a> for Gradle that simplifies creating and deploying Docker containers from your build.gradle.</p><p>On this tutorial, we will use a MySql image to run our database, run tests, clean up and remove the container after finishing running the tests.</p><p>First, let’s begin by setting up the plugin on Gradle:</p><p>There are two ways, using the plugin DSL (Implementation may change in the future as this project is still incubating)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fcc5d162276a36470550b3859c18a827/href">https://medium.com/media/fcc5d162276a36470550b3859c18a827/href</a></iframe><p>on other versions, you can add the plugin using the regular buildscript block and no matter what method you use remember to apply the plugin.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a49e476851a59f8c38c632a19fe00996/href">https://medium.com/media/a49e476851a59f8c38c632a19fe00996/href</a></iframe><p>Let’s begin setting up the database container by creating a block called dcompose. This block is used to configure the docker containers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c166d6939d5e73511b3fd01d3cc08957/href">https://medium.com/media/c166d6939d5e73511b3fd01d3cc08957/href</a></iframe><p>As you can see, we are creating setting the test database container. With the image parameter, we are telling Docker which image the container will run. Next, we set up port bindings for our container, the first section is the host port (the port in which the container will be accessible from on the host machine), and the next section is the port inside the docker container. Now, for the env parameter, we are passing the environment variable with the root password, we can use this env to pass a list of environment variables for our container.</p><p>By adding dependsOn startTestDatabaseContainer, we are telling Gradle that we need the testDatabase Container up and running before running our tests. Note that startTestDatabaseContainer refers to the container previously defined, if you want to change your container’s name just remember to modify this to start&lt;container’s name&gt;Container. And by adding finalizedBy removeTestDatabaseContainer we are telling Gradle to stop and remove the database container after all tests finish running. With the doFirst directive, we are setting some environment variables that we can use in our project. DoFirst will be the first step of the task To Dos.</p><p>With this simple approach we can run our test always under a known initial state and only using resources while the tests are running. In this <a href="https://github.com/sanchezdale/dockergradleplugindemo">repository</a> I set up a very simple example using Spring’s JDBCTemplate.</p><p>P.D: Few things about the test code. First, DriverManagerConnectionFactory should not be used in any production environment; Use DBCP or HikariCP instead. Second, by putting the thread to sleep on line, I’m allowing some initialization time; This is only needed for this test as it is very short and by the time it started to run, the Mysql instance was not always ready to accept connections. Finally, none of this code should be used in any production environment, nor I recommend it to use it not been on a test unless it is a very simple demonstration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56ad38d39e15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Agile perfectly fits my Capstone Project?]]></title>
            <link>https://introdevio.medium.com/why-agile-fit-perfect-my-capstone-project-3a103bf8acb1?source=rss-e3d53d86280b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a103bf8acb1</guid>
            <category><![CDATA[planning]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[introdev.io]]></dc:creator>
            <pubDate>Mon, 04 Sep 2017 01:22:12 GMT</pubDate>
            <atom:updated>2017-09-21T02:36:05.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KyE_XuHmJRR3bMCgMUjpmw.jpeg" /><figcaption>SCRUM Board</figcaption></figure><p>The software industry is probably one of the most changing (if not the most) and constantly evolving industries worldwide. With more technologies being released every month; improvements to existent ones, and new possibilities on hardware, it is hard for a software developer especially students (like me), to keep up with all these changes occurring in the industry at every moment. As a senior student about to graduate, and with various projects as experience even before college, I often feel comfortable in learning new skills or taking part on challenging projects. However, something that has been difficult for me as a developer is embracing a methodology to follow while working on projects.</p><p><strong>Background</strong></p><p>I’m used to a “modified” version of the waterfall model, and by modified, I mean getting rid of much, if not all, the planning phase and start developing right away; Undeniably, college is so fast paced that I tend to think planning is a waste of time, additional to my excitement to see something finished quicker. Nothing is farther from correct; After many projects done without planning, I have come to realize that many stressful situations can be avoided when taking some time to think about the project by planning ahead, as well as a reduction in development and testing time. I remember one of the projects for which I did not do planning at all, it was a timer program, I went through all the phases but planning, on the testing phase everything was “working well” so well that I released the product and gave it to the users. Guess what? A user found out a bug (not even sure if it can be called a bug, is more like a monstrous mutation) in the main feature of my program; The timer had one second more per minute. You could read 1:00, 0:60, 0:59. I could not believe that until they showed me, I was so embarrassed.</p><p>But you might be asking, why planning would probably have avoided that problem? Well, by getting rid of the planning phase, I spent a lot more time in the development phase accommodating new features that came to my mind, learning how to do others that I did not know, fighting with bugs, I forgot about features that were on my mind and were important for the project, among probably many other things that I can’t recall now. I spent so much time developing that my time testing was nothing, my hurry to have it finished was so much that I did not even ask other users to test it. I paid the price.</p><p>For the following projects, I still used the waterfall model, but I realized how planning gave me a high-level vision of projects and assignments that allowed a smoother transition from my mind and paper to code. I had a clear idea of what I wanted to do and how I wanted it to be as well as a list of most important to least important things to implement, which helped me (and others if on a team) to know the right path to follow. It wasn’t until my final project that my team and I were introduced to the Agile movement for software development; a concept that seemed new for us. It took some days to get our head around it and to be able to foresee the benefits it could bring to our project.</p><h4>After Agile</h4><p>The agile movement is focused on the iterative process of developing testing and delivering smaller, independently working pieces that at the end form the final product. In contrast to the more standard approach of working in the final product until it’s released. But why using Agile? I’m not a fan of “one fits all”; there is a reason why you might choose one approach over the other, but for our final project the befits of using Agile apparently outweighed using any sequential methodology.</p><p>I’m so far in love with the agile methodology; it completely satisfied that desire of working on something and see it working very quickly. In the agile methodology, your planning phase looks like one substantial chunk of planning but can be easily scaled down to phases as well (as everything in agile). In our version of Agile, our planning process is like this:</p><ul><li>The first phase is about creating a list of features or functionality that is desired for the final product. It does not matter how long is the list; there is a phase latter to filter out some of these entries.</li><li>On the second step, it’s time to make some predictions. Think about how much time will implementing a feature take you and assign that time frame, it does not need to be extremely precise but neither a prediction based on nothing (you’ll get better, practice makes you a master). A good practice is to make a sub-list of the steps to accomplish the feature, if it seems is getting bigger, try to split the task into multiple parts as no task should be larger than a predetermined amount of time. In our case 2/3 days (with some exceptions).</li><li>On the third phase, prioritize your features by its importance; what needs to be accomplished first? Do some of the features have a dependency on others? If so, those dependencies go first, then your main functions, then start organizing your secondary elements until you have a clear high-level overview of your project.</li><li>Enter this list into the product backlog and start executing!!</li></ul><p>Here comes the beautiful advantage of Agile, it’s a practice that gives you and your team frequent feedback on how your team is doing. During the execution phase, every week we look at the product backlog and pour a list of tasks into the sprint backlog. The sprint backlog holds all the tasks that need to be accomplished during that week, as well as we start to take tasks from that list into a “work in progress” list. That way we know for sure the status of every feature, and every task, if there are problems or if the progress is good and on time. If there are any problems, we can tackle them as a group, and if one of us finish early, we can take the time and help others to accomplish the tasks on time for the benefit of the team. Additionally, we have a pending for review that holds all the tasks that are done and need testing or approval from the team to declare as “complete.” And finally, the “done” list shows the complete tasks; this is called Scrum. Along with the scrum steps, there are stand-up meetings every two days (in our case) in which we talk about the progress of each card. As you can see, the nature of the iterative process is that, if requirements change or problems arise, changes can be made on time to reduce the impact on the project.</p><p>This is just a quick overview of the Agile movement and how beneficial it’s been for my capstone project. There are more topics related to it and good practices that i will be talking about in upcoming posts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a103bf8acb1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>