1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

A simple question for developers or php coders

Discussion in 'Off-Topic' started by CreeperMonster, Jun 19, 2017.

  1. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    How many days/month/months/year/years did it take for you to learn php ?
    Sorry for my bad english.
     
  2. Thouv

    Thouv Slime

    Messages:
    84
    GitHub:
    adeynes
    I've been using PHP for about a year now, but I still consider myself a very big noob and there's sooo much more for me to learn, it's pretty impressive/humbling. Most professional developers have been programming for several years before reaching their level.
    But you should be able to write small plugins after about 6 months if you start from no PHP knowledge and really put your heart to it
     
  3. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    I have some knowledge about PHP but Im still trying to make myself better. I have so many ideas but cant make it because of lack of knowledge

    [EDIT] Fixed a typo
     
  4. Thouv

    Thouv Slime

    Messages:
    84
    GitHub:
    adeynes
    What I did when I had ideas but couldn't make them because I didn't have the knowledge is I just went for it. I did everything I could do, but whenever I didn't know something, I just looked it up. Of course, don't use this method for things that will go in production, but that's how I self-taught myself and I think it worked pretty well. For example, I wanted to make a login system but I didn't know how to store data. So I read up on MySQL and how to connect to it with PHP. Of course, in the end the project was a huge mess that was completely insecure, but I had learned how to connect to a database
    NOTE: This is just how I did it, so please don't come at me saying "you should never do that that's the worst way to learn etc etc"
     
  5. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    Im planning to make Minigame Plugins. Thats why I need so much time to make this happen. Any ideas where should I start ?
     
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    You don't need to learn PHP. You just have to learn programming.
    The whole world of programming is about telepathy. Humans created a programming language, and other humans try to follow the same mindset to understand the language.
    You may recite the whole documentation and still understand nothing. You may be able to make a big plugin and still understand nothing. In the end it lies in whether you're ready to think, to use your brain, to guess what you should be doing.
    Nobody can tell you where to start or what to learn, because all documentations and tutorials and everything contain 90% rubbish and only 10% useful text, but without the 90% rubbish, the tutorials won't make sense.
    It is impossible to learn programming by reading. The only way is to do it yourself. You should read a lot of example code and try writing a lot of code. But that won't help you a lot, because just like you can't create energy out of energy, you can't create knowledge out of knowledge. You can only use knowledge to help you attain more knowledge.
    I know I start getting confusing. Let's put it like this. You read a plugin's source code, and you may be able to edit some messages in it. Then you may be able to delete a few lines to stop the plugin from doing something. Then you may be able to copy some lines from this plugin to that plugin to add some features.
    But all these aren't constructive. You aren't creating. You are just moving things around.
    The key is to ask. When you see the line "sendMessage", would you ask why it is "sendMessage" not "sendChat"? When you see "public function", would you ask why it is not private function? You will then learn to look at the PHP Reference. Then when you become more experienced, when you see two plugins doing the same thing, would you ask which method is better, or why they are different? And when you understand what you are doing better, would you compare your code to real life thinking and see how it is different? For instance, have you thought of why it is simple IRL to draw a circle with a compass, but totally different when you draw a circle in code?
    There is an ancient maxim in China:
    In programming, you do the thinking by bringing what you learnt into practice.

    It's quite hard to put things into practice step by step in PocketMine plugin programming, because the most basic things require much knowledge too. But this is the right direction to go towards.

    TL,DR: My answer is very simple: If you lack the ability of critical thinking, don't even dream of being able to program.
     
  7. Thouv

    Thouv Slime

    Messages:
    84
    GitHub:
    adeynes
    If I were you, I would start with something much simpler, a Minigame plugin seems like much if you've never made a plugin before. My first plugin was a /report command where you could report players and OPs could use /seereports <player> to see the reports a certain player got- it was 70 lines. I then made a factions plugin which I've changed so much since I wrote it. Everything in the code is different between the version from a few months ago to the current version. I also made a moderation plugin. Anyways, whatever you decide to do, I would recommend starting small. And remember, the most important thing is to keep learning. Learn, learn, learn, never stop learning.
     
  8. MCMarsBoyee

    MCMarsBoyee Spider Jockey

    Messages:
    30
    GitHub:
    mcmarsboyee
    I haven't really started with PHP myself, but since I have proficient knowledge of other languages like HTML, CSS, and especially Javascript (since it serves the same purpose as PHP; and are both scripting languages) I could understand most of the PHP scripts and what they meant. If I were you I would look inside the files of plugins and try to relate what they mean based on their syntax, or just learn the syntax from a well-known tutorial website like Codecademy or W3schools.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.