• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Question about the priorities of learning Java  RSS feed

 
Greenhorn
Posts: 4
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning everyone, or evening, or afternoon..doesn't matter, you get the idea.

I have a question about how I should learn, or to be more precise..in which order should I learn those concepts.

I know the basics for C language and a lot more things about C++, Object-Oriented Programming(OOP) since i'm studying in IT field(University, 2nd year, 20y) and we will start to learn basic things for Java.
Like i always do, I prefer to practice a lot before, learn things and when I go to class, i'm just strengthening my knowledge and ask some things i didn't understand very well(or at all). I'm always saying to me that individual work is the best.

Last week I've compared C++ with Java, learned a lot of differences between them(basic syntax therms, IDE shortcuts and a lot more) and I've discovered JFrame & JOptionPane (or i should call it GUI?). I made a few buttons, a few functions, methods etc.
I finished all the 'quests' from hackerrank(Introduction) and started to do more complex problems(OOP,data structures,strings,big numbers etc.) in order to discover more things about Java.
On the other hand I also started to work in Android Studio and managed to finish my first application, a simple calculator(just sum between 2 numbers right know, some buttons + background), put it on my phone (and i've felt so so happy lol ).

From now on, I don't really know what should I do. Should I

- Focus on coding, more complex problems in order to familiarize myself with Java and those little tricks from every language?(and then the other choices?)
- Focus on GUI?
- Continue playing with Android Studio(I simply love it) and build more complex apps since this means more Java code?
- all of these?

Baby steps are the best, I'm just trying to figure out what my priorities should be right know.

Also, sorry for this long post and thanks for reading & sorry if my English isn't the best one. I would appreciate any opinions    
 
Marshal
Posts: 64089
215
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Have you asked your teachers what they would like you to practise? They might say, nothing. We all have our opinions, and my opinion is that you should know object‑orientation, and that is the most important thing to learn at present. Other people will have different opinions.
Also find out the pitfalls you will fall into going from C++ to Java┬«. There are quite a lot of them. You will find books like Cay Horstmann's big book (Core JavaII, two volumes) have descriptions of such pitfalls in.
I suggest you show us some of your code here, so we can see how well you have understood object‑orientation, and so we can see your code style.
 
Marshal
Posts: 6684
464
BSD Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Cristian Gabriel wrote:Like i always do, I prefer to practice a lot before, learn things and when I go to class, i'm just strengthening my knowledge and ask some things i didn't understand very well(or at all). I'm always saying to me that individual work is the best.


I'm giving a cow for this, and then going to finish read the rest of your post That's a sign that you take things seriously - I like it a lot.
 
Saloon Keeper
Posts: 20635
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome!

A good thing about Java is that, unlike in C/C++, there is support for GUI more or less built into the language environment. In C/C++ you mostly have 2 choices: the insular Microsoft Windows API or one of the more-or-less portable GUI frameworks that you have to install yourself.

A bad thing about Java is that there's more than one framework to choose!

The original Java GUI framework was AWT, the Abstract Window Toolkit. Probably better known as the Awful Window Toolkit. It was clumsy, limited, and not known for performance. It also presented a graphical style that most people didn't find very pretty.

To import things, Sun developed Swing. While Swing taps into some of AWT's services, it's much easier to work with, more performant, and you can "skin" it to customize the appearance. For example, there's a Windows skin that makes the Swing GUI elements look more at home on a Microsoft Windows desktop. The JFrame and JOptionPane classes are both part of Swing.

Then there's SWT, the Standard Widget Toolkit. Unlike AWT and Swing, it does not come pre-installed with the Java Developer's kit. It is a third-party GUI toolkit developed by IBM and it serves are the GUI for the Eclipse IDE. It's also used in the Hitachi Pentaho product suite, and in several other high-profile products.

And finally, there's the Android toolkit. AWT, Swing, and SWT are all designed for desktop computers. Android, of course, was designed for portable devices. You can, after a fashion, write an Android desktop application, but since Android is actually the Linux OS overlaid with a language environment named Dalvik - which is a lot like Java, but isn't actually Java - getting an Android app running on a desktop isn't a matter of just copying a JAR and running it. The Android Studio is actually running a simulator when you test GUIs, not the Android OS itself.

Learning Java if you know C++ isn't that hard, but there are some philosophical differences, which are probably more important than the syntactical and semantic differences. Things like that in C++ you can write non-OOP programs, but in Java, you cannot (everything must be in a class). Interfaces. Not having to have separate header and implementation files (Interfaces aren't the same thing as headers!) And the package structure and project organization that mean that only people of questionable sanity attempt to build a Java project using the raw compiler commands. So it's worth learning at least one build tool. I think Android Studio uses Maven. Maven, is admittedly, "magic", however, so for people who want to feel more in control, there's also Ant. And Gradle, which is more or less like Maven without the XML and with the ability to build in a multi-language environment. And others. You should know at least one build tool, since otherwise you're going to have to use your IDE for building, and not only is that the equivalent of being utterly dependent on crutches, but in less congenial environments, can cause much grief. I can tell horror stories about Microsoft Visual Studio, even though it was supposed to support "make" builds.
 
