Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Trouble with learning to program

  1. Aug 4, 2014 #1
    So, I started trying to learn how to code a few weeks ago. I'm trying to currently learn HTML + CSS right now through Code Academy, but I am having trouble actually understanding the material and the purpose of some of the functions. I was hoping to get this product off of Amazon:

    https://www.amazon.com/Web-Design-H...8&qid=1407174055&sr=1-2&keywords=html+and+css

    However, I am skeptical as to whether it will have any effect on my learning. Does anyone have any experience in learning to program and have nice websites or books that could help a beginner programmer such as myself? Also, if you know if this book does a good job in teaching, please tell me. Thanks for the help everyone!!!
     
    Last edited by a moderator: May 6, 2017
  2. jcsd
  3. Aug 4, 2014 #2

    jedishrfu

    Staff: Mentor

    Welcome to PF!

    I don't know about the book you've selected but this book is very descriptive:

    https://www.amazon.com/Learning-Jav...407176438&sr=1-2&keywords=learning+javascript

    It goes into the separation of HTML, CSS and Javascript into different files very clearly explaining why that's the way to do it. I learned about this book when I read its sister book Learning Node.js. The clarity is really refreshing.

    My suggestion is to go to your nearest bookstore and see if they have a copy of your book and/or this one to compare and contrast. You might even be able to order thru the bookstore to look at it before buying.

    The key thing is the book must speak to you that is after reading random portions of it, it answers some questions you had or clarifies something that bothered you.

    Also to be clear learning HTML and CSS is not considered programming but learning Javascript is. Also many people are looking at AngularJS and JQuery for doing AJAX-based web applications. There are also some videos on Youtube about these libraries as well as training sites like the one you found.

    I did notice that your book has many positive references on Amazon ~460 and nearly 5 star which is a good indication of its popularity with its readership so I think you can't go wrong with it.
     
    Last edited by a moderator: May 6, 2017
  4. Aug 4, 2014 #3

    phinds

    User Avatar
    Gold Member
    2016 Award

    To expand slightly on what jedishrfu said, HTML is not a programming language at all, it is a markup language (there's a hint in the name HyperText MARKUP Language) and CSS is just an extension of HTML with some of the stuff that used to be in HTML that has to do with presentation (vs content) moved off to style sheets.

    javascript is a way to embed actual programming into HTML.

    A browser INTERPRETS HTML, but it EXECUTES javascript.

    These are significant distinctions.
     
  5. Aug 8, 2014 #4

    neomahakala108

    User Avatar
    Gold Member

  6. Aug 8, 2014 #5

    phinds

    User Avatar
    Gold Member
    2016 Award

    No, it works like this:

    Statements in HTML do not get executed, they get interpreted (English language meaning) as how the browser should create the web page.

    JavaScript statements are executed by the JavaScript engine which interprets them (Computer Science meaning) and executes them.

    HTML is a markup language. JavaScript is a programming language.
     
  7. Aug 8, 2014 #6
    But programming is just drag and drop right? (Actual client objection to our timeline estimates)
     
  8. Aug 8, 2014 #7

    phinds

    User Avatar
    Gold Member
    2016 Award

    Jeez ... you scared the crap out of me for a minute there. I was so startled by the sentence that I didn't Immediately see what was in parentheses. :eek:
     
  9. Aug 8, 2014 #8
    Yeah when the client said that my boss and I started laughing. Then it got awkward when we realized that the client was being serious....
     
  10. Aug 8, 2014 #9

    neomahakala108

    User Avatar
    Gold Member

    interpreter parses (reads, analyzes & forms data structure) the program code, then executes it instruction by instruction as far as i know.

    compiler parses the program's code, then transforms data structure into target language's code - such as the machine code of the executable program. perhaps more steps are needed to form working executable for given operating system though.
     
  11. Aug 8, 2014 #10

    phinds

    User Avatar
    Gold Member
    2016 Award

    Exactly, which is NOT what happens with HTML.
     
  12. Aug 8, 2014 #11

    neomahakala108

    User Avatar
    Gold Member

    as far as i know HTML is parsed into a Tree data structure, then displayed.

    with Javascript instructions executed if neccessary that can change the HTML Tree.
     
  13. Aug 8, 2014 #12

    phinds

    User Avatar
    Gold Member
    2016 Award

    You keep dancing around the central issue. HTML is not a programming language and javascript is. Do you think otherwise? You seem to want it to be otherwise.

    If you DO think it is otherwise then you would be better off not to mention that to the next person with whom you interview for a job.
     
  14. Aug 8, 2014 #13

    jedishrfu

    Staff: Mentor

    Html is not a programming language. It's a markup language. There are no programming constructs for conditional branching or looping.
     
  15. Aug 8, 2014 #14

    neomahakala108

    User Avatar
    Gold Member

    indeed, it's a markup language.
     
  16. Aug 8, 2014 #15

    jedishrfu

    Staff: Mentor

    Yes and that's why JavaScript capability was added to the mix. Originally it was called livescript by Netscape but Java was hot and so they piggybacked on its success.
     
  17. Aug 8, 2014 #16

    adjacent

    User Avatar
    Gold Member

    Before I started learning about programming, I thought javascript is just a higher version of java. Many people have this confusion because of the name.
     
  18. Aug 8, 2014 #17

    phinds

    User Avatar
    Gold Member
    2016 Award

    They're all derived strongly from C, but of course JAVA is totally OOP, just with most of the fundamental statement constructs almost exactly the same a C. I thought the opposite of you ... that javascript was a dumbed down version of JAVA, but that isn't as true as I thought it was.
     
  19. Aug 8, 2014 #18
    Hello Roinujo1:

    CSS and HTML are certainly "code", so if you are interested in coding, that is certainly a good place to start. As I am sure you have noticed, it is incredibly detail oriented.

    In my experience, there is a very wide variety of personal strategies for both learning and coding - each tailored to the skills of the individual student or coder. So take all advice with a grain of salt.

    Personally, my method of picking up a new language is to read a brief overview on the purpose of the language, look at some examples, put a language reference next to me, and start experimenting.

    On the other hand, every coder can use specific help in the form of dialog on specific issues that get in their way. So if you have a specific question, post it. I'm hoping that the replies to any specific questions you have are more helpful - and on topic.

    And if you are interested in "programming", HTML and CSS coding is a good entry point. Once you feel comfortable in those environments, you can embed Javascript and do "real programming".
     
    Last edited: Aug 8, 2014
  20. Aug 8, 2014 #19

    jedishrfu

    Staff: Mentor

    Haven't you been reading the comments here? Html nor CSS are programming languages and to assert otherwise doesn't help the OP. They are used to properly display content in a web page. When you add in JavaScript then you get the programming capabilities to do rich client web applications.

    Playing games with the word programming even with quotes is a bad way to help the OP understand things. We aren't trying to dissuade the OP from learning but rather set the record straight on what is really programming.
     
  21. Aug 9, 2014 #20

    neomahakala108

    User Avatar
    Gold Member

    HTML has it's uses in programming the Internet Applications, and many, but it's NOT the neccessity.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Trouble with learning to program
Loading...