Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is Java right for me?  RSS feed

 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, it's been such a long time I posted but I love this community and something really draws me here (which is why I lean towards Java, haha).

Currently I have no real reason to program other than to just have fun and learn. I've taken all of my college level programming classes I need for my degree in Cybersecurity and my job isn't related to programming. But it's always been a hobby/passion I want to pursue. I feel like I'm always stuck at the drawing board on which programming language to choose. I know from reading similar posts that in the end a successful programmer knows more than one language. I feel like I just need a push into the pool though.

The types of programs that I have interest in seem to be ones that interact with external data. As simple as a program to get weather. Or even some computer games I play, being able to get data from the games themselves. I don't own a server or have anything installed to support it so I'm not sure if I'd be able to do any back-end type things with Java at my level/experience.

I really want to choose Java but when I read about what it's used for I get overwhelmed with some of the practical uses for Java. Whenever I read articles about it I see people, like any other language I suppose, bash Java and say that it's oudated, slow, and you should get rid of it if you don't need it. I'd really like to invest into some further education and materials (books, classes, etc.) into learning a programming language. Would Java be right for me?

Thank you so much you guys!
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is not outdated or slow. It *is* beginning to look more like a backend language, but you can still write nice frontend stuff with it.

Learning a programming language is almost a no-brainer. If the one language isn't right for the occasion, you learn another! Most programmers know several languages.

Java is still very popular and often comes out at the top of polls of the most popular language.
 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute, thank you very much for your answer!

I love being able to learn a language, when I was a kid I programmed with Visual Basic and made programs that interacted with Windows API and would automate things in other programs. Eventually I tried learning Winsock but struggled because I didn't have the networking fundamentals down like I do now. Client/server programs, retrieving data from websites (such as an email client or something to pull email), and things of that nature I think would help drive me to want to learn a language. Would Java be suitable for this, or would I be better off with another language?

The only other thing that remotely interests me is PHP because I use to do web design, but only with HTML/CSS and graphic design.

Can't thank you enough!
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll endorse what Knute said. Java is a fine language, in general. Learning a computer language is not hard and, at their core, most of the starter choices (Java, C, Visual Basic) have a lot in common. This, for example, is valid Java and C code:


That's hardly a practical bit of code, but it would compile in either language. IIRC, the same code in Visual Basic would be something like this:


Not a lot of real difference, there.

But, there is rather more to programming than learning a language. There is the independent topic of software design, about which much has been written in ways that are applicable to all popular languages. And, there is the matter of learning to use existing standard libraries of code, without which serious programming is impossible, and which tend to take a lot longer to master than do any of the languages that use them. But, don't be put off by that. Rather, the libraries are just that: places where you can browse for potentially useful resources. There's always more than one way to do a thing, and what you choose to use from a library is up to you.

