DEV Community

CodeCara
CodeCara

Posted on

Finished Knights Travails while I was AWOL

Note: I had a few very, very busy and therefore, very unproductive weeks. Also, my records were poor during this project, but I have just included what I had already noted/can remember.

I will try to get back on track, again...

THINGS I’VE WORKED ON/COMPLETED…

I finished Knights Travails and started the next section (but will include that in next week’s post).

ISSUES I HAD…

I had essentialy set up a getPossibleMoves funtion and a markParentMarkVisited function, but I was not handling the array with new moves or the queue and FIFO correctly. I got very confused for a while and had to do a lot of googling to figure out where I was going wrong and when and where to mark nodes as visited.

I really had to sit down and work through what was happening and when in order to get this right and I was going around in circles for ages. The fact that I was only able to do a half hour here and there over a period of a fee weeks due to a busy schedule did not help as as soon as I figured out where I was at the last time I worked on this, my time to work on it was almost up - working in ‘half hours here and there’ does not work for me at all personally.

My concentration and motivation dipped several times - not because I did not like the project, but because my ‘work sessions’ were very short and unproductive. However, the only thing I could do is the same as what I always do - try to get back to it and move forward. I started off well, but got very slow towards the end.

As mentioned, figuring out the order in which things needed to be done (added to queue, marked as ‘visited’ was a bit tricky and I needed to google quite a lot.

I then had the problem that the visited status of all squares was being marked as ‘true’ and had to try to debug that and figure out which function was causing the problem. I was looking at this for days (!) prior to realising that it was because I hadn’t put in the logic to tell it to stop once the target square was reached. Why it suddenly became obvious to me days later, I’m not sure and I am mentioning it in case people reading may wonder if doing such things happens to other people also. Answer - it does. I partially attribute this to my lack of concentration and focus in the last few weeks ,which was primarily due to personal commitments.

My git commits were very poor (as in, very neglected) as I was going around in cirles with the BFS logic for too long.

THINGS THAT WENT WELL…

Once I finally finished the flow logic for processing each square, the remaining part was relatively straightforward and required the path being traced back from the end square using th eparent as a refernce

THINGS I’VE LEARNT/NEED TO IMPROVE ON…

My Git commits - I am so proccupied with getting things working, that I am forgetting about the Git part.

Organising my ‘work time’ better - my schedule over the last month has been terrible in terms of etching out ‘coding time’

OTHER…

The last month has not been very good in terms of recording what I did and maintaining a consistent work schedule - I hope to improve on this in the upcoming month.

PLAN FOR THE UPCOMING WEEK…

I hope to finish ‘Intermediate Git’ but I have to be honest and say I’ve started a little part of it already and there are many confusing parts (for me), so I may be slower going through it than I had hoped. I don’t expect to grasp it perfectly, but I may well need to read additional material to get it straight in my head.

Top comments (0)