Blog

Probation Passed At M&S

I’m sat here on a train from London to Hull and it made me think of a time nearly 3 years ago, where I was sat on a train from London to Hull.

I was into my second month of being a web developer and things weren’t going so well in my dream job – the one I’d worked towards for years in my spare time. I was writing a blog post, pretty much knowing at that point that I was going to struggle to pass my probabtion – and so it proved not too long after, by which point all I was doing was copy and pasting all day – not even anything like coding.

Some people might have quit and just gone back to what they were doing, but I’m a stubborn bastard.

3 years later I’m doing that same journey, writing a blog post about the end of my probation period at M&S.

I passed with flying colours.

I’m still not a superstar developer. I have a good grasp of JavaScript now and am very comfortable with it – though I still haven’t thoroughly grasped the more advanced conceptual aspects.

New challenges

M&S has provided me a whole new set of challenges. Firstly we code in pure JavaScript so I’ve had to upskill – in particular learning the new ES6 stuff which I never touched at Lovespace as our codebase wasn’t set up to use it.

All my code gets reviewed twice, which is something new to handle psychologically – my code was never reviewed at Lovespace. This has proved to be a great help to me as I work with some excellent developers – all with different skills – so this is a great way to learn.

I also have to do my share of code reviews too, no matter how senior the developer, which I’d never done before. I’m quite methodical and seem to have figured out a good way in my head to review code – quite often finding things to improve or edge cases that need fixing – apparently I’m really good at them and my code review skills are in demand!

The one main thing I still stuggle on is writing tests. Again I’ve come from an environment where there was no automated testing – just smoke testing (semi-randomly clicking things to make sure the website works). I haven’t really got my head around it yet – what to write tests for, how to write tests. I can just about get by but it takes me forever – I spend as long writing tests as writing code. I’m slowly improving and eventually it will be as natural as writing JavaScript.

Oh and using a Mac for the first time in my life. I still cannot get used to the cmd button. I still prefer Windows and I miss knowing all the shortcuts that I used to. It works smoothly though…apart from when I don’t know how to do what I want it to.

What Am I Working On?

I cannot really say in public what I’m working on. Well I don’t know if I can so I’m going to err on the side of caution. However it should be a really significant improvement both to the customer experience and loading time. It’s a major change and rather exciting. Not having any code live at the moment means that things are relatively stress-free – that fun is to come when we launch. Soon.

Everyone is really sound there. Most people in the world are, but we have a great little team – and the extended tech team are all superb too, some seriously inspiring people.

And the culture is great. I was a little concerned that it might be too corporate for me, but it isn’t at all. Shorts are no problem, everyone is chilled and after-work beers happen quite regularly. Finishing at 5pm (well, assuming the Met line gets me in for 5am) is a treat. Plus I do get to spend my day looking at lingerie models…I have to test the code works, you know.

It very much feels like I belong and I’m looking forward to seeing the impact of our work on M&S’s recovery.

All the struggle has been well worth it.

How I Got My Second Developer Job

Back in February I concluded that I had progressed about as far as I could in my role at the time, as software engineer at Lovespace.

Money was the main motivating factor as I enjoyed my job, but also I noticed from looking at the job market over Christmas that most jobs wanted Vue, ES6 and especially React. I had none. So there was also a feeling that I might get left behind…I had pushed myself to get this far, I had to push again. Plus I was starting to get bored of looking at the same order funnel all day, no matter how many times we applied redesigns.

At first, I didn’t really have a strategy. I was particularly concerned about how out of date my portfolio was and how it implied that I was a junior developer looking for my first role. My Github was pretty weak, my ‘experienced developer’ interview experience zero, my CV a bore, my personal projects as dated as my portfolio. It felt like it would be as difficult as finding my first developer role – yet having to do it whilst working 40+ hours a week (not to mention the 2.5 hours commuting a day…but yeah lets definitely mention that!).

Profile Improvements

  1. LinkedIn
  2. My Actual Portfolio
  3. Hired/Talent.io
  4. CV

Starting with my LinkedIn profile. Apart from updating my skills and general bio, the most important thing to do was set my status to actively looking for work. Then wait for the messages to come in…and boy they did.

I never finished updating my portfolio. I tidied it up, removed lots of mess – even some of the HTML structure was embarrassing. The most difficult part was trying to work out what to do with it in terms of style – I cannot say that I am overly happy but it is certainly an improvement on before.

