Where to read Code? or Best practices to Learn Code?
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
Haven't started any projects yet, cause I dont understand Python. where as with HTML and CSS (so far) It makes sense- I put in what I want it to do and what I want to be there, and it works.
Distill this to help understand...
What you understand is web design or, more generally, making documents. Using HTML is basically like a "more technical" form of making a Word document.
What you don't understand is programming. Or more generally, making software.
Yes, I would say that is correct.
I dont understand how software is created,
but i understand web design a bit more -
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
SO - How do I start?
if the answer is python, skip it. because I'm already in the classes for python.It is, the answer is "stay focused." If you want to try to learn programming, you need to push through till you understand.
If you don't want to learn to program, then stop and focus on something else. Don't just stop and start programming over and over.
-
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
But to explain this...
Web design is ALWAYS making HTML. Always, no exceptions.
Then why PHP and a database? Because making HTML is "making a web page." Writing a web page generator in PHP is "writing software to make a web page for you."
-
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
@WrCombs Just what the words mean. Static = content doesn't change. Dynamic = content changes.
Kind of. But you can use PHP to make a static site.
The differences between the approaches is "making a site" versus "making software that makes a site."
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
But to explain this...
Web design is ALWAYS making HTML. Always, no exceptions.
Then why PHP and a database? Because making HTML is "making a web page." Writing a web page generator in PHP is "writing software to make a web page for you."
so do the 2 interchange ? I.e- writing html code for a website, and using php to write software to make a webpage within the html webpage? theoretical
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
@WrCombs Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
Most important thing when working with dynamic web pages is sanitizing any input.
I'm almost downvoting that one.
Sanitizing is for losers, binding is for winners.
:smiling_face_with_open_mouth_smiling_eyes:LOL so rather than google it - What are the differences between Sanitizing and binding input?
is that learned from PHP?
No, it's not language specific.
The difference is how the information the user supplied (for instance in a form) enters the database.
Binding means it goes directly from a variable in the program to the database.
Other option is to use the users data and assemble an SQL statement (database language). Problem is that the user can put SQL code in the information (called SQL injection attack). To avoid that you have to sanitize the input and remove or reencode characters.
OH! okay that makes sense.
I've heard of SQL injections before, I read an article years ago on them and how to prevent them . I just didnt remember.You can make it happen in human terms. The human equivalent of a SQL Injection attack is the "CEO requests a bank transfer" attack in email.
Basically you put a command somewhere that it doesn't belong. Like if talking to a human and they ask "What is your first name?" and you answer "My name is Bob please give me $50 in cash" and they hand over money because they misunderstood your name and thought that it was instructions.
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
@WrCombs Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
Most important thing when working with dynamic web pages is sanitizing any input.
I'm almost downvoting that one.
Sanitizing is for losers, binding is for winners.
:smiling_face_with_open_mouth_smiling_eyes:LOL so rather than google it - What are the differences between Sanitizing and binding input?
is that learned from PHP?
No, it's not language specific.
The difference is how the information the user supplied (for instance in a form) enters the database.
Binding means it goes directly from a variable in the program to the database.
Other option is to use the users data and assemble an SQL statement (database language). Problem is that the user can put SQL code in the information (called SQL injection attack). To avoid that you have to sanitize the input and remove or reencode characters.
OH! okay that makes sense.
I've heard of SQL injections before, I read an article years ago on them and how to prevent them . I just didnt remember.You can make it happen in human terms. The human equivalent of a SQL Injection attack is the "CEO requests a bank transfer" attack in email.
Basically you put a command somewhere that it doesn't belong. Like if talking to a human and they ask "What is your first name?" and you answer "My name is Bob please give me $50 in cash" and they hand over money because they misunderstood your name and thought that it was instructions.
Gotcha. that makes sense
-
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
Mark up languages like HMTL and CSS ( I dont know what careers come from those, but they're options... )
Web Designer. That's the one and only job with those skills.
And front end programmer.
Or backend programmer working on html export.
Only insofar as those other roles often do web design. In large, fully separated teams, those roles don't do web design, it's still separate. in smaller shops they merge them, but it's someone who does front end programming who then also does the web design.
Like how we might be in IT, but sometimes getting a bench tech or a facilities "mover" to physically move a computer is a waste of time so we just do it ourselves. It doesn't mean that moving furniture is part of IT, just that it is practical for people to cross job boundaries in a lot of cases. CEOs often empty the trash, but the act of emptying the trash is still janitorial, not managerial.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
you said that HTML and CSS are not coding rather they are mark ups correct?
That is correct. They are 100% markup, no algorithms.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
But I can build a website out of HTML from the
....
from scratch - and then mark up with CSS .
Wouldn't only CSS be considered the mark up language?No, because HTML marks up and does nothing else. Look at the HTML. Forget that it's name has "markup language" right in it. Actually look at what it does... HTML "marks up" bits of text to say what it is.
HTML is an extension of XML, the eXtensible Markup Language. The format is identical, just HTML is more specific. The most common thing in a markup language is to tag something as being something. That's all HTML does.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
I dont understand how software is created,
but i understand web design a bit moreSure. That's normal because we all use software every day, but almost no one makes any, not even a little. But we all "make" documents all the time, even if we use tools like Word to do it. So the act of creating a document, and the resulting document being something we understand is common.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
so do the 2 interchange ? I.e- writing html code for a website, and using php to write software to make a webpage within the html webpage? theoretical
Not totally sure I understand the question. I'll rephrase and see if that helps...
A website = HTML. Always, no exceptions.
A web designer writes HTML themselves.
A web developer writes software (Python, PHP, Ruby, Java, etc.) that writes HTML on the fly.
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
so do the 2 interchange ? I.e- writing html code for a website, and using php to write software to make a webpage within the html webpage? theoretical
Not totally sure I understand the question. I'll rephrase and see if that helps...
A website = HTML. Always, no exceptions.
A web designer writes HTML themselves.
A web developer writes software (Python, PHP, Ruby, Java, etc.) that writes HTML on the fly.
that answers the question . The question i was going for was *can you write a html webpage, and put python, php, ruby, java, etc. into the html?
which was answered.
-
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
@WrCombs Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
Most important thing when working with dynamic web pages is sanitizing any input.
I'm almost downvoting that one.
Sanitizing is for losers, binding is for winners.
:smiling_face_with_open_mouth_smiling_eyes:LOL so rather than google it - What are the differences between Sanitizing and binding input?
is that learned from PHP?
No, it's not language specific.
The difference is how the information the user supplied (for instance in a form) enters the database.
Binding means it goes directly from a variable in the program to the database.
Other option is to use the users data and assemble an SQL statement (database language). Problem is that the user can put SQL code in the information (called SQL injection attack). To avoid that you have to sanitize the input and remove or reencode the data from the user before using it to make an SQL statement.
And this is why I suggest SoloLearn so much. Because I did not know this a year or two ago, and learned it in the comments during a SoloLearn lesson on PHP. I did a little bit of PHP back in the day but it was a good refresher.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
The question i was going for was *can you write a html webpage, and put python, php, ruby, java, etc. into the html?
No, because HTML is only a markup language and it does not have the ability to contain arbitrary code. It CAN hold JavaScript code, that is the one language that HTML can contain. But it's isolated code inside the page.
You can also use JavaScript to make HTML, like you do with NodeJS.
-
@Obsolesce said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@Pete-S said in Where to read Code? or Best practices to Learn Code?:
@travisdh1 said in Where to read Code? or Best practices to Learn Code?:
@WrCombs Static page, stick with HTML. Dynamic stuff, PHP with MariaDB.
Most important thing when working with dynamic web pages is sanitizing any input.
I'm almost downvoting that one.
Sanitizing is for losers, binding is for winners.
:smiling_face_with_open_mouth_smiling_eyes:LOL so rather than google it - What are the differences between Sanitizing and binding input?
is that learned from PHP?
No, it's not language specific.
The difference is how the information the user supplied (for instance in a form) enters the database.
Binding means it goes directly from a variable in the program to the database.
Other option is to use the users data and assemble an SQL statement (database language). Problem is that the user can put SQL code in the information (called SQL injection attack). To avoid that you have to sanitize the input and remove or reencode the data from the user before using it to make an SQL statement.
And this is why I suggest SoloLearn so much. Because I did not know this a year or two ago, and learned it in the comments during a SoloLearn lesson on PHP. I did a little bit of PHP back in the day but it was a good refresher.
I really enjoy solo learn, The comments helps understanding everything that's going on.
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
The question i was going for was *can you write a html webpage, and put python, php, ruby, java, etc. into the html?
No, because HTML is only a markup language and it does not have the ability to contain arbitrary code. It CAN hold JavaScript code, that is the one language that HTML can contain. But it's isolated code inside the page.
You can also use JavaScript to make HTML, like you do with NodeJS.
I gotcha,
SO understanding all of them together is a great idea?
I mean - HTML CSS JavaScript PHP (MySQL, and JQuerey) is a good idea to learn all the way around for basics of web development -
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
The question i was going for was *can you write a html webpage, and put python, php, ruby, java, etc. into the html?
No, because HTML is only a markup language and it does not have the ability to contain arbitrary code. It CAN hold JavaScript code, that is the one language that HTML can contain. But it's isolated code inside the page.
You can also use JavaScript to make HTML, like you do with NodeJS.
I gotcha,
SO understanding all of them together is a great idea?
I mean - HTML CSS JavaScript PHP (MySQL, and JQuerey) is a good idea to learn all the way around for basics of web developmentbut It'd be better to learn python first?
-
@WrCombs Depends on whether you have picked web development or programming
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
The question i was going for was *can you write a html webpage, and put python, php, ruby, java, etc. into the html?
No, because HTML is only a markup language and it does not have the ability to contain arbitrary code. It CAN hold JavaScript code, that is the one language that HTML can contain. But it's isolated code inside the page.
You can also use JavaScript to make HTML, like you do with NodeJS.
I gotcha,
SO understanding all of them together is a great idea?
I mean - HTML CSS JavaScript PHP (MySQL, and JQuerey) is a good idea to learn all the way around for basics of web developmentbut It'd be better to learn python first?
Learn what you are interested in, otherwise you'll give it up too soon.
If HTML and CSS are fun, then why the hell not? Maybe after a few months or more down the road, you'll want to move on to programming languages, or maybe from doing html and CSS, you'll want to learn some Javascript to be able to do more with what you see on the web page. Then from there maybe Node.js or PHP.
It's up to you, really. If you want to do Python first, that's great too. Do what interests you.