<?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: Luke Duncan</title>
    <description>The latest articles on DEV Community by Luke Duncan (@lukewduncan).</description>
    <link>https://dev.to/lukewduncan</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%2F165213%2Fbb754027-1a0f-40cf-be55-7fd6332a1f67.png</url>
      <title>DEV Community: Luke Duncan</title>
      <link>https://dev.to/lukewduncan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukewduncan"/>
    <language>en</language>
    <item>
      <title>What things is your company doing to make interviewing more fair?</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Tue, 21 Jul 2020 15:12:36 +0000</pubDate>
      <link>https://dev.to/lukewduncan/what-things-is-your-company-doing-to-make-interviewing-more-fair-29mb</link>
      <guid>https://dev.to/lukewduncan/what-things-is-your-company-doing-to-make-interviewing-more-fair-29mb</guid>
      <description>&lt;p&gt;I'm a Developer Advocate at CoderPad (&lt;a href="https://coderpad.io"&gt;https://coderpad.io&lt;/a&gt;). Some of you may have used CoderPad in the past while interviewing for a company. Others may have used the tool to interview candidates.&lt;/p&gt;

&lt;p&gt;Our mission at CoderPad is to level the playing field for all technical positions. And when I say all, I mean junior engineering positions all the way up to CTO.&lt;/p&gt;

&lt;p&gt;While we have our own ideas on how to make the interview process more fair. I'm looking for input from the community. This is so we can build the right things for you, your company and your team to improve the candidate experience.&lt;/p&gt;

&lt;p&gt;So all this said...what does your team do to make the technical interview process more fair? and what things would you like to see to make the interview process more fair?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>interview</category>
      <category>interviewing</category>
      <category>career</category>
    </item>
    <item>
      <title>Questions for a live technical interview — what questions I like to ask and why</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Thu, 30 Apr 2020 14:48:10 +0000</pubDate>
      <link>https://dev.to/lukewduncan/questions-for-a-live-technical-interview-what-questions-i-like-to-ask-and-why-26cl</link>
      <guid>https://dev.to/lukewduncan/questions-for-a-live-technical-interview-what-questions-i-like-to-ask-and-why-26cl</guid>
      <description>&lt;p&gt;Technical interviews are probably the most daunting experience a software engineer can have. With every interview, comes a different set of expectations, skills needed and questions asked during an interview.&lt;/p&gt;

&lt;p&gt;I’ve gone through a bunch of technical interviews as a candidate. These interviews have ranged from some of the biggest companies in the world, all the way down to small 2-person technology agencies. I have also been in the interviewer seat at companies I’ve worked at in the past. I’ve conducted white-boarding interviews, reviewed take-home assignments and sat in on live-coding sessions.&lt;/p&gt;

&lt;p&gt;These experiences have allowed me to develop a good sense of what questions to ask during a technical interview — or at least questions that I like to use to gauge a candidates technical chops.&lt;/p&gt;

&lt;p&gt;Before I go into the questions, let me first clarify what I like to see in candidates. I think this will provide some of the context as to why I ask certain questions. Most of the points below cater to both junior and senior engineers, and the candidate has at least broken through the HR gate and first phone screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I look for in candidates
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A good base of knowledge in whatever language THEY choose. Demonstrate fundamentals e.g. loops, statements, data structures. If the candidate isn’t familiar with the language the company uses, no big deal. And if I feel like they do need help, I tell candidates to Google to get the specific method or helper function. After all — If I haven’t been using Javascript for a while, I always need to Google a simple for loop.&lt;/li&gt;
&lt;li&gt;That being said — if it comes down to two candidates who we think are the exact same, and one has experience with the language my company uses, I’m probably picking them.&lt;/li&gt;
&lt;li&gt;I’ll be able to tell if you don’t have a good grasp of the language just from the way your thinking, and typing. You can’t Google everything.&lt;/li&gt;
&lt;li&gt;Good, clear, basic communication. While I get that some conversations have to get REALLY technical, speak to me in plain language to describe a problem and to tell me some of the ideas you have. Describe your solution and tell me some of the potential draw backs as well.&lt;/li&gt;
&lt;li&gt;Ability to solve problems that the company currently deals with. Some of the code questions are setup to mimic this.&lt;/li&gt;
&lt;li&gt;The ability to work alongside me. Showcase that you can work well in a team.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below you’ll find the questions I like to ask. Depending on the interview setup, I will ask a few of the smaller questions if it’s going to be a 45+ minute interview. If it’s 30–45 minutes then I like to ask one of the bigger questions.&lt;/p&gt;

&lt;p&gt;I’ve purposely left some things vague in the questions, just in case a future candidate I’m interviewing with finds this article hehe! But +++ if you are prepping, tell me you saw this. Most of the questions I ask can be applied to any language, but obviously in some cases e.g. hiring a React developer, you want to use React.&lt;/p&gt;

&lt;h3&gt;
  
  
  [Fullstack] Turn a CSV file into an array of objects.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This question requires you to use a IDE like CoderPad that lets you upload files&lt;/li&gt;
&lt;li&gt;Let’s me figure out/see how they work with objects, arrays and basic loops&lt;/li&gt;
&lt;li&gt;Includes use of basic file system to read CSV — we purposely have the fs.readFileSync to start off. This lets me see what they know about file usage and what their thoughts are about how to handle it next.
The let variable is there on purpose. I want to see if they know what the difference is between const, let, var. I’m waiting to see if they do something with it.&lt;/li&gt;
&lt;li&gt;I’m looking for senior engineers to complete this relatively quickly (10–20 minutes)&lt;/li&gt;
&lt;li&gt;For junior engineers, I’m looking for them to complete this in around 30 minutes&lt;/li&gt;
&lt;li&gt;From experience, senior engineers can usually complete this anywhere from 10–15 minutes
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const _ = require('lodash');
const fs = require('fs');

