Hi everyone,
So, the meeting times for this coming week are the usual:
Saturday, March 5 @ 9AM HST
Sunday, March 6 @ 5PM HST
The location should not be surprising:
There is one exercise posted for the Week #6 Assignments:
I plan on adding one more soon. The topic of this week is user-defined functions. We've actually been using functions so far throughout this course -- round(), abs(), substr() etc. are all functions. They accept some values as parameters and return a single value. However, this week, we are learning how to make our own.
Functions are a bit different from other topics we've studied so far. Mathematical operators, logical operators, comparison operators, if(), else(), for(), foreach(), while() and switch() are all tools that provide varying options for how to execute commands and process data. This is always the first step in learning a programming language. You learn how to manipulate the language to make it do the work you want to do.
This works great in the beginning. And if you're working alone and your codebase is small, you can write lots code using just these commands for a long time with no problems. However, once you have a project that goes above 1,000 lines of code, and certainly once you're working with multiple people on the same project, somehow these base tools don't cut it anymore. You need new structures that help you with code organization.
The function is the most basic code organizer. You take a chunk of logic, you give it a name, and now you can call it as many times as desire. You can save groups of files in "libraries" of PHP code, and then import that library into any project you want to use it on. Once the function is tried and tested, you can count on it to work anywhere across many projects, saving you valuable development time.
I'll be responding to emails about project proposals soon as well. Stay tuned!
- Matt