There are still things badly wrong with the site.

I also ensured that all of my key achievements during the previous two years were listed. So at least I had something to show people.

I then created profiles on hired.co.uk and talent.io. Maybe one or two other similar ones too, and set them as though I was looking for work. Oh yeah, hackajob too. Which scared my mum when I told her. You know, the word “hack” is pretty scary to some people.

Finally I created a pretty CV using NovoResume. Only one page as any more was paid for – and I was still on a junior salary. Goodbye boring black and white two-page boring CV, hello colour, stylish CV.

So, what worked?

Firstly, the job boards such as hired.co.uk, talent.io and hackajob were a waste of my time. The idea of those is that you upload your CV/experience and employers reach out to you. Cutting out the recruitment consultant – though you still have an account manager who invariably hassles you to set up phone calls, and question why you aren’t interested in certain roles.

It wasn’t for a lack of approaches (though they went silent around the Brexit deadline weeks), but the roles just didn’t seem suitable or interesting to me. I had a couple of phone interviews, but none of the roles I was convinced about – and apparently them about me too.

I also went to a jobs fair called Silicon MilkRoundabout, in Shoreditch (in London). This was a large building with a ball pit (because all job seekers need a ball pit) and free beer. Hundreds of companies were situated in the building and it was a case of walking round and chatting to them, to see if any of them weren’t desperately looking for either senior developers or React developers.

I had some good conversations – 3 hours was nowhere near enough time to have allowed myself, and if I hadn’t had been offered a role not long after going, I think this could well have borne fruit in terms of interviews. There are a lot of HR departments with my details.

Ignoring recruitment consultants was a good strategy. Given the amount of my time they wasted when I was a junior, just trying to get information out of me, I studiously ignored their approaches. However, I did crack early on with someone who didn’t look dumb as fuck, and was from Yorkshire so had to be honest, which led to an interview for a role that I was unsuitable for.

Stack Overflow jobs section was also worth looking at – a couple of interesting roles and one interview came from there.

LinkedIn For The Win

Finally, LinkedIn. This is where by far the most interesting roles arrived, and all I had to do was just sit there and wait. Most days, something would arrive including my new role at M&S. Simply having an up-do-date LinkedIn profile would have been a very viable strategy for finding a new role.

If I had had more time, then I would have spent the time thinking carefully about the kind of company I wanted to work for, and sent my CV to said companies. But I had enough approaches to deal with. And limited time – it really isn’t easy to schedule interviews or even phone interviews, when you are working full-time and have long working days and long commutes.

Of course, I then had to have some interviews.

I won’t bore you with the details of the phone interviews I had, I probably had around 10 phone interviews – one I was genuinely gutted that I didn’t hear back from, despite chasing – the company was super-cool (yeah I’ve forgotten them) and I thought I was perfect. Otherwise, either I didn’t hear back, or I wasn’t successful (not that I was disappointed generally) or I declined the next interview as the role or company didn’t feel right. It felt good declining companies!

Starting with a disaster

The first place I interviewed for was a company called Grabyo. Contacted by the aforementioned recruitment consultant, I think the only one I dealt with during the whole experience, I was reluctant to go for it because they expected React. Yet I had a really good phone interview, explained that I didn’t know React, had barely touched it – that would be fine.

They asked me to do a coding challenge. In React.

I thought I’d get my head around it, but it was too much to figure out a whole new framework on a Saturday, so I eventually reluctantly gave up. Then a few days later, they said I could do it in AngularJS, which is what I use at work. So I did. And did a pretty decent job of it too.

So I had an interview. A really difficult interview – and I crumbled. After an hour, I knew that I had messed up a couple of questions and could see them judging me – some very obvious signs in his eyes. Then I had to do some pair programming and I could barely use the laptop. I felt the pressure getting more and more (plus I was desperate for a wee and the office was hot). I was desperate to get out of there.

It was a disaster.

Next I interviewed for a company called Simply Cook. This went really well, but they ended up going for someone with more experience.

At least I had performed well at interview, put my previous bad interview to bed and regained my confidence. Plus got some free food kits.

Winner!

Finally, the third role that I interviewed for was at M&S, the revered and slightly troubled British store.

I won’t tell you too much about the interview as I know that they are still recruiting for more roles.

