DMRI Placement - September 2017


Post Date: 15/10/2017

I was on holiday during the first of September so I’ve held off a week to make sure I’ve done a month’s work before doing the September blog. One of my first tasks upon returning to work was updating the opt-ins/outs (these opt-ins/outs are checkboxes that people can check - or not check - to say whether they want to hear from us by email, SMS etc) on the account details page of the competition websites. This had to be changed as we’ve been rolling out a new registration system with the new opt-ins and they hadn’t been updated on the account details page. Not a lot was learned from doing this, however, I did learn how these permits are processed in the back-end. But I do understand that not everything I do is going always give me a broader knowledge of the company/code base.

My next task, however, did greatly increase my knowledge of the websites and how they work. What I was tasked with was updating the share and gain feature of the website, this is where you can share a competition (via Facebook, Twitter or email) you’ve entered to gain an extra entry to any competition on the website. From my initial assessment, I found that no bonus entry was gained when sharing a comp and the twitter share wasn’t working at all. As this code hadn’t been touched in several years, I thought that it would quite outdated. But to my surprise, it was all still to date – except for Twitter. The Facebook code was using the JavaScript SDK which it got from a page on the Facebook servers so as a result when Facebook updated the JS SDK, our end also got updated, the JS code to call it also hadn’t changed so there were no problems there. The email share system obviously doesn’t rely on any API so this was fine. The Twitter share posed much more of a problem, you could go through the steps of logging in twitter and allowing the site to tweet, but the tweet just didn’t get posted - no errors whatsoever. After a couple of days of fiddling around with it, I finally found was the culprit… We were using an old version of the Twitter API which no longer works/isn’t supported. When I went to look at the new version, I discovered that it required a PHP version we don’t use on our server. I brought this up to my supervisor and it was decided we would remove the Twitter share for now.

However, literally as of writing this I just thought we might be able to use the Twitter API through JavaScript rather than PHP.

So after finally sorting the actual sharing of the competition I had to figure out why no bonus entry was being rewarded. Looking into this is what increased my knowledge of the websites, what I learned was how variables, functions etc got passed around the website. In our code, we have what’s called shared code and, as you can probably guess, it’s common code that is used on all sites and this is where I gained the knowledge mentioned above. This was my first time venturing into this folder as I was a bit nervous as any change I would make would affect ALL sites, so I had to make sure I was careful.

Anyway, after a couple of grueling days of trying to fix this bonus entry issue, I finally found the issue… One, literally one, line was missing from the code. I put this line in and it works. Despite all that work done just to find that one line, I wouldn’t call it wasted time as I learned probably essential knowledge of the code base. And now speaking one month on from this, I’ve feel much more comfortable working on shared code and my knowledge about it

My next task came upon me unexpectedly, we had been asked to update and place new ads on the competition sites. The work colleague who would have probably taken the lead on this went on holiday the day of this coming up, but she did do some work on it before leaving. I volunteered to finish off what she started working on and doing this appeared to put me in sort of leadership role for rolling out these new ads. I was the person the manager went to when asking for updates, I was emailing people about it etc. I did receive some help from another senior colleague with regards to the organization/update side of it which helped a lot. I did end getting all the ads there were requested on the sites. During the week my colleague was on holiday, I undertook the daily task of managing the ticketing system. Most of the tickets that came through were quite simple E.g. address changes as user’s address wasn’t showing so had to be put in manually, unable to register or just general issue on the website. And surprisingly, it was a little bit enjoyable doing this and I’m not entirely sure why. I’m thinking that it seems good to know you can see your fixes or suggestions is helping users.

Some security issues also popped up this month. The first one was an XSS was detected on our sites, this wasn’t very hard fix for my senior colleague, but because of this we ran some more scans and found other issues. So, I and my other junior colleague went through and put these fixes in place. We also ended up having some SSL issues, we discovered that we were linking to/loading resources that were over HTTP which meant we weren’t getting the green padlock on out sites. Again, this was a simple fix, just add the S to HTTP where possible and remove if not.

My final task of the month was updating our own company site as it contained outdated information about the company. I had to remove that information and add some more update info, this was only front-end stuff so wasn’t that difficult (other than typically annoying stuff that comes with working with CSS…). I did have to do a bit of back-end work as the manager wanted a contact form where people can opt-in to hear back from us. We don’t have a mailing list set up so I just set it up where the user’s information is placed in a CSV file when submitted and we can retrieve that info whenever we get an email enquiry from someone using the form.

On top of that, I also did the regular work on fixing any issues on the websites that crop up. These are not much of learning experience anymore for me so I’m able to implement these fixes without assistance.