Where to read Code? or Best practices to Learn Code?
-
@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.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
I mean - HTML CSS JavaScript PHP (MySQL, and JQuerey) is a good idea to learn all the way around for basics of web development
Yes, that is true. But keep in mind that "web development" is a lot more moving parts than just "development". So learning it "first" tends to be hard because you are not just learning markup, and programming at the same time, but also learning them in the context of them interacting!
Imagine trying to learn to write a book. But do so in the context of building a Rube Goldberg machine that you trigger and it types out the book through a series of actions!
-
@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?
I think no matter what, you want to learn to program before you learn to do web development, and the best place to start learning to program is Python.
-
@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?:
I mean - HTML CSS JavaScript PHP (MySQL, and JQuerey) is a good idea to learn all the way around for basics of web development
Yes, that is true. But keep in mind that "web development" is a lot more moving parts than just "development". So learning it "first" tends to be hard because you are not just learning markup, and programming at the same time, but also learning them in the context of them interacting!
Imagine trying to learn to write a book. But do so in the context of building a Rube Goldberg machine that you trigger and it types out the book through a series of actions!
Okay, That makes sense, In every "web development" program and book I've seen it starts with HTML and CSS to give the writer and idea on syntax and the front end part of web pages, then it goes deeper with Javascript or Jquerery and PHP (MySQL in most cases that i've seen. although any database server would work.. right? )
-
@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?:
@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?
I think no matter what, you want to learn to program before you learn to do web development, and the best place to start learning to program is Python.
I can understand that
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
In every "web development" program and book I've seen it starts with HTML and CSS to give the writer and idea on syntax and the front end part of web pages, then it goes deeper with Javascript or Jquerery and PHP (MySQL in most cases that i've seen. although any database server would work.. right? )
Yes AND it is like this...
You have to learn...
- PHP as the "server development language."
- Databases, because you have to talk to something.
- HTML / CSS because this is the "presentation markup".
- JavaScript, a second programming language for doing things in the HTML.
- How to tie them all together.
All very doable, but a lot to learn about all at once and keep straight which thing is doing what. And that's before we consider any frameworks, which are often used, like Laravel on PHP, and AngularJS on the front end, which is built on JQuery. The number of things you tend to learn is way higher than the necessary pieces. It gets nuts.
-
@WrCombs said in Where to read Code? or Best practices to Learn Code?:
(MySQL in most cases that i've seen. although any database server would work.. right? )
That's correct. If you are writing your own PHP app, you can choose any database that you want to work with. Of any type.
-
@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?:
(MySQL in most cases that i've seen. although any database server would work.. right? )
That's correct. If you are writing your own PHP app, you can choose any database that you want to work with. Of any type.
And if you're not writing your own?
(just out of curiosity) -
@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.
And that only works because it's isolated AND because the web browser processes it. It's completely separate from Html. But, the Javascript inside the Html page can manipulate and alter the Html and CSS.... as it it can change in real time what you see on the web page after it loads.
-
@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?:
(MySQL in most cases that i've seen. although any database server would work.. right? )
That's correct. If you are writing your own PHP app, you can choose any database that you want to work with. Of any type.
And if you're not writing your own?
(just out of curiosity)Then you are stuck with the decisions of whoever wrote it.
-
@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?:
@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?:
(MySQL in most cases that i've seen. although any database server would work.. right? )
That's correct. If you are writing your own PHP app, you can choose any database that you want to work with. Of any type.
And if you're not writing your own?
(just out of curiosity)Then you are stuck with the decisions of whoever wrote it.
ah fair enough .
-
I can't stand web design, drives me nuts. And you can pay someone peanuts to do the design for your web apps. Definitely not worth the torture.
Python can be the first tool in your web development learning path. Django is popular web development framework, often used by companies who make custom web apps for clients.
-
@scottalanmiller said in Where to read Code? or Best practices to Learn Code?:
@WrCombs said in Where to read Code?:
what software do you use to write code?
Notepad!
Just kidding. But overall I like Visual Studio Code (but not for beginners or learners), Atom, Notepad++ and some people like PyCharm and Sublime.
Oh! Can I plug UltraEdit? I love it to pieces!!!!!!!
-
@flaxking said in Where to read Code? or Best practices to Learn Code?:
I can't stand web design, drives me nuts. And you can pay someone peanuts to do the design for your web apps. Definitely not worth the torture.
Python can be the first tool in your web development learning path. Django is popular web development framework, often used by companies who make custom web apps for clients.
If the goal is web development, wouldn't Node be a generally better route than Python?
-
@Obsolesce said in Where to read Code? or Best practices to Learn Code?:
@flaxking said in Where to read Code? or Best practices to Learn Code?:
I can't stand web design, drives me nuts. And you can pay someone peanuts to do the design for your web apps. Definitely not worth the torture.
Python can be the first tool in your web development learning path. Django is popular web development framework, often used by companies who make custom web apps for clients.
If the goal is web development, wouldn't Node be a generally better route than Python?
I'd say there probably aren't as many Python web development jobs, and most web apps built by a company to provide a service aren't using Django. Python does have a path to web development, and when people trying to figure out what language to start with, they tend to want a path to their end goal from the language they learn to program with. However in reality the knowledge all combines together, so someone who learns Python first and then Node isn't going to be losing much time and will probably be better for it.
That being said, using a server-side JavaScript language was one of the recommendations made to me when I was looking to start learning programming.
-
@flaxking said in Where to read Code? or Best practices to Learn Code?:
I can't stand web design, drives me nuts. And you can pay someone peanuts to do the design for your web apps.
You can't. That's a myth. Web development is as hard or harder than non-web and needs more skills and expertise. Like any development, no one skilled is cheap. You can't actually get it cheaper offshore. They charge less per hour, but it costs more.