<?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 Glazebrook</title>
    <description>The latest articles on DEV Community by Luke Glazebrook (@lukehglazebrook).</description>
    <link>https://dev.to/lukehglazebrook</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%2F145321%2F295408c1-ff0c-4f31-b17e-6893d70ce15a.jpeg</url>
      <title>DEV Community: Luke Glazebrook</title>
      <link>https://dev.to/lukehglazebrook</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukehglazebrook"/>
    <language>en</language>
    <item>
      <title>5 Top Tips For Crushing Programming Interviews</title>
      <dc:creator>Luke Glazebrook</dc:creator>
      <pubDate>Wed, 02 Dec 2020 14:51:38 +0000</pubDate>
      <link>https://dev.to/lukehglazebrook/5-top-tips-for-crushing-programming-interviews-5g9o</link>
      <guid>https://dev.to/lukehglazebrook/5-top-tips-for-crushing-programming-interviews-5g9o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;🐦 Would you rather view this content in Tweet-sized bites? Check out my &lt;a href="https://twitter.com/LukeHGlazebrook/status/1333882979391823873"&gt;Programming Interview Tips Thread&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Technical interviews are typically the final and most challenging stage of most developer hiring processes. You don't know what to expect - who is going to interview you? What is the challenge? How much time are you going to have?&lt;/p&gt;

&lt;p&gt;So, with all of these unknowns, how can you give yourself the best chance of impressing?&lt;/p&gt;

&lt;p&gt;Here are my top five tips for crushing the technical interview!&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 Verbalise
&lt;/h2&gt;

&lt;p&gt;Whatever you're thinking, the questions you're asking yourself - speak them out loud. This will give the interviewer an insight into your thought process and showcase the steps you're taking to solve the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Form Follows Function
&lt;/h2&gt;

&lt;p&gt;Your main objective in a programming interview should always to be to complete the task or get as close to completion as you can. Because of this, you shouldn't let your inner perfectionist hamper your progress by worrying about trivial details.&lt;/p&gt;

&lt;p&gt;You can always re-visit these minor details if you find yourself with excess time at the end of the interview.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔭 Clarify Before Starting
&lt;/h2&gt;

&lt;p&gt;If you don't feel confident you know what is being asked of you, you're setting yourself up for confusion and frustration.&lt;/p&gt;

&lt;p&gt;This unneeded anxiety can be avoided by ensuring you have a good understanding of the challenge &lt;em&gt;before&lt;/em&gt; you start writing/typing.&lt;/p&gt;

&lt;h2&gt;
  
  
  👨‍💻 Be Personable
&lt;/h2&gt;

&lt;p&gt;Given the nerves and pressure of being in an interview scenario, this can be tough. But always try and approach the exercise as you would when pair programming with a friend or colleague.&lt;/p&gt;

&lt;p&gt;This can be a great time to show your personality and give the interviewer an example of what it would be like to work with you in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  📝 Pseudo Code Is Your Friend
&lt;/h2&gt;

&lt;p&gt;If you get stuck on a specific part of the challenge then implement your existing idea in pseudo-code and move on. You can always come back to it later and, this way, you can unblock yourself to continue the rest of the challenge.&lt;/p&gt;

&lt;p&gt;This approach is also effective because it affords you additional time to think about alternative approaches to the tough problem in the background.&lt;/p&gt;

&lt;p&gt;Best of luck!&lt;/p&gt;




&lt;p&gt;🐦 Follow me on Twitter &lt;a href="https://twitter.com/lukehglazebrook"&gt;@LukeHGlazebrook&lt;/a&gt;&lt;/p&gt;

</description>
      <category>interview</category>
      <category>hiring</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>5 Tips for Getting Started with Open Source Development</title>
      <dc:creator>Luke Glazebrook</dc:creator>
      <pubDate>Thu, 31 Oct 2019 16:39:36 +0000</pubDate>
      <link>https://dev.to/lukehglazebrook/5-tips-for-getting-started-with-open-source-11np</link>
      <guid>https://dev.to/lukehglazebrook/5-tips-for-getting-started-with-open-source-11np</guid>
      <description>&lt;p&gt;Contributing to open source can be an enjoyable and fulfilling way to spend your time. However, if you've not contributed before it can be daunting - in this article I am going to cover some things that did help or would have helped me get over that initial hurdle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start small.
&lt;/h2&gt;

&lt;p&gt;You probably already have an idea in mind about what project(s) you would like to contribute to. If not, think about what libraries, frameworks, applications, etc you use frequently and excite you.&lt;/p&gt;

