Tuesday 30 January 2018

Coding One Year On

One of the great benefits of blogging is the fact that you can look back on your posts and enjoy those nostalgic memories and reflect on those thoughts back then.

I started officially coding maybe mid-Jan last year so this isn't on the dot. Also blogging a lot less strictly these days.

Nice start, print actually means send to printer lol fool!

It really is amazing thought how far I've come and I'm literally jobhunting now hoping to get something within the industry. Of course it has to be said that its not as easy as that to start with no knowledge to employment in a year, but if you can afford to go to Makers Academy and persevere then its totally possible.

ONE YEAR ON


Its easy to play down the things I have done. Super easy, since I am British and its a very common trait. But looking back its really awesome to see how my drive and determination has really gotten me to where I am.

More common British traits... Sorry

My coach says that being a developer is going to be about fixing problems. A lot of them. And once one is fixed there is another one to do. And if your ok with that, and even enjoy it then being a developer is for you.

Being a developer is for me.

When starting out learning something, anything, I turn to my favourite resource which is YouTube. There is so much content out there these days its just no comparison for being in the best age of learning. Daniel Shiffman's building of the classic game Snake was what got me to really decide to do it.



Since then I went through all his videos, did some Udacity courses and freecodecamp as well.

In May I was told about Makers Academy, and after checking out GA as well I decided to do it.

There's no comparison for the amazing learning environment, attitude, and incredible teachers and students of this place. Group projects helped us imitate a development team, through the highs and lows, and apply everything we had learned.

One of the group projects we made an iPhone game using the gyroscope movement feature

A big shock to me from my time there was that testing was a huge thing in the industry. I was rather jaded about it at first, because it meant that it would take a lot longer to create things. But in the end I came to accept it and it is very useful for refactoring (reorganising code) and working out where things are going wrong especially when a programme is complex. Testing also means that the code can be quantifiable, in the fact that it is high quality in the fact that it checks itself constantly.

My own custom built testing framework, tribute to Mocha

The pace of the course is fast, its hard work and not easy at all. I struggled some once the web was introduced linking together with code. As open as the place was, it is always difficult in admitting you don't understand something, and constantly asking for help is tough.

It was a great learning experience, not just for the learning, but also finding out about myself. I had never really thought that much about how I handle emotions, and attitudes towards myself (very harsh and unrealistically high standards). Having the wellbeing coach was a direction I did not think was something that I needed, but actually was super useful.

After graduating in the end of October, I went away for 3 weeks and came back in around December time. Christmas period has less job offerings due to the timing but it has picked up for the new year.l

Jobhunting is not fun. Dealing with the emotional rollercoasters of the rejections is tough. The times you spend applying to applications, doing the tech tests, and putting yourself out there in the interviews is physically and mentally draining.

Jobhunting is a roller tycoon of emotions! Man I miss that game...

The Makers Academy careers team are helpful with the graduates in helping them try and land that job with the appropriate training if needed. But at the end of the day, its all on you. The work you do, the training and prep practice, and ultimately presenting the best version of yourself at the interview.

Looks like it hasn't happened for me yet.

But every interview, every tech test, every rejection is added experience and learning to this process!

I was quite reluctant to sign up to LinkedIn, mainly because right now I'm trying to keep my social media to a minimum (like most things nowadays). But actually I'm impressed at the "professionals" Facebook. Its great for networking, and I even managed to get headhunted for an interview for a more local place that wasn't in London. It seems to give you a great chance to network.


So its a new year, and last year when I started I did understand that it was important to document things. It was a good moment when I brought in my bible thick notepad to my Makers Academy interview and get a response of "we like that". I love my Github, and my work, so I've made another repo that lists out the stuff I've done, and what I'm planning to do in the future. I see myself as a creator foremost, so I fully expect to do these projects some time down the line.


Anyways, hope all is well with everyone. To end check out this new concept that Nintendo has done. Seems like when all the other video games company go in the direction of more power, Nintendo goes the other way of more creativity...

Tuesday 16 January 2018

Single Page App - Write A Note!

So for the past few weeks or so, I had been working on a Single Page App (SPA) that I had previously done during the course. Back then we had a choice which was to do a more open direction version in groups, or work on a more directed path in pairs. I had chose the groups option, so I decided to go back and have a look at what the pairs did.