Two phone interviews were passed, then I had a 3 hour face-to-face interview. Firstly the coding test, which I did pretty well at – though they asked me to do some ES6 code which I didn’t know about…but thankfully I made my way through it with use of the internet.

I smashed the logic section – two pretty cool and interesting challenges. Then the culture fit too – though I had no doubts that I would be a good fit.

A few days later, I was offered the role and there was no question about it – I didn’t just want to be a software engineer, but an M&S software engineer.

Summary

If I were to go through this process again, whilst being employed full-time and with my busy life, then I would probably just update LinkedIn, Stack Overflow and my CV.

I wouldn’t waste my time with the job sites such as hired.co.uk, nor would I speak to any recruitment consultants (I don’t anyway). My portfolio really will need updating by time I am a senior…and I really will need to change my portfolio name and URL! I am very much a web developer (or software engineer).

Anyway, cheers to me. New role starts on Monday – just hope I shift this mild fever I’ve had all week by then.

My Next Job

What do I want from my next job?

That’s an interesting question. I’m assuming that my progress in my current role has ended – by progress I mean that I am not going to get a pay rise any time soon. Let’s face it, I’m nearly 40, I have minimal pension, no house, minimal savings – unless I start earning at least the average wage for London, let alone a developer then I’ll be screwed when I’m old.

Also it would be nice to fulfil a few dreams over the next few years, like visiting Japan.

Arguably more importantly, there are new, different challenges out there – and companies with more modern tech stacks that I want…and need to learn.

Yet I’m happy where I work, have a great team and am constantly learning and developing. My current role keeps throwing new challenges at me, which is great.

So, if I am looking, what am I looking for?

Not being under any pressure to find a job means that I am able to be pretty picky.

I’m not fussy about the industry but being in a field that I’m interested in – food, travel, music, etc would be a bonus. Likewise the size of the company, though I’d prefer a smaller company than a massive company, I am not fussy. I don’t particularly want to be in a mega-corporate environment – ie I have no intention of ever wearing a shirt and tie again for work.

It has to be a front-end developer role. I’m not interested in being a full-stack developer at this stage – I still haven’t mastered front-end.

They would have to be willing to grant me time to get up to speed with ES6 and React/Vue – I do want to be working for a company using the latest technologies, but my knowledge of them is close to zero. Indeed, having a culture that includes active training and development would be appealing, or at least space and time to do so.

The “feel” is important – do I get a good vibe from the company and those I speak to? Is there a challenge? Will I be able to contribute from the off yet have the space to become familiar with the codebase? What projects would I be working on? All that is really important – I might not be fascinated by storage, but I am really interested in how we continually improve the website and add new features for customers.

The frivolities

One of the current perks is being able to work from home twice a week, and really has been such a benefit to me finding work/life balance. So a minimum of one day working from home a week is an absolute must for me.

London. Must be in London. Ideally not quite such long hours as I work now either…or at least more appropriately compensated.

I don’t care about free beer, and certainly not free cake. I despise table tennis. Free fruit would be good though.

An actual computer would be good, or at least a decent laptop and a monitor so I’m not staring at a small laptop screen 40 hours a week. Heck, maybe go crazy and offer me a mouse. Oh but please don’t force me to use a Mac. Yuck. That is a deal-breaker.

Also I’m never working in a basement again, nor will I work in an office without air conditioning, or at least some semblance of temperature control. I feel like I sound so demanding, but these are basics which companies still get wrong, as I have experienced.

Casual dress is also a must – the option to wear shorts in the summer is nice. As I mentioned earlier, I haven’t put in years of studying and risked a career change and subsequent pay cut, to end up wearing a shirt and tie all day. That is not who I am.

Good people are a must but that is mostly a given nowadays.

Is my perfect job out there? Sure. Is it easy to find? No. Will I achieve my goal overnight? Hell, no.

I’m very comfortable where I am, but as I said, I want to keep improving as a developer – and I may be reaching my limit where I am. Plus my salary isn’t keeping up with my experience and abilities.

My position is pretty damn good, I have a job that I really enjoy, one that keeps challenging me yet is always at the right level, with a great team around me.

I’m not even actively looking as I feel that I need to improve my portfolio and my Github first – but I do get plenty of messages almost every single day about roles so I’m well aware of what is out there. If that perfect job comes along then I’m going for it.

