Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

What is a good way of studying coding?

Discussion in 'General Discussion' started by Yunho0320, Sep 28, 2015.

  1. Yunho0320

    Yunho0320

    Joined:
    May 16, 2015
    Posts:
    11
    What would be good way of coding?
    Should I write on a paper or type on a computer?
     
  2. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    If you're doing this professionally you must create a design, unit tests planning, and the beginning of the documentation using Word or similar products and often you must make a presentation to the end customers, interview the end customers, hold meetings with the end customers and co-workers and bosses about the project as well as estimate time for a schedule to completion. And when that is done I then tell the business I am working for to triple the estimates I gave them. And then, if your company approves those plans, you can begin coding.

    But for you writing a Unity game, it's best is you type in on computer and if you can't type you're in luck because your slowness typing will allow you to design and code at the same time.

    That said, I do think out the problem and write an algorithm with my own pseudo API particular to that project before I begin on paper. Usually I'll change the algorithm and refine it as I code but you need to plan how to get from 'Input In' to Output Out' for your program. Most problems aren't so complex that you need to spend more than a week doing that and for very large systems design engineers will spend months designing and compartmentalizing subsystems. And a lot of systems just get tacked to over the years and grow naturally. Then a lot of times the business will hire a team to completely rewrite the system after a number of years or just clean up the system for well designed ones.

    You know what you want the character(s) to do on screen. You know how keyboards and input devices work. Now make your pseudo-code that gets you from the keyboards and games controllers to what your characters are doing on screen. Then figure out how to do it properly in Unity.

    You still need to learn the Unity editor things and such like putting together the scene and creating the lighting that you like and such but honestly you should watch Unity's Learn tutorials and wing it on those things because it's not really design or programming, it's piecing together your design - you must construct your scenes in a way the editor expects and the HW and OS is capable of handling.
     
    Kiwasi and Yunho0320 like this.
  3. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    2,985
    You don't need to write your code on paper, but you should write ideas on paper for breaking large things into small manageable things. Write notes about how you want to structure your code.
     
    Yunho0320 likes this.
  4. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    What is code? Code is instructions. If you want to code, you should practice turning your ideas into a set of instructions. The more basic and logical the instructions, the easier they will be to translate into code.
     
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This. Code will flow naturally out of a good plain English description.

    Occasionally I will prototype a structure out on paper. The computer sometimes gets in the way of coming up with a clear set of instructions. As a process engineer I like boxes and arrows.

    Normally once a project is done I will also draw out the structure on paper. This helps to refactor the code into practical subsystems for long term maintenance.
     
    Yunho0320 and angrypenguin like this.
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,516
    You're asking two different questions there. Is this about studying programming, or doing programming?

    For studying it, I strongly recommend getting a book from a respected author and working through it cover to cover. That'll get you a basic grasp of the fundamentals. From there, start practicing by writing software.

    After you're comfortable with what you've learned and applying it practically, get more books. "Programming" isn't all there is to writing software, so get some books that study software design and architecture, use them to learn how to structure code, about patterns (not so much to use them directly, but because they're a useful source to learn about various approaches to different classes of problems). Learn about data structures and common algorithms, because you don't want to re-invent the wheel when there's a documented solution (or an implemented one!) which you can use. Get books about your specialist area - be it game development, UI design, real-time 3D rendering, etc. etc.

    It's basically a process of:
    1: Identify an area you want to learn more about.
    2: Get reputable information or training in that area and study it.
    3: Apply it with real-world practice.
    4: Go back to 1, now with more insight about what you don't know.
     
    Yunho0320, Frpmta and Kiwasi like this.