// CSV contents
// Company,Total Users,MRR,AR,Profit\n
// "A, Inc",100,359,2490,28\n
// "B, Inc",43,86,1408,457\n
// "C, LLC",99,1093,12753,5397

// Specifically used let here
let csv = fs.readFileSync('./data/test.csv');

// Below, turn the CSV into an array of objects
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  [Frontend] Create a simple counter using React
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This question requires you to use a IDE like CoderPad that lets you upload files&lt;/li&gt;
&lt;li&gt;The counter should be able to increase, and decrease. The initial starting number should be 0. The numbers can go negative.&lt;/li&gt;
&lt;li&gt;For front-end interviews, I like candidates to build out simple things. It allows me to see how they think in terms of component architecture&lt;/li&gt;
&lt;li&gt;If we have an hour or longer, I like the candidate to be able to interact with 3rd party data and making a simple API call — but most of the time I just ask for a simple counter&lt;/li&gt;
&lt;li&gt;Because it’s a rather large task — I like to help or work alongside the candidate.&lt;/li&gt;
&lt;li&gt;Extra — will the candidate take time to think about styling, UI/UX etc.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;
    &amp;lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.production.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.production.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div id="root"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;script type="text/jsx"&amp;gt;

      class Home extends React.Component {
        render() {
          return (
            &amp;lt;div className="home"&amp;gt;
              &amp;lt;h1&amp;gt;Hello world!&amp;lt;/h1&amp;gt;
            &amp;lt;/div&amp;gt;
          ) 
        }
      }
      // Render component to the page
      ReactDOM.render(&amp;lt;Home /&amp;gt;, document.getElementById('root'))      
    &amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  [Fullstack] Fibonacci Series
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This question requires you to use a IDE like CoderPad that lets you upload files&lt;/li&gt;
&lt;li&gt;Usually I don’t like asking these types of questions, but this is the one I do like — see below.&lt;/li&gt;
&lt;li&gt;I want to see if they know and can talk about recursion/big-O notation&lt;/li&gt;
&lt;li&gt;My hope is that they spit out the simplest solution, and then we can talk about recursion, and as the series of numbers goes up — how it effects the time for calculation&lt;/li&gt;
&lt;li&gt;Candidate may have been asked this previously. I don’t care. It probably means they’ve thought and at least know the solution and recursion.&lt;/li&gt;
&lt;li&gt;As a junior candidate, I don’t mind that they solve this with a simple solution and exponential runtime&lt;/li&gt;
&lt;li&gt;As a senior candidate, I expect you to be able to solve this for O(1), O(logN) and at the very least O(n).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Ruby
n = 7 
def fibonacci(n)
  # write code here
end

puts "#{n}'s fibonacci value is #{fibonacci(n)}"

# RSpec is available within this pad
# Below, write a test that makes sure the value of the 7th fibonacci value is 13

RSpec.describe fibonacci do
  # write code here
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  [Fullstack] Find the largest 5 digit number in a sequence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This question requires you to use a IDE like CoderPad that lets you upload files&lt;/li&gt;
&lt;li&gt;Looking for good use of loops, sorting and potentially indexing.&lt;/li&gt;
&lt;li&gt;As a junior candidate, I don’t mind that they solve this with a simple solution and exponential runtime
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# In the following 6 digit number: 283910
# 91 is the greatest sequence of 2 consecutive digits.
# In the following 10 digit number: 1234567890 
# 67890 is the greatest sequence of 5 consecutive digits.
# Complete the solution so that it returns the greatest sequence of five consecutive digits found within the number given. The number will be passed in as a string of only digits. It should return a five digit integer. The number passed may be as large as 1000 digits.

# Write code below
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;These are only a few examples of some of the questions I like to ask in a technical interview. I think for the most part they are pretty straight forward — the only one that may cause a little confusion is the ability to understand Fibonacci sequence. Some candidates may take a few minutes to understand what it that is if they have never heard of it, and that is completely fine.&lt;/p&gt;

&lt;p&gt;The whole purpose of the technical interview is to figure out if a candidate will be able to fulfill the demands of a role, and another chance to see if they will fit character/personality wise. So I like to draw up and select a question that best aligns with the position the candidate has applied for.&lt;/p&gt;

&lt;p&gt;If you have your own questions that you’d like to share, I’d love to see them. And if you have any questions about using a live coding IDE for technical interviews — shoot me an email at &lt;a href="mailto:luke@coderpad.io"&gt;luke@coderpad.io&lt;/a&gt;, it’s what we specialize in!&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>The process of the technical interview - A perspective from CTO's, VP's and Directors of Engineering</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Mon, 20 Apr 2020 20:15:03 +0000</pubDate>
      <link>https://dev.to/lukewduncan/the-process-of-the-technical-interview-a-perspective-from-cto-s-vp-s-and-directors-of-engineering-1h4l</link>
      <guid>https://dev.to/lukewduncan/the-process-of-the-technical-interview-a-perspective-from-cto-s-vp-s-and-directors-of-engineering-1h4l</guid>
      <description>&lt;p&gt;Some of you may have read in my last post, I started at CoderPad 3 weeks ago as a Developer Advocate. Since then, I've been connecting with former bosses, co-workers and other software engineers to gather thoughts and to better understand the realm of technical interviews. Most of the people I've been reaching out to in my network work at established technology companies in higher up roles. Think CTO's, Director of Engineering, Lead Engineers, VP's of Engineering and Senior Software Engineers.&lt;br&gt;
