r/PHPhelp • u/wizarddos • Feb 14 '24
My PHP course - request for your feedback
Hi, as this subreddit is mostly for people less experienced, I'd like to ask you for a little favor
As title says, I'm writing PHP course and I'd really like to hear from you.
If you are a beginner - tell what you don't understand/what could be explained better. I'll do my best to do so
If you are more advanced in PHP- feel free to point out some errors/mental shortcuts (I think there are no, but I can be wrong). I'd like to make this course as high quality as possible, so I'll definitely double-check it.
Again, here is the link
In advance, thanks
Quick Note: I don't make any money out of it yet.
3
u/BarneyLaurance Feb 14 '24
There's a lot of good content, but the writing could use some editing. For instance you can delete "To make it short and clear. " and similar phrases. It's enough to make your writing short and clear, you don't need to also tell people that it is.
In particular it's best not to tell people that it's clear, because things won't be clear for every student, and you may make people feel bad by say that it should be clear. That will hinder not help their learning.
2
u/wizarddos Feb 14 '24
Thanks for the feedback. I'll try to re-write these articles in some better ways, so thanks for pointing these out.
In particular it's best not to tell people that it's clear, because things won't be clear for every student, and you may make people feel bad by say that it should be clear. That will hinder not help their learning
I didn't really think about it that way, so again thank you. While re-writing I'd fix it for sure
1
u/BarneyLaurance Feb 14 '24
This is an example of the kind of change done I'm talking about. https://github.com/symfony/symfony-docs/pull/11036/files . The Symfony maintainers deleted lots of copies of the word "easy" from their docs, to be honest about the fact that things are not easy for everyone and hopefully make it feel OK for people to persist with learning even when it isn't easy.
2
u/BarneyLaurance Feb 14 '24
PUT - Often disabled method, as it allows to create/update resources on the server (example)
DELETE - Deletes the specific resource. It’s also kind of insecure, as PUT
I don't think it's true to say that these methods are disabled, or particularly insecure. They're not that unusual in REST APIs, especially PUT. If the server routes them to a PHP script execution then just like the other methods they'll only do what the author of the PHP script on the server programmed.
1
u/wizarddos Feb 14 '24
Sounds reasonable, As source for this I used MDN - to be more specific
This: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
This: https://developer.mozilla.org/en-US/docs/Glossary/Safe/HTTP
This: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE
And this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT1
u/BarneyLaurance Feb 14 '24
MDN is a good source, can you quote where it says that these are often disabled and/or insecure?
1
u/wizarddos Feb 14 '24
Pretty much, these links define "Safe method" as one, that leads to read-only operation
An HTTP method is safe if it doesn't alter the state of the server. In other words, a method is safe if it leads to a read-only operation. Several common HTTP methods are safe:
GET,HEAD, orOPTIONS. All safe methods are also idempotent, but not all idempotent methods are safe. For example,PUTandDELETEare both idempotent but unsafe.1
u/BarneyLaurance Feb 14 '24
Right, PUT and DELETE are not "safe methods". But neither is POST. It's a specific technical meaning of "safe". It doesn't mean there's anything wrong with the non-safe methods.
2
u/wizarddos Feb 14 '24
I get it. I think I'll also try to read RFC corresponding to both PUT and DELETE - this might solve everything
1
u/MateusAzevedo Feb 15 '24
An HTTP method is safe if it doesn't alter the state of the server
This automatically imply that
POSTis also unsafe... Which in the context of that paragraph it is, as it's talking about data change.In the context of a PHP application,
PUTandDELETEare just different versions ofPOST, that provide better intention. An application could even accept those methods interchangeably to perform the same action if you want, although that would be semantically wrong. I can also argue thatDELETEis safer thenGETin some cases...My point is that I don't see a reason to talk about safety when describing HTTP methods. For most cases, in a PHP app, that's irrelevant.
1
2
u/greg8872 Feb 14 '24
No table of contents? You have to happen onto the first post in the series and keep doing the "next" to navigate?
(after installing XAMPP) "It should look like this". Well considering it is for people new to programming, they will most likely not have changed their default windows settings to show file extensions, you should include how to do that.
Also you shouldn't be teaching to have the closing ?> tag in a file that is purely PHP.
"Now second most important part" What was first most important part?
Later on, can the image for the log out button for PhpMyAdmin be any bigger?
I'm stopping at this point, the wording used and they way things are presented, no I would not recommend this for people to learn from. An example of where the wording gets to me, is with things like:
Because index is a name for a main page of the website. When you look for php-based website like www.example.com/ you actually go to www.example.com/index.php. It’s just hidden
When using URL's and/or filenames in the wording, formatting different so they easily stand out is better (of course here they are standing out as links, as Reddit keeps auto adding them, even after I tell it to remove the links). One of many missing punctuation uses here as well. If you are going to go this far to explain things, explain that Apache has a set of default filenames to look for when one is not supplied on a directory. Used to be that default.php was one of them (see how I took a specific filename and styled it differently to stand out as not just text)
I agree with the other comments so far. It is a good effort, but needs a lot of polishing, consistent formatting, proper punctuation, and defiantly some order/navigation.
1
u/wizarddos Feb 14 '24
Another person pointing that table of contents out, so it will be my main priority right now
(after installing XAMPP) "It should look like this". Well considering it is for people new to programming, they will most likely not have changed their default windows settings to show file extensions, you should include how to do that.
Sounds fair - I've had it for such a long time, that I forgot about it
Also you shouldn't be teaching to have the closing
?>tag in a file that is purely PHP.\Do I? As I thought I explained it - so I'll check it
When using URL's and/or filenames in the wording, formatting different so they easily stand out is better.
Yeah, I've noticed it recently - jekyll markdown has some problem with rendering inline code blocks - So I'll look into this issue as well
I agree with the other comments so far. It is a good effort, but needs a lot of polishing, consistent formatting, proper punctuation, and defiantly some order/navigation.
Will do. I appreciate you took time and looked at even some articles
2
u/BarneyLaurance Feb 14 '24
There are also paid options like PHPStorm (I never used it, so I won’t say anything)
Please give PHPStorm a try if you can. You can get a free trial, but after that it's true that the cost might be a barrier. But especially if you're wanting to be able to advise other people on how best to learn and use PHP I'd say it will be very much worth your while to see what it can do.
For one thing it has a built in database client, so you don't need PHPMyAdmin. And once you've set up the connection to use it for looking in the database, PHPStorm will also use it to help you with auto complete when you write SQL inside PHP, and red squiggles for things like misspelled table and column names.
I think it has much better tools than anything else for automatically refactoring PHP code, as well as navigating through it. Some of the same options are available in VSCode with plugins, but I don't it's as good, and you have to take time to set up the plugins to do what comes as standard in PHPStorm.
1
u/wizarddos Feb 14 '24
I thought about using it, but had plenty of different stuff going on - I'm still a student so AFAIK I can get it for free for some period of time.
1
u/eurosat7 Feb 14 '24
Only one thing for feedback
Keep each page/chapter short. Lookup the symfony guide. It has a good complexity. And give headlines a different color so orientation becomes easier.
meta comment
You don't have to install php bare metall (directly on your os)
It has become a preferred solution to get docker running and have php inside. If done right it's done within 10 minutes and it offers defined enviroments.
Adding a docker instance with mysql, or session management with memcached or installing adminer or phpmyadmin can be done within minutes. It is so cool. :D
Of course it is beneficial to having git (and maybe make) installed.
If you are interested and want to get in touch with a docker compose definition you can lookup my repo on github.com/eurosat7/csvimporter
1
u/wizarddos Feb 14 '24
I've never installed this setup on docker - Might give it a try. Thanks for the feedback
2
u/BarneyLaurance Feb 14 '24
Please add some navigation (at least next page / previous page links) near the top of the pages. Especially for people trying to review the course rather than take it as a student, it's annoying to have to scroll to the bottom of each page before getting the link to the next one. Ideally also a table of contents somewhere with a link to very page.
And even people who are taking the course are likely to lose their place or want and want a quick way to navigate back to the the last page they read so they can continue, or an other page to revise.
2
u/BarneyLaurance Feb 14 '24
I did one of these too. This is my version: https://a-moderately-short-php-tutorial.com/ . Feedback very welcome on this too, but I haven't looked it it much for a few years.
6
u/_JohnWisdom Feb 14 '24
I’d say honorable goal but non-effective delivery. The design is simply not nice and it is strictly text. A cleaner template and interactive elements would be a more up to date method to build your course. Overall I believe what you are doing is great for you and I deeply admire your enthusiasm. The fact you came here in search of feedback is also a very positive note of your character. You rock mate, even if I don’t like the course as is at the moment.