Greenhorn
Posts: 28
Eclipse IDE Java Redhat
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christian,
I am new to Java or I should say Programming. What I do and this may help you, is take code I am learning and ask myself, how can it be improved? How can I add some more functionality and how can I make changes to it for usability?
A mentor of mine who actually works for me as the Developer, told me, Don't Repeat yourself. Is there code that is being used over and over again? I read threads, answers that work, don't work. I have an app on my phone that reinforces the fundamentals.
I was an interrogator for the US Marine Corps and we all had target languages. I apply the same thing to learning a spoken language as I do Java, practice, be in it, find someone who can mentor you.
At any rate, I am excited for you and just want to encourage you. I think you are on the right path.
Cheers,
From one new guy to another.
 
Campbell Ritchie
Marshal
Posts: 64089
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . The original Java GUI framework was AWT . . . .

A few years ago JavaFX was spoken about everywhere.

I still think understanding objects is the most important thing at present.
 
Tim Holloway
Saloon Keeper
Posts: 20635
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yeah. I keep forgetting about JavaFX. Although is that really Java in the literal sense? Never dug into it enough to tell. It always came across as more of a dialect to me.

I didn't mention OOP, since Cristian claimed some existing expertise in that. Although it never hurts to keep improving fundamental skills.
 
Campbell Ritchie
Marshal
Posts: 64089
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:. . . JavaFX. . . . is that really Java in the literal sense? . . . .

The latest versions of FX have some interesting features, like opening their own version of the EDT automatically, and different kinds of property, and seems to be designed to use λs throughout for event handlers. Quite different from Swing┬«. I am not sure who holds FX nowadays.
 
Bartender
Posts: 10759
68
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Cristian Gabriel wrote:I have a question about how I should learn, or to be more precise..in which order should I learn those concepts.
- Focus on coding, more complex problems in order to familiarize myself with Java and those little tricks from every language?(and then the other choices?)
- Focus on GUI?
- Continue playing with Android Studio(I simply love it) and build more complex apps since this means more Java code?
- all of these?


I'm probably the worst person to be answering this question, since GUI programming bores me to tears.

I'm an application bod. Always have been, always will, which means that problems are what get me up in the morning, not worrying whether I've got the right shade of crimson on my 'Stop' button or where I'm going to put it on a screen.

For me, algorithms and structures, understanding how collections work, or how to best encapsulate database transactions; Dijkstra's (and others) "shortest path" and "shunting-yard" solutions; how solve the "traffic light" (or bigger) network problems that involve real objects interacting in real (or the shortest possible) time.
That's what rattles my cage.

I don't know if it helps, but it made me feel better. :-)

And kudos to you for wanting to learn. +1.

Winston
 
Cristian Gabriel
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch
I suggest you show us some of your code here, so we can see how well you have understood object‑orientation, and so we can see your code style.