But if it doesn’t, then I stay happy – I keep enjoying Mondays. It’s a pretty awesome position to be in.

Am I Still A Junior Developer?

It’s a question that has been bugging me recently, and I haven’t been able to find a fix for it yet.

Am I still a junior developer?

I look at code that is written on Stack Overflow, and sometimes it can be overwhelming. I watch my (more experienced) colleagues coding and they are so much faster at coming up with solutions than myself, and often much more efficient ways of coding. I know I’m way off being an expert.

On the flip side, I compare against where I was just a year ago – let alone two years ago. I’m fully versed in working with Restful APIs, I know JavaScript fairly well – even if I forget some important functionality like map or reduce. I’m comfortable building an app from scratch in AngularJS – which this time last year I had only just started using.

I can build components, extend the website, change the styling as required, do bits of animation. I can debug errors quite proficiently now – something I really struggled with when I first started at Lovespace.

I’ve created an admin site for business customers pretty much from scratch, rebuilt one of the order flows in AngularJS – removing the jQuery side. I’ve enacted more then one redesign of the order funnel, and rebuilt various sections of the WordPress site at work.

I have plenty of achievements to look at.

Yet then I look at the jobs out there for people with 2-3 years experience, and they seem to need fluency in React, and almost expert-levels of JavaScript, not just understanding what does what, which generally I do – but understanding why and the theory behind it, which generally I don’t.

What to improve?

In the very limited time outside of work that I have to improve my skills, I’m torn between whether to learn React, improve my AngularJS knowledge (as that is what I use at work), thoroughly learn the JavaScript ecosystem or learn ES6+ (modern JavaScript). And then am I better reading books, doing courses or maybe I should start watching YouTube videos of more experienced developers?

I am also kind of limited in my job in that we use an old framework – AngularJS instead of a modern one like React or Vue, we don’t use many of the tools that seem popular such as Webpack or Docker (if arguably pointless – just trendy), nor do we use ES6. So though I am becoming a better developer, I still feel like I am falling behind the competition.

Though why I feel the need to define my developer status is another question – maybe I don’t actually need to.

Am I still a junior developer?

My conclusion is no. I think.

What I know now is another world away from what I knew when I was employed as a junior developer – yet I still don’t feel like a fully-fledged mid-level front-end developer.

Maybe I should stop comparing myself to more experienced people and remember that I’m relatively new to this game – a complete change in my life and one that I’m delighted to have made.

So much still to learn on my journey.

Jeez, I’ve just previewed my post…what have I done to the font? Oops. Going on my Easter fixing list.

First Client Site

At the beginning of the year I was contacted by someone who had read my Reading roast dinners blog, who wanted a website for his fledgling recruitment company.
Yes – he had seen this crappy box on the right that took me 5 minutes to make and decided to contact me.
He had a Wix site which he had put together himself – but as an exceptionally busy person, he was unable to devote more time into making it look more professional – it was a bit messy.  I’ve seen far worse on Wix…you really do have to put a lot of time into it to get it looking good on there…and even then you are limited to what they offer.
Personally I think Wix is abhorrently painful.  Squarespace is bearable – I did do some custom changes on Squarespace a while back, which were at least possible, albeit very hacky.
It came at a good time for me, it was the beginning of the year and I was on a 3-month detox so I needed something to keep me occupied on the weekends.
It was potentially a nice little project that I could build on WordPress, with the possibility of expanding it when his business required it.  At this stage, neither of us felt that anything more than a one-page website with a contact form was required.
The difficulty for me was the design.  I could have just used an off-the-shelf theme but I kind of view that as cheating, especially when someone is paying for it.  Plus I wanted to push myself.
Getting good quality, free stock images was easy – but working out what to do with them, and how to display the text in a friendly yet professional manner was my main challenge.  In the end I went for matching pastel overlays – but cropped them diagonally to give the site some personality and edge.
Mostly the text provided was sufficient – I just wanted to make it clear on the heading what Neary Services offered, and how to contact them.  I kept the heading font that he had used on the Wix site, as I quite liked the informative and direct feel that it gives – and used a standard font for the rest of the text.  One thing I often see people doing that have no knowledge of design, is using way too many fonts, and there were a few on the Wix site!
I think in the future I will do even better, but as a first client website I was proud of my efforts.
The client was delighted, really really pleased with it – and even bought me a couple of beers to celebrate.  And we are going for a Sunday roast next weekend.
With a bit of luck, there will be more websites to come that I can build in my own time, and supplement my earnings and experience.  And yes I will be paying tax on it…guess I’ll have to work out soon how to do that.
I do intend on doing a few posts, just general updates on where I am and where I am going as a developer career-wise.  I do keep having to pinch myself to remind myself just how far I have progressed.  Don’t hold your breath – I’ve been intending on doing this post since April.

