Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Enhancing a Simple PHP Application Cleaning URLs with Subfolders Introducing Constants

who thought this would be a good idea!

who thought it would be a good idea to restructure the whole directory and file structure at this point... they should have just started with this so you would under stand it and not spend hours tracking down and fixing messed up links. i don't know about others, but when i start a website i start with this. no need to do twice the amount of work.

2 Answers

Kevin Korte
Kevin Korte
28,148 Points

For an absolute beginner level course, I think they made the right move. Introducing too much right off the bat would/could easily confuse somebody who knows nothing about PHP. It also helps make the connection as to what constants do, and how powerful they can be. Sure, no one would start a project this way, but I'm glad they started it from absolutely zero.

You will be incredibly lucky to go grow any application and code it exactly right first time round. Refactoring (steamlining / improving existing code) is a very important step! That's just another take home message from this exercise - yes, it requires a bit of work, but imagine the time you save yourself in the long run by refactoring your code to make it more maintainable! It's a very good habit to get into :-)