<?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: Will Martin</title>
    <description>The latest articles on DEV Community by Will Martin (@willhmartin).</description>
    <link>https://dev.to/willhmartin</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%2F497829%2F71d90bfe-26ec-46a1-9a3e-8a83cc079728.jpeg</url>
      <title>DEV Community: Will Martin</title>
      <link>https://dev.to/willhmartin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/willhmartin"/>
    <language>en</language>
    <item>
      <title>Week 4 Day 1: Front End, Old Friend</title>
      <dc:creator>Will Martin</dc:creator>
      <pubDate>Wed, 04 Nov 2020 10:12:05 +0000</pubDate>
      <link>https://dev.to/willhmartin/week-4-day-1-front-end-old-friend-1h2c</link>
      <guid>https://dev.to/willhmartin/week-4-day-1-front-end-old-friend-1h2c</guid>
      <description>&lt;p&gt;I'm back to HTML and CSS after a month or so of not touching it. Having picked it up and put it down a few times in the last couple of years I felt comfortable with the syntax. Easy to learn and hard to master. Certainly the case with &lt;strong&gt;position: fixed/absolute&lt;/strong&gt;. I'm sure that every time I figure out whether the parent or child is relative, W3C has an emergency meeting and switches it up just to spite me. Maybe I just haven't grokked yet. &lt;br&gt;
We made personal landing pages today. Very dry stuff: "Hi I'm Will. Likes and interests: dog walking, programming, photography". A bit of a snooze-fest for the first day of the "creative" part of the bootcamp. I jazzed mine up a little to keep myself interested. The page content is absurdist nonsense but the links to my blog and github are live and legit. It's only half finished, barely responsive and various viewports do wacky things to the layout. I was mainly interested in contrasts of color and lack thereof as well as which elements worked well in a fixed position.&lt;br&gt;
As you can see in the link below, my background image remains fixed whilst the splash of pink paint scrolls with the view (you may have to resize the browser to see this). The page is by no means finished, some parts are broken and I can't think of an elegent presentation for the &lt;strong&gt;h1&lt;/strong&gt; title yet. I'm going to work on it during the week and post again for a during and after comparison. Watch this space.&lt;br&gt;
(&lt;a href="https://willhmartin.github.io/profile/"&gt;https://willhmartin.github.io/profile/&lt;/a&gt;)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8NytBOif--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cs5ysi2cfsx4h6slcwvk.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8NytBOif--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cs5ysi2cfsx4h6slcwvk.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A lot of the afternoon was spent on a particular problem: my splashes of paint had background colors. My search query was "paint splash transparent background", however everything I downloaded looked like this: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5ZT6_1E---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/260b2a1ow2luiau786mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5ZT6_1E---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/260b2a1ow2luiau786mj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
which translated to this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t4g6nVeY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6rgottmik3wvl9lrhonv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t4g6nVeY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6rgottmik3wvl9lrhonv.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems that most sites are wise to the value of a transparent background and only give out samples, a little DRM'd freebie to get you hooked. Then I found a neat little trick with the Google Image criteria:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D0H2VnU2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gudjcdrui22yjggrbk7z.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D0H2VnU2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gudjcdrui22yjggrbk7z.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
selecting "transparent" in tools under the color options returns only photos available and transparent! Knowing this would have saved me a lot of time trying to solve this issue in both CSS and MS:Paint, so let's hope it helps someone else (who against all odds knows less than me).&lt;br&gt;
The design is fun, I don't think of myself as visually artistic but I like experimenting disparate elements together. Check back to see if I make any progress.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Wednesday Week 3: Deliveries</title>
      <dc:creator>Will Martin</dc:creator>
      <pubDate>Sat, 31 Oct 2020 02:20:14 +0000</pubDate>
      <link>https://dev.to/willhmartin/wednesday-week-3-deliveries-550o</link>
      <guid>https://dev.to/willhmartin/wednesday-week-3-deliveries-550o</guid>
      <description>&lt;p&gt;We made a food delivery app with separate models for employees, customers, meals and orders, with a session controller to manage employee vs manager sign-ins and permissions. This is the most complex thing I’ve made. I’m still getting used to separate file dependencies and requiring the right class in the right place. &lt;br&gt;
I really wish I had two monitors here. I’d always thought that people with a multiple-screen setup were flexing. The amount of shifting between tabs when working with multiple models though, plus looking at lecture slides and googling issues. If someone had walked in and hooked me up with two more screens I’d have started crying and given them a hug. I need to finally invest in a desktop soon. I’ve wanted to build my own pc for a long time, something to think about when I get back to Chengdu.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_csv&lt;/span&gt;
    &lt;span class="n"&gt;csv_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;headers: :first_row&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;header_converters: :symbol&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="no"&gt;CSV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vi"&gt;@csv_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;csv_options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:id&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;to_i&lt;/span&gt;
      &lt;span class="vi"&gt;@customers&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="vi"&gt;@next_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vi"&gt;@customers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;last&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="vi"&gt;@customers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;empty?&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above iterates over each entry in a database of customers and pushes them to an array as an instantiation of the Customer class, pushing them to an array in the repository.&lt;br&gt;
There’s a lot of writing here. I can see that a database with thousands or tens-of-thousands of entries is going to run very slowly with this loop. Can anyone tell me at what point (size of table) one would move from a csv to a database using SQL? Is there a best practice size limit for practical use of csv’s? If anyone has some neat refactoring for this code I’d love to see it.&lt;/p&gt;

&lt;p&gt;My uncle made a website for his business in the '90s. I remember my dad showing me the site as a kid and telling me that it had been built with words. It sounded like magic to me at the time (and definitely something I'd never be capable of). I asked my uncle about it this week and he sent me the original source code. He'd written it out in Word which boggles my mind. I'm looking forward to looking at it this weekend.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>database</category>
    </item>
    <item>
      <title>Monday, Week 3</title>
      <dc:creator>Will Martin</dc:creator>
      <pubDate>Mon, 26 Oct 2020 15:15:44 +0000</pubDate>
      <link>https://dev.to/willhmartin/monday-week-3-1o36</link>
      <guid>https://dev.to/willhmartin/monday-week-3-1o36</guid>
      <description>&lt;p&gt;We finished our first Model View Controller today. A cookbook repository with web scraping using Nokogiri to grab recipe names, ratings and descriptions from a popular website. The debugging was a slog. The finished product however was incredibly satisfying. Last year someone on stackoverflow told me I should "start thinking in terms of Object Oriented Programming". After an hour of reading around I still wasn't sure what he meant exactly. I'm beginning to now though. The code I've been writing this week is a far cry from the endless lines of repitition and method after method with no inheritance that I'd been asking for help with a year ago.&lt;br&gt;