&lt;p&gt;One problem I had before I started contributing properly to open source was I was only really keeping an eye on the issues for huge projects I was interested in such as React.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yo_PE3rv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4dmuo89dlwyepusuzuiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yo_PE3rv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4dmuo89dlwyepusuzuiu.png" alt="React.js stats on Github"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whilst it is possible to jump straight in on a large project I would not personally recommend it. At the time of writing, React has 654 open issues, 234 open pull requests and 1,341 contributors. Contributing to such a large project early doors could prove to be an overwhelming experience.&lt;/p&gt;

&lt;p&gt;Instead, find a smaller scale project that you find interesting so you can get your feet off the ground.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TtkPtDUi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r1xl9cg82o5k1ouzgvjl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TtkPtDUi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r1xl9cg82o5k1ouzgvjl.png" alt="Reach UI stats on Github"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For me, because I do a lot of work with React and have an interest in accessible technology, I decided to contribute to &lt;a href="https://www.github.com/reach/reach-ui"&gt;Reach UI&lt;/a&gt;. At the time of writing, Reach UI currently has 46 open issues and 11 open pull requests, so enough issues/pull requests to get involved, but not so many you feel overwhelmed by it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uiQa42Cq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/yn17lw1mqma2x3v70id2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiQa42Cq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/yn17lw1mqma2x3v70id2.png" alt="Filtering by 'good first issue' label"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whatever project you choose, a great starting point is to check out whether they have any labels set up for people who are new to the project. Typically the label is called something along the lines of 'good first issue' or 'beginner friendly'.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing is more than just code.
&lt;/h2&gt;

&lt;p&gt;There are a whole host of ways you can contribute to projects.&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contribute code by fixing a bug or adding a requested feature.&lt;/li&gt;
&lt;li&gt;Improve documentation by fixing mistakes, increasing clarity and providing examples.&lt;/li&gt;
&lt;li&gt;Help by reporting issues you've experienced.&lt;/li&gt;
&lt;li&gt;Provide an additional set of eyes on pull requests by leaving a review.&lt;/li&gt;
&lt;li&gt;Increase the project's test coverage.&lt;/li&gt;
&lt;li&gt;Help maintain or provide TypeScript types.&lt;/li&gt;
&lt;li&gt;Many more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see from the above, there are a lot of ways to get involved in a project and every contribution you can make is valuable. Don't worry about opening up a small pull request with a few documentation adjustments for example, maintainers are usually very grateful and the readers of that documentation will be too!&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow contribution guidelines.
&lt;/h2&gt;

&lt;p&gt;Most open source libraries contain a &lt;code&gt;CONTRIBUTING.md&lt;/code&gt; file in their repository. This file outlines how to go about contributing, things to take into consideration and, occasionally, rules to follow.&lt;/p&gt;

&lt;p&gt;It is always worth your time to take a look through this documentation in advance and familiarise yourself with it.&lt;/p&gt;

&lt;p&gt;It's best to be in the know from the very beginning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow good contribution etiquette.
&lt;/h2&gt;

&lt;p&gt;Open source work is, by its nature, highly collaborative and, as such, it's important to follow good etiquette and be as helpful as possible.&lt;/p&gt;

&lt;p&gt;A lot of projects include a &lt;code&gt;CODE_OF_CONDUCT.md&lt;/code&gt; file which is always a good place to start. Familiarise yourself with this before making any changes. If the project you want to contribute to doesn't have one then just follow the age-old rule: treat others how you would want to be treated yourself.&lt;/p&gt;

&lt;p&gt;As well as following any code of conduct you should also take the time required to fill in any issue or pull request templates set up by the maintainer(s) of the project. Your issue or pull request is likely to be addressed sooner if you provide all of the information requested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Always be on the lookout.
&lt;/h2&gt;

&lt;p&gt;Since I enjoy contributing to open source, I am always on the lookout for things to fix or changes to make. For example, if you're looking at a new library and notice that the documentation is missing an important example or contains a spelling/grammar mistake - go in and fix it, the maintainer will appreciate it!&lt;/p&gt;

&lt;p&gt;Similarly, as you continue to use various frameworks and libraries in your projects - if you spot any improvements that could be made or issues that arise then go and report/fix them.&lt;/p&gt;

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

&lt;p&gt;Contributing to open source is a very rewarding experience once you get over that initial hurdle of not know where to get started. Hopefully this article has given you some thought points and actionable steps to take.&lt;/p&gt;

&lt;p&gt;Have any tips or ideas that I've missed out? I would love to hear them.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Consistent commits using Commitlint</title>
      <dc:creator>Luke Glazebrook</dc:creator>
      <pubDate>Tue, 30 Apr 2019 17:25:31 +0000</pubDate>
      <link>https://dev.to/lukehglazebrook/consistent-commits-using-commitlint-3hhj</link>
      <guid>https://dev.to/lukehglazebrook/consistent-commits-using-commitlint-3hhj</guid>
      <description>&lt;p&gt;The hardest part of version control is representing the history of your project in a way that is meaningful and easy to digest for future readers.&lt;/p&gt;

