Monday 4 June 2012

Version Control

I have started learning about version control for my new project; putting together a series of math functions in c which will eventually be converted to assembler.

I would quite like to use a version control program going forward because my hard drive is very messy with all the programs on it.

My understanding is that there are two types of version control programs:
Those that commit chnages to a master source in a central repository.
Those that are stored in a distributed fashion similiar to shared folders in drop box.

Git is a program made by Linus Torvalds so it should be ok to use when I learn Linux later.

Thursday 12 April 2012

Simultaneous Equations?

I realised today just how important maths can be for programming.
Based on my experience with my new Mastering Mathematics book it really does astound me that we are not taught algebra in University.
I suppose most students going to university have been in education for a while so algebra is still fresh in their mind, but it has been more than five years since I studied the subject.

One of the exercises was something called Arithmogons:
The numbers in the square are the sum of the circles on each side of the square.
I initially assumed they were whole numbers and was getting nowhere.
I decided I needed to employ some algebra.

I wrote out a formula like this:
27 is the sum of all squares:
27=(X+Z)+(X+Y)+(Z+Y)
I ended up with:
27-Z = X+Z
-----
  Y

That is 27 minus Z over Y is equal to X plus Z.
I assumed I needed to multiply X plus Z and decided this was the wrong approach.
Instead I asked my housemate how he would approach it and he came up with the following solution:

X+Y=8
Y+Z=9
X+Z=10

(9-Y)+2=10
Z=10-(8-Y)
y+10-(8-Y)=9
Y+2+Y=9
2Y=7
Y=3.5

I recognised a bit of this from simultaneous equations and proceeded to repeat the word several times and then we both moaned about how boring maths was in school.

Now that I had an algorithm for working out X,Y and Z I could write a program.
This is why whenever my tutors say programmers don't need to learn maths, I completely ignore them and continue reading my awesome book.

Wednesday 11 April 2012

Maths III

One of my lecturers has suggested that I take a look at Engineering Mathematics by Stroud http://www.amazon.co.uk/gp/product/0333620224/ref=oh_o00_s00_i00_details and also Math Centre http://www.mathcentre.ac.uk/
Seems promising.

Tuesday 10 April 2012

Maths 2

It looks like I need to learn about calculus, however I am also interested in brushing up on my algebra. I am sure there are more fields of maths that I need to know to help me with my programming.

Monday 9 April 2012

Students Are A Microcosm For The Research Community

Although my lecturers are very approachable and helpful, my peers are the main support structure when it comes to learning programming.

Others may argue that the lecturer is the person a student should turn to first, but peers are there on the weekend and at midnight.

They are on Facebook and happy to talk to some one who needs help with really stupid problems.

They are also learning the same things as each other so in some ways they are more an expert on the work to be done than the the lecturer marking.

This is why I believe it is important to help my peers with any problems they have with their coursework because if I am the only one on the final task of an assignment and stuck. I am just as likely to fail as everyone else, whereas if I help everyone get to the final task; we can all help each other and collaborate.

Students have strengths and weaknesses and by not being a prick, everyone becomes stronger by sharing their advantage for the good of the group.

No matter how annoying some of that group may be.

Saturday 7 April 2012

Software Engineering Approach To Problem Solving

Realised this week that because assignments and projects are:
  • getting larger in scope 
  • not limited to one source file
  • implement multiple unfamiliar functions
creating programs approach needs more structure
Systems Analysis and Design and lower level programming work has covered this

the following techniques will be implemented:

//Technique One
only focus on implementing one function at a time

//Technique Two

when it seems the program runs after implementing the new function, save that version of the program and begin implementing the next function in a separate version

//Technique Three

begin a project by working on the function that can be tested most easily

Wednesday 4 April 2012

Maths

While Pair Programming yesterday it occurred to me that I didn't know any maths.

One of my lecturers suggested integrals and differentiation.
I didn't understand what either of those things were.
I searched the web for the best place to start.
There was too much information.
I have ordered a book on maths.
I looked at a GCSE mock exam and did not understand the first question.