<?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: Matt McNeive</title>
    <description>The latest articles on DEV Community by Matt McNeive (@mattyice).</description>
    <link>https://dev.to/mattyice</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%2F878310%2Ffc2a4338-9cd0-4061-86c7-4196468f1989.jpeg</url>
      <title>DEV Community: Matt McNeive</title>
      <link>https://dev.to/mattyice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mattyice"/>
    <language>en</language>
    <item>
      <title>Working with Java Database Connectivity</title>
      <dc:creator>Matt McNeive</dc:creator>
      <pubDate>Fri, 01 Jul 2022 21:42:58 +0000</pubDate>
      <link>https://dev.to/mattyice/working-with-java-database-connectivity-2dnm</link>
      <guid>https://dev.to/mattyice/working-with-java-database-connectivity-2dnm</guid>
      <description>&lt;h2&gt;
  
  
  What is JDBC?
&lt;/h2&gt;

&lt;p&gt;Java Database Connectivity (JDBC) is a Java API that is a part of the Java Standard Edition from Oracle. It allows a client to connect with a database and execute queries. These queries are saved into an object meant to be a representation of the table created by the query and easily useable in your Java application. Personally, I don't have much familiarity with other methods for connecting with a relational database in Java but I found JDBC very reliable and easy to use and I would recommend it to any Java developer looking for this functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up a connection
&lt;/h2&gt;

&lt;p&gt;Most of the setup for JDBC is done in the YML file. You only need to a few lines of code to get together everything you'll need to get started querying your database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;database:
   name: SchoolDatabase
   connection: jdbc:sqlserver:path-to-database
   queries:
      students: SELECT * FROM students
      teachers: SELECT * FROM teachers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is a sample of what the settings may look like in a YML file. From here, these settings could be referenced in a config file to be used throughout your application. One important note is that you do not need to use a YML file to establish a JDBC connection, but I have found that managing everything is much easier this way and eliminates any instances of D.R.Y. if you have to change a connection string or query.&lt;/p&gt;

&lt;p&gt;Now we are ready to start executing queries! First I'll just throw the code at you and then talk about what all the different parts mean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {
   Connection conn = DriverManager.getConnection(database.connection, root, password);
   Statement stmt = conn.createStatement();
   ResultSet rs;

   rs = stmt.executeQuery(database.queries.student);
   while ( rs.next() ) {
      String lastName = rs.getString("Lname");
      System.out.println(lastName);
   }
   conn.close();
   } catch (Exception e) {
      System.err.println("Got an exception! ");
      System.err.println(e.getMessage());
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So that's it! That is all it takes to both query a database using JDBC and handle the appropriate exception. But there are a lot of things there that you may have never seen before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connection:&lt;/strong&gt; Connection is pretty self explanatory, it represents the connection to the database that we are using. In the YML file, we created the path to the database, however if there is a root or password associated then those will also have to be included as well. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DriverManager:&lt;/strong&gt; While Connection is meant to represent our connection to the database, the DriverManager is what actually establishes it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statement:&lt;/strong&gt; Now that we have successfully connected to our database, we can use a Statement object to actually run some queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ResultSet:&lt;/strong&gt; We use Statement to run the queries we want and the output comes in the form of a ResultSet. This holds the resulting data in a format similar to a table that we would see in a relational database. We can iterate through every row using &lt;code&gt;rs.next()&lt;/code&gt; and in the line &lt;code&gt;String lastName = rs.getString("Lname");&lt;/code&gt; the string "Lname" would be the column header and the value at that column in the current row would be what gets stored in &lt;code&gt;lastName&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This has been a very brief overview of what is possible with JDBC, but there is much more still to be uncovered. In addition to what I showed, you can also call stored procedures and use a &lt;code&gt;RowMapper&lt;/code&gt; function to determine how certain rows are added to a &lt;code&gt;ResultSet&lt;/code&gt; (similar to a SQL &lt;code&gt;WHERE&lt;/code&gt;). I encourage everyone to do more research into this technology if you think that you may use this in your personal or professional development.&lt;/p&gt;

&lt;p&gt;Happy Coding!!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 3: Adding a second page</title>
      <dc:creator>Matt McNeive</dc:creator>
      <pubDate>Wed, 29 Jun 2022 02:44:06 +0000</pubDate>
      <link>https://dev.to/mattyice/day-3-adding-a-second-page-mm4</link>
      <guid>https://dev.to/mattyice/day-3-adding-a-second-page-mm4</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BIv8GR_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m25ds32uofa1k0krabz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BIv8GR_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4m25ds32uofa1k0krabz.png" alt="Image description" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Shifting some content
&lt;/h2&gt;

&lt;p&gt;Today was mainly about adding some additional content rather than big style changes. My college professors drilled separation of concerns into my head so much that I decided I would break up much of the content that I had on the main page of my site. I started this up by creating an about.html page where I provided some general information about the challenge as a whole, rather than what I specifically would be trying to accomplish. It was a fairly simple change, and my biggest concern was that my css styling would transfer over to a new page seamlessly.&lt;/p&gt;

&lt;p&gt;It actually worked pretty well! I split the css into different files, with a "master" css and more specific ones for each different page. Doing this is so helpful as it keeps the CSS from getting too cluttered as my site continues to get bigger. This is all of the CSS I needed to write to get the new page shown above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.header {
    padding-top: 10px;
}

#main {
    background-color: rgb(38, 50, 91);
    height: 475px;
    width: 80%;
    margin: auto;
    border-radius: 10px;
    color: white;
    padding-top: 50px;
}

