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 ...

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!

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!

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.

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.

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.

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.

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.

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

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.

>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.

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.

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.

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.