I started reading back my notes on these calls and I've started to see a pattern in their technical interviewing process. Here are some key findings…&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Side Note: Would you be interested in learning about the specific companies technical interviewing process OR do you want to highlight your companies technical interview process? If yes, shoot me a message luke@coderpad.io&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Engineering higher-ups like to use their hiring process as a recruiting tool
&lt;/h3&gt;

&lt;p&gt;I spoke with two former colleagues that now lead engineering teams at some companies you have definitely heard of, but aren't Google and Facebook. An interesting point that came up in my conversations with them is that they use their hiring process as a way to attract the big talent.&lt;br&gt;
They both told me that they are highly involved in the recruiting process. Not so much vetting resumes and finding talent, but they were definitely leading the "Introductory First Calls". Not only was this a tactic to make the engineering talent feel special, but it also allowed them to figure out the motivations of the candidate and if it was worth even moving forward to the technical interview.&lt;/p&gt;

&lt;h3&gt;
  
  
  Take-Home projects are the go to for smaller companies
&lt;/h3&gt;

&lt;p&gt;Almost every person I talked to in the past week told me they were doing take-home projects for their candidates, instead of live coding sessions. The main reason for them preferring Take-Home projects seemed to be the opportunity for candidates to work in a "real world" scenario and for the company to see "real world" output.&lt;/p&gt;

&lt;p&gt;One specific Director of Engineering told me how they set up their Take-Home projects. They took a problem that the company had in the past, simplified it, and came up with an exercise that mimicked that problem. So not only are the candidates in a more relaxed environment, they are also working on problems the company may have faced in the past or are currently facing. It's a win-win for both sides in my opinion.&lt;br&gt;
Another reason was the time saving that comes with the take home, and engineers not having to spend 30 minutes to 1 hour on a live coding interview.&lt;/p&gt;

&lt;h3&gt;
  
  
  Languages don't matter during the technical interview
&lt;/h3&gt;

&lt;p&gt;Most engineering managers are looking for how you think, rather than specific language ins and outs. It was almost a consensus - that once you know one language, you can learn them all. They were more focused on the tangible outputs like how do they write actual code, and how are they solving a problem.&lt;br&gt;
Specifically they were looking for maintainable code, are they breaking down code into individual functions, are they using object orientated design, is the code readable for others etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Most technical interviews are the same for Juniors &amp;amp; Seniors - but managers are looking for different things
&lt;/h3&gt;

&lt;p&gt;Like the subtitle reads above, companies are looking for different traits out of junior versus a more senior engineer.&lt;br&gt;
In a junior engineer, it seemed they were looking more in the direction of soft skills, team compatibility and the basic knowledge of the languages and frameworks that the companies use.&lt;br&gt;
In senior engineers, they are looking for high quality, good grasp of software design knowledge and high end communication that will eventually allow them to lead projects.&lt;/p&gt;




