Hey! Today was a great day!
I had lunch at my brothers school, their food is very delicious. I also saw my old computer science teacher and have a better direction on how to program and approach university as a whole.
The biggest programming problem is that I tend to skip the design phase all the way. This is really bad because I just hop right to programming which means that my application doesn’t have well defined parameters or overaching flow. I fail to address questions such as “What is the goal of this application”. What are the ideal feature list? Minimum feature list? Wish feature list?
I’m also failing to keep a weekly log of what I accomplished, what I’m planning on working on next and so on.
I’m going to have to take a few days and plan out SNAT throughly. How do I want it to be used? How should the interface between the classes be structured? What classes should I use? Even though this slows down my development right now, it’s something that I know that I’ve been needing to do for a long while. It’s only so long that I can continue limping with my badly written code before it’s going to cause me a real big headache. I’m not switching to another project or anything of that like! All that I’m doing is taking a few days off from coding to properly define what the main goal of SNAT is. Build a project overview, figure and design the state diagrams, create the UML diagrams and verify that everything works correctly. I already have a lot of code, I just need to better organize it and give it better direction.
The problem and this is going to come back to bite me if I don’t start forcing myself to do this, is plan what I’m going to do most of the way before I actually begin developing the application. This planning even though it means that I can’t jump into the code right away will serve me better in the long run when I try to introduce new features and such.
IE for example something that I’ve failed to properly consider is which level does error handling in my program? Right now all the levels of the program verify that the input is sanitized. Is that nessary? Could I just do it on the input level and require that any programmer that uses the API verify and do bounds checking on the data before passing it? This would also make it much simpler in changing the data down the road because I won’t have to worry about updating the data verification that is scattered at multiple levels throughout my code.
This was a problem in my JRS application that I wrote awhile back where in some cases I was passing the entire filenames to the file writer/reader and other cases passing just the filenames and having to keep track of which function expected what type of input. That was an example of poor planning and as a result I lost a lot of time further in the development because I had to troubleshoot faulty code and and figure out which data inputs had been checked and which data inputs needed to be check.