15

Any advice for someone who goes from programming in Java to C?

Comments
  • 4
    Good luck!
  • 1
    @okkimus thanks I guess...
  • 6
    Use lube. A lot.
  • 3
    Oop is overated
  • 2
    Don't? 😂
    Idk man, what do you want to hear
  • 0
    Turn back.
  • 1
    Good choice!
  • 1
    Pointers, pointers everywhere.
  • 0
    Read Zed Shaws book: Learn C the Hard Way.
  • 4
    In C you can do whatever you want. You can think of the craziest thing you want to make, and you can start making it. But whatever you want to do, you have to do it by yourself, up from the most basic blocks . Also, you will suffer. A lot. Endless hours will be spent lookin the code again and again, trying to understand what is wrong with your thousand - or for start, hundreds - lines long program. Unfortunately, these seemingly lost weeks in total of your life are unavoidable if you wish to learn C and its applications seriously. Also, couple all this with computer architecture studying for better results. But, after and if you pull through the hell, the knowledge you will have gained will be worth all the pain. You will be swimming in a world of possibilities and deep understanding of what is going on under the hood. And you will be forced to write clean code - or no serious program will be even remotely functional. If you liked the process, then go on to Haskell for a 10x experience
  • 2
    @Teabagging4Life yo dude haskell is easy whatcha talkin about
  • 0
    @BindView I still see nightmares with monads that emulate state.
  • 0
    Learn about how heap and stack and where C puts stuff on there and how it works and functions for the language and threads specially in C you can do a lot of fuckups and overflows of memory.
  • 1
    Pointers and brevity.
  • 2
    Dude u got to clean up your own shit now. You created something u gotta delete it manually. No GC like in Java. And of course the pointers.
  • 1
    My advice: never go back
  • 1
    1. Use GCC and learn to compile from cmdline
    2. Start with small programs
    3. Play around with pointers until you understand them
    4. I've always found compiler errors & warnings are a good way to learn the intricacies of a language

    Oh and remember you have to so everything yourself in C, the native code is pretty small but incredibly flexible.
  • 0
    Yes. Forget everything you know.

    Jk not really. Just remember that Java was meant to be idiot-proof (mostly, somewhat) while C is not. So any situation you could "let the compiler/runtime handle it" in Java, you can't in C.
  • 2
    I have one advice, DON'T
  • 1
    @py2js I think you meant to say
    DON'T use Java!!! 😋😂😎
Add Comment