<?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: Paulina Delmore</title>
    <description>The latest articles on DEV Community by Paulina Delmore (@pdelmore).</description>
    <link>https://dev.to/pdelmore</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%2F1017757%2F68d2d71d-d499-4cf3-b620-48434de0b249.jpeg</url>
      <title>DEV Community: Paulina Delmore</title>
      <link>https://dev.to/pdelmore</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pdelmore"/>
    <language>en</language>
    <item>
      <title>TIL - Heroku and postgresql</title>
      <dc:creator>Paulina Delmore</dc:creator>
      <pubDate>Tue, 28 Mar 2023 03:14:18 +0000</pubDate>
      <link>https://dev.to/pdelmore/til-heroku-and-postgresql-525l</link>
      <guid>https://dev.to/pdelmore/til-heroku-and-postgresql-525l</guid>
      <description>&lt;p&gt;Today I was working on my portfolio website. It's still not completely done, but I am happy with how it's turning out. I learned a few new things in the process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I deployed my first two projects on Heroku,&lt;/li&gt;
&lt;li&gt;I learned about Rack gem and how to use it to create a static page in Rails. I made an empty app and pushed it to GitHub just to have it handy whenever I want to deploy a static page to Heroku,&lt;/li&gt;
&lt;li&gt;that being said, I learned that Heroku doesn't support sqlite3, so I had to look up how to switch to postgresql instead,&lt;/li&gt;
&lt;li&gt;oh, and I connected my domain to my portfolio hosted on GitHub pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, it was a pretty productive day!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ruby</category>
      <category>rails</category>
      <category>beginners</category>
    </item>
    <item>
      <title>TIL - teamwork is hard</title>
      <dc:creator>Paulina Delmore</dc:creator>
      <pubDate>Sat, 25 Mar 2023 16:36:49 +0000</pubDate>
      <link>https://dev.to/pdelmore/til-teamwork-is-hard-4bcj</link>
      <guid>https://dev.to/pdelmore/til-teamwork-is-hard-4bcj</guid>
      <description>&lt;p&gt;We stayed on our first group project yesterday. The biggest takeaway from the very first meeting with a team - collaboration is hard and it's a skill that some, if not all, people develop over time.&lt;br&gt;
I am looking forward to learning from others and getting this project done!&lt;/p&gt;

</description>
      <category>rails</category>
      <category>beginners</category>
      <category>programming</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>TIL 3</title>
      <dc:creator>Paulina Delmore</dc:creator>
      <pubDate>Wed, 15 Mar 2023 16:55:56 +0000</pubDate>
      <link>https://dev.to/pdelmore/til-3-56f0</link>
      <guid>https://dev.to/pdelmore/til-3-56f0</guid>
      <description>&lt;p&gt;I've been working on my final project for a couple of weeks now, and I hit a few roadblocks in terms of the functionality that I know how to achieve vs the functionality that I want in my project that I thought I had no idea how to implement. One of them was table pagination. During a brief conversation with the instructor he assured me that it's something I should be able to do with the knowledge of basic Ruby and Rails that I have so far. And, as it turns out, he was right.&lt;/p&gt;

&lt;p&gt;What I wanted to achieve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;split the records in the table into chunks (10 per page)&lt;/li&gt;
&lt;li&gt;display those chunks on consecutive pages&lt;/li&gt;
&lt;li&gt;links "previous page" and "next page" to navigate the records&lt;/li&gt;
&lt;li&gt;first page has disabled "previous" link&lt;/li&gt;
&lt;li&gt;last page has disabled "next" link&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I needed:&lt;br&gt;
The instructor noted I probably needed to use &lt;code&gt;params&lt;/code&gt;, as well as &lt;code&gt;.limit&lt;/code&gt; and &lt;code&gt;.offset&lt;/code&gt; methods. Since we haven't talked about the two methods in class, I had to read up on those first.&lt;/p&gt;

&lt;p&gt;What I did:&lt;br&gt;
First, I wrote my steps in a form of comments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # set notes_per_page number
    # set params (:page), default to 0
    # define pagination limit and offset - limit is notes_per_page, offset is notes_per_page * page params
    # get number of notes
    # get number of pages, convert to float
    # divide page_number by notes_per_page, round, to integer
    # get last page - rounded_page_number minus 1 because count starts at 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, I went comment by comment and wrote the code, one variable at a time. I was amazed at how easy it was to do it after explaining to myself what my code was supposed to achieve first.&lt;/p&gt;

&lt;p&gt;Third, I had to figure out how to go about "previous" and "next" buttons. Again, I wrote myself the steps in a mix of Ruby and English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # if page param == 0, can't click on "previous", can click on "next"
    # if page param = last_page, can click on "previous", can't click on "next"
    # else can click on both
    # link takes to ?page=&amp;lt;%= page param +/- 1 %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know there are much easier, faster and prettier ways of achieving what I just did. But what I've learned is that many features are really easy to create - all is needed is an understanding of what it is we are trying to do, and work one line at a time. That's what's amazing about programming.&lt;/p&gt;

&lt;p&gt;And suddenly, the next feature that I wanted to add to my final project - messaging option between the users - doesn't seem as difficult to write as I thought it was!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>beginners</category>
    </item>
    <item>
      <title>TIL 2</title>
      <dc:creator>Paulina Delmore</dc:creator>
      <pubDate>Fri, 10 Feb 2023 19:45:57 +0000</pubDate>
      <link>https://dev.to/pdelmore/til-2-4c43</link>
      <guid>https://dev.to/pdelmore/til-2-4c43</guid>
      <description>&lt;p&gt;Difference between .method vs .method! - "!" modifies the object so we can't reference the original object. The "safe method" creates a copy of the object and changes that copy.&lt;/p&gt;

&lt;p&gt;.split takes a string and returns an array. Cool!&lt;/p&gt;

&lt;p&gt;To access a two-dimensional array we need to use double square brackets =&amp;gt; array[1][5]&lt;/p&gt;

&lt;p&gt;Ruby seems so easy, yet so complicated at the same time. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>TIL 1</title>
      <dc:creator>Paulina Delmore</dc:creator>
      <pubDate>Wed, 01 Feb 2023 20:55:31 +0000</pubDate>
      <link>https://dev.to/pdelmore/til-1-3mn3</link>
      <guid>https://dev.to/pdelmore/til-1-3mn3</guid>
      <description>&lt;p&gt;It's difficult to spot mistakes and typos in the code that you wrote yourself. I can stare at it for an hour and not realize that all I am missing is a dot. Note to myself: do not stare at the code forever. Move on and get back to it or ask somebody to look at it.&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>offers</category>
    </item>
  </channel>
</rss>
