Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

learning java?

by kodo (Hermit)
on Oct 28, 2002 at 12:01 UTC ( #208479=perlmeditation: print w/replies, xml ) Need Help??

Hi monks!
I've currently to think about an offer I got here at my company. I currently do 90% of my job coding perl, doing CGI-stuff, simple scripts but also bigger projects.
Now I could take a java-course for some months and then start in a huge java-project, but I still don't know what kind of project it is. But well, the interesting point is that I could learn java, which would be totally new to me. I code in perl now for 9 months but I still learn lots of new things in perl etc.

So I'd like to know from those of you who did both already (java + perl), if it's interesting for someone who knows perl to learn java, or if it's a bit boring compared to perl? Someone told me a while ago that it would be good to learn java to understand OO-Coding, what do you think about this?
The bad thing would definitly be that I wouldn't do much perl for quite a while, which I would miss a bit...but I'll prolly get more bucks when I take the java-part...


Replies are listed 'Best First'.
Re: learning java?
by Tanalis (Curate) on Oct 28, 2002 at 12:13 UTC

    I learnt Java at Uni, and now know Perl from the workplace. Both languages have their pros and cons, both languages have times when I'd choose one over the other.

    I think Java is quite interesting to learn .. though it's not dissimilar to C/C++ (in my opinion, coming from a C background prior to learning Java). Like most languages, it has its nuances and complexities that make it both frustrating at times, and interesting to get your head round.

    Java was my first real OO language, and it made it quite simple to step from procedural/method-based coding to the OO side. It certainly helps understanding the basic concepts behind OO, as well as being able to extend on these basics into the complexities.

    I think if I were in your situation I'd jump at the chance - getting paid to learn a language is a bonus, as is a pay rise at the end - much better than a company simply stating in a job that "Java is a requirement".

    Just some quick thoughts ..

Re: learning java?
by coreolyn (Parson) on Oct 28, 2002 at 13:50 UTC

    Learning any new language always has it's bonuses and insights. The only thing that I think you may find boring about it is the culture.

    While one of Java's strengths is its reusability culturally it almost seems as if the intellect requried to reuse it is obfuscated for competitive reasons betweeen developers. It is definately not a Perlish culture.

    It has been occurring to me lately that many Java developers don't know 'why' things work just 'how' to make it so that it does. In Java's rush to abstract the differing levels of large scale application development it has made it hard to find developers that understand the bigger pictures.

    Then again there is so much to J2EE it is hard to believe anyone could be expected to understand it completely.


      You could, of course, say the same things about "many Perl developers" -- people who just want to get a CGI script working without caring how things work, or why something might fail. Both communities are incredibly diverse, attracting developers from all sorts of programming backgrounds and companies. And both communities have scads of open source development at all project levels. There is, however, no CPAN equivalent yet for Java.

      In general, I've found that folks around Perl are a bit more casual and freewheeling (although I suspect that part of this is living up to an existing reputation), but hanging around projects like JBoss or Struts for a while you'll see much the same sort of discussion and lively behavior.

      FWIW, my 2c, etc.

      M-x auto-bs-mode

      i like java and think its an interesting language.

      but i think you might be onto something there with the boring culture. i guess i had a bad experience so i'm a little biased. but i found that all the java books and java websites and the java community in general seems very business oriented and lacking in a sense of humour. really i just found the people and the atmosphere boring as heck. i'd like to get away from java and go back to c and perl because of that. the people in those areas seem more interested in low level technical details.
Never stop learning (Re: learning java?)
by Ovid (Cardinal) on Oct 28, 2002 at 15:52 UTC

    If you have a chance to learn another programming language, you should do so. Aside from the obvious benefits to a resume, it will teach you different ways of looking at things. One job, for example, I had to learn VBScript. This language is so crippled in its ability to handle many things that Perl programmers takes for granted that I was forced to find "creative" solutions to problems. Many of those creative solutions, to be honest, involved reimplementing Perl functions in VBScript, but it does give one an appreciation for what one has.

    What will you learn from Java? You will learn to hate arrays that cannot be resized. You will kill for a printf function or something equivalent. You will scream at the stupidities inherent in int and Int. You will marvel at how your Swing application can sit there and crash without anyone doing anything. You will hate using 20 lines of code when you know you could do it in five (and sanely!) in Perl.

    What will you love about Java? Just a guess, but I think you might appreciate a much cleaner OO model. Having a clear distinction between classes and instances of them can be nice. Distributing code to others and knowing that they have to take exception handling into account is great. Never again will you see open FOO, "foo.txt";. While people may scream at me for this, Java applets can be a lot of fun to program (well, the results are fun, the programming is not).

    To be perfectly fair, I didn't study Java for very long. But in the short time that I studied it, I found that it really didn't fit the way I like to program. It has many nice features that I want in Perl, and will get in Perl 6, but I'm willing to deal with Perl's kludges. On the other hand, it can be difficult to appreciate Perl's problems without working in other languages.


    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: learning java?
by hieronymus (Scribe) on Oct 28, 2002 at 13:36 UTC
    Hey giant...

    I've taught myself Perl and do most of my current work in it. After reading Learning Perl and as many other tutorials and a plethora of O'Reilly books on Perl. I absolutely love writing Perl code and understand your feelings of missing coding Perl.

    However, after I had finished reading a few of my books and had a few (small) coding projects under my belt I decided to teach myself Java. First because it's popular language emerging as a leader and I didn't want to be left out. Second I wanted to learn OO programming methods. This turned out to be a be plus for me. While I was studying Java I was constantly thinking about how to translate that to OO Perl. Consequently, my Perl skills improved while I was learning Java.

    My feelings are never turn down any learning opportunities...espesically when someone else offers to foot the bill.


Re: learning java?
by mjeaton (Hermit) on Oct 28, 2002 at 12:43 UTC
    So I'd like to know from those of you who did both already (java + perl), if it's interesting for someone who knows perl to learn java, or if it's a bit boring compared to perl?

    In my opinion, learning something new is never boring. Check out perl : focus or balance.

    While Perl is fun and exciting and provides you a lot of work now, think about the doors that will open if you learn <insert almost any other language here> and use it on a project. While Java has a reputation for being a bit of a pig, it can also be fun to write code in (if for no other reason than you have to figure out how to do something that a CPAN module would easily do in Perl).

Re: learning java?
by revdiablo (Prior) on Oct 28, 2002 at 19:19 UTC

    I would definitely recommend learning Java. I think the language is quite fun to code in, even if I miss some very nice facilities from Perl (can we say foreach). It can be used to make some pretty clean code, and just sort of feels good. It will definitely help you in your Perl journey. For example, it actually showed me what OO techniques are good for, and motivated me to learn OO in Perl. I am very grateful for this. :)

    I learned Java in a very similar situation, though not quite as voluntary as yours. A new boss was coming in, and word was he wanted to use Java everywhere. Being the industrious worker bee that I am, I learned Java before he got there. To my surprise, I actually began to like the language, despite its stigma. You might find yourself feeling the same.

