Monthly Archives: June 2014

Dealing with rejection….

It was with some surprise that I saw this on Twitter last night…

irisTweet If you’ve checked my blog roll, then you’ll know that I’m a reader of Iris’ blog.  And this post surprised me.  Now, I don’t know Iris at all, but this post sounded like it was flat.  And indeed, if you read the blog post in question.  (Just click on the picture).  And it was difficult reading that post, especially when you can see the passion Iris has in her previous posts, and her enjoyment of programming is clear to all. 

However, it reminded me of when I was trying to become a programmer way back in 2006.  Until that point, I’d be pursuing a call to the priesthood in the Church in Wales, but that door closed, and looking back now, I’m very thankful for that.  But at the time, I was working as a pastoral assistant for a small Welsh speaking church, which involved preaching once a month, visiting the elderly folk of the parish, (who knew exactly how to make a young lad blush…) and general admin stuff. 

But that job came to an end. The Church were generous in the parting gift they gave to me, and with it, I bought a desktop computer, monitor, keyboard and mouse all from e-bay and started to learn to code again.  It had been a while, (I graduated from University in 2004) so I had a lot to learn, and Java had moved a long a bit since I last coded in it.

So I started writing lots of little bits and bobs to try and get my coding skills back up to scratch.  At one point I wrote a Point of Sale system in Java using a database backend, I wrote a small project manager program which I didn’t quite get round to finishing.  And generally coded all morning, while in the afternoon, I’d fire off my CV to companies looking for Junior Developers.

I’d been doing this for about several months.  I did everything I could to get myself a programming job, heck, I even went to London at an hour’s notice for a job interview. 

But in that seven months, all I heard constantly was “No, you don’t have enough experience!”  Now let’s be clear here.  I was applying for a JUNIOR Developer position.  And yet these companies were saying no.  I saw one job advertising for a Junior Developer with 5 years experience.  I’m sorry but what you’re doing is trying to get a decent developer at a Junior Developer rate, and frankly I’m not going to go for that!

It all came to a head when I was encouraged to phone one company, oddly enough in the town I now reside in (hahaha), and the chap at the end of the line asked “What experience have you got in ASP.NET?”  I was honest and told him that I didn’t have all that much experience, but had a keen mind and was willing to learn.  He responded with “well, we need an experienced developer really, sorry”  At which point, I must confess I lost it.  I responded by yelling at the man “How the hell can I get experience if nobody’s even give me a chance to gain any?” at which point I slammed the phone down.

Probably wasn’t my finest hour.  However, it got me thinking, “Okay, how do I get experience if nobody gives me a chance?”   So how can developers starting out, get the experience they need?  As not all degree courses give the option of a year in industry.

Kick off your own open source project.

One of the things you can do is kick off your own open source project.  This is even easier these days, and there’s a massive variety of things you can do.  You can write a mobile app, a web app framework.  The only limit here is your imagination.

Contribute to an Open Source Project

Another option is to join a project that’s already running.  This has the benefit of enabling you to work with other developers all over the world.  It’s also an excellent way to find a mentor too, someone who will take the time to help you improve as a programmer.  The best thing with this is that you can get as involved as you like, and you can also choose an area to specialise in.  Want to write unit tests?  Great! Go for it, want to get involved on the documentation?  Cool, projects are screaming out for folks to do the documentation.

Have realistic expectations.

This is a tough one.  We all want to be the rock star developer, but we’ve got to start at rock bottom.  For example, it took me three years to get a job as a programmer.  I started by stacking shelves at a local supermarket.  From there I worked for a small local software company doing technical support, and from there to my current job as a fully fledged software engineer.  So sometimes it’s going to take a while to get there, and once you’re there, you’ve not made it.  Oh no!!  It’s then the work really starts!  There’ll be stuff to pick up, books to read, certain procedures to follow etc. 

Don’t get disheartened by rejection, allow the folks around you to help you.