One Year Anniversary

A year ago today (I started writing this on Tuesday…), I walked into my new web development job, as Junior Front End Software Engineer at Lovespace.

I had been unemployed for 4 months following my first fairly short-lived dev job which had ended in failure.

This time I had to succeed. I am quite used to not being successful the first time around – I do tend to do things the hard way.

I arrived late on my first day – the wonders of the Metropolitan line that consistently haunt me. It was a little daunting at first too, I was tasked with documenting the 10,000 line JavaScript file – some of it I really didn’t understand. The outsourced senior developer was helping me to an extent, but I was left relatively on my own to document it.

And it was boring. I ploughed through.

It wasn’t long before I started to be given some of the tickets – simple things at first, and guided by the outsourced senior developer at first – especially through the version control system, Github, who’s potential for messing things up scared me at first! The styling I could do without too much difficulty but changes in the JavaScript file was another matter.

It wasn’t much longer before I had some tricky things to fix and was really struggling to debug. I had minimal experience of how to debug code – I was originally going to write a blog about error debugging being by major weakness but I never found time. It isn’t something you get taught in books or courses – it isn’t something especially easy to teach. I groped my way towards a strategy for debugging that works – I didn’t have a clue what section of the code did what, and I realised overnight that I could just put console logs in every section, with a different number, and see what was triggered – and more importantly what wasn’t triggered, and therefore where the error was. Genius…well, I thought I was anyway.

Looking back now, it is amazing just how much I have progressed. My knowledge of applying code and styling has improved significantly, but I’ve made even larger strides in necessary competencies such as using APIs, error debugging, etc. Things that are not taught so well outside of working environments. I barely had any experience of using an API, let alone having to manage and debug one, prior to joining Lovespace.

I still have huge amounts to learn. This will always be the case, and that is part of what appeals so much – there will always be the next level to aim for. In particular I must learn at least one framework – I don’t think I can be counted as anything other than a junior developer until I do. We use AngularJS on our apps – and my manager has just about finished re-coding our ordering system on the website in AngularJS which I assume I will be taking over soon. Nothing like jumping in at the deep end.

Career-wise it would make more sense to learn React or Vue, but maybe I’ll eventually get time to do so in my own time. Yeah…my own time…

Will I still be at Lovespace in another year?

I’d like to think so. My frustrations are growing in number and significance; be it the long hours, low pay, limited holidays, minimum pension, extra demands on my time doing things like customer service (tonight again, sigh), the idea that I need sales training yet get no formal tech training (though that has gone quiet), lack of daylight…hmmm more frustrations than I realised.

Yet the company has charm and I do want to stick around and wait for it to become the success it should become. My jobs prior to working at Lovespace have all been for faceless corporates – I actually quite like Lovespace as a company. They have a good ethos, and there are some very nice people working here – though I have found that in almost all jobs I have done, so that isn’t anything unique. A decent social scene and the co-working office we work in is top-notch.

Most importantly the role is at the perfect level – I had straight-forward tasks at the beginning, now I have much more complex and involved tasks, and this complexity should increase further, with new technology to learn too.

I add value to the business and feel appreciated as an employee. I even got the initial lead for what I think is our largest business customer.

Though at the same time I am aware of other opportunities out there and I don’t want to limit my ambition. Currently my ambitions can easily be met at Lovespace, hopefully some of my frustrations can be reduced and not added to. Notably positive that my frustrations are all outside of the actual work and team/management, etc – I really enjoy what I do.

Longer-term, I am keen to work on a larger variety of websites and can envisage having my own design agency. Maybe that is the direction that I am heading in. But if I’m going that route, then I don’t just want to be any other agency producing decent websites – I want something that will be talked about, an agency that would produce “wow” websites (or experiences in marketing terms, bluergh). I’m a long way from knowing what my vision is, let alone being able to do it. I’d possibly need to find someone to share and develop my vision with – a designer?

