asking for an advise

Discussion in 'iOS Programming' started by Carll, Mar 26, 2013.

  1. Carll macrumors newbie

    Joined:
    Jan 10, 2013
    #1
    Hello there, probably someone of you remember me! I'm just studying and practice with Objective-c, I did some simple games with cocos2d (seems to be easy) but I'm quite "stuck" on coding working stuff but... just very bad code. I understand the next step since I believe I'm able to do "almost" everything I want for now (at certain levels of course) is to start coding in a decent way. My code to be short is a huge amount of conditional statements and a few classes who do everything.

    I know it's important to separate logic from views and give the right responsibilities to the right classes (high cohesion, low coupling etc, all concept I know but not enough), but I don't know exactly how to do it.

    I just need to learn better way to write clean, understandable (even for me) and good code for future implementations and for bigger project (I can't go far with this poor quality of code).

    So the question is: what should I see now? any advises? books, concepts, topics? what would you do if you were in me to learn to separate logic/view and make classes with right responsibilities?

    I'm thinking about patterns (I know something, but not much) but seems to be something too hard for me atm...

    thank you in advance for every advise.
     
  2. xArtx macrumors 6502a

    Joined:
    Mar 30, 2012
    #2
    Because it sounds like you don't mean to enter formal qualification right now,
    and it sounds like your talking about not writing spaghetti,
    If you do some free project with someone else, you can't give variables
    names you won't understand in six mths, and you'll have to comment code
    to tell someone else what you're doing (that's also you in six mths),
    you'll have to indent nested if/then, for/next/step, and whiles.

    If you both get everything wrong programming-wise,
    but can communicate effectively to achieve some objective, you will have learned to standardise.
    We have a factory, and a warehouse exclusively servicing the factory at the same site, owned by the same company, but run as a separate buisiness.
    The exchange of thoughts, problems, data, and communication in general is a
    struggle across two shifts in the same business, let alone across businesses.
     

Share This Page