Thread: breaking the java habit...

  1. #16
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Well for me I got stuck with Basic for quite a while because I knew it well and could do most things I wanted in it. Learning new languages takes time, and in that time you cant make as much fun stuff. It took me a couple of years before I got off my ass started learning C; console apps aren't the most inspiring things to start off with. That said Its nice to be able to make progs that run fast and don't come with a ton of bloat.

  2. #17
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Fundamentally you should probably think more about the task you are trying to accomplish than the actual code behind the task. There will be a point where you will have to begin thinking about code but that should be simple(r) since you already have a design. So if you find yourself thinking in Java then I'm afraid if you use C++ you will also find yourself thinking in C++ instead of thinking in concepts. Fact is you don't think in any language when you are approaching a specific problem. This will keep you concentrated on how to approach and solve the problem more than how you will code A with B.

    Once you have your design and approach then you could pretty much code it in any language. At this point you will have to wrap your brain around C++ a bit but it should not be too hard - especially when the compiler starts yelling at you for this or that. Once that happens you will get a good feel for what is allowed in Java and what is allowed in C++. I don't think the adjustment should be that difficult. And your Java knowledge will not be 100% useless in C++ so I agree that you shouldn't throw out the baby with the bathwater here. Think of it as both and instead of one or the other.

    Your problem as I see it may be you are thinking in relation to a specific language or a specific implementation rather than a general overall view of the underlying concepts.
    Last edited by VirtualAce; 01-16-2008 at 07:07 PM.

  3. #18
    Registered User
    Join Date
    Oct 2006
    Location
    Omaha, Nebraska
    Posts
    116
    Thanks everyone for the input.
    So it looks like the general consensus is not forget to java, but remember that C is not Java and focus on the on design.

  4. #19
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    Although I dont see it as being useful outside web applications.
    Alright... well... basically my entire Ph.D. project is written in Java. I wrote an english syntax parser, and vector analysis package, and a bunch of other stuff to do natural language processing in it. It has a lot of libraries by which you don't have to re-impliment a lot of very useful data structures (I actually wrote a tree-map, but then scratched it after I realized that java already had it! such wasted time but at least I learned something). It was good because I wanted to focus more on dealing with the grammar, and the algorithms, and not nitpick around making data structures for everything.

    Also, it's cross-platform compatible so you can run your code on your windows box, but also on a unix box.

    So, yeah...!

    Oh, and before anyone mentions anything about performance, my simulations take six days already, so it doesn't really matter. I swear, the other Ph.D.'s always .......... about their sims taking half an hour, or like two hours, go get some lunch and come back, try a week... pfft!

    So... yeah!
    hasafraggin shizigishin oppashigger...

  5. #20
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Oh, and before anyone mentions anything about performance, my simulations take six days already, so it doesn't really matter.
    Err ... now if your simulation took a minute, then I'd say don't worry. But if it takes 6 days, then even making it run just 1% faster would shave a full hour and more off.
    The longer something takes, the more you should worry about performance.
    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

  6. #21
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    Well, that's true that the longer it takes the more the percentage-wise improvement would help. However, there are multiple modules to the project, so usually when I'm running simulation on a particular part, I'm coding or improving other parts, or writing new code for something else. If I were to re-write this in C++, it would probably take more work, though I have re-written this entire project from the ground up several times.
    hasafraggin shizigishin oppashigger...

  7. #22
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I have to learn new flavors of basic all the time. I program a lot of controllers (servo's, PLC's, etc). The latest flavor is PBASIC. Once you know how to program, the specific language only depends on what is most applicable to the task at hand. Sure, I'd love to be able to program the BASIC stamp in C/C++, but then it would be the C/C++ Stamp. The project requirement is to write the code for the stamp, so I just have to deal with it.

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