So if you are reading this you are already a programmer or looking at getting in to programming. Either way this should be a good and helpful read for you. As a working man who programs pretty much every day it is no supprise I make mistakes, quite a few tbh, but they aren't big mistakes that can be overly complex.
They are usually the mundane missing a semi colon or most recently an incorrect spacing. These can drive you mad searching tirelessly for the most simple errors and as such I have learnt a fair few ways of trying to reduce the number of these errors and just improve all round code. You may have heard of a few of these and there may be more but these are my top 5.
Number 1: It seems fairly obvious but some people don't like letting other people look at their work. However, if you ever want a simple bug being found quick and easily, give it to someone who doesn't know what your program does. They will be looking at it with fresh eyes and won't think about, "Oh this could be improved by this", they will be less distracted by the program and more likely to spot the simple errors. So suck up what ever pride you think you have and ask for someone to give your code a quick read through.
Number 2: If no one is around or you are too stubborn to ask for help then fair enough, read it yourself. Just take your time and read it as though it was being ran, don't go off to look at other methods to try and see what they are doing. This is where the debugger comes in really handy, it allows you to run the program step by step seeing what variables are what. You never know you might come across a missing semi colon or a mis typed variable that stops everything from working. It happens I know.
Number 3: Comment your code, dear god comment it. This can not be said enough, comments are so usefull and I am not on about just the one line saying does stuff. If you comment often and clearly not only other people will know what you have written should do but so will you when you come back to it. The number of times I didn't comment something because I knew what it was at the time then came back to it and was like, erm what is quite a lot. It is a vital part to programming, yes the computer might know what the code does but when you come back to improve or use your code you will have no idea and that can make chages really hard to implement.
Number 4: Test. Now this can be manual tests, automated tests or other tests but testing works out the kinks. As well as that it helps you write better code and reduce pointless code. With a good few tests you can see where and why your code is failing and what you can possibly do to remedy it. It can get boring but if you do it as you go along you won't have a LOAD of tests at the end to write. As well it also helps see if any new code you have put in breaks existing code.(see regression tests).
Number 5: Write code, any code and lots of it. Practice makes perfect...but nobody is perfect so why practice..... because you can come damn close to being perfect. The better and quicker you can write code the more money you are likely to earn. So crack those fingers, sit down and give yourself a simple coding challenge. It is a great way to try and learn a new language or just boost knowledge in an existing one, it doesn't have to be anything huge, try conways game of like or noughts and crasses. You can write something that solves a problem you are working on or something that makes your life a little easier. The more you write the better and less buggy your code will be, there will always be those bugs that creep in though, it happens to us all.
I hope these few bits of info help in your programming endevours and if you have any pointers you would like to share please leave a comment below.
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Google+ - https://plus.google.com/u/0/109059474716876336577/posts/p/pub
A nice little blog about my general life and thought/ideas I feel like rambling on about.
Showing posts with label Twitch. Show all posts
Showing posts with label Twitch. Show all posts
Monday, 27 July 2015
Wednesday, 15 July 2015
So the past couple of weeks has been super busy so here goes it.
The first big thing that happened was me and a good friend went to seafood festival in Aberaeron. I got to try a load of lovly seafood and sing, singing in the rain, in the rain. As well as this I got to try oysters for the first time with chilli sauce. They taste nice but I could not quite decide if I liked the texture or not, so I had another. Overall I think I like them, after got some delicious mint cake.
On the job front I have a job in Leicester as a Web developer. It is going well and getting on ok, only done first day though. Will have to wait and see how it goes in the long term.
Also I officially graduated in a lovely and warm gown then got my expensive bit of paper(Degree). Already missing Aberystwyth, considering trying to become a lecturer there but we will see on that front. See picture below.
YouTube videos should be back on schedule now and hopefully more live streams, so stay tuned :).
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
The first big thing that happened was me and a good friend went to seafood festival in Aberaeron. I got to try a load of lovly seafood and sing, singing in the rain, in the rain. As well as this I got to try oysters for the first time with chilli sauce. They taste nice but I could not quite decide if I liked the texture or not, so I had another. Overall I think I like them, after got some delicious mint cake.
On the job front I have a job in Leicester as a Web developer. It is going well and getting on ok, only done first day though. Will have to wait and see how it goes in the long term.
Also I officially graduated in a lovely and warm gown then got my expensive bit of paper(Degree). Already missing Aberystwyth, considering trying to become a lecturer there but we will see on that front. See picture below.
YouTube videos should be back on schedule now and hopefully more live streams, so stay tuned :).
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Modded Minecraft: Ep12, Solar panel(Complete) pt4, Harnising the power o...
In this episode I get the solar panel up and powering the digital miner.
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Wednesday, 1 July 2015
Modded Minecraft: Ep10, Solar panal pt2, A big mistake
As well as this I explore a little trying to keep resources up and make a big mistake towards the end of this episode.
'
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Labels:
#10,
#2,
blogger,
facebook,
mentalmarriott,
minecraft,
mistake,
modded,
solar panel,
Twitch,
twitter,
youtube
Wednesday, 24 June 2015
Another week gone and stuff to talk about so lets get straight to it.
First lets get the important stuff out the way, Jurassic World. Yes it was good, a lot better than I was expecting it to be however the ending did let it down just a bit. I love the throw back to the classic films and couldn't help smile when the Chris Pratt meme scene came on. If you are not aware of this then you must live under a rock, check image below to see what I am on about.
I'm trying to keep up to date with videos but this coming week I am doing a lot of traveling so they won't be kept up to date as much. They will be back to the daily schedule soon. I will also have to start looking into getting some more storage space as my hard drives are filling up quite quickly.
Interesting bit of information here, turns out Windows 10 will not be free.
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
First lets get the important stuff out the way, Jurassic World. Yes it was good, a lot better than I was expecting it to be however the ending did let it down just a bit. I love the throw back to the classic films and couldn't help smile when the Chris Pratt meme scene came on. If you are not aware of this then you must live under a rock, check image below to see what I am on about.
I'm trying to keep up to date with videos but this coming week I am doing a lot of traveling so they won't be kept up to date as much. They will be back to the daily schedule soon. I will also have to start looking into getting some more storage space as my hard drives are filling up quite quickly.
Interesting bit of information here, turns out Windows 10 will not be free.
Twitter - https://twitter.com/MentalMarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Labels:
blog,
chris pratt,
cinema,
facebook,
Jurassic world,
lifehacker,
meme,
Twitch,
twitter,
videos,
windows 10
Wednesday, 17 June 2015
So it has been an interesting week. There were bats(well just the one), driving, coffee, job talks and many youtube videos and adjustments.
So first off the bat? Well the other day it was nice so me and a friend went on a walk up Pen Dinas a hill near where I live. After watching a never ending heard of cows we decided to head back home as my hayfever was playing up. On the way down I spotted a bat on the path crawling along. Upon closer inspection the bat appeared to be injured as such my friend decided to contain the bat(carefully) in her hoodie. After calling flatmate to drive up with a container we managed to get the bat back to our house where we proceded to call bat conservation society and RSPCA. They said to put it in a shoe box with a tea towel(to snuggle into) a milk lid with a wet kitchen roll for drink and bit of cat food for sustanance.
When we finally go through to someone who could help they said that no one could pick him up the next day. As such we kept the bat over night, unfourtunatelly no one came to pick him up but there was someone only an hour away. So me and my friend drove to Carno a small village in west Wales to a lovely b&b where we met a lovely woman who was a drop of location for bats. After speaking with her and being shown the lovely b&b we found out the the bat was not a he but a she and had a damaged wing. She said she would take care and get her to someone who looks after bats and let us know what happens. There is a picture below of the bat
That was the most hectic it has got this past week. On the other end I have tried some delicious orange liquor coffee that a friend brought and was very nice. Tasted exactly like the chocolates but hot and coffee like.
My job hunting is going alright I a few phone interviews and a face to face as well. I have a few emails which I need to send out soon, got to keep on top of these things I want a job you know.
Finally videos been going up and got thumbnails sorted as well as links to this blog so everything is getting connected. Check me out online at the links below or by googling mentalmarriott and until next time laters.
As always constructive criticism welcome :)
Twitter - https://twitter.com/MentalMarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
So first off the bat? Well the other day it was nice so me and a friend went on a walk up Pen Dinas a hill near where I live. After watching a never ending heard of cows we decided to head back home as my hayfever was playing up. On the way down I spotted a bat on the path crawling along. Upon closer inspection the bat appeared to be injured as such my friend decided to contain the bat(carefully) in her hoodie. After calling flatmate to drive up with a container we managed to get the bat back to our house where we proceded to call bat conservation society and RSPCA. They said to put it in a shoe box with a tea towel(to snuggle into) a milk lid with a wet kitchen roll for drink and bit of cat food for sustanance.
When we finally go through to someone who could help they said that no one could pick him up the next day. As such we kept the bat over night, unfourtunatelly no one came to pick him up but there was someone only an hour away. So me and my friend drove to Carno a small village in west Wales to a lovely b&b where we met a lovely woman who was a drop of location for bats. After speaking with her and being shown the lovely b&b we found out the the bat was not a he but a she and had a damaged wing. She said she would take care and get her to someone who looks after bats and let us know what happens. There is a picture below of the bat
My job hunting is going alright I a few phone interviews and a face to face as well. I have a few emails which I need to send out soon, got to keep on top of these things I want a job you know.
Finally videos been going up and got thumbnails sorted as well as links to this blog so everything is getting connected. Check me out online at the links below or by googling mentalmarriott and until next time laters.
As always constructive criticism welcome :)
Twitter - https://twitter.com/MentalMarriott
Youtube - https://www.youtube.com/user/GamingMarriott
Facebook - https://www.facebook.com/mentalmarriott
Twitch - http://en-gb.twitch.tv/mentalmarriott
Labels:
b&b,
bat,
bats conservation,
carno,
coffee,
facebook,
job,
mentalmarriott,
orange liquor,
pen dinas,
pic,
picture,
rspca,
Twitch,
twitter,
Wales,
youtube
Wednesday, 3 June 2015
Android fun
So the past couple of weeks I have been trying to keep busy with job applications and my own projects. I have started work on creating an android game so stay tuned to see how that progress. As well as this I am also working on improving my C code and learning C#. I have had a job interview yesterday that I feel went well and got a few other people I am waiting to hear from. If any one is looking for a developer or support technician then I am the computer scientist for you :P
With the android development I had a bit of trouble getting my Z1 compact registering on my computer using android studio. This was so I could develop and run the application on my phone. This was fixed by clicking tools menu, android and enable ADB integration. At the moment just going through an on line tutorial. The tutorial I am using is this.
I have also started live streaming on twitch mostly Minecraft and Team Fortress 2, check my twitter here for when I will be live streaming. Also check out when a new video goes up on YouTube.
As well I have finally wired up my 4x4x4 LED cube to a breadboard and a ATMega328p. Which although the wiring is not fantastic it is working :).
Graduation is soon so I am going to have to make sure I am ready for that.
With the android development I had a bit of trouble getting my Z1 compact registering on my computer using android studio. This was so I could develop and run the application on my phone. This was fixed by clicking tools menu, android and enable ADB integration. At the moment just going through an on line tutorial. The tutorial I am using is this.
I have also started live streaming on twitch mostly Minecraft and Team Fortress 2, check my twitter here for when I will be live streaming. Also check out when a new video goes up on YouTube.
As well I have finally wired up my 4x4x4 LED cube to a breadboard and a ATMega328p. Which although the wiring is not fantastic it is working :).
Graduation is soon so I am going to have to make sure I am ready for that.
Labels:
adb,
android,
android studio,
atmega328p,
C,
C#,
developer,
graduate,
graduation,
jobs,
LED,
technician,
tutorial,
Twitch,
university,
z1 compact
Subscribe to:
Posts (Atom)

