Trouble with learning to program

  • Thread starter roinujo1
  • Start date
  • Tags
    Program
In summary: If you DO think it is otherwise then you would be better off not to mention that to...uh...the client.
  • #1
roinujo1
41
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/dp/1118907442/?tag=pfamazon01-20

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:
Technology news on Phys.org
  • #2
Welcome to PF!

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

https://www.amazon.com/dp/0321832744/?tag=pfamazon01-20

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:
  • #3
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
neomahakala108 said:
a browser interprets both HTML & Javascript, as far as i know.

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.
 
  • #6
But programming is just drag and drop right? (Actual client objection to our timeline estimates)
 
  • #7
cpscdave said:
But programming is just drag and drop right? (Actual client objection to our timeline estimates)

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:
 
  • #8
phinds said:
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:

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...
 
  • #9
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.
 
  • #10
neomahakala108 said:
interpreter parses (reads, analyzes & forms data structure) the program code, then executes it instruction by instruction as far as i know.

Exactly, which is NOT what happens with HTML.
 
  • #11
phinds said:
Exactly, which is NOT what happens with HTML.

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

with Javascript instructions executed if necessary that can change the HTML Tree.
 
  • #12
neomahakala108 said:
as far as i know HTML is parsed into a Tree data structure, then displayed.

with Javascript instructions executed if necessary that can change the HTML Tree.

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.
 
  • #13
Html is not a programming language. It's a markup language. There are no programming constructs for conditional branching or looping.
 
  • #14
jedishrfu said:
Html is not a programming language. It's a markup language. There are no programming constructs for conditional branching or looping.

indeed, it's a markup language.
 
  • #15
neomahakala108 said:
indeed, it's a markup language.

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.
 
  • #16
jedishrfu said:
Originally it was called livescript by Netscape but Java was hot and so they piggybacked on its success.

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.
 
  • #17
adjacent said:
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.

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.
 
  • #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:
  • #19
.Scott said:
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".

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.
 
  • Like
Likes 1 person
  • #20
HTML has it's uses in programming the Internet Applications, and many, but it's NOT the neccessity.
 
  • #21
i recommend starting to learn Programming from Pascal Programming Language.
 
  • #22
neomahakala108 said:
HTML has it's uses in programming the Internet Applications, and many, but it's NOT the neccessity.

HTML does NOT program internet applications. You continue to not understand programming.
 
  • #23
phinds said:
HTML does NOT program internet applications. You continue to not understand programming.

i wrote the Internet Applications Professionally for ~5 years.

server code generates HTML code that is sent to clients such as browsers, for example.

you just write program that generates HTML as an output.
 
Last edited:
  • #24
neomahakala108 said:
i wrote the Internet Applications Professionally for ~5 years.

server code generates HTML code that is sent to clients such as browsers, for example.

you just write program that generates HTML as an output.

So you have generated HTML is the OUTPUT of a program. Does that make HTML a programming language? I think you problem is more with understanding what words mean than with understanding how computers work.
 
Last edited:
  • #25
phinds said:
So yourhave generated HTML is the OUTPUT of a program. Does that make HTML a programming language? I think you problem is more with understanding what words mean than with understanding how computers work.

it's a markup language.

i know what words mean, but perhaps differently than you - there are different meaning to words depending on nationality, viewpoint, education, religion etc...
 
  • #26
jedishrfu said:
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.
The OP never claimed that HTML and CSS were programming languages. And I found it very humorous that the dialog that ensued was so fixated on whether these were, in fact, "programming" languages. ... And, I am using the quotes for the "programming" debaters, not for the OP.

He said he was "coding" in HTML and was interested in "programming". So I took him at his word and said Great!, that type of coding is one way of getting into programming. And it is. What any beginner programmer-wannabee needs more than anything else is a very handy environment where they can experiment. The HTML/CSS environment includes Javascript, so once you understand HTML/CSS, bring Javascript into that sandbox and you are all set. Say "Hello World" in HTML, say "Hello World" with CSS, then say "Hello World" with Javascript. Learn Javascript, then move on to other languages.

