|
Thank's but I'm more of a book reader-type and I learn best by reading well structured books. The problem is that all the books on Java, besides Deitel book are worthless. They are OK up to inheritance and after that they are just horrible. I read them and I ask myself: "Why to use that? When to use that? What's the point with this and that? Why do that?" and the authors never answer. C++ - books on the other hand are written in this manner "We use this, because of that, if you do this, that goes wrong, do this to make that right. You need this becuase it makes that easier". I don't know why java programming authors are so bad at teaching. 1000 pages after 1000 pages and still they don't expalin anything... like they want to hide something from you... I'm just frustrated.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Use the right tool for the right job.
"Easier" is rarely "better".
Learn D.
|
|
|
|
|
It seems like Java is the right tool for almost everything because it has good GUI support but... it so messy... Like it's ok up to inheritance and GUI and than... lambda this... abstract class this, inner class that, interface that, library this, library that. For a beginner like me it's a total chaos.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
No, Java isn't right for anything and its practitioners should never be allowed near a computer.
|
|
|
|
|
Haha
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Programming languages are part of the toolbox of a good programmer, each with its own strengths and weaknesses. A good programmer will try to use the programming language most appropriate to the job. For example, most programmers would not write a program to calculate orbits in COBOL, nor would they write an interactive game in Fortran (though it is possible to do both).
A good programmer will know more than one language, and will be able to write code in the differing styles that these languages impose, e.g. procedural for C and C++, Object-Oriented for C++ and Java, etc. The idea is that you should be able to match the project to the appropriate language.
Many programmers have had a long and successful career knowing only one language (for example the COBOL programmers who started in the '60s). Today, you are likely to migrate between projects with differing requirements, and cannot afford to limit yourself in such a manner.
In addition to your Computer Science studies (data structures, algorithms, etc.), I would recommend trying to learn at least one popular language a year - C, C++, Java, Python, etc. You do not have to become a master of the languages, just know how to program in them and where to find the more advanced stuff. This will help you when you have to look for a job.
Programming is a challenging career, but it can be very rewarding to the right person. Good luck!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Thanks
modified 3-Jun-21 21:01pm.
|
|
|
|
|
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
Daniel Pfeffer wrote: A good programmer will know more than one language, and will be able to write code in the differing styles that these languages impose, e.g. procedural for C and C++, Object-Oriented for C++ and Java, etc. The idea is that you should be able to match the project to the appropriate language. This!
In my first professional project, I worked with folks that were taught COBOL OTJ (most started late 50's/early 60's). They had no degrees or certificates -- they were high school grads hired by the US federal government and taught how to program in COBOL.
Fast forward 30+ years. My team was rehosting ancient applications onto Oracle, and part of that was training the programmers how to handle the new applications + languages. I worked with one woman for months -- she could not learn SQL. Honestly, she was brilliant, she could make COBOL do anything she wanted. But after 35 years of doing things exactly 1 way, IMO she had a mental block and just could not make the mental shift to a totally different paradigm.
That taught me a valuable lesson -- never stop learning. When you stop learning, you limit your ability to adapt to an ever changing environment.
Java doesn't make sense but other languages do?
Then study the languages that DO make sense. Learning to program is NOT learning a specific language. Learning to program is learning to think, and to express your ideas in a way a computer can execute it.
IMO, learn at least 3 styles of programming: procedural, OOP, and SQL. All three require thinking differently, and learning any language in a style gives you the background to learn new ones.
Always keep in mind that the right language to learn is one that someone is willing to pay you to work with.
|
|
|
|
|
I think you're confusing language syntax and class libraries. You don't so much "learn" libraries; the art is in knowing how to find something that will help you accomplish what you want.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Oh, I understand. I thought I had to memorize most of them and felt really overwhelmed Thank's for your response
modified 3-Jun-21 21:01pm.
|
|
|
|
|
When I was in school we had assignments in languages I just didn't get and furthermore knew I would never use, those I learned enough to complete the assignments. The ones that I did get and knew I would use I studied relentlessly until I became fluent.
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
I was thinking about doing the same, but java is the language that I will be using. Like java, c# and java script are what all jobs are about where I live, so I have to force myself and start to love it
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Gotcha, gotta do whatcha gotta do.
Good luck
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
thanks
modified 3-Jun-21 21:01pm.
|
|
|
|
|
1. Finish your assignments on Java.
2. Don't be afraid of pointers, but do read some topics on / play with pointer arithmetic.
3. You can get a job with C++, no issues with that, there are plenty of jobs requiring C++.
4. I wouldn't waste my time on C#, unless you have a project to do with that language. If you are already learning Java and C++, you won't benefit a lot from adding C# to the list.
5. You will benefit from adding a functional language to the mix, but I wouldn't recommend Haskell to a beginner. I found Standard ML to be easy to learn, so I would recommend that.
6. Try a C++ GUI framework. I would recommend Qt.
|
|
|
|
|
Learning C# may not add a lot more on top of Java and C++, but learning how to deal with .net can lead to some good jobs, just sayin'. Coder's gotta eat (:
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
|
Hey! Thanks for reaching out! Learning to code is hard for most people, and, importantly: no programming language is perfect
When I read the title of your post, I was about to respond with "write code in whatever makes you most productive!", but then I read until the end, and now I have to recommend that you try to get everything you can out of Java, because finding your first job is freaking difficult, but trying to find your first job without a qualification... well, let's say you'd better have friends in the right places.
A lot of the issues you're talking about in Java aren't intrinsic to Java. Yes, C++ doesn't have interfaces, but interfaces fulfill some of the role of abstract classes, which C++ has, but clearer: you can't inherit from them, only implement them.
precursor / disclaimer: I've worked in > 20 languages. C++ was my primary for about 6 years, I've only fiddled in Java (written small things), but my daily driver for about the last decade has been C# (and I do a reasonable amount of JS/TS), so I know that a lot of concepts from C# hold in Java land, and I have a reasonable history with C++...
Interfaces (or, in C++, you might use an abstract class for this) simply provide a "contract" for talking to something else. Let's say you have an interface for IDog : this tells you what "shape" a dog has (it might mention that there are an integer number of legs, an integer number of tails -- you'd expect values 4 and 1 from those, but some unfortunate doggos have had accidents )': ) and a method like Speak() which returns "woof!". You could see how this "shape" doesn't just apply to dogs: cats also have an integer number of tails and legs and when they "speak", they say "meow!", so you could think of a simple contract for an animal where you have, in C#:
public interface IAnimal
{
int Legs { get; }
int Tails { get; }
string Speak();
}
Now, when we want to implement our own animal, it may do more than that (perhaps it can do tricks!) and it will speak with its own voice. The point is that, if we have a zoo of different animals, in a collection, eg List<IAnimal>() , we could count the total legs at the zoo, or imagine the cacophony if all animals were to "speak"!. This means that a function which was, for example, counting all legs at the zoo, doesn't have to care what animals are actually in the zoo! Even the Snake class could implement IAnimal , where Legs would return zero! Eg:
int CountLegs(IAnimal[] animals)
{
var total = 0;
for (var animal in animals)
{
total += animal.Legs;
}
return total;
}
(I purposely skipped LINQ because it's not important to this conversation!)
So, where to use an interface? Any time you want to abstract away the inner workings of a class from something which may work with it. It's nice to use interfaces as parameter types on methods because it means a person could make a completely new thing that implements IAnimal without having to inherit (and probably override) any behavior from a base class!
Anyway, circling back: I know that this is a difficult time, and there's bits you don't like about Java. But my experience is that the particular programming language isn't as important as your skills in being able to solve real-world problems and get paid for it. We're not code-monkeys: we're problem solvers, and sometimes we actually use code to do that!
You've obviously sunken time (and probably money) into getting accredited as a Java programmer. Stick it out! Get a job! Get experience! Experience can lead you to a new job! Whilst you're working on your first job, you will learn lots of stuff that they won't teach you in college, stuff which isn't specific to Java, but more like:
- how to work with team-mates
- how to do and receive code reviews
- how to get your code to production
- debugging
- systems thinking
- version control
- and much, much more!
Whilst you're doing this, pursue your passions in other languages, and, if you think you're getting good enough, start applying for positions with examples of work you're doing in your own time in those languages!
I know this works, because it's how I got to where I am:
- Studied some C as part of a Chem. Eng degree (didn't finish that - ran out of money)
- Did a diploma where the primary language was COBOL!
- Got my first job: VB6! & SQL!
- 2nd job: VB, ASP.NET classic, JavaScript, PHP, SQL
- 3rd job: worked for myself: TCL, ASP.NET, PHP, SQL, JavaScript
- 4th job: TCL, Perl, Delphi/Kylix
- 5th job: C++
- 6th job: C++
- 7th job: C#, F#, JavaScript, TypeScript, Ruby, SQL, HTML, CSS
- 8th job: C#, TypeScript, JavaScript (browser/node)
Along the way I've also become reasonably proficient in Python (love .py!), shell scripts, a little pwsh, learned a tiny bit of assembler, started learning some Rust, some Kotlin, a little Lua... I'm sure I'll learn more and probably forget some of it! The point is that the languages and environments are tools for a task and the important bit of it is to solve the tasks, and hopefully end up somewhere where you're enjoying using the tools and solving the tasks.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
Sorry for late reply, but I'm always busy with studying. I just want to say. Why can't java book writers explain programming concepts as clearly as you do? You should write books, I would definitely buy it Thank's for help
modified 3-Jun-21 21:01pm.
|
|
|
|
|
You're welcome.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
Be careful not to judge a language by the writings of an author. I must have a dozen Java books that are good for a bonfire and another dozen books on C that are wonderful. Java jumped to a leading development language in application programming because of its usefulness, but I would never want to develop gaming programs with it. Think of languages as tools in a toolkit and you will go far.
Just as a hammer is terrible at turning screws, a scripting language will never be good at real-time applications. Other languages are much better at that.
Usually, experienced programmers can point you to good books, or better yet, good authors to help get you where you need to go. CodeProject has a great breadth of experienced developers who are happy to help, and no, I am not getting paid to say that. With Bjarne Stroustrup having developed C++, he is an excellent source, but I found his book to be dry and slow going. Ask for good books for Java and maybe you can get a leg up.
|
|
|
|
|
The first language is the hardest. Once you MASTER any single language, others will be easier to understand.
For Java, you might try the free ebook: Thinking in Java.
It is an okay learning book.
For Java, just remember that Object variables are only "leashes" or "reins" on an Object. They let you control something that wants to roam free (and be garbage collected when that happens). Primitives are values. All variables (including "leashes") are passed to and from functions by value/copying. So if you pass an object to a function, you have a second leash to the same object inside the function. Java object references act like C/C++ pointers, except that the Java language will not let you access the contents. In C/C++, you can dereference a pointer type via * and see the actual memory location.
The one syntactic "sugar" that basic Java gives you is a double quoted String constant: "Assign me to a leash or lose me forever".
|
|
|
|
|
A few thoughts from me:
Why Java?
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.
end
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
|
|
|
|
|
I went to University to study Computer Science. What I can tell you is that once you have learned four or five languages you will find that learning new ones gets easier. So, you have two options that are fairly obvious to me. One would be to find more books on Java, you could probably do this for free in a public library since the language is so popular. The second option would be to look ahead at the other courses you will be taking and what languages they are using then start learning those languages now, that will help you gain greater insight in programming which will help with Java, and you will have a head start on what is coming up in the future. This second option will work but it will also take longer, so you do have a big choice here.
|
|
|
|
|