This is a really hard one. I got knock back after knock back after knock back, and it’s so easy to think you’re not good enough.  I kept all my rejection letters for a bit, but I’ve since shredded all of them.  But I am also blessed that I have parents who love me enough to kick me up the ass when I needed it, and I did quite a few times while I was applying for programming jobs.  On the flip side, they were also brilliant at encouraging me when I’d had a rough one.  My mum heard me yell at that guy on the phone and she commented drily “you won’t get far yelling at them…”  Of course she was right, but she also understood why I was so angry as well.  When I mentioned it to my dad, he just laughed, he was surprised I’d do such a thing to a potential employer. 

The people around you want to you help, but sometimes they don’t know how.  Just remember that they’re supporting you and they care about you.  I couldn’t see it at the time when I was going through all this, but I am grateful beyond words that they supported me through this.  And not just my parents, I have some friends from my time in Aberystwyth (you know who you are), who gave me project suggestions and stuff I could look at writing, or provide me with guidance on setting up Wireless networking on early versions of Ubuntu. 

And the support didn’t stop once I landed a programming job either.  Over the last five years I’ve been working as a professional developer, I’ve had the privilege of being mentored by some brilliant developers, they know who they are.  They’ve provided me with clarity of vision when I’ve been too blinkered or too stupid to see what’s going on. 

This is not an exhaustive list, but it’s the stuff I learned during one of the hardest times of my life.  If I can encourage you in any way, is that it was worth it.  There is a light at the end of the tunnel, and once you get there, you’ll look back and see how much you’ve grown through it all. 

I would also love to hear about your experiences in going through something like this.  Please feel free to comment.

Advertisements

From brain to keyboard…

“Yeah I can do that in no time!”  Those were the words that should have rang alarm bells in my head.  My mentor at work had issued me a challenge from a well known competitive coding site, and in my head it didn’t take any time at all for me to do the arithmetic of what I had to do.

The tricky bit came to when I had to convert what I intuitively knew in my head, to C++ code.  And it’s tricky.  So the problem is basically, you’re given a number (N), and you have to find the least amount of steps to turn N in to a Fibonacci number.

Now for those who’ve never seen a Fibonacci number before, it’s basically a sequence of numbers where the last number is the sum of the two previous numbers, so this is a Fibonacci sequence:

0,1,1,2,3,5,8,13,21,34,55,89….. and so on.  You get the idea.  So if I gave you say…19 you’d know instantly that the nearest Fibonacci number to it is 21.  But try writing that in code.

This is something that I’m not as quick as everyone else at doing, I tend to over-think and over-complicate things.  But that’s is why I do this deliberate practice, so I can become better at it.  So my first stab at the program was a bit of a mess I must confess, this is what my code looked like initially….

int find(int f)
{
    int fib = 0;
    int currentNum = 1;
    int previousNum = 0;
    int loop = 0;
    static int currentGap = 0; 

    while(loop != f)
    {
        fib = currentNum + previousNum; 
        previousNum = currentNum;
        currentNum = fib;
        cout << "Fib: " << fib << endl;
        currentGap = f - fib; 

        int tempGap = f - currentGap;
        // cout << "Current Gap: " << currentGap << endl;
        // cout << "Temp Gap: " << tempGap << endl; 

        if(tempGap <= currentGap)
        {
            cout << "Gap is " << currentGap << endl;
        }
        ++loop;
    }   
}

 

As you can see from this, it was quite a messy piece of code.  It certainly wasn’t well thought out.  I’d just sat at my keyboard and hacked away at it, which isn’t what I should be doing as an engineer right?

So I stopped writing code for about an hour and started writing the steps on paper.  As can be seen.

notes

This helped take my mind off the syntax, and on the concept on how I’m going to do this.  So the final code looked a lot tidier and more compact, so the result is as follows:

int find(int f)
{
    int returnVal = 0;
    int first = 1;
    int second = 1;
    while(second < N)
    {
        second = first + second;
        first = second - first; 

        // cout << "Second: " << second << " : first " << first << endl;
    } 

    int val1 = N - first;
    int val2 = second - N; 

    if(val1 < val2)
    {
        returnVal = val1;
    }
    else
    {
        returnVal = val2;
    }
    return returnVal;
}

This is something I really need to work on to become a better programmer, and it’s only by practising I am going to get better at doing this.