296
Fenix
7y

DO YOU FUCKING SERIOUSLY TELL US IN THE SECOND SEMESTER OF OUR MASTERS DEGREE THAT WE SHOULD BE CAREFUL THAT ARRAYS START WITH 0?!?

Comments
  • 30
    And then there is MATLAB.
  • 1
    @zunder yeah this peace of shit. I don't like to work with that slow... thing
  • 2
    I work with rpgle, arrays start at 1
  • 1
    @lukegv Hm yeah but the whole lecture was really basic things, we ranted in class a lot ;) From our "background": he talked about python and you should have heard about that at this time, because we had some projects about python beforehand at our bachelor degree and in the master degree.
  • 4
    The best feeling in life is when you learned c before and start working with java. No malloc or free and array pointers anymore.
  • 2
    @seplayer well you still can get memory leaks. I'm coming from the Android background and its even easier there to leak some memory if you're not careful. GC is not a wizard :D
  • 0
    @zunder first thing that came to my mind xD
  • 0
    @seplayer I'm not a Java dev, so this may be redef as corner case? I had to update some JVM "flags" don't know what else to call them... Anyways looking at docs mentioned that Java can explicitly call for GC.. is that close enough to free or is it something that's there but not often used? I was amazed, btw, at the level of tuning options available. Reminded me a little of reading GCC docs 😉
  • 0
    Well in the array code in CLRS, they all start with 1...
  • 0
    @seplayer Java has shit eficiency and pointers are great if you understand them. But hey i guess interfaces and all that polymorphism is useful
  • 0
    @stable-penguin yes you can explicitly call for GC, but still it only collects and frees the memory of objects that aren't referenced anymore (it's more complex on how the GC decides if something isn't used anymore, use Google if you're interested)
  • 1
    @Fenix thank you, that's kind of what I figured. I was actually testing with the Java (1) man page which had all the various GC strategies. I couldn't really make heads or tails of whether to use the Linux huge pages (decided no for now). Like I said, I had no idea there were that many fine tuning parameters in Java. I've really only worked with C++ and Python. It actually made me want to go learn some Java to be better rounded, at least for high level... Instead ignoring it like I have. Thanks again --
  • 0
    Doesn't metter where you live, how much you had study or how many years of programming experience you think you have.
    Arrays will continue to start with 0.( unless they are empty). . .
  • 1
    Technically Arrays start with an A....
Add Comment