&lt;p&gt;Every company is different and finds success using different methods (live coding vs. take homes for example). But I thought this would be good to share to show potential candidates what to look out for in the world of technical interviews.&lt;br&gt;
Technical interviewing is difficult. Both for companies and for candidates. At CoderPad, we are always trying to bridge that gap and make things easier for both sides. If you have any questions about CoderPad, or if you are a company looking to set up technical interviews, please reach out - happy to talk!&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>The interviewing process for a software engineer and tips for getting a new job while in lockdown</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Tue, 31 Mar 2020 14:21:09 +0000</pubDate>
      <link>https://dev.to/lukewduncan/the-interviewing-process-for-a-software-engineer-and-tips-for-getting-a-new-job-while-in-lockdown-1nfa</link>
      <guid>https://dev.to/lukewduncan/the-interviewing-process-for-a-software-engineer-and-tips-for-getting-a-new-job-while-in-lockdown-1nfa</guid>
      <description>&lt;p&gt;After being laid off 52 days ago, I’m happy to announce that today I’m starting with CoderPad (&lt;a href="https://www.coderpad.io"&gt;https://www.coderpad.io&lt;/a&gt;) as a Developer Advocate (working in a mixture of marketing, product and dev). I’m super excited to work with some really smart people and look forward to learning a bunch/working my butt off. Funnily enough, one of the companies I was interviewing with was using CoderPad so it was cool to look at it from the candidate side, but sorry! That's not the point of this article.&lt;/p&gt;

&lt;p&gt;Being that we are in crazy times, I thought it’d be beneficial to talk a little bit about searching and finding a job (specifically software development/tech) in today’s market. I learnt a bunch over the last 5 weeks and want to give some tips to anyone out there hunting for a new position.&lt;/p&gt;

&lt;p&gt;To give some background - my last role was a Senior Software Engineer at a ticketing/events company working remotely. I was laid off from the role. Knowing this information will help give context to my situation - the types of interviews I was able to get, the questions I was asked in interviews etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before I get into the tips, here is some data surrounding my job hunt:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Amount of applications: 53&lt;/li&gt;
&lt;li&gt;Applications responded by company to get first interview: 18&lt;/li&gt;
&lt;li&gt;Applications rejected: 12&lt;/li&gt;
&lt;li&gt;Recruiters worked with: 7&lt;/li&gt;
&lt;li&gt;Live coding interviews: 5&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code Projects worked on: 3&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amount of whiteboard interviews: 4&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Got to final interview but did not get offer: 2&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Job Offers: 3&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  I don’t want to give away the exact companies that I was interviewing with, but I can tell you in an abstract way -
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One of the MAJOR banks&lt;/li&gt;
&lt;li&gt;A place you’ve probably shopped online before&lt;/li&gt;
&lt;li&gt;Construction software company&lt;/li&gt;
&lt;li&gt;Oil &amp;amp; gas data company&lt;/li&gt;
&lt;li&gt;Major oil/gas company (not a super major but big)&lt;/li&gt;
&lt;li&gt;Legal software company&lt;/li&gt;
&lt;li&gt;Electricity power company&lt;/li&gt;
&lt;li&gt;A cyber security company&lt;/li&gt;
&lt;li&gt;Technology agencies&lt;/li&gt;
&lt;li&gt;Marketing Firm&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I live in Houston, Texas hence why all the oil and gas companies that I was interviewing with. It was up for debate whether I wanted to continue working remotely or find a position in Houston.&lt;/p&gt;

&lt;h3&gt;
  
  
  Positions applied for:
&lt;/h3&gt;

&lt;p&gt;Software Engineer, Senior Software Engineer, Software Developer, Front-End Developer, UI Developer, Product Manager, Project Manager, Developer Advocate, Implementation Engineer, Web Developer&lt;/p&gt;

&lt;h3&gt;
  
  
  Some of the live coding challenges:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Fizz Buzz (I don’t know why a company would use this anymore ha)&lt;/li&gt;
&lt;li&gt;Write a for loop that goes over the array in reverse order and create an array of arrays grouping the numbers that are the same e.g. [[1,1], [5,5,5], [2,2], [21, 21]]&lt;/li&gt;
&lt;li&gt;Figure out if input is palindrome (numbers and strings)&lt;/li&gt;
&lt;li&gt;Create a function to determine if a number is a power of two&lt;/li&gt;
&lt;li&gt;Turn this CSV string into an array of Objects with the same keys and associated values&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Some of the white-boarding questions:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;From two arrays, find the numbers that AREN’T in either array&lt;/li&gt;
&lt;li&gt;What efficiency is this algorithm? Explain how you would improve it or make it better (Big O Notation)&lt;/li&gt;
&lt;li&gt;Given this method, how would you make it better?&lt;/li&gt;
&lt;li&gt;Build an abstraction of a shopping cart&lt;/li&gt;
&lt;li&gt;Show us how you would build out a car utilizing Object Orientated design&lt;/li&gt;
&lt;li&gt;Describe one of your most recent projects you worked on&lt;/li&gt;
&lt;li&gt;Build out a relational database for a vet showing appointments and anything else you might find applicable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The take home projects:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Build out a simple CRUD API in NodeJS&lt;/li&gt;
&lt;li&gt;Build out UI components that use an external API to digest data and show in graph&lt;/li&gt;
&lt;li&gt;In this codebase, make changes to a method so that it caters to what they were looking for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ok so now we have all that stuff out the way, here are some of the things I learned and hopefully some tips you can take with you or pass a long to someone you know who’s in the interview process:&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Glassdoor
&lt;/h2&gt;

&lt;p&gt;It’s a good way of finding out what salaries you would be looking at for a role, and if someone has gone through the interview process before, you can perhaps even get a good grasp of what technical questions they might ask. I did this for the major bank that I interviewed with. And I got asked a question that I had prepared for. Part of me says this is wrong, you know moral high ground. But then part of me thinks what’s wrong with being prepared with all the information out there?&lt;/p&gt;

&lt;h2&gt;
  
  
  LinkedIn is pretty cool when you actually need it
&lt;/h2&gt;

&lt;p&gt;Some people give LinkedIn a bad rap. I’ve never been one to use LinkedIn actively while I’ve been working at other jobs. But having used it pretty extensively during this job search — there are a few things that make it great. First off, their job search functionality is amazing for searching by location and position. Second, the quick application feature makes it super easy to apply to a bunch of jobs. Most of those jobs don’t require a cover letter, and maybe an answer to a question or two — so it’s super easy to apply to 30 jobs in an hour if you really wanted. And lastly, the amount of traffic your profile can get is pretty insane. I had at least 3 to 4 recruiters per week contacting me about open opportunities they thought I’d be a fit for. Not all are, but it’s still a great thing to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recruiters are awesome!
&lt;/h2&gt;

&lt;p&gt;I had never worked with a recruiter before this because I had never had to. In the past, I’ve been hit up by hundreds (not joking) of recruiters asking if I was looking for a new role or saying that I’d be the perfect candidate for X role. I always just responded “no thanks”.&lt;/p&gt;

&lt;p&gt;But I think the biggest help on my job search was using recruiters. They allow you to skip the line of the interview process at companies because you’ve already been “vetted”. And they are there to help you. Ultimately, if you get hired, they make money so it’s in their best interest to set you up for success. Being it’s their full-time job, they have a good grasp of the market, what positions you would be good for and help prep you for interviews. All this being said, I actually didn’t use a recruiter to get my role at CoderPad, but the other offers I had were because of recruiters.&lt;/p&gt;

&lt;h2&gt;
  
  
  You need to practice leet code and technical interviews
&lt;/h2&gt;

&lt;p&gt;No matter what you do, technical interviews are always going to be nerve wracking. So prepare! Take a bunch of Leet Code — most companies ask easy to medium questions that I’ve experienced. And most likely, if you practice enough, you’ll be asked problems you’ve solved before. I think if you are applying at the FANG companies and high up engineering positions (director of engineering), that’s when the “hard” questions start being asked because they are dealing with issues at extreme scale.&lt;/p&gt;

&lt;p&gt;Also get familiar with some of the technical interview IDE’s. You’ll be taking live coding interviews a bunch. Try one like CoderPad ;) &lt;a href="https://www.coderpad.io"&gt;https://www.coderpad.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I often find that leet code questions bear no similarities to the things you’ll be working on in your actual job. My mind thinks differently when trying to solve Leet Code questions versus the usual tasks I have as a software engineer. Preparing and practicing these questions makes the switch into thinking about these questions easier in my brain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Think of creative ways to stand out
&lt;/h2&gt;