#main h2 {
    font-size: 64pt;
    margin-bottom: 120px;
}

li {
    font-size: 32pt;
    margin: 60px;
}

ol {
    width: 60%;
    margin: auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Tomorrow I plan to add some more content to the two pages that I have created thus far. Right now, they are not very big and still look more like powerpoint slides than webpages so I hope to fill them up quite a bit.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 2: Grid in CSS</title>
      <dc:creator>Matt McNeive</dc:creator>
      <pubDate>Mon, 27 Jun 2022 22:39:38 +0000</pubDate>
      <link>https://dev.to/mattyice/day-2-grid-in-css-2k4a</link>
      <guid>https://dev.to/mattyice/day-2-grid-in-css-2k4a</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6Nx_o3v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5wrapzn1sqys36esnxyf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Nx_o3v8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5wrapzn1sqys36esnxyf.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Off the Grid
&lt;/h2&gt;

&lt;p&gt;Today I updated my basic webpage using a CSS grid format. Getting back into grid was not as bad as I would've imagined (perhaps I was thinking of its far scarier cousin flex-box) and I was able to create a simple layout I was happy with. I really like the look of webpages that use very simple colors and layout so that is exactly what I was going for. But there is still a lot that I want to expand on in the coming few days to make it much more visually appealing. &lt;/p&gt;

&lt;p&gt;I also want to start to add some more content to the page. At the moment, it looks more like a powerpoint slide that a site and I am hoping that this is no longer the case after a few more days of contributions. My original thought was that I would spend my time relearning HTML and CSS making several smaller pages, but now I think I would rather expand upon a single site and make something larger that I am really proud of.&lt;/p&gt;

&lt;h2&gt;
  
  
  Today's Contribution
&lt;/h2&gt;

&lt;p&gt;The HTML did not change much from yesterday. The biggest change was restructuring it a little to allow me to easily create the grid I wanted in the CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="grid-container"&amp;gt;
      &amp;lt;div id="grid-header"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;
          &amp;lt;h1&amp;gt;Day 2 of 100&amp;lt;/h1&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;

        &amp;lt;div class="grid-item" id="upper"&amp;gt;
          &amp;lt;p&amp;gt;
            Super excited to be starting my #100DaysOfCode Journey! I hope to
            get a good refresher on my knowledge of HTML and CSS and take a deep
            dive into JavaScript.
          &amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item" id="middle"&amp;gt;
          &amp;lt;p class="list-header"&amp;gt;New things I hope to Learn&amp;lt;/p&amp;gt;
          &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;Base JavaScript&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;NodeJS&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;REST API&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;VueJS&amp;lt;/li&amp;gt;
          &amp;lt;/ul&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item" id="lower"&amp;gt;
            &amp;lt;p&amp;gt;Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sit ad consequuntur architecto, excepturi sequi maxime debitis, distinctio dolorem temporibus doloremque at similique. Illo voluptas odio exercitationem sint! Veritatis impedit cupiditate perspiciatis eum, iste ea nobis nulla enim modi temporibus vitae sapiente, harum saepe nemo pariatur. Eos aliquid enim repellendus perspiciatis!&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The biggest changes today were found in the CSS. I added a bit more styling in terms of color but spent most of my time working on the layout of the grid itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  background-color: white;
  color: white;
  margin: 0;
  height:500px;
  padding: 0;

}

#grid-container {
    display: grid;
    grid-template-columns: 33% 33% 33%;
    height: 300px;
    margin: 0;
    width: auto;
}

.grid-item {
    padding: 75px;
}


#grid-header {
    background-color: rgb(175, 207, 229);
    grid-column: 1/-1;
    text-align: center;
}

h1 {
    font-size: 64pt;
}

#middle {
    background-color: rgb(230, 117, 113);
    padding-top: 10px;
    font-size: 18pt;
    text-align: center;
}

.list-header {
    margin: 20px, 0;
    text-decoration: underline;
    font-size: 20pt;
}

ul {
    margin: 10px;
    list-style: none;
    text-align: left;
}

li {
    margin: 15px 0;

}

