The title says it all but I am curious if it's acceptable or even efficient for that matter. If others were to read my code or work on a project with me is this generally accepted among others or yourself if you work on an enterprise level? Is this memory efficient to split things up for developer "ease-of-use"?
I don't agree that "the title says it all". I have no idea what your question is. Programming involves creating and using functions and classes, how could it possibly be not "ok", if you can't create / use functions and classes, you can't do anything. It's like asking "is using a hammer and nails 'ok' for a carpenter?". Please explain what you mean more clearly, and we'll be happy to help.
How would you write code without using functions or classes? From what I know about code creation you want to compartmentalize your code as much as possible. Breaking it up makes it easier to maintain and affords you the ability to change code in one spot and have it apply to your entire project. Lets say you have an algorithm that does a transformation of a number to another number. If you had the code that does that in all of the places you need it that's bad. If you want to change it you would have to go to every spot in your code and change it. If you instead had the code in a function and you called the function every time you needed it then all you have to do is change the code in the function. Its the same problem with magic numbers in your code. If you are using a specific number all over the place in your code make it a constant variable instead of hard coding it everywhere. It makes updating your code a lot easier.
I understand using classes and functions to simplify code but my question was using them to merely organize the actual text for the programmer. An example would be say you have 10 functions that you need a class to use. Is it better to call all ten or call the 10 functions into 1 function with the only use of that function being to call it in our class, therefore only needing 1 function call in our new class.
As software engineering is similar in many ways to architecture, there is a principle that they share: "Form follows function". The principle is summarized as the fact that the form that a construction takes depends primarily on the function or purpose intended for it.
The reason I point this out is that you are asking about the form that code should take, without explaining the purpose or function that the code should accomplish. That can't work. You have to explain the function before you can determine what the best form is.
Is this memory efficient to split things up for developer "ease-of-use"?
Even if it wasn't, it doesn't matter. Code maintainability and readability is a lot more important than shaving off a few bytes here and there. Your time as a developer is a worth more money than a few processor cycles.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Hi. Im using vb 2010. I want to dynamically add textboxes to my form by clicking on a button. I've google searched and so far this code worked:
Private Sub btn_addline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addline.Click Dim txtB1 As New TextBox Dim i For i = ...