&lt;p&gt;You are competing with hundreds of people for a job. Think of ways you can stand out in the job application. One way is to use Recruiters like I said before to skip the line, but what I found really successful was creating a page on my website specifically for a company and hiring manager.&lt;br&gt;
I can show you one I made for CoderPad: &lt;a href="https://www.lukeduncan.me/coderpad"&gt;https://www.lukeduncan.me/coderpad&lt;/a&gt; — I haven’t asked if this helped but I can only imagine it doesn’t hurt. It shows you put time and effort into your application and it’s a good way of getting your foot in the door. I have had major success with this in the past as well. It turns you into a person rather than an application in my opinion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get the buzzwords into your resume, and what you did with those buzzwords at prior jobs
&lt;/h2&gt;

&lt;p&gt;Recruiters and companies are looking for specific languages, but they are also looking for the type of things you’ve worked on in your prior experience. Be specific on what languages you used and what you accomplished with them. Here is one of the lines I have on my resume as an example:&lt;/p&gt;

&lt;p&gt;“Built custom solutions and features for Ticketbud’s enterprise level clients that led to new revenue channels and retention of clients using technologies such as Ruby on Rails and Javascript”&lt;br&gt;
Recruiters are looking for these buzzwords all over and it will get you a lot more opportunities by including them in your resume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get feedback from final interviews
&lt;/h2&gt;

&lt;p&gt;I reached a few final interviews during this process and didn’t get an offer. It can be a real hit to the gut especially when you are just one round way from being hired. But to move forward and learn, I ended up asking for feedback about why I wasn’t selected or what they liked and what they didn’t like. Ultimately I ended up using the feedback from a few final interviews and took it into my other opportunities. It helps you grow as a developer, thinker and candidate!&lt;/p&gt;

&lt;p&gt;A big problem that I had/have, I think of a solution in my head to a problem which fine. But when I start to describe my solution, other things that I maybe missed out in my solution start to pop in my head and I start to include them into my solution. So I start to add random bits into my answer and everything becomes less clear. I got this feedback from one of the first interviews I was rejected from and used it to catch myself when I was doing this at later interviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hit me up!
&lt;/h2&gt;

&lt;p&gt;And that’s that. If you have any questions about my interviews, have any other tips you’d like to share (I’ll add them to this article) or are interested using CoderPad in your interview process (perfect for hiring Remote in todays climate) — I’d love to talk! Email me at &lt;a href="mailto:luke@coderpad.io"&gt;luke@coderpad.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's hard times out there for everyone, so if there is anything I can do to help anyone, I'm all ears!&lt;/p&gt;

&lt;p&gt;Stay safe. &lt;br&gt;
Luke&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>Any unconventional tips after being laid off?</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Mon, 10 Feb 2020 19:45:22 +0000</pubDate>
      <link>https://dev.to/lukewduncan/any-unconventional-tips-after-being-laid-off-dap</link>
      <guid>https://dev.to/lukewduncan/any-unconventional-tips-after-being-laid-off-dap</guid>
      <description>&lt;p&gt;Hey Dev,&lt;/p&gt;

&lt;p&gt;I was laid off on Friday and now begin the hunt for a new job. I am looking for tips, specifically things I may not have thought about doing now that I am unemployed.&lt;/p&gt;

&lt;p&gt;I have updated the resume, contacted a few recruiters that I am friendly with - and luckily for me I just updated my personal website two weekends ago :)&lt;/p&gt;

&lt;p&gt;During this time of unemployment, I hope to take a few React courses. I haven't used React since 2018 so looking forward to learning all about Hooks and all that new shiny stuff.&lt;/p&gt;

&lt;p&gt;Buy any advice helps. Look forward to reading your responses!&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>What are some tips for working as a remote developer with children at home?</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Wed, 19 Jun 2019 15:11:16 +0000</pubDate>
      <link>https://dev.to/lukewduncan/what-are-some-tips-for-working-as-a-remote-developer-with-children-at-home-1do8</link>
      <guid>https://dev.to/lukewduncan/what-are-some-tips-for-working-as-a-remote-developer-with-children-at-home-1do8</guid>
      <description>&lt;p&gt;Hi everyone!&lt;/p&gt;

&lt;p&gt;I've been working remote for a little over a year and a half now. It's been great and don't think I can go back to working in an office full-time.&lt;/p&gt;

&lt;p&gt;However, we've added a little one to our family and he's now a month old. My wife has started running errands where she is gone only a few hours - and I've stayed at home with the baby boy. He's pretty good overall, sleeping most of the time. But when he's crying - there is no way to possibly work.&lt;/p&gt;

&lt;p&gt;My wife will be going to work full-time at an office so I'm coming to you for some tips! Because I can only imagine as he grows up, my eyes will have to be on him 24/7.&lt;/p&gt;