I found a solved problem as an example for OOP on my current laptop with some animals & zoo. Nothing too complicated but enough for me back there. I don't know how you'll classify my knowledge after this. Ignore lack of measurement units, missing descriptions(name of the animals in the ending) or things like this. I've created an account on github to share this one : GitHub Repository.

Started it with simple tasks, added more objectives, added all the animals in a list, successfully overloaded <<, and more.
I've added a readme file there to see more details about the problem.
I've translated it into English real fast(didn't check it twice).
To be honest, I would've wrote those lines from cpp into each corresponding header since there are only a few rows there but that's how my teacher wanted to do.



Winston Gutkowski wrote:
I'm probably the worst person to be answering this question, since GUI programming bores me to tears.

I'm an application bod. Always have been, always will, which means that problems are what get me up in the morning, not worrying whether I've got the right shade of crimson on my 'Stop' button or where I'm going to put it on a screen.

For me, algorithms and structures, and understanding how collections work, or how to best encapsulate database transactions; dijkstra's (and others) "shortest path" and "shunting-yard" solutions; how solve the "traffic light" (or bigger) network problems that involve real objects interacting in real (or the shortest possible) time.
That's what rattles my cage.

I don't know if it helps, but it made me feel better. :-)

Winston



I've learned how some algorithms works like Dijkstra,KMP,Trees(Splay/B/2-3/Red-Black/Trie),Max-Flow,Prim,Roy-Floyd,Huffman code. Unfortunately, just understood them very clearly(studied their codes, examples, being able to explain them easily) and they are quite interesting. I would like to study them a little more but I don't think I have the chance right now. Never used them in coding, wanted to use them on some competitional websites in order to improve myself but my examination period appeared and I don't have only programming things to do for Uni.


 
Campbell Ritchie
Marshal
Posts: 64089
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Cristian Gabriel wrote:. . . successfully overloaded << . . .

Which language is that? C++?
 
Cristian Gabriel
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Cristian Gabriel wrote:. . . successfully overloaded << . . .

Which language is that? C++?



Yes, uploaded for OOP thing. I don't have any 'clean' code for Java right know to post it since I'm trying tons of things.

Forgot to say this, between November & December I didn't even knew how to make a simple class in c++. I was so so so so so bad.
Started to study a few hours per day for 4-5-6 days / week in order to recover the lost time and be able to do my assignments. I know I have a lot do learn and a lot to do, more than I can imagine but that doesn't matter.
 
Tim Holloway
Saloon Keeper
Posts: 20635
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may notice that my compatriots are promoting gaining as much expertise as possible in Computer Science in general, as opposed specifically to Java.

Java has its idiosyncrasies, but the better you are in C/C++, Python, COBOL, or whatever, the better you can be in Java as well.

Winston would enjoy my algorithm library. I have the 3 classic Knuth volumes, the MIT Algorithms textbook (great stuff on graph theory), the classic Algorithms + Data Structures = Programs, and Djikstra's opus A Discipline of Programming. Plus the GoF book on Design Patterns. Add to that, a very useful book on non-numerical algorithms whose title slips my mind.  And that's before you even start on my platform-specific library.

And, incidentally, Irving Copi's textbook on Introduction to Logic, including symbolic logic and the Calculus of Propositions, which is indispensable for learning how to crunch down boolean logic. I wish more people would read that, since it also covers non-Aristotelian (non-binary) logic, which is something that our current generation of ideologues sadly don't employ, alas.

---
Update: The forgotten book was actually Combinatorial Algorithms, and I forget the authors, but it pre-dates Knuth's published work on the subject.
 
Cristian Gabriel
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch

Have you asked your teachers what they would like you to practise? They might say, nothing.



I spoke with the OOP & Data Structures via mail and established a friendly chat next week(separate ones). They might say, nothing.
 
Sheriff
Posts: 5917
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote: I am not sure who holds FX nowadays.


JavaFX is completely open source now.  I know that Gluon has pledged to support it, and there's OpenJFX.

I still think it's an important part of Java, but general consensus is probably against me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!