Week 11
I am so happy to be back to the routine of learning after the Christmas break. This module is all about Java and I have had to wave goodbye to my beloved VS Code text editor in exchange for IntelliJ IDEA (which is an integrated Development Environment rather than a text editor - it has waaay more tools at its disposal). I had that initial gulp of imposter syndrome - a new environment that I don't know my way around...Thankfully that feeling didn't last long - there are lots of new features that I will need to work my way through and become familiar with, but the bare bones are pretty much the same as VS Code. I now need to go and find how to install my beloved bracket colouriser....
Typing colouriser there made me think back to starting coding and how unnatural it felt to be typing color rather than colour (for my non coding pals - CSS (lets us style webpages) is written in US English)- a few months down the line and it is creeping into my everyday writing and it now feels unnatural to type colour!
You all know how much I love Javascript.. well.. (whispers) I think I may have a new Love! Java 😍 It completely appeals to my logical mind. I like the way that you have to define what data type each element will be. It says what it means and I like that! I think the other reason that I am enjoying it so much is that on the surface I'm comfortable with it but under the bonnet there's a whole load more to learn! Bring it on interfaces, method Overloading, collections and ArrayLists!
Code Craftsmanship
This is a phrase that I saw recently in a job advert and have shamelessly stolen - and will use as often as I possibly can! Code Craftsmanship - it succinctly describes what I aspire to. I want the code that I write to be crafted so it is well planned, easy to read, well structured, efficient, clean and maintainable.
This week we have been hearing about the SOLID Principles and the 4 Pillars of OOP (Object Oriented Programming). So far we have covered the principle of Single Responsibility (the S in SOLID) - this is something that actually the instructors have been instilling in us since week 1. At first I felt like I should be writing a method that did everything all in one, but the principle of single responsibility tells us that a method should be responsible for one thing only. For example you would write one method to change a name and ANOTHER method to get the name change returned to you. Now that this has sunk in I'm finding it really liberating and my code craftsmanship has definitely benefitted from this. It really helps you write cleaner drier code. I have found that when dealing with more complex logic it also helps my thought process and 'chunk up' the task into smaller bite size issues - ultimately each one has single responsibility and I find it helps make a complex problem so much easier to understand and work through.
We have also learned about encapsulation (one of the 4 Pillars of OOP). This is where you set the properties of an instance to be private and then create public 'getter and setters' to grant read/write access to that instance. This means that other classes cannot directly access the data and you can grant others perhaps read only access to it. This is one advantage of encapsulation, there are several others including that it makes your code clearer and easier to understand.
Enums
Enums are such a handy tool to have up your sleeve and they have such a cute name that I just had to mention them. They are a "class" that you use for variables that will never change - think days of the week, months of the year, suits and ranks in a pack of cards. Enums are a great way of avoiding errors from passing in invalid/unwanted data. Use them if you are selecting a variable from a small set of possible values that will not change. If there is a chance that those variables could change then don't define them as an Enum.
Mentoring
Codeclan really have thought of everything with this course. This week we were asked to fill in a form detailing what parts of software development we were most passionate about so that we can be paired up with a mentor. This isn't a job seeking opportunity, rather the opportunity to gain a friendly insight into the Industry we will be entering via someone who has been in our shoes. It is a place where we can ask questions and raise any worries or anxieties we may have. It sounds like a fantastic opportunity and I'm looking forward to asking lots of questions!
Comments
Post a Comment