breaking the java habit...

This is a discussion on breaking the java habit... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; so i was reading one of the threads that started quite a debate. link's right here. I found it pretty ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    Omaha, Nebraska
    Posts
    116

    breaking the java habit...

    so i was reading one of the threads that started quite a debate.
    link's right here.
    I found it pretty interesting, both the forum and the authors of the discussed article made some really excellent points, but it brought up some questions for me.
    Mainly how does some one whose first programming language was Java break the Java habits?
    They don't work for C and C++ (obviously ) but I can't seem to get passed going back to Java to try to figure out how to write C code.

    At any rate, I was hoping to get some feed back from you guys and gals.
    Thanks again!

    ~M.I.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    I'm coming from a non-C / non-C++ background as well. I too find myself "all the time" working out the code I'm trying to write in the language I primarily code in. So, it's not just Java!! I've been coding in Assembler for 18 years!

    I feel your pain.

    Todd

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Breaking a paradigm habit is the same as breaking any other habit. Prevent yourself from indulging in it. Arrange things so that you get negative feedback every time you indulge. (E.g. to get rid of finger biting, paint your nails with this foul-tasting stuff.)

    Learn Haskell or ML. The functional approach is so fundamentally different that with an imperative, object-oriented mindset you will get absolutely nowhere. That ought to work.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I hopped from regular Java study and use to heavy C++ use. One step is not to read material the compares how the two languages do things, because it seems as though they get you thinking, "In java you do this, but like this"

    I don't think it's so difficult, because other than the whole library and that stuff you just have to know the basics.

    I'm taking a class where we're doing ml this semester, wish me luck.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quit java like you quit cigarettes, by going cold turkey.

    Don't buy cigarettes, dont use java. Eventually the effects will wear off.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    And don't think C# is a nicorette patch.

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Ultimately you need to realize that the assertion that Java is 'just like C/++' is a load of malarky. See C/C++ as a new language and you will overcome one of the largest mental barriers to learning C/C++. Whether its true or not is irrelevant. Seeing them as 'similar' makes you end up using your java knowledge to try to figure out C/C++, which ultimately holds you back. Its unfortunate that you where mentally abused by being taught java as a first language, so radical steps are necessary to fix the damage.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,717
    See C/C++ as a new language and you will overcome one of the largest mental barriers to learning C/C++.
    I agree. I would extend this to C and C++ as well, in that recognising that they are different and not some language named C/C++ is a step across the barrier to learning one after learning the other.

    Its unfortunate that you where mentally abused by being taught java as a first language, so radical steps are necessary to fix the damage.
    I think that is an exaggeration. It not mental abuse to be taught programming with Java as the first programming language. The "radical" steps we're talking about here is necessary when learning any new programming language radically different from the ones you already know.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I'm noticing a trend with abachler

  10. #10
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by indigo0086 View Post
    I'm noticing a trend with abachler
    Heh, what trend would that be?
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Mainly how does some one whose first programming
    >language was Java break the Java habits?
    Why would you want to? At the risk of alienating all of the language zealots here, you learned Java, and those lessons are valuable. There's no reason to throw them away, even if you move to a different language. Just remember that Java is Java, and other languages are not Java. Adjust your habits accordingly, but don't discard them.
    My best code is written with the delete key.

  12. #12
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Java is a language for babies :duck:...

    j/k. Although I dont see it as being useful outside web applications.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  13. #13
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    I like Java. It looks good on my resume.

  14. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by Prelude View Post
    you learned Java, and those lessons are valuable. There's no reason to throw them away, even if you move to a different language. Just remember that Java is Java, and other languages are not Java. Adjust your habits accordingly, but don't discard them.
    True, but I think the adjusting is what the OP has problems with. And the best way of stopping to try to apply the Java way of thinking to everything is to completely avoid the Java way of thinking for a time. It's not like you forget it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #15
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    One thing that helps is to program in several different languages at the same time (but not necessarily for the same project). Since I've had to do that I found I think more about the problem, possible algorithms, restrictions, etc long before an implementation comes to mind. I then start thinking about the implementation (in generics) which then leads me to a language and then to a specific method.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  2. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 09:07 PM
  3. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 12:37 AM
  4. C or Java as a first language
    By CorJava in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 10-23-2002, 05:12 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21