&lt;p&gt;Authoring commit messages is as much an art as it is a science. The thought and time that goes into ensuring code quality and standards are upheld should also be put into version control standards. You should be able to read back through the commit log and have a good idea of what has changed over time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you cannot derive any meaning from your version control log then the history itself is meaningless.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When working on JavaScript/TypeScript code you often have a linter working alongside you to nudge you in the right direction. Following linting rules doesn't in any way ensure you're writing good quality, readable, bug-free code but it does definitely help you think about these things and nudge you in the right direction as you're working away.&lt;/p&gt;

&lt;p&gt;What if you could employ the same concept of linting code but for git history?&lt;/p&gt;

&lt;p&gt;The good news is, you can. Introducing &lt;code&gt;commitlint&lt;/code&gt;, a simple way to enforce some standards across your VCS history.&lt;/p&gt;

&lt;p&gt;But wait, what does this actually look like? What is an example of a commit that would pass the recommended ruleset?&lt;/p&gt;

&lt;p&gt;One of the core concepts behind &lt;code&gt;commitlint&lt;/code&gt; is adding "types" to your commmit messages. Your next question is probably, what does that look like?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docs: add contributing.md file
&lt;span class="nb"&gt;test&lt;/span&gt;: ensure hamburger menu is hidden on mobile
style: make Header component yellow by default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above cases, &lt;code&gt;docs&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;style&lt;/code&gt; are the "types". They're present to give you a little bit more information about what is contained in the PR but  in a consistent way.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to see a list of all of the available "types" then check out the &lt;a href="https://wwww.github.com/conventional-changelog/commitlint"&gt;&lt;code&gt;commitlint&lt;/code&gt;&lt;/a&gt; Github page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some other niceties you can enforce using &lt;code&gt;commitlint&lt;/code&gt; are things like whether the subject can be empty, whether it should have a full stop at the end of the line, what case the subject should be in, etc.&lt;/p&gt;

&lt;p&gt;It is worth mentioning that, just like code linting, commit linting alone isn't a silver bullet. It is not the only thing you need to give you and your team nice, readable, history. You could still have plenty of commits that follow the standards perfectly and look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;feat: add big feature
style: improve styling
docs: explain more stuff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, like we mentioned earlier - having a linter is a great way to nudge yourself (and your colleagues) in the right direction and invoke more thought about how we should write our project history.&lt;/p&gt;

&lt;p&gt;So far I've worked with &lt;code&gt;commitlint&lt;/code&gt; in some personal projects and a couple of OSS projects and I've really enjoyed it. I would recommend checking it out if you're interested in adding some consistency to your history.&lt;/p&gt;

&lt;p&gt;Thanks for reading! If you have any questions about anything I've spoken about in this article then feel free to tweet me &lt;a href="https://www.twitter.com/LukeHGlazebrook"&gt;@LukeHGlazebrook&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>git</category>
    </item>
    <item>
      <title>Gatsby + Linaria = 💜</title>
      <dc:creator>Luke Glazebrook</dc:creator>
      <pubDate>Wed, 13 Mar 2019 23:41:27 +0000</pubDate>
      <link>https://dev.to/lukehglazebrook/gatsby--linaria---5b97</link>
      <guid>https://dev.to/lukehglazebrook/gatsby--linaria---5b97</guid>
      <description>

&lt;p&gt;I recently went through the process of re-building &lt;a href="https://glazebrook.dev"&gt;my personal blog/site&lt;/a&gt;. My old site contained a couple more pages (“home” and “contact”) but I didn’t really feel like they added much to the experience. They were very content-light and, in the end, added unneeded complexity to the site.&lt;/p&gt;

&lt;p&gt;That old site was built in Gatsby and I have had a good experience with all&lt;br&gt;
three versions of Gatsby released to this point so it seemed like the obvious choice.&lt;/p&gt;

&lt;p&gt;I also stuck with the same CSS-in-JS library that I was using on my old website, &lt;a href="https://emotion.sh"&gt;emotion&lt;/a&gt;. Again, it seemed like a fairly straightforward&lt;br&gt;
choice since I didn’t have any issues with it last time and &lt;code&gt;emotion&lt;/code&gt; is a&lt;br&gt;
library that I have used a multitude of times during my work since then.&lt;/p&gt;

