Haha, I totally see where you are coming from its just that then these people go out there getting software development jobs and when they quit or get fired we're forced to reuse un-reusable code. Also I do agree that sometimes you shouldn't do things because thats the way you are "supposed" to. About the 3rd paragraph ye I've reused tons of view code thru my projects. Example: you write a view with 2 side buttons, one to view the next image and one for the previous... if you set the view to display images in an images array that is in the delegate then your view can only display images from that specific app. HOWEVER: if you make the view have a delegate object that it can ask for how many images are in the array and the images in an increasing order then you can easily reuse the view thru multiple projects that need to display data in that manner.
Sorry If I wrote too much and once again Im not saying you don't know what you are doing or anything along those lines Im just simply stating how such design isn't very reusable (from my point of view) so that others won't run into common problems when they are working on a big project.
Also ye n00bs shouln't get caught up on coding standards because they'll just end up pondering for hours on end if they are doing things right. With time and having to rewrite identical views to some you've previously written they will learn what it takes to write reusable code and understand the standards.
Quote:
Originally Posted by myersn024
Message disclaimer: I don't pretend to know it all, and my advice probably isn't the best. Coding is one of my hobbies, and I've been doing it for around 15 years. I try to make my code easy for me to understand since I'm the one that maintains it and uses the final product. If you like your way better or think I'm full of crap, then that's your prerogative. I fully realize that all the message thus far in this thread have been constructive criticism, and I'm not angry or trying to be defensive about anything. I'm just posing my point of view and trying to help others that may be having trouble figuring out things that I know how to do.
I'm going to toss this out there just for the sake of asking....no other reason at all......
Has anyone here ever really reused a view for anything other than what they designed it for? I totally understand the concept, but I don't see how it can be actually applied (not to say that it can't, but I'm sure you understand what I'm saying...or maybe you don't LOL).
And as a side note to noobs, my advice is don't get too caught up in coding standards right off the bat. Try to do things the right way, but don't be afraid to "break the rules" if you need/want/have to; just try not to develop too many bad habits along the way.
|