@notrab It's just me, backwards.

Do you want my job?

I’m leaving my full time Developer position at Norseal to work at a cool startup with offices in London & Durham.

Norseal are one of the largest UK distributors for fire protection products. They driving technology forward within the company and are looking create a solid future with online sales.

I’ve spent the past 2 years moving them from a very outdated set of frameworks and poor IT infrastructure to now boast a custom built CMS & CRM which manage their products and customer records. It is now time for me to help another company in the areas I am skilled.

Do you fit these skills?

  • At least 2 years industry experience
  • Familiar with Ruby on Rails, REST & RSpec
  • Basic knowledge of JavaScript, jQuery, HTML(5), HAML, CSS(3) and SASS
  • Experience working on challenging and exciting projects
  • Good understanding of using Git & GitHub
  • Familiar using Sketch and Adobe Suite
  • Good understanding of design and UX
  • Passion to learn

Take 10 minutes to write a brief job spec for your current role and you’ll be surprised how skilled you really are. I am lucky to have worked in an environment which stimulated personal growth and development for the past two years.

If you consider yourself passionate and outgoing, and seeking a full time permanent role, contact Neil for more details.

Salary is negotiable depending on experience.

Getting to know Ruby Operators - Part 1

The purpose of this post is just to be used as a reference to those new to Ruby programming who want an example for each operator. If you’re coming from another programming language, you’ll know most of these but if you’re new to Ruby, save this page as a reference until you become best friends.

I’m sure you know how to use arithmetic operators + addition, - subtraction, * multiplication, / division, % modulus and ** exponential power operators already.

Logical Operators

a && b

The AND operator you’ll be familiar with from other programming languages. If both sides of the operator are true then the method returns true.

true && true
#=> true

true && false
#=> false

true && nil
#=> nil

# && can be replaced by 'and' but don't do this.

a || b

Similar to the AND operator, OR compares both operands to compare truthiness.

true || true
#=> true

true || false
#=> true

false && false
#=> false

# || can be replaced by 'or' but don't do this.

!(a && b)

You’ll want to use the bang operator when you want to compare the reverse state of the provided condition.

!(true && true)
#=> false

!(true && false)
#=> true

!(false && false)
#=> true

# ! can be replaced by 'not' but don't do this.

?: a.k.a Elvis 😂

I don’t often use this operator as it confuses a lot of beginners working on your project. Check out this example to get a simple understanding:

a = true

a ? true : false
#=> true

Now let’s mix a bit of previous knowledge with this operator:

a = true
b = false

a && b ? 'Yay! True.' : 'Sorry. False.'
#=> "Sorry, False."

a || b ? 'Yay! True.' : 'Sorry. False.'
#=> "Yay!, True."

Comparison Operators

==

In almost every Ruby class you’ll find this operator. It checks if either side are equal or not.

true == true
#=> true

true == false
#=> false

100 == 100
#=> true

!=

Friends with == is the operator !=. Which you might expect from the above examples does the reverse. If both operands are not the same then the condition is true.

10 != 20
#=> true

def age(dob)
  Age.new(dob)
end

puts age('23-07-2015') != 18 ? 'Have a coke.' : 'Have a beer.'
#=> "Have a coke."

===

Similar to ==, === checks for equality. If both operands are not of the exact same then it will be false. The examples below should clear this up.

10 === 10
#=> true

10 === '10'
#=> false

>, >=, < and <=

As you’ll notice above, I compared the age of someone with a given target value. Let’s get started with a few examples below.

10 > 5
#=> true

10 > 20
#=> false

10 >= 10
#=> true

10 >= 5
#=> true

5 < 10
#=> true

10 <= 10
#=> true

10 <= 5
#=> false

<=>

This is my favourite. It compares each operand and returns either -1, 0 or 1. I’ve used this so many times when building scoring algorithms.

The best way to describe this is with an example:

5 <=> 10
#=> -1

10 <=> 10
#=> 0

15 <=> 10
#=> 1

There are a lot more Ruby operators but I’ll post part 2 covering ~, ~= and ^ later.

Get the Lodown on Lodash

Take this array of students for example and imagine you wanted to get the first or last, youngest or oldest in the array.

var students = [
  {name: "Jamie Barton", age: 25},
  {name: "Sophie Miller", age: 23},
  {name: "Liam McCabe", age: 25},
  {name: "Greg Bishop", age: 33}
];

Now you can with a very simple JavaScript plugin Lodash. I’ve noticed Lodash in many projects as dependencies but never understand the purpose. Until now.

Now imagine you want to get the first student from the array and you wanted to use a little friendlier syntax than students[students.length - 1], check this:

var firstStudent = _(students).first().value();

You can do the same for the last object:

var lastStudent = _(students).last().value();

But hang on, I want the youngest or oldest student. Easy:

var youngestStudent = _(students).min("age").value();
var oldestStudent = _(students).max("age").value();

Lodash comes with a bunch of methods. If you’re a fan of Ruby and all the helpers Rails brings to the table, you’ll love how much cleaner your JavaScript functions will become using familiar methods like flatten, take and the great pluck method:

var studentNames = _(students).pluck("name").value();

Try it today. It’s easy as var _ = require('lodash');.

Introducing Plangram

Matt, Anthony and I launched Plangram. It is available today, for free on the Apple App Store.

Plangram for iOS

Plangram is a quick, easy, and fun way to make casual plans with your friends with Instagram. Create custom photo based plan cards and share them with your friends via Instagram Direct.

Matt & I have always toyed with the idea of creating an app that focuses on easy event planning. A few years ago we started a service which allowed users to share a short unique url that gave users the ability to mark their attendance in a single click.

After many iterations of the project we decided it was time to call it a day and focus our energy into building something which was easier to use and didn’t require user authentication.

We wanted to build a utility that served a simple purpose but illustrated the beautiful mechanics of iOS design. We believe we did it.

Plangram for iOS

See for yourself — Available on the App Store and join in the discussion at ProductHunt.com.