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 facebook. Show all posts
Showing posts with label facebook. 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
Saturday, 27 June 2015
So I have graduated, well I have my results graduation is on the 14th July. I will be graduation with a 2:1 hons BSc in Computer Science from Aberystwyth university and a 1st for my dissertation. I have had a fantastic time there and met some amazing people who I will remain friends with for a long time. It will definitely not be the last time I am in Aber though as I want to keep visiting there as it is a wonderful place.
In other news the supreme court of America has announced that gay marriage is legal in all 50 states. This has created a bit of an up roar with those who are against it(I am for gay marriage) who have been saying they will move to Canada. Little do they know Canada has had gay marriage legal for a long while now so they will be in for a shock.
People on Facebook who are happy about the news have taken to rainbowifying their Facebook profile pictures. The rainbow being the LGBT log. So there are a lot of colourful faces on Facebook at the moment.
Videos on YouTube are a bit slow as well at the moment as I am currently at home, but there will be a new video going up soon so keep checking my channel out. (Link below). I am at home as more job interviews, yay! hopefully will have a job and start earning some money to pay everyone back.
Thanks for reading and hope you have a good day!
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
In other news the supreme court of America has announced that gay marriage is legal in all 50 states. This has created a bit of an up roar with those who are against it(I am for gay marriage) who have been saying they will move to Canada. Little do they know Canada has had gay marriage legal for a long while now so they will be in for a shock.
People on Facebook who are happy about the news have taken to rainbowifying their Facebook profile pictures. The rainbow being the LGBT log. So there are a lot of colourful faces on Facebook at the moment.
Videos on YouTube are a bit slow as well at the moment as I am currently at home, but there will be a new video going up soon so keep checking my channel out. (Link below). I am at home as more job interviews, yay! hopefully will have a job and start earning some money to pay everyone back.
Thanks for reading and hope you have a good day!
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, 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
Tuesday, 1 July 2014
Bowling and such
So today has been a busy but fun day. Started off as most work days do, getting up, exercise, breakfast, head to work. At work I had my usual stuff to do but there was a manager leaving so we all gathered to say a good bye, even though she was only leaving to a different department and would be on the floor above. Also talked had a meeting about what is needed to be done for an event that I shall be helping out with.
At the end of the day I got a lift of a friend rather than my flatmate as we were heading bowling later. However they had to nip to the dentist, so I came along and sat in the waiting room. I went the toilet while there, as when you got to go you go, the toilet was tiny. It was smaller than train toilets it was ridiculous. When I got back to the waiting room my friend showed me what they put on Facebook about me, they said "It's like being at the dentist with my dad". Hope that meant I was mature, still seems a bit off then.
After the dentist there was time to spare before bowling(pun intended). So we went for a nice meal at a local pub/eatery place, the food there was very nice. The fly though was not. After the nice meal we headed off to bowling. When we got to bowling we were still a little early so grabbed a drink and started having a little chat. Then it was bowling time. First game didn't do too well and came last as always. Second game I found my swing of things part way through but then lost it.
While waiting for the third game there were a couple of kids who looked like they were going to have a fight but one of their friends came along and calmed them down. In the third match I was doing much better, I got two strikes in a row but unfortunately missed the third. I was especially annoyed at missing the third as on a Tuesday a gentleman comes round to each lane and if that player can get a strike then they get a free game. So came to me and was my turn, bowled, one pin remained standing, I was gutted. I was happy with the third game overall though as finally managed to break 100.
Today has been a rather good day, also got my pink driving license through today. Problem is it features me with hair whereas now I am lacking most of it, ah well.
Oh and my sweepstakes team, Germany are through, just :).
At the end of the day I got a lift of a friend rather than my flatmate as we were heading bowling later. However they had to nip to the dentist, so I came along and sat in the waiting room. I went the toilet while there, as when you got to go you go, the toilet was tiny. It was smaller than train toilets it was ridiculous. When I got back to the waiting room my friend showed me what they put on Facebook about me, they said "It's like being at the dentist with my dad". Hope that meant I was mature, still seems a bit off then.
After the dentist there was time to spare before bowling(pun intended). So we went for a nice meal at a local pub/eatery place, the food there was very nice. The fly though was not. After the nice meal we headed off to bowling. When we got to bowling we were still a little early so grabbed a drink and started having a little chat. Then it was bowling time. First game didn't do too well and came last as always. Second game I found my swing of things part way through but then lost it.
While waiting for the third game there were a couple of kids who looked like they were going to have a fight but one of their friends came along and calmed them down. In the third match I was doing much better, I got two strikes in a row but unfortunately missed the third. I was especially annoyed at missing the third as on a Tuesday a gentleman comes round to each lane and if that player can get a strike then they get a free game. So came to me and was my turn, bowled, one pin remained standing, I was gutted. I was happy with the third game overall though as finally managed to break 100.
Today has been a rather good day, also got my pink driving license through today. Problem is it features me with hair whereas now I am lacking most of it, ah well.
Oh and my sweepstakes team, Germany are through, just :).
Subscribe to:
Posts (Atom)

