1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Questions from a programmer

Discussion in 'Nerd Out Zone' started by joppiesaus, Mar 24, 2015.

  1. joppiesaus

    joppiesaus Infamous Space-Octopus

    • Member
    So I am programming for a while now, and I must say it's a very unique experience.
    I mean it looks like a boring thing todo: sitting depressed in front of a monitor all day while you're trying to figure out where is the semicolon you missed.

    But it isn't. It's very fun! At least sometimes.
    Literally, one moment I jump up from my chair and celebrate with much noise that my new code for a feature works, and then 10 minutes later I feel like I'm in deep crap: I've got a huge bug and I feel like what I made is crap and I am crap and my life is crap and everything is crap.
    Then I fixed it and I am satisfied again. Then I remind myself what I actually needed todo, which I still didn't do, I payed to much attention on new cool(and sometimes useless) features.
    It's basically a creative process, which is mostly unpredictable.

    I also can't program for like a day long. If I can program an afternoon then that's a good day for me. After that, I often don't have the energy and concentration anymore. I know there are people who do this the whole day every workday. I don't get how they do that! I'm not even talking about people who program at 2 AM with the help of energy drinks!

    Then you post a - what you think it's a - good question on stackoverflow and you get completely misunderstood and everyone gives you downvotes, except for that one answer you gave that has a 100 upvotes. Searching an question is often better than asking one.

    And what's up with all this bikeshedding? Getters and setters everywhere? Instead of "int money" some people actually believe you should create a class with "private int money" with getters and setters for such a simple thing(I'm talking about a simple program here).

    And then when people ask you "I want this" and you make "this" and then you get "It's exactly what I asked for, only not what I wanted".

    I often find it a hard time getting feedback at my games, too. Does anyone have a tip on that?

    Sooo my questions are to other programmers: What's your opinion and this? Do you have some of these "problems" sometimes too?
  2. matc11

    matc11 Crash Landed

    • Member
    Im gonna be the scumbag and say: yes you should use getters and setters (no i don't use them that often, but still), becasue it makes changing code behavior easeier
  3. joppiesaus

    joppiesaus Infamous Space-Octopus

    • Member
    Nooo! Don't start the bikeshedding! You conventional human!
    NeonSturm likes this.
  4. NeonSturm

    NeonSturm Back Into Space

    • Member
    And it would be much better if poor Java would automatically generate them when needed.

    class x{ int y }}
    x.y = z // should use the setter
    z = x.y // should use the getter.

    But I think having setters and getters for objects which just hold x y and z... this makes your code damn slow with all the function calls -- Java has no inline functions which copy their code into the caller at compile time afaik.

    And it also adds 6 more lines into your source code, not to mention that you have to rename them together with your variable name while the package is developed.
    NeonSturm, May 13, 2015
    Last edited by NeonSturm; at May 13, 2015
  5. Shashwah

    Shashwah Tester

    • Tester
    I personally find no problem with using getters and setters, I am lazy so I don't usually use them and will usually use public variables for things like that because I don't want to write a getter and setter for almost every private variable that I use, I mostly just write custom classes for certain pre-existing types so that I have control over absolutely everything.

    That being said I wouldn't recommend doing that because it takes a lot of time to do this for almost every single type that you want to control more of. I don't use Java but it shouldn't be too bad to be writing extra bits of code for everything and depending on your IDE you should be able to just hit a button to create getters and setters for variables.

    Keep in mind though that I don't use Java so most of what I have said probably isn't very useful to you.
  6. joppiesaus

    joppiesaus Infamous Space-Octopus

    • Member
    I've found out a way to ruin lives:
    git stash
    git stash drop
Similar Threads: Questions programmer
Forum Title Date
Nerd Out Zone [Physics] Questions about inertia drive, absolute rotation changes without thrust... May 20, 2015
Nerd Out Zone Do programmers like math? Oct 5, 2014
Nerd Out Zone Why is caffeïne a programmers best friend? Apr 24, 2014

Share This Page