Nov 9, 2021RSpec Shared Examples and Shared ContextSlowly developing your knowledge in software engineering should be a methodical process. Learning to refactor and DRY out your code is one of those processes where the more knowledge you have the easier it becomes. Shared examples and shared context will allow you to keep your specs DRY, even when…Rspec3 min readRspec3 min read
Published inThe Startup·Feb 16, 2021Rails-Money Gem and to_fRecently I came across an interesting problem that involved using the to_f method and the problems it can bring, especially when dealing with monetary values. My problem involved the inexact arithmetic used in to_f in Ruby, adding three numbers together, and comparing them against a single total number. If the…Ruby5 min readRuby5 min read
Jan 3, 2021RSpec and FactoryBotThis is aimed at anyone recently taking up RSpec testing for Ruby. I am always looking for ways to refactor my code, a standard rule for programmers. But you can stare at code for so long and sometimes not see what you can change without potentially being exposed to a…Rspec4 min readRspec4 min read
Published inThe Startup·Dec 2, 2020Creating Rails methods with SQL: Part IISo in my last blog, I built the basics of creating a database, dropping a database, creating an instance of your class, and saving that instance to the database. Now I want to move on to some more methods. …Rails5 min readRails5 min read
Published inThe Startup·Dec 1, 2020Creating Inbuilt Rails Methods With SQLI decided that although I loved Rails and Ruby, you could build a perfectly simple API or Rails application without understanding too much of what is going on in the background. For instance, after doing my Bootcamp, I knew that the Create action from CRUD essentially bundled the new and…Sql7 min readSql7 min read
Published inLevel Up Coding·Nov 16, 2020FizzBuzz in Ruby — Following TDDDuring a final stage interview recently, I was asked towards the end of my technical test if I knew FizzBuzz and if I could please implement some code to write a successful FizzBuzz script! The review of my take-home showed that I could write tests, but didn’t show my thinking…Rspec6 min readRspec6 min read
Published inThe Startup·Nov 9, 2020Ruby — Inheritance and ModuleRecently I have been looking more and more into plain old Ruby, no Rails framework, just trying to better understand the language behind it. Having built projects using pure Ruby and Rails, I have come to find I have some questions about what goes where. Which is good. …Ruby5 min readRuby5 min read
Published inLevel Up Coding·Nov 2, 2020Ruby Methods New to MeI have taken a bit of a step back on blogs for front-end and React-based projects/skills to also focus on Ruby. After doing a take-home exam a week ago, I realised I was adept enough at making my own RoR project but creating a Regex, plain Ruby setup from nothing……Ruby6 min readRuby6 min read
Published inThe Startup·Oct 26, 2020Counter App to Learn Redux With HooksI almost felt guilty not doing camel casing for the title! Having based my last blog around the basics of setting up a redux project, I wanted to build a simple app with this blog to showcase a full example of Redux, including the use of Redux Thunk. …Reactjs8 min readReactjs8 min read
Published inThe Startup·Oct 19, 2020Understanding ReduxThis is a slight diversion on what my next blog was meant to be about. Context API and testing it with Jest + Enzyme. Why? …Redux5 min readRedux5 min read