<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Leigh Halliday&apos;s RSS Feed</title><description>Leigh Halliday is a staff engineer at Wrapbook. He writes about Ruby, Rails, React, and JavaScript.</description><link>https://www.leighhalliday.com</link><item><title>MongoDB GeoJSON Schema Validation</title><link>https://www.leighhalliday.com/mongodb-geojson-schema-validation</link><guid isPermaLink="true">https://www.leighhalliday.com/mongodb-geojson-schema-validation</guid><description>If you want to save the location of someone, something, or somewhere, you&apos;ll need to store its coordinates. In this article we&apos;ll be looking at a Point , a singular location with…</description><pubDate>Mon, 06 Jul 2020 12:00:00 GMT</pubDate><category>javascript</category><category>mongodb</category></item><item><title>How To Mock Fetch in Jest</title><link>https://www.leighhalliday.com/mock-fetch-jest</link><guid isPermaLink="true">https://www.leighhalliday.com/mock-fetch-jest</guid><description>Making HTTP requests in tests isn&apos;t a great idea in most situations... it can slow your tests down, is unreliable, and the API you are making requests to may not appreciate it…</description><pubDate>Fri, 15 May 2020 12:00:00 GMT</pubDate><category>javascript</category><category>testing</category><category>jest</category></item><item><title>How to use Reduce in JavaScript</title><link>https://www.leighhalliday.com/reduce-javascript</link><guid isPermaLink="true">https://www.leighhalliday.com/reduce-javascript</guid><description>The reduce function of an Array is one of the most versatile functions in JavaScript. With it you can accomplish a lot of the functions from the Array and Math objects. It&apos;s job…</description><pubDate>Sat, 09 May 2020 12:00:00 GMT</pubDate><category>javascript</category></item><item><title>How to Publish an NPM Package</title><link>https://www.leighhalliday.com/publish-npm-package</link><guid isPermaLink="true">https://www.leighhalliday.com/publish-npm-package</guid><description>Publishing an NPM package with TypeScript has never been easier with the help of tsdx, a wonderful package from Jared Palmer, who also happens to be the creator of Formik for…</description><pubDate>Thu, 09 Jan 2020 12:00:00 GMT</pubDate><category>npm</category><category>javascript</category><category>react</category></item><item><title>Leaflet Marker Clustering</title><link>https://www.leighhalliday.com/leaflet-clustering</link><guid isPermaLink="true">https://www.leighhalliday.com/leaflet-clustering</guid><description>Performance can begin to degrade pretty quickly when you are trying to show large amounts of data on a map. Even at hundreds of markers using Leaflet via React Leaflet, you may…</description><pubDate>Wed, 08 Jan 2020 12:00:00 GMT</pubDate><category>react</category><category>hooks</category><category>maps</category></item><item><title>Google Maps Marker Clustering</title><link>https://www.leighhalliday.com/google-maps-clustering</link><guid isPermaLink="true">https://www.leighhalliday.com/google-maps-clustering</guid><description>Performance can begin to degrade pretty quickly when you are trying to show large amounts of data on a map. Even at hundreds of markers using Google Maps via google-map-react, you…</description><pubDate>Sun, 29 Dec 2019 12:00:00 GMT</pubDate><category>react</category><category>hooks</category><category>maps</category></item><item><title>Mapbox Marker Clustering</title><link>https://www.leighhalliday.com/mapbox-clustering</link><guid isPermaLink="true">https://www.leighhalliday.com/mapbox-clustering</guid><description>Performance can begin to degrade pretty quickly when you are trying to show large amounts of data on a map. Even at hundreds of markers using Mapbox via react-map-gl, you may feel…</description><pubDate>Fri, 27 Dec 2019 12:00:00 GMT</pubDate><category>react</category><category>hooks</category><category>maps</category></item><item><title>Replacing Redux with React Hooks</title><link>https://www.leighhalliday.com/replacing-redux-with-react-hooks</link><guid isPermaLink="true">https://www.leighhalliday.com/replacing-redux-with-react-hooks</guid><description>Redux has been the go-to way to manage state within your React application for years. It&apos;s popularity is due in large part because when it was introduced, it solved a number of…</description><pubDate>Wed, 18 Dec 2019 12:00:00 GMT</pubDate><category>react</category><category>redux</category><category>hooks</category></item><item><title>How Does SWR Work?</title><link>https://www.leighhalliday.com/how-does-swr-work</link><guid isPermaLink="true">https://www.leighhalliday.com/how-does-swr-work</guid><description>SWR is a great package from Zeit to help make it easier to fetch remote data with hooks. It is based on the stale-while-revalidate RFC, which in simple terms says to show stale…</description><pubDate>Sun, 15 Dec 2019 12:00:00 GMT</pubDate><category>react</category><category>hooks</category></item><item><title>Secrets and Environment Variables in Next.js and Now</title><link>https://www.leighhalliday.com/secrets-env-vars-nextjs-now</link><guid isPermaLink="true">https://www.leighhalliday.com/secrets-env-vars-nextjs-now</guid><description>Zeit has great documentation, but it took me a while to understand the difference between environment variables (secrets) on the serverless side vs how to get env vars exposed and…</description><pubDate>Sat, 07 Sep 2019 12:00:00 GMT</pubDate><category>serverless</category><category>nextjs</category></item><item><title>Serverless OG Image</title><link>https://www.leighhalliday.com/serverless-og-image</link><guid isPermaLink="true">https://www.leighhalliday.com/serverless-og-image</guid><description>If you&apos;ve ever pasted a URL from an article on dev.to into Slack, Twitter, Facebook or LinkedIn, you&apos;ll notice they have an awesome social share image that is included. Little did…</description><pubDate>Mon, 15 Jul 2019 12:00:00 GMT</pubDate><category>serverless</category></item><item><title>Iterate over Objects in JavaScript</title><link>https://www.leighhalliday.com/iterate-objects-javascript</link><guid isPermaLink="true">https://www.leighhalliday.com/iterate-objects-javascript</guid><description>How do you iterate over objects in JavaScript? In this article we&apos;ll answer this question by showing 3 alternatives. The data we&apos;ll be using for this article contains the name of…</description><pubDate>Wed, 26 Jun 2019 12:00:00 GMT</pubDate><category>javascript</category></item><item><title>Tagged Template Literals</title><link>https://www.leighhalliday.com/tagged-template-literals</link><guid isPermaLink="true">https://www.leighhalliday.com/tagged-template-literals</guid><description>I kept seeing Tagged Template Literals in a number of popular libraries, but I didn&apos;t understand how they worked. This article explores what they are, how they&apos;re used &quot;in the…</description><pubDate>Tue, 02 Apr 2019 12:00:00 GMT</pubDate><category>javascript</category></item><item><title>Using the useEffect hook</title><link>https://www.leighhalliday.com/use-effect-hook</link><guid isPermaLink="true">https://www.leighhalliday.com/use-effect-hook</guid><description>useEffect is meant to handle any sort of &quot;side effect&quot; (making a change in some external system, logging to the console, making an HTTP request, etc...) that is triggered by a…</description><pubDate>Thu, 28 Mar 2019 12:00:00 GMT</pubDate><category>react</category><category>hooks</category></item><item><title>Generating TypeScript Types from GraphQL Schema in Apollo</title><link>https://www.leighhalliday.com/generating-types-apollo</link><guid isPermaLink="true">https://www.leighhalliday.com/generating-types-apollo</guid><description>GraphQL is a typed language, so why redefine all of the types ourselves inside our TypeScript code when we should be able to take advantage of the types coming from GraphQL and…</description><pubDate>Sun, 24 Mar 2019 12:00:00 GMT</pubDate><category>typescript</category><category>graphql</category></item><item><title>Async Axios in React Testing Library</title><link>https://www.leighhalliday.com/async-axios-react-testing-library</link><guid isPermaLink="true">https://www.leighhalliday.com/async-axios-react-testing-library</guid><description>In this article we&apos;ll take a look at how to handle async code in React Testing Library, specifically at how to test and mock a call using Axios. Async code... waiting for an…</description><pubDate>Thu, 07 Mar 2019 12:00:00 GMT</pubDate><category>react</category><category>testing</category><category>react-testing-library</category></item><item><title>Firing Events in React Testing Library</title><link>https://www.leighhalliday.com/firing-events-react-testing-library</link><guid isPermaLink="true">https://www.leighhalliday.com/firing-events-react-testing-library</guid><description>In this article we&apos;ll see how to fire and test events in our React components using the React Testing Library. With React Testing Library it&apos;s very easy to simulate browser events…</description><pubDate>Thu, 07 Mar 2019 12:00:00 GMT</pubDate><category>react</category><category>testing</category><category>react-testing-library</category></item><item><title>Introduction to the React Testing Library</title><link>https://www.leighhalliday.com/introduction-react-testing-library</link><guid isPermaLink="true">https://www.leighhalliday.com/introduction-react-testing-library</guid><description>React Testing Library is an amazing yet simple testing library from Kent Dodds. It works alongside the testing library Jest to provide React specific testing for snapshots,…</description><pubDate>Tue, 29 Jan 2019 12:00:00 GMT</pubDate><category>react</category><category>testing</category><category>react-testing-library</category></item><item><title>React Hooks with Apollo GraphQL</title><link>https://www.leighhalliday.com/react-hooks-with-apollo-graphql</link><guid isPermaLink="true">https://www.leighhalliday.com/react-hooks-with-apollo-graphql</guid><description>With React 16.7 we were introduced to hooks. A way to allow things like state, refs, and lifecycle functions to live inside functional components, functionality once only…</description><pubDate>Sun, 09 Dec 2018 12:00:00 GMT</pubDate><category>react</category><category>graphql</category><category>hooks</category></item><item><title>Using apollo-link-rest to use GraphQL with your RESTful endpoints</title><link>https://www.leighhalliday.com/using-apollo-link-rest</link><guid isPermaLink="true">https://www.leighhalliday.com/using-apollo-link-rest</guid><description>So you&apos;ve updated your React code to use GraphQL, but there&apos;s those 2 RESTful API endpoints that you still have to integrate with... what do you do? You could use fetch or axios…</description><pubDate>Tue, 06 Nov 2018 12:00:00 GMT</pubDate><category>react</category><category>graphql</category></item><item><title>React and Purity</title><link>https://www.leighhalliday.com/react-purity</link><guid isPermaLink="true">https://www.leighhalliday.com/react-purity</guid><description>React gets its name from being reactive to changes in your data. When data changes, the UI reacts to those changes to re-render the page to match the data. Data is known as two…</description><pubDate>Wed, 24 Oct 2018 12:00:00 GMT</pubDate><category>react</category><category>javascript</category></item><item><title>How to use GraphQL with React</title><link>https://www.leighhalliday.com/how-to-use-graphql-with-react</link><guid isPermaLink="true">https://www.leighhalliday.com/how-to-use-graphql-with-react</guid><description>GraphQL is an amazing new(ish) paradigm for communicating with APIs, made popular by Facebook but since then used by many companies including Shopify and as we will see in this…</description><pubDate>Sun, 13 May 2018 12:00:00 GMT</pubDate><category>react</category><category>graphql</category><category>javascript</category></item><item><title>Map, Reduce, Filter, and Pie Charts</title><link>https://www.leighhalliday.com/map-reduce-filter-and-pie-charts</link><guid isPermaLink="true">https://www.leighhalliday.com/map-reduce-filter-and-pie-charts</guid><description>Data comes in all sorts and sizes, and one of the key skills a developer can have is how to convert it into the required format and shape. In this article we&apos;ll convert data…</description><pubDate>Tue, 24 Apr 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category></item><item><title>Mocking Axios in Jest + Testing Async Functions</title><link>https://www.leighhalliday.com/mocking-axios-in-jest-testing-async-functions</link><guid isPermaLink="true">https://www.leighhalliday.com/mocking-axios-in-jest-testing-async-functions</guid><description>In our tests we don&apos;t want to perform an actual HTTP request. To start with it is slow, but there are certain calls you really can&apos;t make with every test run, for example charging…</description><pubDate>Mon, 09 Apr 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>testing</category><category>jest</category></item><item><title>Testing Asynchronous Components with Mocks in Jest</title><link>https://www.leighhalliday.com/testing-asynchronous-components-mocks-jest</link><guid isPermaLink="true">https://www.leighhalliday.com/testing-asynchronous-components-mocks-jest</guid><description>In this article below we will test a component which runs asynchronous code inside of its componentDidMount lifecycle event. We&apos;ll look at how to avoid making real AJAX requests…</description><pubDate>Fri, 06 Apr 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>testing</category><category>jest</category></item><item><title>Introducing the React Context API</title><link>https://www.leighhalliday.com/introducing-react-context-api</link><guid isPermaLink="true">https://www.leighhalliday.com/introducing-react-context-api</guid><description>The new React Context API is touted (at least on Twitter and a number of articles) as solving the need to use a state management tool, when I think in reality what it solves is…</description><pubDate>Wed, 04 Apr 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category></item><item><title>Error Boundaries and Render Props</title><link>https://www.leighhalliday.com/error-boundaries-and-render-props</link><guid isPermaLink="true">https://www.leighhalliday.com/error-boundaries-and-render-props</guid><description>Error boundaries were introduced in React 16.2 and provide a sort of declarative try/catch pattern for you to handle errors which occur during the render of a component. In this…</description><pubDate>Mon, 02 Apr 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category></item><item><title>Testing React with Jest, Enzyme, and Sinon</title><link>https://www.leighhalliday.com/testing-react-jest-enzyme-sinon</link><guid isPermaLink="true">https://www.leighhalliday.com/testing-react-jest-enzyme-sinon</guid><description>In this article we&apos;ll look at how to get up and running with testing React in a create-react-app. We&apos;ll look at how to configure your tests and tackle 3 common testing patterns.…</description><pubDate>Thu, 29 Mar 2018 12:00:00 GMT</pubDate><category>react</category><category>jest</category><category>testing</category><category>javascript</category></item><item><title>Introduction to React Motion Tutorial</title><link>https://www.leighhalliday.com/introduction-react-motion-tutorial</link><guid isPermaLink="true">https://www.leighhalliday.com/introduction-react-motion-tutorial</guid><description>React Motion is an animation library loved within the React community. I have to say that having some experience with libraries like GSAP, it isn&apos;t the easiest to comprehend, but…</description><pubDate>Sat, 17 Mar 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>animations</category></item><item><title>Easy MobX and Redux Comparison</title><link>https://www.leighhalliday.com/easy-mobx-redux-comparison</link><guid isPermaLink="true">https://www.leighhalliday.com/easy-mobx-redux-comparison</guid><description>In this article/video we&apos;ll start with a simple React app made with create-react-app that uses component state (setState) as its state management. We&apos;ll then take it from…</description><pubDate>Tue, 13 Mar 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>mobx</category><category>redux</category></item><item><title>Best Ruby &amp; Ruby on Rails Resources</title><link>https://www.leighhalliday.com/best-ruby-and-ruby-on-rails-resources</link><guid isPermaLink="true">https://www.leighhalliday.com/best-ruby-and-ruby-on-rails-resources</guid><description>I wanted to compile an ultimate list of Ruby resources, books, courses, people to follow, etc... This list contains resources I have used over the years while learning and writing…</description><pubDate>Sun, 11 Mar 2018 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>MobX Async Actions</title><link>https://www.leighhalliday.com/mobx-async-actions</link><guid isPermaLink="true">https://www.leighhalliday.com/mobx-async-actions</guid><description>I&apos;ve always loved MobX because of it&apos;s lack of boilerplate in comparison to Redux. It just seems so effortless to modify state... so how does it fare with Async code? In Redux…</description><pubDate>Wed, 07 Mar 2018 12:00:00 GMT</pubDate><category>javascript</category><category>mobx</category><category>react</category></item><item><title>Using Refs in React</title><link>https://www.leighhalliday.com/using-refs-in-react</link><guid isPermaLink="true">https://www.leighhalliday.com/using-refs-in-react</guid><description>Currently there are 3 distinct ways of using refs in React. A ref gives you access to the underlying DOM element. This is especially useful when interfacing with libraries which…</description><pubDate>Sun, 25 Feb 2018 12:00:00 GMT</pubDate><category>javascript</category><category>react</category></item><item><title>Introduction to MobX State Tree</title><link>https://www.leighhalliday.com/introduction-mobx-state-tree</link><guid isPermaLink="true">https://www.leighhalliday.com/introduction-mobx-state-tree</guid><description>MobX State Tree takes something which is awesome (MobX) and brings it to the next level. You can now define your own typed models, made up of typed fields, and have them all…</description><pubDate>Mon, 19 Feb 2018 12:00:00 GMT</pubDate><category>react</category><category>javascript</category><category>mobx</category></item><item><title>MobX in Create React App Without Ejecting</title><link>https://www.leighhalliday.com/mobx-create-react-app-without-ejecting</link><guid isPermaLink="true">https://www.leighhalliday.com/mobx-create-react-app-without-ejecting</guid><description>You do not have to eject from create-react-app to get support for decorators and other babel plugins. MobX works fantastic with decorators and I&apos;ve always been ejecting to get…</description><pubDate>Fri, 09 Feb 2018 12:00:00 GMT</pubDate><category>mobx</category><category>javascript</category><category>react</category></item><item><title>Create React App with MobX using Decorators</title><link>https://www.leighhalliday.com/create-react-app-mobx-decorators</link><guid isPermaLink="true">https://www.leighhalliday.com/create-react-app-mobx-decorators</guid><description>Create React App is a great way to get up and running with React. It comes configured with sane defaults which are great for most people, but unfortunately we&apos;ll need to make a…</description><pubDate>Tue, 24 Oct 2017 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>mobx</category></item><item><title>Named Captures in Ruby Regular Expressions</title><link>https://www.leighhalliday.com/named-captures-ruby-regular-expressions</link><guid isPermaLink="true">https://www.leighhalliday.com/named-captures-ruby-regular-expressions</guid><description>In Ruby we can use the match method which belongs to the String class to both check a string for a regular expression match but also to extract data using captures. Captures allow…</description><pubDate>Thu, 01 Sep 2016 12:00:00 GMT</pubDate><category>ruby</category><category>regex</category></item><item><title>Introduction to Mobx and React</title><link>https://www.leighhalliday.com/mobx-react-introduction</link><guid isPermaLink="true">https://www.leighhalliday.com/mobx-react-introduction</guid><description>In this video tutorial I show how to get up and running with Mobx in a React app. We will go from create-react-app all that way to having a fully functioning Mobx store connected…</description><pubDate>Tue, 16 Feb 2016 12:00:00 GMT</pubDate><category>javascript</category><category>react</category><category>mobx</category></item><item><title>Building a CLI in Ruby with GLI</title><link>https://www.leighhalliday.com/building-cli-ruby-with-gli</link><guid isPermaLink="true">https://www.leighhalliday.com/building-cli-ruby-with-gli</guid><description>Typically in Rails apps we use rake tasks as a way to interact with our application through the command line. We&apos;re all familiar with running code like rake db:migrate , or custom…</description><pubDate>Wed, 25 Nov 2015 12:00:00 GMT</pubDate><category>ruby</category><category>ruby-on-rails</category><category>cli</category></item><item><title>Is it nil?</title><link>https://www.leighhalliday.com/is-it-nil</link><guid isPermaLink="true">https://www.leighhalliday.com/is-it-nil</guid><description>What is actually happening under the covers in Ruby when you ask if a variable is nil? It turns out that it&apos;s way simpler than you may think, and it all comes down to object…</description><pubDate>Wed, 25 Nov 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>Skinny controllers through refactoring</title><link>https://www.leighhalliday.com/skinny-controllers-through-refactoring</link><guid isPermaLink="true">https://www.leighhalliday.com/skinny-controllers-through-refactoring</guid><description>Controllers can get out of control. Their job should generally be quite simple. In an MVC framework such as Rails, they should have the job of knowing how to work with the Model…</description><pubDate>Wed, 25 Nov 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Understanding method missing</title><link>https://www.leighhalliday.com/understanding-method-missing</link><guid isPermaLink="true">https://www.leighhalliday.com/understanding-method-missing</guid><description>In this article we are going to look at method missing and respond to missing? in order to see what they do and how they can be used. We&apos;re going to re-create the StringInquirer…</description><pubDate>Tue, 08 Sep 2015 12:00:00 GMT</pubDate><category>ruby</category><category>metaprogramming</category><category>ruby-on-rails</category></item><item><title>Exploring some string methods</title><link>https://www.leighhalliday.com/exploring-some-string-methods</link><guid isPermaLink="true">https://www.leighhalliday.com/exploring-some-string-methods</guid><description>I&apos;m working with an API which requires a phone number to be in the format 555-555-5555. As much as you want your users to enter it in that format, they won&apos;t always do that...…</description><pubDate>Thu, 13 Aug 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>A Stack in Ruby using Linked Lists</title><link>https://www.leighhalliday.com/stack-in-ruby-linked-lists</link><guid isPermaLink="true">https://www.leighhalliday.com/stack-in-ruby-linked-lists</guid><description>What is a Stack? A Stack is an abstract data type in programming which has a variety of uses. The basic premise of a Stack is that you can add a new value to the end (pushing),…</description><pubDate>Fri, 03 Jul 2015 12:00:00 GMT</pubDate><category>ruby</category><category>algorithms</category></item><item><title>Weighted Quick Union &amp; Quick Find Algorithm in Ruby</title><link>https://www.leighhalliday.com/weighted-quick-union-find-algorithm-in-ruby</link><guid isPermaLink="true">https://www.leighhalliday.com/weighted-quick-union-find-algorithm-in-ruby</guid><description>Today we&apos;re going to explore a Ruby implementation of the Weighted Quick Union &amp; Quick Find algorithm. This is an algorithm used to find if there is a connection between two…</description><pubDate>Mon, 29 Jun 2015 12:00:00 GMT</pubDate><category>ruby</category><category>algorithms</category></item><item><title>Showing similar results in Postgres</title><link>https://www.leighhalliday.com/showing-results-for-trigrams-in-postgres</link><guid isPermaLink="true">https://www.leighhalliday.com/showing-results-for-trigrams-in-postgres</guid><description>Correcting for spelling mistakes If you search &quot;trgrams in pstgres&quot; in Google, you&apos;ll get results for &quot;trigrams in postgres&quot;. To say that is useful is an understatement! Recently…</description><pubDate>Thu, 25 Jun 2015 12:00:00 GMT</pubDate><category>postgres</category></item><item><title>Avoid race conditions in Rails with Postgres locks</title><link>https://www.leighhalliday.com/avoid-race-conditions-with-postgres-locks</link><guid isPermaLink="true">https://www.leighhalliday.com/avoid-race-conditions-with-postgres-locks</guid><description>Race conditions A race condition or race hazard is the behavior of an electronic, software or other system where the output is dependent on the sequence or timing of other…</description><pubDate>Tue, 16 Jun 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category><category>postgres</category></item><item><title>CORS in Phoenix</title><link>https://www.leighhalliday.com/cors-in-phoenix</link><guid isPermaLink="true">https://www.leighhalliday.com/cors-in-phoenix</guid><description>Single page applications Single page applications (SPA) are becoming more and more popular, often replacing the more traditional server rendered websites that are common in Rails…</description><pubDate>Thu, 11 Jun 2015 12:00:00 GMT</pubDate><category>elixir</category><category>cors</category><category>api</category></item><item><title>Recursion in Elixir</title><link>https://www.leighhalliday.com/recursion-in-elixir</link><guid isPermaLink="true">https://www.leighhalliday.com/recursion-in-elixir</guid><description>Intro I recently wrote an article on Recursion in Ruby, and this is meant to be its Elixir counterpart. It will provide a way to compare solving the same problems in both…</description><pubDate>Sat, 30 May 2015 12:00:00 GMT</pubDate><category>elixir</category><category>algorithms</category></item><item><title>Recursion in Ruby</title><link>https://www.leighhalliday.com/recursion-in-ruby</link><guid isPermaLink="true">https://www.leighhalliday.com/recursion-in-ruby</guid><description>This article is the counterpart to one I wrote on Recursion in Elixir. What is recursion? Recursion in computer science is a method where the solution to a problem depends on…</description><pubDate>Tue, 26 May 2015 12:00:00 GMT</pubDate><category>ruby</category><category>algorithms</category></item><item><title>FizzBuzz in Elixir</title><link>https://www.leighhalliday.com/fizzbuzz-in-elixir</link><guid isPermaLink="true">https://www.leighhalliday.com/fizzbuzz-in-elixir</guid><description>Intro... learning Elixir This is my first post in the new Elixir category I&apos;ve set up on my site. I&apos;m new to Elixir and functional programming in general, aside from a Scala…</description><pubDate>Fri, 15 May 2015 12:00:00 GMT</pubDate><category>elixir</category><category>algorithms</category></item><item><title>My solution to Software Engineer challenge</title><link>https://www.leighhalliday.com/solution-software-engineer-interview-challenge</link><guid isPermaLink="true">https://www.leighhalliday.com/solution-software-engineer-interview-challenge</guid><description>The challenge Write a program that outputs all possibilities to put + or - or nothing between the numbers 1, 2, ..., 9 (in this order) such that the result is always 100. For…</description><pubDate>Sat, 09 May 2015 12:00:00 GMT</pubDate><category>ruby</category><category>algorithms</category></item><item><title>Requiring Uniqueness in Rails</title><link>https://www.leighhalliday.com/requiring-uniqueness-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/requiring-uniqueness-in-rails</guid><description>How to ensure your values are unique It&apos;s often the case that you want to ensure that you&apos;ve got uniqueness in your data. You only want an email address to be used once...…</description><pubDate>Thu, 30 Apr 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Object hierarchy in Ruby</title><link>https://www.leighhalliday.com/object-hierarchy-in-ruby</link><guid isPermaLink="true">https://www.leighhalliday.com/object-hierarchy-in-ruby</guid><description>As a way to better understand how Ruby works, I started to dive into how object hierarchies work in the language. We&apos;re going to be covering the default ancestry chain in Ruby,…</description><pubDate>Thu, 23 Apr 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>Where is this method defined?</title><link>https://www.leighhalliday.com/where-is-this-method-defined</link><guid isPermaLink="true">https://www.leighhalliday.com/where-is-this-method-defined</guid><description>My problems today Today I was trying to write a test for a method, and I was expecting certain behaviour that I definitely wasn&apos;t getting. Why was this method returning me a valid…</description><pubDate>Thu, 23 Apr 2015 12:00:00 GMT</pubDate><category>ruby</category><category>metaprogramming</category></item><item><title>Savon - SOAP that doesn&apos;t leave you feeling dirty</title><link>https://www.leighhalliday.com/savon-soap-doesnt-leave-you-feeling-dirty</link><guid isPermaLink="true">https://www.leighhalliday.com/savon-soap-doesnt-leave-you-feeling-dirty</guid><description>Can you do this integration? Is what I was asked. Oh no... it&apos;s in SOAP? Instantly all the time I spent working with SOAP APIs in PHP flashed before my eyes, bringing back…</description><pubDate>Thu, 16 Apr 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category><category>soap</category><category>api</category></item><item><title>Ruby Metaprogramming - Method Missing</title><link>https://www.leighhalliday.com/ruby-metaprogramming-method-missing</link><guid isPermaLink="true">https://www.leighhalliday.com/ruby-metaprogramming-method-missing</guid><description>What is method missing? method missing is a method that ruby gives you access inside of your objects a way to handle situations when you call a method that doesn&apos;t exist. It&apos;s…</description><pubDate>Mon, 06 Apr 2015 12:00:00 GMT</pubDate><category>ruby</category><category>metaprogramming</category></item><item><title>Ruby Metaprogramming - Creating Methods</title><link>https://www.leighhalliday.com/ruby-metaprogramming-creating-methods</link><guid isPermaLink="true">https://www.leighhalliday.com/ruby-metaprogramming-creating-methods</guid><description>Creating Methods In this post I&apos;ll be discussing another aspect of metaprogramming in Ruby. The ability to create methods dynamically, during runtime. There are many reasons to do…</description><pubDate>Wed, 01 Apr 2015 12:00:00 GMT</pubDate><category>ruby</category><category>metaprogramming</category></item><item><title>Ruby Introspection - Metaprogramming</title><link>https://www.leighhalliday.com/ruby-introspection-metaprogramming</link><guid isPermaLink="true">https://www.leighhalliday.com/ruby-introspection-metaprogramming</guid><description>What is metaprogramming? You might have heard the term metaprogramming before, but what is it and what does it have to do with Ruby? To start off, let&apos;s look at the Wikipedia…</description><pubDate>Fri, 20 Mar 2015 12:00:00 GMT</pubDate><category>ruby</category><category>metaprogramming</category></item><item><title>Creating a Ruby DSL</title><link>https://www.leighhalliday.com/creating-ruby-dsl</link><guid isPermaLink="true">https://www.leighhalliday.com/creating-ruby-dsl</guid><description>Overview I&apos;ve been in Colombia for the last month visiting family, and last week I had the opportunity to hang out with the Medellin.rb meetup. It was led by Oscar Rendon and it…</description><pubDate>Thu, 12 Mar 2015 12:00:00 GMT</pubDate><category>ruby</category><category>dsl</category></item><item><title>The simple but powerful Ruby Struct</title><link>https://www.leighhalliday.com/ruby-struct</link><guid isPermaLink="true">https://www.leighhalliday.com/ruby-struct</guid><description>What is a Struct? A Struct in Ruby is one of the built-in classes which basically acts a little like a normal custom user-created class, but provides some nice default…</description><pubDate>Mon, 23 Feb 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>Intro to MongoDB for Postgres developers</title><link>https://www.leighhalliday.com/intro-to-mongodb-for-postgres-developers</link><guid isPermaLink="true">https://www.leighhalliday.com/intro-to-mongodb-for-postgres-developers</guid><description>Intro to MongoDB MongoDB is an object or document based database... in other words, a NoSQL database. This puts it in contrast to databases such as MySQL, PostgreSQL, or SQLite,…</description><pubDate>Fri, 20 Feb 2015 12:00:00 GMT</pubDate><category>mongodb</category><category>postgres</category></item><item><title>Why doesn&apos;t my code work outside of Rails?</title><link>https://www.leighhalliday.com/why-doesnt-my-code-work-outside-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/why-doesnt-my-code-work-outside-rails</guid><description>Situation Maybe you originally wrote some code for a Rails project that you&apos;re trying to use in another framework, in an automation script, or in a Gem that you&apos;re extracting out…</description><pubDate>Thu, 19 Feb 2015 12:00:00 GMT</pubDate><category>ruby</category><category>ruby-on-rails</category></item><item><title>What is Rack?</title><link>https://www.leighhalliday.com/what-is-rack</link><guid isPermaLink="true">https://www.leighhalliday.com/what-is-rack</guid><description>The basics of Rack Taken from the Rack website: Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks. It gives a large number of webservers…</description><pubDate>Fri, 13 Feb 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>8 tips on how to choose a technology</title><link>https://www.leighhalliday.com/tips-on-how-to-choose-a-technology</link><guid isPermaLink="true">https://www.leighhalliday.com/tips-on-how-to-choose-a-technology</guid><description>Deciding on technologies When deciding on which technologies to focus your time and energy on to learn, or whether it makes sense to use one over another on any given project, it…</description><pubDate>Fri, 06 Feb 2015 12:00:00 GMT</pubDate><category>career</category></item><item><title>Embracing change and choosing your identity</title><link>https://www.leighhalliday.com/embracing-change-and-choosing-your-identity</link><guid isPermaLink="true">https://www.leighhalliday.com/embracing-change-and-choosing-your-identity</guid><description>My switch from PHP to Ruby as primary language About 3 years ago I started coding the first version of FlipGive, an online fundraising platform. It was written in PHP. Why?…</description><pubDate>Fri, 06 Feb 2015 12:00:00 GMT</pubDate><category>career</category></item><item><title>Tree Structures in your Rails models</title><link>https://www.leighhalliday.com/tree-structures-in-your-rails-models</link><guid isPermaLink="true">https://www.leighhalliday.com/tree-structures-in-your-rails-models</guid><description>What are tree structures used for? Tree structures are needed any time you want to insert a hierarchy into your data. It&apos;s when you want to store relationships between data of the…</description><pubDate>Wed, 04 Feb 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>When your Rails app slows to a crawl</title><link>https://www.leighhalliday.com/when-your-rails-app-slows-to-a-crawl</link><guid isPermaLink="true">https://www.leighhalliday.com/when-your-rails-app-slows-to-a-crawl</guid><description>Hi, Leigh, are you busy? The website is no longer responding... can you investigate? A phone call nobody really likes to receive on a Saturday. We launched a new website on Friday…</description><pubDate>Sat, 31 Jan 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Implementing Ruby&apos;s Collect Method</title><link>https://www.leighhalliday.com/implementing-rubys-collect-method</link><guid isPermaLink="true">https://www.leighhalliday.com/implementing-rubys-collect-method</guid><description>Ruby&apos;s Collect method Ruby&apos;s collect method is part of the Enumerable mixin; a mixin which provides very useful and powerful methods for collection objects. collect is a method I…</description><pubDate>Sun, 25 Jan 2015 12:00:00 GMT</pubDate><category>ruby</category><category>enumerable</category></item><item><title>Implementing Ruby&apos;s Tap Method</title><link>https://www.leighhalliday.com/implementing-rubys-tap-method</link><guid isPermaLink="true">https://www.leighhalliday.com/implementing-rubys-tap-method</guid><description>What is the Tap method? Ruby&apos;s tap method allows you to &quot;tap into&quot; a method chain, modify an object and receive that same object as the result. An Engine Yard blog recently spoke…</description><pubDate>Sat, 24 Jan 2015 12:00:00 GMT</pubDate><category>ruby</category></item><item><title>Copying Postgres Table with its Attributes</title><link>https://www.leighhalliday.com/copying-postgres-table-with-its-attributes</link><guid isPermaLink="true">https://www.leighhalliday.com/copying-postgres-table-with-its-attributes</guid><description>Why do this? Recently at work we had 1 data model that was getting a bit out of control. When we first modelled the data it made sense, but over time business requirements change…</description><pubDate>Fri, 23 Jan 2015 12:00:00 GMT</pubDate><category>postgres</category></item><item><title>Working with Enumerables Four powerful collection methods</title><link>https://www.leighhalliday.com/working-with-enumerables-four-powerful-collection-methods</link><guid isPermaLink="true">https://www.leighhalliday.com/working-with-enumerables-four-powerful-collection-methods</guid><description>What is an Enumerable? Enumerable is a Ruby mixin/module which provides a large set of functionality to collection classes. You already know of some objects which are enumerable…</description><pubDate>Thu, 22 Jan 2015 12:00:00 GMT</pubDate><category>ruby</category><category>enumerable</category></item><item><title>Adding translations to your Rails website</title><link>https://www.leighhalliday.com/adding-translations-to-your-rails-website</link><guid isPermaLink="true">https://www.leighhalliday.com/adding-translations-to-your-rails-website</guid><description>Why does this site have I18n? It&apos;s a good question because my content is only available in English (perhaps I should write some articles in Spanish??). The answer is that the code…</description><pubDate>Wed, 14 Jan 2015 12:00:00 GMT</pubDate><category>i18n</category><category>ruby-on-rails</category></item><item><title>Learning Tips for the Software Developer</title><link>https://www.leighhalliday.com/learning-tips-for-the-software-developer</link><guid isPermaLink="true">https://www.leighhalliday.com/learning-tips-for-the-software-developer</guid><description>The life of a developer Working as a software developer is the decision to become a lifelong learner. What you learn today has a good chance of being obsolete a few years from…</description><pubDate>Fri, 09 Jan 2015 12:00:00 GMT</pubDate><category>career</category></item><item><title>Can I Use Angular in my Rails App?</title><link>https://www.leighhalliday.com/can-i-use-angular-in-my-rails-app</link><guid isPermaLink="true">https://www.leighhalliday.com/can-i-use-angular-in-my-rails-app</guid><description>Using Angular in Rails App Single Page Applications (SPA) aren’t incredibly new any more, but there are a lot of people with Rails applications using a more traditional…</description><pubDate>Tue, 06 Jan 2015 12:00:00 GMT</pubDate><category>angular</category><category>ruby-on-rails</category></item><item><title>User Authentication in Rails</title><link>https://www.leighhalliday.com/user-authentication-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/user-authentication-in-rails</guid><description>Our Goal In this article I&apos;d like to discuss how to implement user authentication into this blog. In this article about modelling the data for our blog we talked about wanting to…</description><pubDate>Sat, 03 Jan 2015 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Easily Upgrading from RSpec 2.x to 3.x with Transpec</title><link>https://www.leighhalliday.com/upgrading-rspec-2x-to-3x-with-transpec</link><guid isPermaLink="true">https://www.leighhalliday.com/upgrading-rspec-2x-to-3x-with-transpec</guid><description>Background At FlipGive we use RSpec to handle all of our testing. Over the years we&apos;ve built up quite a few tests... last count there are 2130 of them, which take 3 minutes and 20…</description><pubDate>Wed, 31 Dec 2014 12:00:00 GMT</pubDate><category>rspec</category><category>ruby-on-rails</category></item><item><title>Building an admin section in Rails</title><link>https://www.leighhalliday.com/building-an-admin-section-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/building-an-admin-section-in-rails</guid><description>Today&apos;s Goal: Creating an Admin Section This website, along with most of the other ones I create end up having an admin section; a place where data can be created and managed.…</description><pubDate>Thu, 18 Dec 2014 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Postgres Insights with PgHero</title><link>https://www.leighhalliday.com/postgres-insights-pghero</link><guid isPermaLink="true">https://www.leighhalliday.com/postgres-insights-pghero</guid><description>What is PgHero? PgHero is a gem written by Andrew Kane for getting quick insights into how your Postgres database is performing and where there is room for improvement. It…</description><pubDate>Mon, 15 Dec 2014 12:00:00 GMT</pubDate><category>postgres</category><category>ruby-on-rails</category></item><item><title>How to model data in Rails</title><link>https://www.leighhalliday.com/how-to-model-data-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/how-to-model-data-in-rails</guid><description>Deciding What Models are Needed In my last article in this series, getting started with ruby on rails, we worked through getting Rails installed and creating a new application,…</description><pubDate>Sat, 13 Dec 2014 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Getting Started with Ruby on Rails</title><link>https://www.leighhalliday.com/getting-started-with-ruby-on-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/getting-started-with-ruby-on-rails</guid><description>Git Init The first thing I do when starting a new project is to create a new git repository. GitHub is great if you don&apos;t mind the code being public, or you don&apos;t mind paying to…</description><pubDate>Mon, 08 Dec 2014 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Sorting null values in PostgresSQL</title><link>https://www.leighhalliday.com/sorting-null-values-in-postgresql</link><guid isPermaLink="true">https://www.leighhalliday.com/sorting-null-values-in-postgresql</guid><description>The Problem Say you have a table of people and you want to sort them alphabetically by their nickname in descending order (Z - A). That works great as long as everyone has a…</description><pubDate>Sun, 07 Dec 2014 12:00:00 GMT</pubDate><category>postgres</category></item><item><title>The Basics of PSQL</title><link>https://www.leighhalliday.com/the-basics-of-psql</link><guid isPermaLink="true">https://www.leighhalliday.com/the-basics-of-psql</guid><description>Overview PSQL is the command line tool for accessing the PostgreSQL database. I recommend anyone using Postgres to at least learn the basics of how to navigate around and feel…</description><pubDate>Sun, 07 Dec 2014 12:00:00 GMT</pubDate><category>postgres</category></item><item><title>Mail Interceptors and Observers for Logging and Development</title><link>https://www.leighhalliday.com/mail-interceptors-and-observers</link><guid isPermaLink="true">https://www.leighhalliday.com/mail-interceptors-and-observers</guid><description>What is a Mail Interceptor? When using ActionMailer in Rails, there is a way to hook into the outbound message after you call the &quot;deliver&quot; method, but before it is actually sent…</description><pubDate>Fri, 28 Nov 2014 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Pull Requests for Quality, Training, and Shared Knowledge</title><link>https://www.leighhalliday.com/pull-requests-quality-training-shared-knowledge</link><guid isPermaLink="true">https://www.leighhalliday.com/pull-requests-quality-training-shared-knowledge</guid><description>Intro To Pull Requests A pull request is when you are wanting to merge code from one git branch to another, and instead of just merging it yourself, you send a request to another…</description><pubDate>Fri, 28 Nov 2014 12:00:00 GMT</pubDate><category>career</category></item><item><title>Responding with JSON in Rails</title><link>https://www.leighhalliday.com/responding-with-json-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/responding-with-json-in-rails</guid><description>When building a RESTful API in Rails, there are many different options and gems you can use to format your JSON responses. This isn&apos;t a post about how to build an API, but rather…</description><pubDate>Wed, 26 Nov 2014 12:00:00 GMT</pubDate><category>api</category><category>ruby-on-rails</category></item><item><title>Block Based Configuration</title><link>https://www.leighhalliday.com/block-based-configuration</link><guid isPermaLink="true">https://www.leighhalliday.com/block-based-configuration</guid><description>Block based configuration is a pattern you see quite a bit when using ruby. When I look at this website itself, there are 3 different gems that I am configuring using this…</description><pubDate>Mon, 24 Nov 2014 12:00:00 GMT</pubDate><category>ruby</category><category>ruby-on-rails</category></item><item><title>How To Succeed As a Junior Developer</title><link>https://www.leighhalliday.com/how-to-succeed-as-a-junior-developer</link><guid isPermaLink="true">https://www.leighhalliday.com/how-to-succeed-as-a-junior-developer</guid><description>10. Don&apos;t Feel Discouraged It&apos;s easy to feel discouraged when you first start at something... anything, not just programming. Lance Armstrong most likely started out with training…</description><pubDate>Tue, 18 Nov 2014 12:00:00 GMT</pubDate><category>career</category></item><item><title>Onboarding Junior Developers</title><link>https://www.leighhalliday.com/onboarding-junior-developers</link><guid isPermaLink="true">https://www.leighhalliday.com/onboarding-junior-developers</guid><description>Having The Right Mindset When bringing on junior developers to the team, you obviously have some goals for them, but you shouldn&apos;t forget that they have goals for themselves too.…</description><pubDate>Tue, 18 Nov 2014 12:00:00 GMT</pubDate><category>career</category></item><item><title>Creating QR Codes In Rails</title><link>https://www.leighhalliday.com/creating-qr-codes-in-rails</link><guid isPermaLink="true">https://www.leighhalliday.com/creating-qr-codes-in-rails</guid><description>Barby is a great gem for when you have to generate a barcode or QR code. You can choose to output it as any number of barcode types or as a QR code. This example will use a QR…</description><pubDate>Fri, 14 Nov 2014 12:00:00 GMT</pubDate><category>ruby-on-rails</category></item><item><title>Translating Your Ruby on Rails Application</title><link>https://www.leighhalliday.com/translating-your-ruby-on-rails-application</link><guid isPermaLink="true">https://www.leighhalliday.com/translating-your-ruby-on-rails-application</guid><description>Goal If you&apos;re planning to take over the world (or a smaller but no less noble task of taking over Canada), you&apos;ll either need to convince everyone to speak your language, or…</description><pubDate>Thu, 13 Nov 2014 12:00:00 GMT</pubDate><category>i18n</category><category>ruby-on-rails</category></item></channel></rss>