<?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: Chris Harding</title>
    <description>The latest articles on DEV Community by Chris Harding (@chrisharding).</description>
    <link>https://dev.to/chrisharding</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%2F379922%2Fc949292d-ab03-4f85-bfed-099de72550c8.jpeg</url>
      <title>DEV Community: Chris Harding</title>
      <link>https://dev.to/chrisharding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chrisharding"/>
    <language>en</language>
    <item>
      <title>Tips for getting hired as a developer</title>
      <dc:creator>Chris Harding</dc:creator>
      <pubDate>Mon, 08 Jun 2020 10:45:54 +0000</pubDate>
      <link>https://dev.to/chrisharding/tips-for-getting-hired-as-a-developer-2l7o</link>
      <guid>https://dev.to/chrisharding/tips-for-getting-hired-as-a-developer-2l7o</guid>
      <description>&lt;p&gt;Given the uptick in people looking for roles right now, I thought I’d share some tips for getting hired as a developer. These tips are things I look for when hiring developers. My aim is to shed some light on what people over the other side of the desk are thinking. Perhaps armed with this perspective, you will think differently about your own approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  It started with a resume
&lt;/h2&gt;

&lt;p&gt;Before jumping into the interview itself, it’s first important to talk about how to get one. When making decisions on who to interview, I spend time looking through a candidates background and portfolio. The main two aspects I look at are as follows:&lt;/p&gt;

&lt;h3&gt;
  
  
  Resume
&lt;/h3&gt;

&lt;p&gt;Your resume encompasses a range of mediums which should clearly and concisely demonstrate why I should bring you in for interview. These mediums include your LinkedIn profile, personal website and 2-page resume, but to name a few. Think about these as telling a story about how you got to where you are, what skills you have developed and the achievements you had along the way. It should stoke their imagination and encourage them to want to dig deeper. &lt;/p&gt;

&lt;p&gt;Hiring managers will look at plenty of resumes each day, so you should aim to make their life as easy as possible. There is nothing more frustrating than having to sift through 6 pages of terse text, not least because it contradicts the oft stated ‘good communicator’. There are some quick wins here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeping your resume to two, well-formatted, pages&lt;/li&gt;
&lt;li&gt;Strip back information which is not directly relevant such as part-time work or whether you have a driving licence&lt;/li&gt;
&lt;li&gt;Bring to the top specific points mentioned in the job spec. By this I mean if a hiring manager is looking for a Python developer with AWS experience, make sure this is clearly stated at the top of your resume.&lt;/li&gt;
&lt;li&gt;Highlight results and achievements where possible. Rather than &lt;em&gt;“Upgraded website from .NET to .NET Core”&lt;/em&gt;, try &lt;em&gt;“Scaled website from handling 500k to 2 million customers a week, resulting in 50% increase in sales”&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also like to see some personality injected where possible. Could you add a little about your hobbies? Or an interesting social enterprise you’re passionate about? This starts to build a picture in my head about who you are and whether you would make a good fit for the team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Portfolio
&lt;/h3&gt;

&lt;p&gt;Your portfolio is another cache of evidence around the statements in your resume. For me, it’s a really important part of initial candidate vetting and gives me insight into what you have built, how you write code and what methodologies you follow.&lt;/p&gt;

&lt;p&gt;Portfolios can include personal websites, GitHub accounts, Stackoverflow pages or other relevant links. I would encourage everyone to throw up some sample projects and if you don’t have one, try and make a couple. It could be anything as simple as a todo list through to a clone of a social media site. The important part is demonstrating concepts such as clean code, testing methods, documentation and even devops process. Personally, I’m not looking at the result of the project necessarily, rather how it was built.&lt;/p&gt;

&lt;h2&gt;
  
  
  And now, we tango
&lt;/h2&gt;

&lt;p&gt;So onto the interview. This part is about really understanding your personality, and whether you can backup everything you wrote on your resume. Often your response to questions will be measured by the thought process, the reaction and the communication rather than the specifics of the answer. Some of the qualities I look for are as follows:&lt;/p&gt;

&lt;h3&gt;
  
  
  Passion