So there is no doubt about whether I know what a programming language is, I have coded in HTML, CSS, Javascript, C, C++, Pascal, FORTRAN (and numerous variants), Forth, COBOL, RPG(and a few variants), BASIC (endless variations), ADA, ladder logic, numerous fourth level languages, and the assemblers and machine languages for the 86 series, Motorola series, IBM 360, 1130, and 1620, Honeywell 200, CDC 3100, the HP2116A, a few of the PDPs, DG, and more embedded processors than I can recall.
 
  • #27
.Scott said:
The OP never claimed that HTML and CSS were programming languages.
Right. neomahakala108 did and that's what started that part of the thread.

And I found it very humorous that the dialog that ensued was so fixated on whether these were, in fact, "programming" languages ...

I can't speak for others but as for me, I get WAY too anal about details sometimes and very annoyed when people seem to be making up their own definitions of standard terms. It does get a bit ridiculous.
 
  • #28
neomahakala108 said:
i wrote the Internet Applications Professionally for ~5 years.

server code generates HTML code that is sent to clients such as browsers, for example.

you just write program that generates HTML as an output.

You either wrote java servlets or java server pages. In the first case, a java program writes html and sends it to the client browser. In the second case, you wrote a mixed file of html and embedded java, the java server page gets processed into a java program where the html is quoted, the program runs and outputs html that is then sent to the client. In both cases, html is the output and it lacks any programming constructs like conditionals or looping.
 
  • #29
jedishrfu said:
You either wrote java servlets or java server pages. In the first case, a java program writes html and sends it to the client browser. In the second case, you wrote a mixed file of html and embedded java, the java server page gets processed into a java program where the html is quoted, the program runs and outputs html that is then sent to the client. In both cases, html is the output and it lacks any programming constructs like conditionals or looping.

i wrote more than Servlets & JSP (Servlets & Google Web Toolkit mostly, very little of JSP).

but even Servlets alone can use full power of Java, including conditional instruction 'if', and iteration instructions (looping as you put it).

HTML code is dynamically generated that way, depending on conditions & boolean expressions.

but yes, HTML is the output and it lacks conditional instructions & looping. but Javascript & CSS is also the output, not only HTML.
 
Last edited:
  • #30
I suggest the thread be closed as it has run its course and is getting off topic. Thank you all for contributing.
 
  • #31
jedishrfu said:
I suggest the thread be closed as it has run its course and is getting off topic. Thank you all for contributing.

+1 on that. Did you report it to get it closed?
 
  • #32
Done. Thread is now closed.
 

What is the best way to learn programming?

The best way to learn programming is to start with the basics and build a strong foundation. This includes understanding fundamental concepts, practicing regularly, and seeking out additional resources such as online tutorials and coding challenges.

Why do some people struggle with learning to program?

There are a variety of reasons why someone may struggle with learning to program. Some common factors include a lack of prior experience with coding, difficulty understanding abstract concepts, and a lack of motivation or persistence.

How long does it take to learn programming?

The time it takes to learn programming varies for each individual and depends on factors such as prior experience, dedication to practicing, and the complexity of the language being learned. However, with consistent effort and practice, it is possible to become proficient in a programming language within a few months.

What are some helpful tips for learning to program?

Some helpful tips for learning to program include breaking down complex problems into smaller, more manageable tasks, seeking out feedback and guidance from experienced programmers, and regularly practicing and challenging oneself with coding projects.

Is it necessary to have a background in math or science to learn programming?

While a background in math or science can certainly be helpful, it is not necessary to have prior knowledge in these subjects to learn programming. Many successful programmers come from a variety of backgrounds and have different strengths and weaknesses. With dedication and practice, anyone can learn to code regardless of their academic background.

Similar threads

  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
7
Views
681
  • Programming and Computer Science
Replies
10
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
8
Views
874
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
17
Views
2K
  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
6
Views
1K
Back
Top