Welcome to the Lounge
The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
|A few thoughts from me:
New kid of the 90s when a new boom of development kicked off with this people. Companies digitizing their processes and looking for how to do that.
A: Free, B: had some features for new programmers that eased development.
New programmers thrown Java
New programmers cheap
Move 20 years on. Java has its foot in lots of business applications, because of that expansion phase. So lots of work maintaining that work because the risk to rewrite seems unproductive from a business perspective.
Tons of courses use Java to teach, because they already have the course setup for that and will cost time and energy to change it. Again its free to use the language and teach from, so many courses used it.
After learning how to write code. It will be helpful to understand some business stuff to be able to manage clients. This is a whole different thing to understand. Unless you happy to be code monkey (in the positive sense, not negative) and find a manager to deal with all business. This still leave you at the manager whims that when you think project should be done as X, but manager says must be done as Y.
Why learn concepts?
For 10 years after uni, never once used an Abstract. had no need.
Had no need because I was in a company whos product had no need.
Until I found a code base which everything had Interfaces. Now some of this might be C# specific but lots of cross over. Interfaces were created for everthing, so dependcy injection could be done on Testing (unit tests). This granular level of testing also took some learning and once clicked the interfaces made sense.
For some understand B before A is more helpful then A then B. I am the former.
"Oh no, you never did tests before!?"
Yes and no. I had tried to do unit testing to little avail. So the previous porjects I had worked on relied more on integration test, automated out, and dedicated testers following manual test sheets. So need to learn that programming had little need.
So back to Abstract. I noticed that there could be a use for an Abstract class. This was not really me thinking in OOP terms, but understanding some C# features, and wanting to trim some code fat.
consider this. There are lots of clients that need food.
We offer Breakfast, Lunch, Dinner, but needs to be implemented different for each client.
So we make an Interface for Breakfast, Lunch, Dinner.
(interface is just method names, properties and return type. Only the public methods)
So each client has to implement each method, even if they dont want something.
So given some 20 clients. and many only want Lunch. means a method which just returns "does not want Breakfast".
This is where an Abstract made sense. I dont want to allow the Abstract to be instanced. but I want make a default return for each.
then the client classes only need to override the methods that it uses.
Learning you need to over learn.
Then when go to implment its often cutting back sometimes. If only going to have 2 clients in the above example, then Interface/Abstract might be overkill.
Some developers prefer to side on write it first time to be extenable, so they dont have to rewrite. Others are not able to see that far ahead first time and so require that extra rewrite stage.
Also Ask your teacher
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.