This project was done in basic Javascript only. This meant that we would only use the the core functions of the language and not have any add ons or libraries to help us. We were limited to using Javascript, HTML, DOM elements, CSS and only Node.JS's http server to run a local server.


WHAT IS A SPA?

A single page app is a webpage application which includes some functionality that works without needing to reload the page. This can be done by modifying the page live according to what is wanted. This means that once the initial page is loaded, all of the functionality should work without needing to have a server respond to requests from the page. Pages like Github or Gmail are SPA's.

My app lists out the notes but limits it to 20 characters

Clicking a note will show it in full


Note that reloading the page manually will reset everything.


LISTENING OUT

The DOM contains something called Event Listeners which are used to only run your function when an "event" happens on the page. For the app we had 2 event listeners.

One listener listens for the create button being pressed. When this happens, it will take the text from the text box, and output a list containing the first 20 characters to the page. It adds all this HTML inside the <div id=app> tags.


The other listener listens for a 'hashchange' in the url. When a note is clicked, the link will change the url. When this happens, it will run a function that looks at the number in the url, and output the correct note to the page in full. Again, this edits the <div id=app> tags and adds in the correct HTML.



MVC STRUCTURE

The notes app is encouraged to maintain a MVC structure. This stands for Model, Views, and Controller.

  • Models are the logic behind the app.
  • Views are the output of the app, what the user sees.
  • The Controller is where everything is linked together and implemented.

Keeping the file structures to MVC

In my app the models would be the list of the notes, and the notes itself. The note inputs would be stored here to be referred to.

The views would be the conversion of the model's notes into HTML so that it can be output into the page.

The controller would control all of this, and initiate the functions when applicable according to the events it listens to.

This also means that the html page itself can be considered a controller too, as all the files are loaded and initialised within it.

TESTING

One of the scariest parts of the project was to build your own testing framework to use to test the SPA. Previously we had been using pre-made ones like RSpec or Jasmine, and never really thought about how they worked.

But once we broke it down, we realised that tests were just comparisons between things, and then outputting true or false.

The result could then be outputted to the console, and then later on I outputted it to the page itself.

I made a homage to a common testing framework used called "Mocha" and called mine "Espresso"

My own testing framework!


FINAL THOUGHTS...

My repo is here, feel free to have a look. The readme will be more in depth and a bit more advanced technically. Its been really interesting to take this more thorough process with what seemingly seems like a super simple app. I had a lot of challenges in this project, but found it overwhelmingly useful to my understanding of HTML and Javascript.


Sometimes a simple question to solve problems can lead to passionate arguments...

Its super interesting to think about webpages like this, check out this post about the pro's and con's between SPA's and multi-page applications. I personally like SPA's a lot, they load once and then afterwards everything seems instantaneous, creating a free flowing environment to work with.

Well that's it for now, maybe we can dream of next week having a Singapore post!

Monday 8 January 2018

5 Must Have Apps to Start Out 2018

Wassup, and happy new year 2018! Its really weird to see these numbers go up, and how far off Back to the Future 2 was in its predictions, I mean, where the hell are these hoverboards and pocket sized expandable pizzas? Get on it, tech world!

Since coming back from my Asia trip I have been keeping busy by applying to jobs, and continuing with projects, mostly some from the course which I wanted to re-go through and clarify. The blog has taken a bit of a seat back, it took me ages to get my Hong Kong blog out, and I'm still yet to do the Singapore one.

I thought I'd start out the new year by going through some of my top tips and tricks, and must have useful programs. When it comes to continuous tweaking and improvements, I'm totally obsessed with trying to make things better and more efficient, sometimes to my own procrastinating detrement.

I'm not paid for these promotions, and these apps are not new or anything like that, just super useful.


LASTPASS

Price: Free, or $2/month Premium, or $4/month Family
Devices: Website, Chrome Extension, iPhone, Android

If there was one of these that I would tell you to get, its to get a password manager. For the love of God, just freaking get one. Stop making excuses and do it now!

I started using LastPass and now its something that I don't have to worry/think about. These days, a lot of websites will want you to sign up to them, and now I don't have to worry about which of my 4 passwords I will use, of which will have to be altered to certain sites which want numbers and/or capital letters etc.



