The most important thing as a programmer

Discussion in 'Programming' started by Herogx, Jul 7, 2015.

  1. Hello all, thought I'd light a few fires and see what you all believe to be the "most important" thing to keep in mind or be good at, I suppose, when developing.

    For me it's actually two things (you can have a little list if you so desire but try to keep it around 1-3 items long).
    The number one most important thing is the ability to keep your program from killing itself or "collapsing" under the weight of its own complexity. Anyone can write a complex solution to a complex problem. Only a genius can write a simple solution to a difficult problem.

    The other thing for me is code readability. I literally hate code that is written without keeping in mind that Enums, constants and documentation all exist.

    What do you guys think?
  2. working out and not getting overweight xD
    • Agree Agree x 4
    • Optimistic Optimistic x 4
    • Funny Funny x 3
    • Winner Winner x 2
  3. For me the most important thing is remembering to follow the code design layout I started with. Especially if I get lazy, I can tend to drift, which just means more work the next day when I realized i fucked up and need to clean/fix it.
  4. When working on large projects, I'd usually say readability and maintainability is the most important to keep in mind, quickly followed by security and performance.
    • Agree Agree x 1
  5. Respect the language you're using. Coming from a procedural background, when I started with Java I was mapping COBOL and C in my head and I've seen this with lots of people.
    When writing Java, write object-oriented code cause this is what Java is designed for and what it's good at. Doing so will immediately fix a lot of other problems.
    • Agree Agree x 1
  6. Plan your project well from the start. Come up with a framework you can reliably build upon as you add more features. Instead of doing things the easy way because they "work right now," design your project with maintainability in mind.
    • Like Like x 2
  7. sothatsit


    Simplicty and Readability.

    Always try to find the most simple and elegant solution.
    • Agree Agree x 2
  8. £70 a month for a gym membership. Totally worth it <3
    • Like Like x 1
  9. I tend to follow the rule that says "program as if the person taking over from where you left will be a homicidal maniac who knows where you live". It has worked for me so far.
  10. It takes me four hours to add a small command to my plugin. Because of its framework.. But it's pretty easy to do as long as you're not in a rush. That includes testing it and fixing any lines of code I may have forgotten to add in the other classes. Also last time I looked at the file size of my dev build it was 587kb. So I would have to agree with minecraft124_, When he said to have a framework you can expand upon.
    #10 MidnightShadow, Jul 8, 2015
    Last edited: Jul 8, 2015
  11. Four hours? How small a command are we talking? Is your framework so complicated it takes you four hours to add a small command? This smells flawed design to me.
    • Agree Agree x 5
    • Like Like x 1
  12. It's not that the frameworks complicated, I just have to provide multiple methods for retrieving data. So while a command only retrieves certain data, I'm adding other getter/setter methods that can be utilized by the API.

    From the time the player executes a command, It goes through 4 classes and then the player receives the output. Which may seem like a lot, But it's all OOP. Two of those classes simply involve validating the command, checking the arguments, checking permissions and, passing it to the right method in the respective command class. It's also important to note I only have one command, with roughly 30 sub-commands. Which I decided to do to prevent conflicts when issuing commands, where the commands of two plugins may overlap.

    Also my plugin supports the use of any language and, just about everything has a on/off switch. Which requires a considerable amount of time to be consistent when adding new code.

    So it's really not that complex, It's just a lengthy procedure to add code that's consistent with the existing framework. New commands don't really come along that often now anyways.
    #12 MidnightShadow, Jul 8, 2015
    Last edited: Jul 8, 2015
  13. But if you need to go through a lengthy process to add one small feature then that is a cause for alarm. It does sound like you forgot about abstraction. When I need to add a command to my framework I just call one method and create one instance of an interface (lambda expression or other). That's it. Same procedure to add a subcommand. The rest (permission checks, player checks, argument validation, etc.) is all handled by the already made framework.
  14. There is a fair amount of abstraction present in my code. I just don't use interfaces or, abstract classes to maintain readability. While those features are great for working on small ~ medium sized plugins, They're kind of a bother to work with when your sitting at 500kb+. Especially for those developers who have some learning to do. However, I prefer to write my code as a rough draft of sorts, then go back and optimize it once I've achieved the end result/squashed all the bugs. Which I'm sure will be frowned upon once I click post reply. But it's what works for me and, I'm sure other developers have silly things they do as well.
  15. I'm not gonna frown at that, no. Premature optimisation is bad. Writing clear and simple code should be first priority.
  16. yes...
    • Winner Winner x 1
    • Informative Informative x 1
    • Useful Useful x 1
  17. lol wat
    Try £15 - £25 or even £30 tops.
    • Agree Agree x 2
  18. Imo, it's all about simplicity and pre planning
    • Agree Agree x 1
  19. The most important thing as a programmer is to be logical and to think logical.

    Don't repeat your self.
  20. Three or more? Use a for!