Maybe I’ll just have an ordinary design agency first.

This weekend also marks my first full-on private client project going live. Still one or two little bits to finish off, and that’ll be a blog post for another time.

Back to living the dream. Washing up, roast dinner and customer service. Rock and roll.

Getting Stuck – And Getting Over It

I have been in my developer role for over 6 months now. I feel very much a part of the furniture both in terms of company and part of the tech team – although I can still be over-awed in technical discussions, I understand much more than I did.

Most of what happens front-end on the website now, is done by myself. I’d say around 90%, as an approximation. It is a source of pride that I almost fully look after the front-end of a website for a relatively sizeable corporation.

This time last year, I was doing mostly copying and pasting and what I thought was my dream job was starting to fall apart. I really had doubts about myself.

I still have occasional doubts. Mostly I am confident of my place as a junior front-end developer, I occasionally even question when I will stop calling myself a junior – not yet though.

Recently I have been given a chunky piece of work, to revamp one of the main sections of the order funnel. At first I thought it might take a few days, now I am thinking a few weeks.

Getting a tad technical (still not quite sure what my audience is here – curious friends or junior/aspiring developers?), we implement a jQuery Datepicker, for when the customer picks the date and time slot of their delivery and also of their collection. The latter, I have been tasked to change from dropdowns, to display fully on screen.

I didn’t envisage the world of problems this would cause me.

It took me a while to work out that I would need to change the HTML markup of the datepicker to ensure it displayed without the need of a dropdown – though as we used the same php module/template for both the delivery and collections datepicker, and I was only changing the collections, I then had to implement an if/else statement – simple, except for the fact that we use Handlebars (a jQuery plugin) to compile the datepicker, so I had to work out how that would fit in.

The actual calendar part wasn’t too troublesome to hook up to the existing codebase, and there was little to amend in terms of display.

The main issue occurred when trying to hook up the time slots. It would display the time slots, but no matter what I did, would not create the object necessary to communicate the customer’s choice of time slot, and would throw all sorts of errors.

Thursday afternoon I was stuck. Friday, I mostly worked on other tasks, Monday I had off work, then Tuesday pretty much all day I tried as much as I could to get around the errors, and occasionally I would fix something but yet it was still not creating the object I needed. And the more I looked at it, the more I tried, the more tired I got – it just simply wasn’t happening.

Something that I guess happens to more developers than just me, is that when I get really stuck on something, I try as much as possible but my brain just becomes mushier, my eyes glaze over and I become very easily distracted, ooooh look at that nice cardboard box over there. And like most things, coding is easier to do at 9am than 5pm – at least for me, anyway, as my most productive hours are early on.

So Wednesday I came into work with a strategy. I inserted dozens of console logs throughout the code – the main codebase is around 10,000 lines now, in places where I thought errors might be occurring. I do this as a matter of course, but had been doing it on a more adhoc basic. Here I started console.log(1), console.log(2) – etc. For those non-coders reading, if you right click Chrome, and click ‘inspect’, you’ll see a box pop up – known as the console, which is inherently useful. The console tab will display anything I tell it to, so in the code if I say console.log(1), then it will log 1 in the console. Try it – just type console.log(1) in the console tab, and you will see it logs 1.

By doing this I can often find out what is going wrong – as if it doesn’t make it to console.log(2), then I know the problem comes in the code between the two console logs.

Alas, this didn’t help. Eventually I started to write a message to our outsourced senior developer, who is available to help when I get stuck – though I always try my hardest to resolve it myself. But before I pressed send, I thought of something else to test – completely outside the chunk of code that I expected it to be within, and yes I found what was causing the error.

Had I built the website myself, I think it would be a lot quicker to unpick and revamp as required – because I would have understood what was coded in the first place.

The main conclusion is that I really am progressing as a developer. I do get stuck. I don’t like asking for help unless I am fully stuck, and not just a bit glued up. I can do this – I really can do this.

I’m still so much at the beginning of my journey, and have so many skills and techniques to learn, but I have come such a long way in the last year.

I Feel Like A Developer

I’ve had a very interesting week in various respects, and my work as a developer has certainly been part of that.

A week on Friday ago, our technical director asked me to create some functionality to display to the customer the cheapest available delivery slot within the next 7 days.