MVC is tricky to be sure, I'm making stupid mistakes with getters and setters but I'm also able to track those mistakes down. It feels good.&lt;br&gt;
I ate a whole pizza for lunch today. Pineapple cheese and meatballs. No comma there, the cheese was pineapple flavored. It sounds egregious and it was. When I sat back down at my computer all I wanted to do was get under the desk and take a nap. But I managed to force myself through the haze of dough and got on with adding a mark_as_done method to the cookbook. I don't normally have such a stupid lunch but I've been living in Chengdu for four years. There's a limit to the variety of foreign food there and since arriving in Shanghai three weeks ago I've been indulging myself a little. Sometimes, when you haven't been back to your own country for two years, you need to give yourself a big pizza for lunch. Tomorrow I'll go with rice and beans.&lt;br&gt;
As the evening's live code started I noticed that one of the remote students had asked me for help. An hour before. It's the second time I missed someone asking for help and I felt bad for not catching the message. I need to keep an eye on my slack notifications when I'm dialled in.&lt;br&gt;
Tomorrow we're building four MVCs. It took us two days to make one. This is going to be interesting. I'm not sure how they're going to communicate unless it's just a question of &lt;strong&gt;attr_accessor&lt;/strong&gt;. I guess we'll find out tomorrow. Take care x&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Week 2 Reflections</title>
      <dc:creator>Will Martin</dc:creator>
      <pubDate>Sun, 25 Oct 2020 07:00:27 +0000</pubDate>
      <link>https://dev.to/willhmartin/week-2-reflections-3gg9</link>
      <guid>https://dev.to/willhmartin/week-2-reflections-3gg9</guid>
      <description>&lt;p&gt;Week 2, what happened to week 1? I like it when films start in media res. The audience gets drawn in when they're not drip fed the story and have to piece it together along with the protagonist. If I had more cunning I'd pretend that I'd adopted this tactic to draw you in. The truth is that this weekend is the first time I've had enough room in my head to think about writing anything that doesn't begin with &lt;strong&gt;def&lt;/strong&gt; or &lt;strong&gt;puts&lt;/strong&gt;. Week 2 of a 9 week full stack web development bootcamp. Not even one third of the way through and I feel like the galaxy brain meme. Every day starts the same: a zoom lecture on today's learning objectives, then buddy up and start chomping on some problems. Pseudo, code, push, repeat. Le Wagon are running the course as a hybrid, half of our cohort are stuck outside mainland China. Some are in Hong Kong, maddeningly close but in the current situation they may as well be remoting in from the moon. One classmate is in London. Every day we can see him in his living room working with us through the night until by the evening's live code there's full-on daylight streaming through his curtains. And I thought I was resilient.&lt;br&gt;
We spent Day 1 setting up our environments and, I suppose, quietly appraising ourselves. Did we belong here? How long until a teacher or fellow classmate pointed at us and said "they can't do this"? Perhaps this is just me. I've read up on imposter syndrome, but I think this was just first day trepidation. I needn't have worried anyway. The instructors had a graph in the classroom showing how our moods would peak and trough throughout the course. It's seemed pretty accurate so far but no matter how drained and stupid we might feel at the end of the day, no-one has had a cross word to say and the team spirit and good humor have been great.&lt;br&gt;
We've started with Ruby, as someone who self-taught the basics of Python last year it's been a confidence-booster to begin with another high level dynamically typed language, even if I still try and use &lt;strong&gt;randint()&lt;/strong&gt; for a random integer half the time. Then last week we moved into OOP with class inheritance. A friend back in London went through the same camp and said that the start is just you "drowning in a sea of knowledge". I don't feel that; everything so far has fitted into place like it was meant to be there. Not always immediately, but usually after a decent sleep. I'm finally starting to internalize that sleep is important after 28 years. &lt;br&gt;
The trough will come, I'm not arrogant enough to think it won't. I'll bang my head against a concept at some point and I'll feel like crap. But my teammates will be there for me as will the teachers. I'm where I want to be and I'll trust the process.&lt;/p&gt;

&lt;p&gt;This is the first blog post I've ever written so I'm going to be finding my style/voice for a little bit. Going forward I'm going to try and post as often as I can and get a little more into the technical side of what we're learning. For now it's been enough to barf some words up and clear my head a little. Stay safe and thanks for reading x&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ruby</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
