Handy Color Code for Custom Values in Swift

So that RGB values can be entered in XCode in Swift (for example changing the background colour of a table view), place this UIColorExtensions file in your code:

import Foundation
import UIKit
func UIColorFromRGB(rgbValue: UInt) -> UIColor {
    return UIColor(
        red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
        green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
        blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
        alpha: CGFloat(1.0)
    )
}

Then call it in your viewDidLoad() or wherever you want using:

        view.backgroundColor = UIColorFromRGB(0x209624)

Very useful for custom colors in Swift.

Advertisements

Rejecting the ‘9-5’ and Embracing Remote Working

Companies nowadays are trying to adapt to new ways of working. For many big corporations, this is an un-traditional approach, but one that needs to be acknowledged in order to obtain and keep the best people. This is a topic of interest to me, so I thought it would be an interesting one to discuss.

I work for a large corporation in London, but I live in Essex, with an average journey time of 2 hours each way (on a good day) which comprises of a drive, a walk, overground train, underground train and another walk. This can get pretty stressful and tiresome, and quite frankly can ruin my attitude towards work for a day if all goes badly. To combat this, I arrive at work between 7.30 and 8.00, leaving between 16.00 and 17.30 on an average day. Thankfully, my company are great with ‘flexi-time’ and are embracing this new culture of allowing remote working too, which is a complete god send: not only do I feel relaxed and well rested, but I usually end up working more productively and for longer because of this.

I have recently been discussing with several other ‘long distance’ employees at work (who are all earlybirds like me) and general attitudes towards this. The general attitude at my place of employment is just to go ahead with remote working until told otherwise. This makes a lot of sense – as long as we get our work done to the best of our ability and communicate with our team, being in the office when needed, what does it matter? My team have recently embraced ‘Remote Wednesdays’, where we will work either as a team or individually in a location of our choice, whether it be a coffee shop or at home, which has been working very well. Thanks to tools such as Slack, Github and Dropbox, we all have a continuous workflow with each other and ways to communicate – we all love it so far. Hopefully the higher ups in the business won’t disagree with us and take it away.

The main reason I wanted to write this post was to give some genuine insight into how customising your own work regime is working at my workplace, in case other people would like to embrace it also. So here are some bullet points into why working this way is great:

1. A different work routine isn’t an incorrect work routine

Just because someone isn’t at their desk 9-5 doesn’t mean they are not working. The most creative people almost never work from 9-5 – early hours seem to be a common theme. A lot of developers seem to prefer the night, starting late in the day and then working on/off throughout the night. Github is an interesting way to see how people work differently in teams.

Clock

2. Becoming a robot is not a good way to get rewarded

If you become that person who seems to live in the office, you will burn out. Working more hours is great if you really enjoy what you are doing, but everyone needs to know their limits and when to take a break. You may end up falling out of love with what you’re doing, or just become so exhausted that you cannot function. Either way, the best creatives and the most happy ones have a good balance. Getting in ‘the zone’ is much easier, and time will pass quickly by itself.

8hours

3. People need to be engaged

If you’re not engaged with what you are doing, you will get bored and lose your enthusiasm. Remote working gives us a good way to get out of ‘those’ meetings that dull your mind for the rest of the day. It is a known fact that the most creative people get bored and distracted easily if they are not stimulated, as their minds are always looking for something to occupy them. Giving them the freedom to choose their own working environment gets more out of the person and, therefore, gives more back to their company. A fun office environment is a plus too!

work

4. Risk taking is a part of life

We embrace the Agile methodology: fail fast. Try this way of working, and if it doesn’t work for you, it’s not the end of the world. You will learn from your mistakes, which is the most important thing. You need to accept failure in order to reach success and understand why the failure happened in the first place. It’s hard at first, especially if you work in a subjective area such as design, but you need to not take failure personally. Step up to the challenge and make it work.

creative

5. Daydreaming is important

It’s hard to daydream in an office with phones ringing and people rushing by. Headphones work to an extent, but it is extremely important to have the space and time to think. Daydreaming allows your imagination to expand and gives your brain some downtime. Thinking is so crucial, especially in the early stages of a new project, as it allows you to consider all possibilities, and the 5 minutes a day that you get some good quality daydreaming done may produce a big idea or approach that you never would have considered otherwise.

Daydream

So the rest is up to you. If there are any other personal reasons you feel for working your own way, let your employer know. They train you, they should be willing to make you happy enough to keep you. It is still a touchy topic at times, but we’re all human at the end of the day – no-one wants to see someone else crash and burn out. I write this while working remotely from my home, and it’s a brilliant thing to be able to do, and the creative juices have certainly been flowing today!

Note: All images are copyright to me – no usage without permission.