My initial thought was “how the fuck am I going to do that”.  I felt a little overwhelmed with the idea at first – I’ve been there not too far off 6 months now, and I am still a junior.  I am aware of my strong points (albeit at relative scale) and also have become very aware of my weaknesses.

This involved calls to the API which I had just about got my head around.

When it comes to writing functions, I do pretty much all my draft coding in the console, so the first thing was to write a GET request to ensure that I could retrieve the timeslots data that I required – a customer can, for example, pay more for delivery first thing in the morning, or pay less for delivery during our less busy days which are normally Tuesday/Wednesday.

I realised at this point that I was becoming very comfortable in making requests to the API – although I had some limited knowledge of working with APIs, I now feel like I actually understand them, and can even run functions off their successful calls.

However, being able to retrieve the data for the current day only was not the task.  I had to retrieve the data for 7 days, and with the added complication that I had to take into account the first possible date of delivery – for example if you order after 11am on a Monday, the first delivery possible day is a Wednesday.  Weekends and bank holidays add extra complications – though there already was a function for this.

So I once I had worked out the first date and the last date, I then had to get the date into a form that you iterate and add 1 to – ie I am running the request for the first day, then the request repeats but adds 1 day – and so on until the maximum.

This was my first infinite loop at Lovespace, where I had set the calculation to keep on going until infinity.  Hmmm.  Chrome was not happy.

It took quite a few attempts to get the loop right.

