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. -
@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.
-
@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.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
python looks like it's all math, basically up to this point.
In the same way that cooking and recipes are all math... which is to say "they have math, but they are not math."
-
@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.
@scottalanmiller weird question - and Im a noob (as already said multiple times) however,
you said that HTML and CSS are not coding rather they are mark ups correct?
But I can build a website out of HTML from the<!doctype: html> <html> <body> <!-- some website information here --> </body> </html>
from scratch - and then mark up with CSS .
Wouldn't only CSS be considered the mark up language? -
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
Under that, I feel like it'd be good practice to build a website from scratch, use mark ups and add python.
You guys have said multiple times "having a goal in mind while learning is best because if you dont you'll get distracted."
But how do I do that?
learning PHP as @bnrstnr said?Absolutely not. You are missing the BIG picture stuff of "what is programming" and "what is web design." Just randomly changing syntax isn't going to change the fundamentals.
Python = PHP. Python is just a little easier for a noobie to learn, that's all. Both are programming languages, they do exactly the same things, both are equally "math".
-
@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.