&lt;p&gt;Now, you may be wondering where &lt;code&gt;linaria&lt;/code&gt; fits into this because, at this point, it will seem like all was going well. That’s true, it was going well - I had pretty much finished my site and was looking through my Github when I rediscovered &lt;code&gt;linaria&lt;/code&gt; after hearing about it on Twitter some weeks ago. My only issue with &lt;code&gt;emotion&lt;/code&gt; at this time was I was experiencing some small (and not overly noticeable) performance issues when loading new pages on the dark theme. The web page, only for a few frames, would render in the light mode until it had time to parse the styles. Whilst this wasn't a huge deal the perfectionist in me wasn't pleased and had to do something about it.&lt;/p&gt;

&lt;p&gt;I had been meaning to try &lt;code&gt;linaria&lt;/code&gt; in a project and, because the API for styled React components is very similar to that of &lt;code&gt;emotion&lt;/code&gt;, I decided to give it a shot. Getting &lt;code&gt;linaria&lt;/code&gt; installed and set up in a Gatsby project is fairly straightforward thanks to &lt;code&gt;gatsby-plugin-linaria&lt;/code&gt; so I created a new branch and cracked on with the refactor.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In my case the setup wasn’t quite as straightforward as it could be based on a compatibility issue with &lt;code&gt;gatsby-plugin-typescript&lt;/code&gt;. The maintainer of &lt;code&gt;gatsby-plugin-linaria&lt;/code&gt; (as of writing) is trying to find a solution to the problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One thing that really appealed to me about &lt;code&gt;linaria&lt;/code&gt; is the fact that all of the styles are processed at build-time rather than runtime. This makes a lot of sense when you put that build-time style generation alongside Gatsby’s brilliant built-in SSR (server side rendering). Why parse your styles at runtime when you can extract them during build?&lt;/p&gt;

&lt;h2&gt;
  
  
  So, how difficult was it to migrate?
&lt;/h2&gt;

&lt;p&gt;I expected the migration to be easy because of the almost identical API but it turned out to be even easier than I expected. In the majority of cases on my new site the migration looked a little bit like this (I'm not joking!):&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@emotion/styled'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Delete this line&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'linaria/react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Add this line&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I will add a little disclaimer here to say that your mileage may vary but, in my case, the vast majority of components didn’t require any changes going from &lt;code&gt;emotion&lt;/code&gt; to &lt;code&gt;linaria&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There currently aren’t any codemods available to automate this switch but&lt;br&gt;
there is an &lt;a href="https://github.com/callstack/linaria/issues/112"&gt;open Github issue&lt;/a&gt; discussing the possibility of creating some in the future.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Can’t you achieve build time extraction with Emotion or Styled Components?
&lt;/h2&gt;

&lt;p&gt;This is something you used to be able to do in both &lt;code&gt;styled-components&lt;/code&gt; and &lt;code&gt;emotion&lt;/code&gt; but the teams behind both libraries have expressed that they would like to move away from static extraction and stop supporting it in their libraries. In the threads I can find on Github/Reddit the advice from them is “Use Linaria” 😁&lt;/p&gt;

&lt;p&gt;After reading discussion and documentation online it seems the teams behind both libraries would like to move away from static extraction. &lt;code&gt;extractStatic&lt;/code&gt; from &lt;code&gt;emotion&lt;/code&gt; has been &lt;a href="https://github.com/emotion-js/emotion/blob/master/docs/extract-static.md"&gt;deprecated with version 10&lt;/a&gt; and there is &lt;a href="https://github.com/styled-components/styled-components/issues/1018"&gt;no aim of supporting it&lt;/a&gt; in &lt;code&gt;styled components&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The advice from the teams behind both of these very popular libraries seems to be to just use &lt;code&gt;linaria&lt;/code&gt; if you want static extraction! 😁&lt;/p&gt;

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

&lt;p&gt;Overall, I am very pleased that I decided to give &lt;code&gt;linaria&lt;/code&gt; a shot. The project was really straightforward to get started with and the migration was even more seamless than I expected.&lt;/p&gt;

&lt;p&gt;I think if you’re going to create a static site using Gatsby and you like&lt;br&gt;
CSS-in-JS then it could be the perfect solution for you.&lt;/p&gt;

&lt;p&gt;If you would like to ask me any questions about anything I’ve spoken about in this article than feel free to DM me or Tweet at me: &lt;a href="https://www.twitter.com/LukeHGlazebrook"&gt;@LukeHGlazebrook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also if you would like to see &lt;code&gt;linaria&lt;/code&gt; in action then check out my website @ &lt;a href="https://glazebrook.dev"&gt;https://glazebrook.dev&lt;/a&gt;&lt;/p&gt;


</description>
      <category>javascript</category>
      <category>gatsby</category>
      <category>react</category>
      <category>cssinjs</category>
    </item>
  </channel>
</rss>