&lt;/h3&gt;

&lt;p&gt;It’s really important that you are passionate about what you do and the vision the company is driving towards. Passion fuels motivation and is good indicator of how you will perform in a role. Are you doing the job because you genuinely care about solving the mission statement, or because tech pays well? &lt;/p&gt;

&lt;h3&gt;
  
  
  Adaptability
&lt;/h3&gt;

&lt;p&gt;Being adaptable and able to cope with change is a crucial trait and something I value when hiring. An example of why this is important. The technical shopping list is a snapshot of today and borne out of current requirements. It will almost definitely change over time as these requirements evolve. Hiring for this specific skill set will solve a problem now, but if you can’t adapt then the whole process will repeat down the line. I would much prefer someone intelligent, willing to learn and able to adapt than a marginally better coder of a specific tech stack.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get things done
&lt;/h3&gt;

&lt;p&gt;Businesses survive by getting results. Results require you to get things done and add value. It may be great that you can architect the perfect, fault tolerant and performant system. But can you actually write it? Can you ship it in a timely manner? Can you get something out that will move the needle now rather than in two years time?&lt;/p&gt;

&lt;h2&gt;
  
  
  When can you start?
&lt;/h2&gt;

&lt;p&gt;Well, if you made it this far congratulations - you got the job. To summarise, the first step is getting your foot in the door. Do this by telling your story and showing the hiring manager you can meet the role requirements. Once at interview, demonstrate your personality traits and qualities. Show that you can learn and adapt and will grow with the business. That they can trust you to do the job.&lt;/p&gt;

</description>
      <category>career</category>
      <category>hiring</category>
    </item>
    <item>
      <title>Building a calendar in Swift</title>
      <dc:creator>Chris Harding</dc:creator>
      <pubDate>Mon, 18 May 2020 18:15:35 +0000</pubDate>
      <link>https://dev.to/chrisharding/building-a-calendar-in-swift-4ekp</link>
      <guid>https://dev.to/chrisharding/building-a-calendar-in-swift-4ekp</guid>
      <description>&lt;p&gt;In this post, I wanted to walk through an approach I used when building a calendar view in Swift for an iOS app I’m working on. The requirements were as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Should start from the current day, and then scroll backwards through time&lt;/li&gt;
&lt;li&gt;Each month is it’s own section, with corresponding header&lt;/li&gt;
&lt;li&gt;Days should be a selectable square cell, and we should have 3 days on each row&lt;/li&gt;
&lt;li&gt;The grid should take up as much screen real estate as possible&lt;/li&gt;
&lt;li&gt;It should be memory efficient&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And with any luck, it will look something like this...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m2q8YkZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t73ffkwjmegqnz6h9ezt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m2q8YkZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t73ffkwjmegqnz6h9ezt.png" alt="a calendar view layout"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this in mind, I decided to use a customised &lt;code&gt;UICollectionView&lt;/code&gt;, as most of the work around grid layouts and memory optimisation are done for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bring the calendar to life
&lt;/h2&gt;

&lt;p&gt;The first step in this process is to initialise a collection view. That’s relatively simple as follows&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Most of this code is layout plumbing such as setting the frame size to it’s container, along with constraints to anchor it's size. This will fulfil my requirement around maximising screen real estate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go with the flow (layout)
&lt;/h2&gt;

&lt;p&gt;Next up, I wanted to further optimise the layout such that the day cells are as big as possible. To achieve this, we can subclass &lt;code&gt;UICollectionViewFlowLayout&lt;/code&gt;. The important methods to implement are as follows&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Here we are calculating the maximum size of cell, based on the current frame and padding used. This should yield 3 day cells on each row, each maximising the width.&lt;/p&gt;

&lt;p&gt;This subclass now needs be registered with my collection view as follows&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Make it fancy
&lt;/h2&gt;