Re: learning java?
by hiseldl (Priest) on Oct 28, 2002 at 14:59 UTC

    Learning java was a good experience because it opened my eyes to another way that OOP is implemented, and some of those ideas definitely carry over to my Perl and C++ coding today.

    I'd say, go for it! Learn java and keep Perl'ing in your spare time to keep grounded. ;)

    What time is it? It's Camel Time!

Re: learning java?
by kodo (Hermit) on Oct 29, 2002 at 07:52 UTC
    Thanks a lot for all your answers!

    There were some new points to me in your postings, and some that I had already thought about, like that the culture would be a bit boring. I also think java is not as much TMTOWTDI than perl right?

    But well the most important points for me to learn java are:
  • Learn more about OO-Coding
  • Know another widely spread language is always good
  • Java doesn't seem to be bad at all
  • It's always fun to learn something new -> that's what it's all about right? :)

  • So my final conclusion is to go for the java-thing, but also try to still code as much perl as possible...

Re: learning java?
by Anonymous Monk on Oct 29, 2002 at 04:11 UTC
    HI , Learning Java is certainly a good idea and opportunity. One on the most appealing concepts in java is the oo concept, which has been put to great use. Also it surely not going to be tough for one who has coding experience and having worked on perl , I think its easy to migrate to java. Yep both the languages have their own advantages and disadvantages. I am sure you will begin to know the difference once you start working on Java and thatmuch more if you are exposed to the Enterprise environment. That a cool opportunity . Just take it. Good Luck. Anandatirtha
more languages are better
by chicks (Scribe) on Oct 30, 2002 at 16:06 UTC
    The more languages you get a chance to learn, the better off you will be. It has been a recognized fact among project managers that programmers who know more languages are more effective regardless of the language for a particular project.

    Perl, C, C++, Java, JavaScript, awk, C# and several other languages are all quite similar to C. Perl, C++, Java, and JavaScript each have their own features and niches, but someone familiar with one can easily read code written in the others. Naturally if you know any of the C-like languages it makes learning one of the others that much easier. (The same principal applies to real life languages. French speakers have an easier time learning Italian than the Japanese do.) So instead of worrying about which brackets to use or how a for() loop works you get to focus on the strangeness unique to each language.

    This process of learning the strangeness of each language will benefit your coding in any language you work in. Having seen the Perl solution to something can help influence the easy way to do something in C++. Having seen a massive OOP hierarchy in Java may make you want to create something similar in Perl. It all feeds back on itself if you're really learning.

    After you've gotten a few of the C-like languages under your belt, consider learning some of the strange languages. Forth and PostScript are like nothing you're used to seeing. They will change how you think. LISP and Prolog deserve more than a passing glance. Everybody should write at least one non-trivial assembler program, but write a trivial one if that's all you've got time for. There are hundreds of specialized languages, from SQL to Mathematica, which are interesting each in there own way.

    There's no reason to run out of languages to learn. Just like books, they're being invented faster than anyone could hope to consume them.

Re: learning java?
by bizzach (Beadle) on Oct 29, 2002 at 16:54 UTC

    What do you want to do long-term? I dropped a java job because I didn't believe in the technology. Perl is much more flexible, has better support, and has a faster delivery time. But you will have more marketability with java. Alas!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://208479]
Approved by hacker
Front-paged by hacker
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-07-03 05:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found