Now, as you are interested in real-world data, I am going to suggest you learn C. C is easy to learn and is popular with the Arduino community (that's a cheap, tiny computer that can easily be connected to external devices, like weather sensor, LEDs, games, and so on). The vendor provides a C compiler (albeit a slightly limited on) for free. Yes, there are similar products that run Java, but I personally think C is a little bit better fit for that sort of thing.

Now, having said that to you, I also advise that you stand some distance away from me, as this is JavaRanch, and it is very likely that, in a few moments, my colleagues will begin to hurl heavy objects at me, and I don't want any innocent bystanders getting hurt.
 
Tim Cooke
Marshal
Posts: 3872
233
Clojure IntelliJ IDE Java
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stevens Miller wrote:as this is JavaRanch

JavaRanch is more than that now, we are CodeRanch. That means we invite and embrace discussion about all programming languages. CodeRanch is all about discussing and learning good Software Engineering practices, no matter the language.

You want to learn C? Go for it, and bring your questions to the Ranch. Look forward to seeing you around
 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stevens Miller wrote:Now, as you are interested in real-world data, I am going to suggest you learn C. C is easy to learn and is popular with the Arduino community (that's a cheap, tiny computer that can easily be connected to external devices, like weather sensor, LEDs, games, and so on). The vendor provides a C compiler (albeit a slightly limited on) for free. Yes, there are similar products that run Java, but I personally think C is a little bit better fit for that sort of thing.


I just checked out their site and some of the content. Seems pretty cool! I know nothing about electronics though, haha. I think it'd be quite fun to do something like that as a side project. Thanks for sharing this!

Stevens Miller wrote:Now, having said that to you, I also advise that you stand some distance away from me, as this is JavaRanch, and it is very likely that, in a few moments, my colleagues will begin to hurl heavy objects at me, and I don't want any innocent bystanders getting hurt.

*Puts on helmet*, it's okay I'll stay for the chaos.

Thanks again for all of this. For some reason I really want to stick with Java still. Seeing the robotics/electronic side of programming is pretty cool. The satisfaction of being able to program something and put it into a device that you can touch and see physically would be quite rewarding. Maybe once I stumble across some additional funds I'll pick up a starter pack and try it out! Thanks again
 
chris webster
Bartender
Posts: 2407
36
Linux Oracle Postgres Database Python Scala
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brandon

Don't get too hung up on the "One True Path" for programming. There are loads of programming languages, some of which are better for some purposes than others, and these days it's quite common to use different languages for different parts of an application. Right now I'm mostly using Python and Scala and a bit of SQL at work, because I'm working on a "Big Data" project, although officially I'm a Java developer.

In any case, if you decide to try a new language, you will swiftly realise that much of what you're learning can be applied in many other languages, as the core principles of programming are fairly universal. Anything you learn in C or Java (or Scala or Lisp or Python or Go or whatever) will help you to become a better programmer. So you don't have to choose a single language to focus on unless you want to, especially if you're just coding for fun.

If you want to try learning something new, check out the many excellent free online courses from EdX, Coursera or Udacity. Some of these are presented on a fixed schedule, with assignments and deadlines etc, but others can be taken any time to fit your own schedule. There is often an option to pay for some kind of certified version of the course, or you can take the free option to audit the course on your own.

Personally, I'd recommend Python as a good starting point for trying something a bit different, and there are some great courses on EdX and Coursera, for example. Python is a dynamically-typed interpreted OO language with some functional features, and it's very widely used for all kinds of application areas (data science, sys admin work, web apps, etc). It's pretty easy to use and you may find - as I did - that it becomes a really useful tool in your toolbox for tasks that you'd like to code but where Java would be overkill.

Or you could try out the highly regarded EdX course Systematic Program Design by Gregor Kiczales, which looks at a fundamental approach to programming that can be applied in any language, and it uses a variant of Lisp as the teaching language so you'll learn a bit about functional programming as well. I haven't done this one myself, but I've heard good reports and I think it looks interesting and a bit different from the "Master XYZ in 24 hours" approach to learning programming.

As for working with servers, you can run most open source databases on a reasonable laptop e.g. I use MongoDB, Cassandra, PostgreSQL on my ageing Toshiba Core i5/8GB RAM laptop at home, although you may not want to run everything at the same time! So if you want to explore database applications, you can easily do so at home. Similarly for web servers and application servers, although Java EE tends to be quite a resource hog.

Alternatively, if you want to be hang out with the cool kids in the cloud , you can try out Google Compute Platform for free (60 days or $300 worth of resources): https://cloud.google.com/free-trial/

This a user-friendly cloud platform where you can create Linux virtual servers, play around with databases etc, even explore Google's proprietary tools for Big Data, at a relatively low cost. Once your free trial has run out, you'll be asked if you want to continue with GCP, in which case Google will start charging you for resources you use. But you only pay for most things while you're using them, so just make sure you shut down your servers when you're not using them.

So I'd say just look around and try something new as there are masses of opportunities to do so. Even if you decide you want to stick with Java, you'll be a better Java programmer for learning about something else as well.

[EDIT:]
Just saw you are interested in hardware as well - why not try out Raspberry Pi with Python, as lots of other people are already doing?

https://www.raspberrypi.org/documentation/usage/python/

https://www.coursera.org/learn/raspberry-pi-platform
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chris webster wrote:Just saw you are interested in hardware as well - why not try out Raspberry Pi with Python, as lots of other people are already doing?

I've never tried the Pi myself, but I know a few folks who have and they like it.

Brandon, if you think you'd like to go in that direction (Pi/Arduino/external hardware), I'd recommend looking for a "makers' space," (very, very lamentably also known as "hackerspaces," although hacking-as-tinkering is what they mean, not hacking-as-breaking-and-entering). I belong to one and it's how I learned about the Arduino. Mine is very informal, with no dues (and no safety rules, which leads to some thrilling moments when other members fire up the chopsaw, start the drone motors, or use the laser cutter). These are groups of people who like to tinker, invent, experiment, and generally work with all kinds of contraptions, many of which (but not all) are computer-controlled. My great passion is the automated embroidery machine our founder managed to buy on eBay for a song. Other members are building their own 3D printers. Another is building an Arduino-controlled system to keep his solar panels facing the sun. Almost all of us can program computers, and most are pretty willing to give advice to others, when it's asked for.

Reason I bring this up is that programming can be kind of lonely if you are learning on your own, and nothing helps like a sensei to guide you as you learn. With your interest in external data, the right makers' space might be just the thing for learning the kind of programming you would be most excited about, in the company of others with similar interests. One warning: makers' spaces are as different as churches. Mine is as loosely run as it could be, others have dues and directors, and so on. Some require being tested before using club equipment. Others are nothing more than big rooms with tables and chairs, where everyone brings their own tools and takes them home at the end of every meeting. If the first one or two you find aren't to your liking, keep looking: the right space is out there.

One further word on languages: not only is there no "true path" (nor any "best" language), Java has excellent support for using code written in another language. I'm no Java guru, but I have a lot of experience with the Java Native Interface (the "JNI"). This lets programmers write code in another language (I've been using C++), then use that code in a Java program. This means that, if I find I've reached a point in a Java project that I'm working on and it is causing me headaches that C++ would not be causing me, I have the option to switch to C++, solve whatever was causing me the headaches, and switch back to Java. Now the JNI is not the place for a new programmer to start. But I mention it to let you know that, if you start with Java, you haven't made any sort of decision that prevents you from using C++ to solve your problems when it can. You can use both and, someday, you may find you wish you could. When that day comes, remember I told you about the JNI!

And, we're always here. If you have questions, Java or otherwise, ask them here. We like to help.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One sort-of side issue: if the web is where you want to be, don't fall into the PHP trap. You want to learn about SPAs and JavaScript-driven applications; PHP and other "build the UI on the server" approaches are old news, in my opinion, and beginning to stink of the tar pits.
 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So much helpful information packed in here. You guys are awesome and the reason why I keep coming here. Is it possible that a community alone is the driving factor of wanting to learn a programming language? Haha. Like Steven's was mentioning, it's extremely daunting learning a new language. I took a stab at it a while back and I'd like to get back on my feet and rolling with Java again. The tinkering with electronics and boards seems like a lot of fun but I think for now I'll just stick with the software side. I have this crazy passion to want to build programs that can:

- Act as an email client
- A program I can leave running on my computer and I can monitor things from my phone using an Apache server, or something? Not entirely sure where to start, but that seems like a fun project
- I play some online games where their websites collect data. I think it would be cool to make a GUI based application that can pull data from their website. I don't know if using web requests would be too slow, or if using something like Sockets would be faster? Not sure how this would work in Java

Again, you guys are some amazing people. It's really awesome being able to talk with people who are, how I see, at the finish line or deep into the race of being programmers. Getting advice from you guys means a lot to me because I know it's educate opinions from real-world experience. Thank you all so much!
 
Stevens Miller
Bartender
Posts: 1444
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:You want to learn about SPAs and JavaScript-driven applications; PHP and other "build the UI on the server" approaches are old news, in my opinion, and beginning to stink of the tar pits.

I don't know enough about Web stuff to opine on this, specifically, but it has seemed to me for many years now that there is a slow oscillation, back and forth, between do-it-on-the-server and do-it-on-the-client, that is unlikely ever to end. My guess is that this is a result of human nature, much more than of changes in technology, though each of the one might well exert an influence on each of the other.
 
Dave Tolls
Rancher
Posts: 2914
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stevens Miller wrote:
I don't know enough about Web stuff to opine on this, specifically, but it has seemed to me for many years now that there is a slow oscillation, back and forth, between do-it-on-the-server and do-it-on-the-client, that is unlikely ever to end. My guess is that this is a result of human nature, much more than of changes in technology, though each of the one might well exert an influence on each of the other.


The oscillation has been favouring the client with each cycle, as the power of the client improves.
Each cycle generally occurs when one or the other picks up some fancy new framework, but it's harder for the server-side to argue it should be building the UI as the client hardware gets better.
We're pretty much at the point where it would have to be a particularly funky server framework to overhaul the likes of Angular or React, and the whole RESTful based SPA structure.
 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's almost as if you're both speaking another language, haha. I can't wait to continue learning more about Java so I can understand half of the things you are talking about LOL. Really excited to be here and to see how active members are in the community!
 
Joe Bishara
Ranch Hand
Posts: 175
17
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brandon Bushnell wrote:...my job isn't related to programming

I hope I don't scare you off but you mentioned that your job isn’t related to programming, so before you switch to programming, there are a few home truths that need to be spelt out.

Java has a wide variety of uses from web development to desktop software to mobile, however, like a marriage, programming is a lifetime commitment. In many professions, one needs to train regularly in order to stay relevant, however, this issue is especially amplified in programming. Just when you think you know enough, there’s a little bit more to learn.

The trick is to show your employer that you can learn and you are willing to keep learning.
 
Brandon Bushnell
Greenhorn
Posts: 23
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Bishara wrote:
Brandon Bushnell wrote:...my job isn't related to programming

I hope I don't scare you off but you mentioned that your job isn’t related to programming, so before you switch to programming, there are a few home truths that need to be spelt out.

Java has a wide variety of uses from web development to desktop software to mobile, however, like a marriage, programming is a lifetime commitment. In many professions, one needs to train regularly in order to stay relevant, however, this issue is especially amplified in programming. Just when you think you know enough, there’s a little bit more to learn.

The trick is to show your employer that you can learn and you are willing to keep learning.


Not at all! I actually appreciate your blunt honesty. I wish I had the time like I use to to sit down for hours and learn to program. Now I have to take PDF's with me on the go and read them on breaks. When I come home I'm a full time dad/husband/student so time is scarce. However, I'm going to make it work. I think that's why I really wanted to take the time to ask some of you senior programmers if this is the right way to go. I just wanted to ensure that Java was the right language to learn for what I'm doing since time is so scarce. Some of the members mentioned robotics/electronics. Those would be interesting way down the road but for now I'd really love to just make programs that interact with content from websites or client/server type programs. I love networking and would love to learn more about sockets and eventually get a grip on multi-threading (I don't know what this intimidates me so much).

Thank you again so much!
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brandon Bushnell wrote:...[I]would love to learn more about sockets and eventually get a grip on multi-threading (I don't know what this intimidates me so much)...

Natural selection.

Multi-threading is not for the faint of heart. It may seem simple - and credit to Java for making it a lot simpler than it is in other languages - but many of the "race" conditions you encounter aren't. Same with recursion, reflection, and several other "goodies"...

My usual strategy is avoidance. I don't write classes that need synchronization if I can possibly help it. I don't write reflective code except as an absolute last resort. Same with recursion...

It may be lazy, but it's served me well.

Winston
 
chris webster
Bartender
Posts: 2407
36
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:Multi-threading is not for the faint of heart. It may seem simple - and credit to Java for making it a lot simpler than it is in other languages - but many of the "race" conditions you encounter aren't. Same with recursion, reflection, and several other "goodies"...

My usual strategy is avoidance...

Same here!

One way to avoid the world of pain that is thread management in your applications is by using Akka - this is a concurrency framework written in Scala but also available for Java, and based on the Erlang Actor model for concurrency. The framework manages the threads and your programs interact via asynchronous message-passing between Actors, which are very lightweight processes that run concurrently. It's supposed to be very scalable - you can also run Akka across a cluster - and has various extra libraries for things like Reactive Streams and persistence. Akka has been around for a while and is widely used in Scala land, including in other Scala-based frameworks where scalability and distributed concurrency is required, such as Apache Kafka and Apache Spark.

I don't pretend to understand any of this, but I've managed to use Akka for some prototype data streaming applications (in Scala) and I like what I've seen so far.
 
ludoviko azuaje
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Brandon Bushnell,

Since learning Java can be an overwhelming and daunting task I think that Python is best suited for new learners -people not necessarily programmers but eager to learn to program- and easier to pick, there are also very good resources to start with. At the same time is a well-thought-out language with countless possibilities and applications, with its own niches.

You might find this useful:

http://www.pythonlearn.com/book.php
https://automatetheboringstuff.com/

In Coursera try:

https://www.coursera.org/specializations/python
https://www.coursera.org/course/interactivepython1

The ground you get can be later applied to Java.









 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!