&lt;p&gt;How do you balance working remotely and looking after a baby/kids?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What are some good tutorials/tips for building your own computer</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Fri, 31 May 2019 00:56:48 +0000</pubDate>
      <link>https://dev.to/lukewduncan/what-are-some-good-tutorials-tips-for-building-your-own-computer-56m9</link>
      <guid>https://dev.to/lukewduncan/what-are-some-good-tutorials-tips-for-building-your-own-computer-56m9</guid>
      <description>&lt;p&gt;I'm a complete newb when it comes to linux, operating systems and all the rest. Basically I'm dumb as to how computers actually work. &lt;/p&gt;

&lt;p&gt;I thought it'd be fun to build my own computer from the ground up. But I have no idea where to start! I thought some of you in the community would have some good tips and tutorials to share. Look forward to hearing from you in the comments 🙂&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>linux</category>
      <category>help</category>
    </item>
    <item>
      <title>Things that helped me build a $200,000 feature with a 4 week deadline</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Fri, 17 May 2019 18:48:29 +0000</pubDate>
      <link>https://dev.to/lukewduncan/things-that-helped-me-build-a-200-000-feature-with-a-4-week-deadline-1180</link>
      <guid>https://dev.to/lukewduncan/things-that-helped-me-build-a-200-000-feature-with-a-4-week-deadline-1180</guid>
      <description>&lt;p&gt;For about 8 months now, my company had a feature built into our Event Registration system that is only used by 2 or 3 priority clients. Before the feature was built, it cost our support team at least a months load of work to handle. So it was pretty much a no-brainer to implement. &lt;/p&gt;

&lt;p&gt;When the feature itself was built late last year, we were under severe time restrictions and it was "hacked" into our system to make a client happy. After the clients event was over, the company realized that this feature could potentially be a huge revenue stream. The decision was made to turn this into a full-fledged feature that all of our users could have access too. I was the one in charge of the project.&lt;/p&gt;

&lt;p&gt;But time was against us. My wife is currently 37 weeks pregnant at the time of writing this. And as a company we also had other large projects that needed work. But I was given 4 weeks to make it happen. It was almost going to take a miracle to get the feature production ready, to remove the hacks and to learn parts of the system I wasn't familiar with. But hey, code is only words on a screen that magically work sometimes.&lt;/p&gt;

&lt;p&gt;So here are a few things that helped me build a complicated system in a small amount of time. Junior or new developers please read!&lt;/p&gt;

&lt;h2&gt;
  
  
  Always set expectations with your team
&lt;/h2&gt;

&lt;p&gt;I knew the people above were itching to get this feature out the door. To stop the constant questioning, I came up with a detailed schedule of what was going to be worked on and when. I also included potential setbacks and other small work items that had to be worked on alongside this project. &lt;/p&gt;

&lt;p&gt;This helped me in the long run because it would stop useless meetings and slack messages from being sent. Meaning I had more time for work, and less time talking about work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S5JfWfv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.rescuetime.com/wp-content/uploads/2018/02/Slack-crazy-busy-1000x486.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S5JfWfv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.rescuetime.com/wp-content/uploads/2018/02/Slack-crazy-busy-1000x486.jpg" alt="Slack is silly sometimes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't even code until you have too
&lt;/h2&gt;

&lt;p&gt;When I first started working on the project, I sat down with the CTO and we created a list of action items that had to be done. He wasn't going to be coding this feature, but his insight and the information he could provide were invaluable. The action list included things that had to be done at a high level. E.g. customers had to have xyz, we need to show users abc.&lt;/p&gt;

&lt;p&gt;Once I had that action list scribbled on a piece of paper in front of me. I literally sat for two days pseudo coding the entire project. Pseudo coding for me is done at a lower level than the action list. E.g. what database columns would need adjusting, what views did I need to create/edit, what models was I going to be interacting with.&lt;/p&gt;

&lt;p&gt;I can't recommend this enough. Once I got in front of my computer, it made the actual coding so much easier. I've seen junior developers&lt;br&gt;&lt;br&gt;
just dive straight onto their computer and into a problem, and it often leads to major major coupling issues. Sometimes a pen and paper is all you need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bSffIq6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.quickmeme.com/img/4b/4b13379ccd882c9910256f803ec1670dd169859d3cb28cc050e61d4e228984c6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bSffIq6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://www.quickmeme.com/img/4b/4b13379ccd882c9910256f803ec1670dd169859d3cb28cc050e61d4e228984c6.jpg" alt="I love unmaintainable code"&gt;&lt;/a&gt;&lt;br&gt;
I promise it won't be fun in a few weeks or when somebody else has to come in and fix it!&lt;/p&gt;

&lt;h2&gt;
  
  
  TDD until you die
&lt;/h2&gt;

&lt;p&gt;When I mentioned I was turning pseudo code into actual code, I should have been clearer. I was turning pseudo code into tests into code!&lt;/p&gt;

&lt;p&gt;Pseudo Code -&amp;gt; Write Tests -&amp;gt; Write code for tests to pass -&amp;gt; FEATURE WORKS ALL THE TIME&lt;/p&gt;

&lt;p&gt;When creating a feature (especially one of major importance), I always think it's vital to follow test driven development. If you don't know what TDD is, take a look at this great article by &lt;a class="comment-mentioned-user" href="https://dev.to/chasestevens"&gt;@chasestevens&lt;/a&gt;
 &lt;a href="https://dev.to/chasestevens/getting-started-with-test-driven-development-1o8f"&gt;https://dev.to/chasestevens/getting-started-with-test-driven-development-1o8f&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My favorite part about following TDD, it breaks the code into manageable parts. This makes it easy for other developers to review the code and review pull requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you're struggling, take a break
&lt;/h2&gt;