&lt;p&gt;The final piece of layout required are definitions for what the day cells and month section headers will look like. To achieve this, I created two simple nibs. The day cells need to subclass &lt;code&gt;UICollectionViewCell&lt;/code&gt; as follows&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Nothing out of the ordinary here, just a label being set. I did however implement static convenience functions so that details such as reuse identifiers are encapsulated. As for the month header, we need to subclass from &lt;code&gt;UICollectionReusableView&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Note how we register this as a kind of &lt;code&gt;UICollectionView.elementKindSectionHeader&lt;/code&gt;. We now need to tell our collection view to use these templates when creating new header and collection cells.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Let there be data
&lt;/h2&gt;

&lt;p&gt;Finally, we need to tell the collection what it’s actually supposed to be rendering. I achieved this by firstly implementing a manager class which will calculate the necessary data, and put it into an efficient struct format.&lt;/p&gt;

&lt;p&gt;The reason for this is that we can calculate this once, upfront, and then simply lookup the relevant data at render time (as opposed to re-calculating for each cell). Here is the supporting code to decide how many months we need to show, along with how many days each month contains&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;With this data in place, we again lean on the on the built in collection view functionality and subclass &lt;code&gt;UICollectionViewDataSource&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;As you can see, returning the relevant section and cell data is just a lookup from our array. We can now hook this data source up to the collection view and away we go!&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Looking back through the approach I have taken, I'm pleased to say it meets all of the requirements I set out at the top. This makes me happy.&lt;/p&gt;

&lt;p&gt;You can see the full Swift calendar source code for this solution here: &lt;a href="https://github.com/wdchris/calendar-grid-swift"&gt;https://github.com/wdchris/calendar-grid-swift&lt;/a&gt;&lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
    </item>
    <item>
      <title>Setting Up Netlify Forms With Gatsby</title>
      <dc:creator>Chris Harding</dc:creator>
      <pubDate>Tue, 05 May 2020 10:07:07 +0000</pubDate>
      <link>https://dev.to/chrisharding/setting-up-netlify-forms-with-gatsby-3o86</link>
      <guid>https://dev.to/chrisharding/setting-up-netlify-forms-with-gatsby-3o86</guid>
      <description>&lt;p&gt;I recently built a website using Gatsby, choosing to host it on the Netlify free tier. One of the features I wanted to try was form handling. Typically, handling form posts requires wiring up and hosting a backend to process requests. Netlify forms allows me deploy a simple static site with zero backend, letting them handle the rest for me. You can read more about the functionality here.&lt;/p&gt;

&lt;h2&gt;
  
  
  React setup
&lt;/h2&gt;

&lt;p&gt;The setup is relatively straight forwards. Firstly, we need to add in the usual form, input and button tags. Below is a sample component for submitting a user email address.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Notice two extra attributes on the form tag. &lt;code&gt;data-netlify&lt;/code&gt; is used to tell Netlfy we want to track this form. &lt;code&gt;data-netlify-honeypot&lt;/code&gt; is the name of an input within the form we’ll use to counter bot attacks. Note also that we need to specify a &lt;code&gt;name&lt;/code&gt; attribute on the input we're tracking. This is a key, the input being the value, which will be sent to the Netlify forms api.&lt;/p&gt;

&lt;p&gt;The last pieces of markup we need are two hidden inputs.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;The first wires up the form name to the Netlify api. The second is the aforementioned honeypot input field for tricking bots. This will be hidden from users, but will likely be completed by any bots informing Netlify to ignore this response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hooking it up
&lt;/h2&gt;

&lt;p&gt;Now that the markup is in place, we just need to add some standard React code to track the state of the input and send a POST request for Netlify to capture.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Here we have used React hooks to track the state. A &lt;code&gt;fetch&lt;/code&gt; method is then used to send a POST request, encoding the form name and email address response to be sent to the Netlify api.&lt;/p&gt;

&lt;h2&gt;
  
  
  That’s all folks
&lt;/h2&gt;

&lt;p&gt;And that’s all it takes. Push this to deploy and you’ll notice submissions coming through on the Netlify forms dashboard. It will track a form called &lt;em&gt;register&lt;/em&gt;, and will contain a field called &lt;em&gt;email&lt;/em&gt;. All this built on a static React site with a stateful front-end. You can see the full code sample &lt;a href="https://gist.github.com/wdchris/c64309f50add47196c3d743292ef6660"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>netlify</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