#upper {
    background-color: rgb(38, 50, 91);
    font-size: 24pt;
    padding: 7%;
}

#lower {
    background-color: rgb(231, 219, 147);
    font-size: 18pt;
    padding: 7%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Tomorrow I need to first see if there is anyway to clean up the code a bit. I often found myself hastily changing the CSS so I'm sure there are plenty of repeated code or other things that could be removed. After that, I plan to add some more content to the page and continue with the style that I have been using so far.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 1: Back to the Basics</title>
      <dc:creator>Matt McNeive</dc:creator>
      <pubDate>Mon, 27 Jun 2022 01:51:09 +0000</pubDate>
      <link>https://dev.to/mattyice/day-1-back-to-the-basics-4jp4</link>
      <guid>https://dev.to/mattyice/day-1-back-to-the-basics-4jp4</guid>
      <description>&lt;h2&gt;
  
  
  Starting my journey
&lt;/h2&gt;

&lt;p&gt;Today I am so happy to be starting my &lt;code&gt;#100DaysOfCode&lt;/code&gt; journey! Throughout the next few months, my primary goal is to learn JavaScript and a few frameworks such as VueJS and NodeJS. While I'm at it, I figured that I would also spend some time refreshing my knowledge of HTML and CSS, which I haven't used in a few years as most of my recent work has been with OOP languages like Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributions for today
&lt;/h2&gt;

&lt;p&gt;Today I just got myself set up with a new repository and created a pretty basic site. Most of my time was spent setting up some base HTML that I will be able to add some more in-depth styling to tomorrow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;link rel="stylesheet" type="text/css" href="styles.css"&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;h1&amp;gt;Day 1 of 100&amp;lt;/h1&amp;gt;
        &amp;lt;div id="container"&amp;gt;
            &amp;lt;div id="left-side"&amp;gt;
                &amp;lt;p&amp;gt;Super excited to be starting my #100DaysOfCode 
Journey! I hope to get a good refresher 
on my knowledge of HTML and CSS and 
take a deep dive into JavaScript.
                &amp;lt;/p&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div id="right-side"&amp;gt;
                &amp;lt;p&amp;gt;New things I hopt to Learn&amp;lt;/p&amp;gt;
                &amp;lt;ul&amp;gt;
                    &amp;lt;li&amp;gt;Base JavaScript&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;NodeJS&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;REST API&amp;lt;/li&amp;gt;
                    &amp;lt;li&amp;gt;VueJS&amp;lt;/li&amp;gt;
                &amp;lt;/ul&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1{
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    font-size: 48pt;
    background-color: rgb(23,23,23);
    width: 30%;
    margin-left: auto;
    margin-right: auto;
    padding: 40pt;
    padding-left: 220pt;
    padding-right: 220pt;
    border-radius: 10pt;
}

body{
    background-color: black;
    color: white;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So far, this is a super basic webpage, but I hope to spend the next few weeks expanding upon it and adding a lot more content and styling. It really has been some time since i have done front-end development so I want to make sure I take the time I need to refresh my memory and learn some new things along the way. Hopefully, this will provide me with a great foundation to spend the majority of the challenge working with JavaScript.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/m-mcneive"&gt;
        m-mcneive
      &lt;/a&gt; / &lt;a href="https://github.com/m-mcneive/100-days-of-code"&gt;
        100-days-of-code
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      #100DaysofCode Challange. Learning front-end development with an emphasis on JavaScript.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
100-days-of-code&lt;/h1&gt;
&lt;p&gt;#100DaysofCode Challange. Learning front-end development with an emphasis on JavaScript.&lt;/p&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/m-mcneive/100-days-of-code"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>100daysofcode</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Starting my 100 Days of Code Journey</title>
      <dc:creator>Matt McNeive</dc:creator>
      <pubDate>Sat, 18 Jun 2022 18:10:39 +0000</pubDate>
      <link>https://dev.to/mattyice/starting-my-100-days-of-code-journey-4efj</link>
      <guid>https://dev.to/mattyice/starting-my-100-days-of-code-journey-4efj</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ykXHik34--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbskd4do1q6dmx41rs04.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ykXHik34--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbskd4do1q6dmx41rs04.jpg" alt="Image description" width="800" height="333"&gt;&lt;/a&gt;&lt;br&gt;
The #100DaysOfCode challenge has always been something that intrigued me. While it seems simple, just code for at least an hour a day for 100 days, I know that it will take a lot of determination to get it done. I hope that posting updates here will help keep me motivated and will be a great way to document my journey and reflect on it after finishing. &lt;/p&gt;

&lt;p&gt;My plan is to learn more advanced Java concepts during this challenge and create an application with Springboot. I am hoping that there are those who have done this challenge before that could share any tips and tricks that helped get through and stay motivated throughout. If not, even just to provide some much needed words of encouragement!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