Its quite mind blowing how common it is to have only a few number of passwords over all your sites. This, is way waaaaaaay worse for security, as once a password has been taken, the hacker can just try it over all of them. Now all my passwords are different, super safe completely random characters, and I don't even know what they are off the top of my head!

Chrome Extension makes it super useful!
Common annoying counter arguments;
  • Its not safe to store all your passwords in one place - The most common comment by people. You remember one master password that lets you into your page, but there are extra security steps that can be added if you prefer. When I was abroad, even though I had the correct master password, I still had to go through extra steps of email verification because it didn't recognise the ip address. This means if your master password gets stolen, it doesn't mean they can get into your account.
  • Its annoying to have to keep referring to it - Chrome has a great LastPass extension that helps you get the passwords without needing to login, or even see it, its up to the user to customise which webpages should have extra steps of security. It also has an iPhone app for the times you need to get your passwords when using your phone.
  • It can get hacked - LastPass has gained a reputation and is also used by leading tech experts.
Do yourself a favour and install it, if not LastPass do your own research and find a good password manager. Its amazing how many people don't do this.



MOOM

Price: $10
Devices: Mac

One of the features of Windows 10 that I like is the way you can move your windows around and make it half screen by moving it to the left or right, and full screen by moving it to the top. Feels to me that these little "quality of life" small improvements are becoming more common in Windows features then Macs now.

Moom preferences page to set your custom window layouts

Moom is an app that lets you customise your window locations for Mac. You can add keyboard shortcuts to make windows go in a certain place. As developers, its quite common to find ourselves opening Atom/Some other Text Editor and also having a terminal on the side for practical reasons and also letting ourselves imitate cool matrixy style 'tech' stuff.

But annoying person number two (annoying person number one's brother btw who refuses to get LastPass) will harp in my ear about Apple's amazing swiping desktop feature!

This I certainly cannot argue effectively about why its not better, this will most likely be preference. However, for myself, I've found that the swiping gives me mass confusion about how many windows or desktops there are, especially working on multiple screens. That is to say, both screens can and will have separate swipable windows!



When it comes to efficiency, I don't want to spend time remembering to keep track of all my windows and desktops, especially when you end up with multiple Chromes open with stuff your referring to. Having the "Apple + Control" method with all my windows on top of each other, and positioned through Moom personally is what I like.


FLUX

Price: Free
Devices: Mac, Windows

Flux noticeboard panel

Flux is an app which synchronises the light outside/time of the day to the colours of your monitor. This means that the later it is in the night, colours are adjusted to be more warm for your eyes.

Typically most people would have their monitor on the brightest setting, which kinda tricks your brain into thinking its still day. There's a lot of research to suggest that this is happening. Since using Flux for a few years now, I've actually found that I've slept better.


FACEBOOK PURITY

Price: Free
Devices: Add on to your web browser

Over time I have become more into minimal styles. My iphone only contains one screen of apps. Facebook also has been minimised to its bare bones usage. Another tip is to remove the phone app and just use it through your phone browser, as the app saps your battery life like nothing else!

I use Facebook for mainly its practical uses now, compared to before of hours spent of uneccessarily stalking of other people's lives. However, there is a ton of crap now. There are loads of menus, groups, trending, games etc etc.

Facebook Purity settings page

Use Facebook Purity to minimise all of that, and edit it to only show whatever you want. It will also tell you when you get unfriended, I'm sure its nothing personal!

When you add it you will get a logo of it on your facebook.



WAZE

Price: Free
Devices: iPhone, Andriod

Waze for all you drivers out there. This is a GPS app bought by Google with a difference! The idea behind this is that it is a community driven GPS app. What does that mean? Well as a practical example, drivers that use the app can report if there is traffic or an accident at a location live, which will be updated for all other drivers.



Other features include map corrections, and hilarious (am I being sarcastic?) voices from promotions like Terminator or Star Wars. Opting in to reporting via motion movements as your driving will not only update and improve the mapping, but also is incentivised by points of which you can exchange for prizes.



So there you go, 5 great apps that I suggest you get and try out. Do you guys have any must have apps? I'd be interested to hear them and try them out too. Hope everyone has had an amazing Christmas break!