10-15-2008, 10:36 PM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
The first thing that strikes me is that code is awfully difficult to read. I dislike the actual layout of the code, and there's a lack of commenting. I fear it would take me a while to understand what's going on there, and whilst you may think that's not such a bad thing, because perhaps you're the only person who's working on it. What happens if you neglect it and then come back to it in 6 month's time? Do you think you'll still understand what is going on?
I think the best approach is probably to separate out the difficult tasks to other classes. That way one class only has one responsibility, and that responsibility can be clearly detailed by yourself. So when you do come back to the code in 6 month's time, you'll be able to read the comments in which you wrote down, and begin working on the classes again within, hopefully, 5 minutes or so.
In addition to that, I think placing the curly brackets on new lines -- lines of their own, really does help in readability, but that's merely a personal preference.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|