&lt;p&gt;At around week 2 of the project, I was really struggling to understand the more complicated parts of the system. After 3 days of working on it, I still didn't understand what I was looking at.&lt;/p&gt;

&lt;p&gt;I realized that I had to take a break from looking at the code. I moved onto small, quick wins I could knock out and worked on them for about a day. When I found myself having to come back to the complicated parts, all of a sudden I had lightbulb emojis flashing above me head. If your an engineer, you definitely know the feeling!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cY0mFRGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.gifer.com/8D0z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cY0mFRGP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.gifer.com/8D0z.gif" alt="Have a kit kat"&gt;&lt;/a&gt;&lt;br&gt;
Take a break, have a Kit-Kat.&lt;/p&gt;

&lt;p&gt;I often tell junior developers that if they are having a tough time - go and take a walk, spend a few hours away from your computer and let the mind relax. The answers will always come, I promise! If you struggle to take breaks, then do what I did. Move onto other parts of the project so your mind can think "differently".&lt;/p&gt;

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

&lt;p&gt;Ultimately, all these points helped me successfully build out the project on time. And so far the support team has not recorded any bugs - pray for me!&lt;/p&gt;

&lt;p&gt;But I hoped these points helped out, especially for junior developers. I truly believe that half the job of a software developer doesn't even revolve around typing on a computer.&lt;/p&gt;

&lt;p&gt;What are some tips you have for others to help them build software? Drop them down in the comments 😄&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>What is your favorite CI tool to integrate with a Rails project?</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Fri, 17 May 2019 14:50:18 +0000</pubDate>
      <link>https://dev.to/lukewduncan/what-is-your-favorite-ci-tool-to-integrate-with-a-rails-project-3082</link>
      <guid>https://dev.to/lukewduncan/what-is-your-favorite-ci-tool-to-integrate-with-a-rails-project-3082</guid>
      <description>&lt;p&gt;I'm looking to integrate a CI into a new Rails project I'm working on. What are your favorite CI tools?&lt;/p&gt;

&lt;p&gt;I have experience utilizing CircleCI for my job, but wanted a more low cost tool if there was any out there.&lt;/p&gt;

&lt;p&gt;Thanks for the recommendations in advance!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
    </item>
    <item>
      <title>Uploading a CSV to AWS S3 in Rails to use in an Email</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Wed, 08 May 2019 19:12:34 +0000</pubDate>
      <link>https://dev.to/lukewduncan/uploading-a-csv-to-aws-s3-in-rails-to-use-in-an-email-2j7j</link>
      <guid>https://dev.to/lukewduncan/uploading-a-csv-to-aws-s3-in-rails-to-use-in-an-email-2j7j</guid>
      <description>&lt;p&gt;Recently we were dealing with an issue for a customer (we’ll call them customer X) that has been with us for several years. They have hundreds of thousands of records in our system and we are starting to deal with issues of scale.&lt;/p&gt;

&lt;p&gt;For a typical customer that isn’t customer X, they could simply go to a dashboard we had created, click on a button and a CSV report downloads straight from the browser with a few hundred records. For customer X this simply wouldn’t work because the calculations in the backend took too long for the browser and often ended up timing out. It was a simple problem to solve with a background job which is exactly what we did a few years ago.&lt;/p&gt;

&lt;p&gt;We implemented a background job to run the query and when ready would allow the user to download the report from an email we had sent them. It was a perfect solution for customer X until another problem arose. Here is the email method that was performed and put in a background job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;email_sales_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="vi"&gt;@report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Reports&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Sales&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;report_params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;attachments&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'sales_report.csv'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="vi"&gt;@report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;csv&lt;/span&gt;
  &lt;span class="n"&gt;mail&lt;/span&gt; &lt;span class="ss"&gt;to: &lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;subject: &lt;/span&gt;&lt;span class="s2"&gt;"Email Sales Report &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This looks fine and dandy right?&lt;/p&gt;

&lt;p&gt;We thought it did too until one day we started receiving errors about this email report not being able to be sent. After a few hours of digging and irrelevant error messages, we found out that the email server could not handle attachments of the size we were trying to use.&lt;/p&gt;

&lt;p&gt;In order to make this report work again, we had to come up with a solution where we could host the CSV and link to it from the email. AWS S3 which most of you should know is “simple storage service” allowing you to store documents, files and more was the perfect solution.&lt;/p&gt;

&lt;p&gt;Here are the basic steps we took to set this up in our Rails application:&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding AWS SDK to gemfile and bundle install
&lt;/h2&gt;

&lt;p&gt;Just for this tutorial, if you don’t already have AWS-SDK within your Rails repo, go ahead and add it and then bundle install.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'aws-sdk'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting up initializer
&lt;/h2&gt;

&lt;p&gt;First we setup an initializer to get S3 working. We set this up like so in a file we created — &lt;code&gt;/config/initializers/amazon_s3.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We set this as a global variable that could be accessed at any point in our rails application through AMAZON_S3_CLIENT&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;AMAZON_S3_CLIENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Aws&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;S3&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Resource&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="ss"&gt;region: &lt;/span&gt;&lt;span class="s1"&gt;'us-west-1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;access_key_id: &lt;/span&gt;&lt;span class="s1"&gt;'XXXXXXXXXXXXXXX'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;secret_access_key: &lt;/span&gt;&lt;span class="s1"&gt;'XXXXXXXXXXXXXXXXXXXXXXXXX'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating Class Command to instantiate S3 Upload
&lt;/h2&gt;