// Create first and last date (6 days later) to iterate through

            var firstDate = new Date();
            firstDate.setDate(firstDate.getDate() + collectionOffset);
            var endDate = date.setDate(date.getDate() + 6 + collectionOffset);
            // Create empty array
            var object = [];
            // Get available timeslots for each day and insert into empty array
            for (var d = firstDate; d <= endDate; d.setDate(d.getDate() + 1)) {

My task was complicated further because the API didn’t recognise that format of date, so as part of the loop I had to then reformat it into a form that our API would recognise.

A little frustrating to get this right, and it took me a while to work out a good, clean, simple solution for it – but it worked.

I had data with which to play with.  Except it was in the form of an array of arrays of objects (don’t ask if you aren’t a coder).

So I removed one level of array with:

var merged = [].concat.apply([], object);

Then I had to work out how to find the cheapest available slot.  What I had was an array of objects – each object had the amount of available timeslots for that day, with a price, a date and other information.

There were probably a few ways to do it, but the most intuitive to me, was to sort by price and then by date, to display the next available of the cheapest options.

I knew how to sort by one criteria – but not two.  This took a bit of playing with, and some help from Stack Overflow (what would we do with it?):

            merged.sort(function (a, b) {
                if (a.Price === b.Price) {
                    return new Date(a.Date).getTime() – new Date(b.Date).getTime();
                } else if (a.Price > b.Price) {
                    return 1;
                } else if (a.Price < b.Price) {
                    return -1;
                }
            });

Finally I had a list of options sorted by price and date.  I then just had to take the first item, turn the data into something human readable, then get it to display.

Getting it to display at the appropriate moment was then also a challenge – where in the 10,000 lines of code that runs our website would I need to place it to ensure that it always ran?

It wasn’t just as simple as running it after it displayed – as the customer has the option to change delivery address, which may have different pricing and times, so would then need to run again.

The function in the end came to 70 lines, including comments.  Something I simply wouldn’t have been able to do a year ago, and probably not prior to joining Lovespace.  I am sure that an experienced developer would be able to improve it, and maybe in a year or so I will be able to also.

It showed to me that I am making really good progress in becoming a web developer.  I do still have to pinch myself sometimes when I think about how I have changed from doing a shit credit control job for a miserable company, to doing what I have been working towards for the last few years, for a really good company.

I am definitely still a junior developer but every day I come closer to losing that ‘junior’ tag in my mind.

ps Just realised this site has some problems to fix since I last updated WordPress…joy!

Probation Review

So I’m at the end of my 3-month probationary period.

The last time this was the case, I was bored still doing data entry in a so-called web developer role. I do, of course, accept that in any job role, especially in a small company, one may have to muck in elsewhere. But there was not even any hope of doing any web development by the end. Just repeating the same thing every 5 minutes. Working in a pea factory would have been more intellectually challenging.

I think my two bosses had forgotten that my probation was finished that day. I hadn’t. I knocked on their door and asked to discuss my future, knowing the likely outcome.

An hour later, I received the expected outcome. It felt like failure but it was a relief. I couldn’t wait to go buy some beer and gravy to celebrate. My manager did say one thing though that pained me a tad, “you’re a great guy, but you might just not be cut out to be a developer – some people are born developers, some people learn to become a developer – I don’t think you are cut out to be a developer”.

In fact, they had tried to work out how they could keep me within the business in a different role. Or so they advised – I had no reason not to believe that.

My initial reaction to that comment was one of “I’ll show you”, but as unemployment went on, I did start to have some doubts. Maybe he was right.

But I’m a stubborn sod sometimes. Often. And I wasn’t about to give up my dream.

Apart from death and the death of loved ones, I always believe that bad news can turn into good news. It took a while though. I came second in quite a few interviews. Then I fell on my feet after a slightly quirky interview process at Lovespace.

I did my research on my interviewer, and made sure that we would have a personal connection in the interview. I had a written coding quiz for the first part of the interview and apparently got the best score ever of any applicant. I didn’t have much time to talk about myself, before the technical director then came in and introduced himself and explained more about the company. Then I was asked whether an aeroplane would take off on a giant treadmill, which took at least half of the interview.

Baffled as to whether I had done well or not, I then set about completing a coding challenge that was set for me. And waited. And waited. And interviewed elsewhere.

Then I met the CEO. Warm and keenly interested in what I could offer, slightly reminding me of a young Tony Blair (leadership/communication aspects) – it seemed as though he was looking more to see if I had an appropriate personality.

I had no hesitation in accepting the job, and was warmly welcomed. At first, it was a bit slow work-wise, but I found my feet after a few weeks, got into the process and found myself with a large project to tackle, which is still keeping me busy now.

It often isn’t like working. I sit here in a pleasant environment, doing something I enjoy – coding. Occasionally it is frustrating, occasionally repetitive. Mostly it is challenging, and mostly I am succeeding.

Thankfully, my manager agrees. He is impressed with how much of the work I have taken on, my understanding not only of the code but the business, and how I am communicating with others.

Which, yes, means I have passed my probation period and am now a fully-fledged permanent employee.  I am a web developer.

Developing Developer

So I’ve just completed my 9th week at Lovespace already as a junior front end developer. Or has it been 10 weeks? I am losing count.

It was been a much gentler introduction than the last place I worked at – with not only a plan, but also with support. People to help me, people to train me – people to whom I can ask questions when I don’t know what I am doing, and people that understand juniors can make mistakes.

I massively appreciate my previous employers giving me a chance, I learnt more in the 3 months there than I had in the previous year or so of learning in my spare time. I just wasn’t right for them – and vice versa. They needed a senior developer – not a junior.

Things are going well so far.

At first I was tasked with documenting the large JavaScript files. I was a tiny bit disappointed – I wanted to be coding.

And I was also a tiny bit overwhelmed – I’m used to writing JavaScript at 100 lines at best. I most certainly am not used to 6,500 line files.

However by the time I started to be given coding tasks to complete, I could clearly see the benefit of the amount of time I had spent studying said files. Whilst not understanding everything that was going on, I generally could either amend, or write new functions to be able to complete the required tasks.

Now I am working on a complete overhaul of the main website, making it look simpler but adding more detail to assist both the user, and those who receive the orders.

A lot of what I have been doing over the last week or so has been styling, though there has been some fairly complex JavaScript function-writing (for my standards) to ensure that I can recreate what the product team require within the current bounds of the website.

The website is pretty much my baby now, at least the front-end side of things – the bits you see. The senior developer still does the more complex bits that I don’t understand, and still checks and signs-off all of my changes. Will be interesting to see what he makes of my current project, which has taken a few weeks now, once I push it over to him.

I will also be learning how to make amendments to the consumer and scanner apps, which are coded through Angular – something I definitely need to learn. My boss looks after it – but it would be helpful for me to understand what is going on so I can actually make amendments/urgent fixes if he isn’t around.

It is a good challenge. It is definitely at the right level for me – I know enough to be able to impress myself with what I am doing, and feel comfortable with most tasks – yet still be challenged and be learning almost every single day.

The people are really sound, the company is young, ambitious and culturally on my wavelength (making storage sexy) – it is a generally very good place to work.

And I am very happy.

It does go to show that the rewards are out there if you work hard enough. But my journey has only just begun – and I still need to pass my 3-month probation.