pull down to refresh
100 sats \ 7 replies \ @Emblematiz OP 23 Mar 2023 \ parent \ on: For how long could you keep your lifestyle without any income? bitcoin
Mentorship would be ideal. Meanwhile take a look at some books. Clean code is a good one. Also, you could share a repo with something you have done so people can give you feedback on how to make it better
Recommending "Clean code" for an amateur considered harmful.
reply
I don't think so, but it would be great if you could share some other more suitable books.
reply
deleted by author
reply
Cool. Interesting project. I don't know much about PHP but I can give you some general feedback.
- Following conventions is always good. It makes easier to others to understand and modify the code we write. BEM is something you can follow when writing styles.
- Always write code that is pleasant to read. Avoid lines with more than 100 characters and use indentation and blank lines properly. Always follow the style guide of the language you are using.
- Avoid magic numbers in your code. Use always constants with meaningful names. Same with strings.
- Take into account the complexity of the functions/algorithms you write. Nested loops are too complex the most of the times. Take a look at Big O notation.
- Do not store app configurations in code. Use environment variables. The twelve factor is a good methodology to follow when writing code for production.
- Do not commit commented code.
- Read quality code. Look for projects you find interesting and you think are high quality code and learn how their code is written.
I hope this help you. Also, keep an eye on the tech trends (frameworks, languages and tools), being up to date is a must.
reply
Thanks. Do you know any procedural PHP codebases that I could read? (I am already familiar with the Wordpress codebase and have made some custom functions/plugins before.)
reply
deleted by author
reply
Here is the Bitejo source code: https://codeberg.org/Anarkio/bitejo As a warning, it's messy, low quality and most of it should probably be rewritten...
reply