&lt;p&gt;We utilize commands throughout our app that are put into background jobs like the one we have been talking about with the reports. We created another command for uploading our CSV’s to S3. This is how we set it up below in a file named &lt;code&gt;commands/reports/upload_to_s3.rb&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Report::UploadToS3&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Command&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;
  &lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="ss"&gt;:csv&lt;/span&gt;

  &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_aws_bucket&lt;/span&gt;
    &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;AMAZON_S3_CLIENT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="vi"&gt;@bucket_path&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/report.csv"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;body: &lt;/span&gt;&lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;acl: &lt;/span&gt;&lt;span class="s1"&gt;'public-read'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;content_disposition: &lt;/span&gt;&lt;span class="s1"&gt;'attachment'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;public_url&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;set_aws_bucket&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;env&lt;/span&gt;
    &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="s1"&gt;'production'&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
      &lt;span class="vi"&gt;@bucket_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'csv'&lt;/span&gt;
    &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="s1"&gt;'staging'&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
      &lt;span class="vi"&gt;@bucket_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'staging.csv'&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;
      &lt;span class="vi"&gt;@bucket_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'dev.csv'&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;There are a few things I’d like to point out. Notice that we use a different bucket path depending on the environment that we are working on, we don’t want to mix and match csv uploads.&lt;/p&gt;

&lt;p&gt;Next — you’ll see that Time.now is included in the string for saving the file name in S3. This will create a folder called “01/01/2019 18:00:00” for example and within that the actual file. This was just to show that you can create subfolders.&lt;/p&gt;

&lt;p&gt;In our actual app we do some complex things to create folders for individual users so that each user has their own folder and we can save all the reports they have been downloading. You should be able to figure out ways to do this on your own but it is highly recommended you do so and in a secure manner not using any common identifiers like user_id and things of that nature.&lt;/p&gt;

&lt;p&gt;And lastly, you’ll notice content_disposition: 'attachment' is vitally important as it allows the CSV to be downloaded and acl: 'public-read' is important too because it makes your CSV’s viewable for your customers. The URL for this file is returned using public_url instance method which can be seen here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#public_url-instance_method"&gt;https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#public_url-instance_method&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Invoking the command and retrieving the URL
&lt;/h2&gt;

&lt;p&gt;Now this is what our email_sales_report method looks like :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;email_sales_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="vi"&gt;@report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Reports&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Sales&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;report_params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="vi"&gt;@s3_public_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Report&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;UploadToS3&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="ss"&gt;csv: &lt;/span&gt;&lt;span class="vi"&gt;@report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;

  &lt;span class="n"&gt;mail&lt;/span&gt; &lt;span class="ss"&gt;to: &lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;subject: &lt;/span&gt;&lt;span class="s2"&gt;"Email Sales Report &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;@s3_public_url can be used in the email template for this method like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Your all attendee ticket list is attached. Please click on the link below:&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#{@s3_public_url}"&lt;/span&gt; &lt;span class="na"&gt;download&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Download Report&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
Now you can send a file as you want over any email server. This has helped us immensely not only send out large reports to our customers, but it has also helped us to see which customers are downloading reports and how frequently they are downloading them.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Hopefully this has helped you out and is easy to follow along. If you have any questions or need any help uploading files to S3 and using those files throughout your rails app — shoot me an email at &lt;a href="mailto:luke.will.duncan@gmail.com"&gt;luke.will.duncan@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>aws</category>
      <category>s3</category>
    </item>
    <item>
      <title>How to build an audio player with HTML5 and the Progress element</title>
      <dc:creator>Luke Duncan</dc:creator>
      <pubDate>Wed, 08 May 2019 15:34:21 +0000</pubDate>
      <link>https://dev.to/lukewduncan/how-to-build-an-audio-player-with-html5-and-the-progress-element-387m</link>
      <guid>https://dev.to/lukewduncan/how-to-build-an-audio-player-with-html5-and-the-progress-element-387m</guid>
      <description>&lt;p&gt;HTML5 introduces built-in media support with the audio tag, which makes it very easy to embed media straight into any HTML document with limited code. It comes with built in browser controls, if you specify and plays audio nice and effectively.&lt;/p&gt;

&lt;p&gt;This is typically what it will look like in your browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds4agmt5ns6jiqcieamj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fds4agmt5ns6jiqcieamj.png" alt="Standard Browser HTML5 Audio Player"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might be thinking: “Well what if I wanted to style my own audio player with it’s own buttons and scroll bar?”&lt;/p&gt;

&lt;p&gt;With the audio element, the progress element and a few buttons, you can build your own audio player in no time! The progress element is mainly used to track the completion of a task and can be manipulated easily with Javascript. In our case, it would be to keep track of the length of a song. And the great thing is, HTML5 and browser capabilities make it easy to grab song lengths, current time and more.&lt;/p&gt;

&lt;p&gt;If you’d like to play with the code, go for it! Unfortunately Codepen embeds aren't working for me so the link is below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/luke__duncan/pen/dpZVOr/" rel="noopener noreferrer"&gt;View on Codepen here!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And below is the code. Note that their are two separate functions. One that keeps track of the audio player actually playing audio (initPlayers function) and the other that is keeping track of the audio for the progress element (initProgressBar function). I tried to keep jQuery to a minimum but used it to actually call the function, sorry, i’m not sorry JS purists.&lt;/p&gt;


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


&lt;p&gt;If you have any questions or suggestions, i’m all ears! Email me at &lt;a href="mailto:luke.will.duncan@gmail.com"&gt;luke.will.duncan@gmail.com&lt;/a&gt; or hit me up on twitter @luke__duncan&lt;/p&gt;

</description>
      <category>html</category>
      <category>audio</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
