Let’s develop something
Sometimes you need to keep yourself busy doing something, so I decided to document the birth and evolution of my next project from the early beginnings to a working stage (hopefully).
I will develop an application to keep track and create statistics on walks I make around here when I have some free time.
I know it’s not nice to answer a question with another one, but to the question why another one? I would simply answer, why not?
This could be an interesting project and I haven’t seen much documentation about the process of developing a project from the beginning.
I’ll try to be as clear as I can and document each choice I make to make some sense of this in the end.
I think doing this could:
- Keep me busy, making me think about something else.
- Be an interesting challenge to solve.
- Make me learn something new.
- Let me experiment on things.
- Make my coding skills better.
- Help somebody who’s curious about anything I’ll talk about here.
First things first!
Well I like to do code while listening to music, so the first thing to do is finding something to listen to.
I don’t have it on my phone so the choice it’s pretty easy on what to listen to for me, you can buy it by clicking on the links.
Here’s the player from bandcamp if you want to check them out:
What do I want to do?
Programming basically consists of finding ways to solve problems and make a computer do it for you in the best way possible.
What I want to do is to keep track of when I walk and calculate statistics to see how things are going.
That’s basically it for now, later on I’ll try to analyze this in more details and try to find a solution each subproblem to come up with something that would work for me.
Decisions, decisions, decisions…
How to write it?
I like the Java programming language, I also use it every day at my job, so the choice for me it’s pretty easy, using it 🙂
How to call it?
Well this should keep track of my walks and do statistics on them, why not calling it walk-stats?
Sounds reasonable, and it’s not already taken, so be it, welcome walk-stats.
How to release it?
I’m a pretty strange person, I’m a bit of a misanthropist, but I still believe that helping someone who needs it (and while programming you came across a lot of challenges) it’s a nice thing to do.
I also think that more people looking and collaborating at something would make it better.
So I’m releasing the code for this project with the BSD 2-clause license, basically, do whatever you want with this program as long as you keep the license for the code I wrote in source and binary form.
Analysing the problem a bit more in depth
A nice way to attack and solve a problem it’s dividing it in smaller subproblems, as a lot of people said before: divide et impera, it worked then, and still works today.
So from keep track of when I walk and calculate statistics on it, it’s easy to divide it into 2 smaller problems:
- Keep track of when I walk.
- Calculate statistics on it.
This is helpful because I can focus on the first problem first and move on with the second part later.
Keep track of when I walk
How can I record data from a walk?
Well, I don’t feel like writing a full pledged gps logger application for my Android phone, I just want to aggregate the data in a unique place and make some computations about it, so Logger GPS for Android would sure do.
With it I can save data in the GPX format, which is pretty cool.
What’s the data I need to save about each walk?
For now, without worrying too much about it I guess I need to save:
- The date and time I was walking
- The actual data GPS positions from the walk
Where can I store that data to make it easily accessible and usable?
Probably in a database, where I can structure the data and query it.
How do I want to see the data?
Well it would be cool to see the actual map with the track on it, so I’ll try to keep it an option. But it’s good enough to see the numbers too as the first release.
Calculate statistics on the data
Other questions and answers
What do I need to compute from the saved data?
It should be useful to see:
- Total time.
- Total distance.
- Average speed.
- Maximum instantaneous speed.
All of this also from all walks together. (this should be be easy from the single aggregated data).
How do I want to see the data?
Again, graphically a graph would be cool, I’m not a graphic so I would keep that in mind, but just the raw data it’s good enough for the first release.
Let’s start setting up the project
Distributed version control system for the code
I think it’s important to keep the code under version control, it helps focusing on what you’re doing, and all the others nice things like distributed development, versioning, history, rollbacks and so on.
I won’t focus much on how git or github works, if you need help there’s a nice documentation about them.
It works like this:
- Create a github account
- Create a new repository
- Add a .gitignore and/or a license and/or a readme if needed
So here it is, the repository for the project!
That’s it for now, but the fun part is yet to come 🙂 See ya!