4h 4m – Intermediate
Many successful programmers know more than just a computer language. They also know how to think about solving problems. They use “computational thinking”: breaking a problem down into segments that lend themselves to technical solutions. Code Clinic is a series of six courses where lynda.com authors solve the same problems using different programming languages. Here, David Powers works with PHP.
Each month, David will introduce a new challenge and provide an overview of his solution in PHP, explaining how he broke the problem up into logical components, and revealing the difficulties he encountered. Challenges will include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenge in languages like C#, C++, Java, Python, and Ruby. And check back every month for new challenges.
Introduction – 8m 49s
Welcome – 1m 18s
What you should know before watching this course – 4m 40s
Using the exercise files – 1m 56s
Getting the most from Code Clinic – 55s
1. Statistical Analysis – 1h 34m
Introducing Lake Pend Oreille – 5m 4s
Overview of my solution – 3m 22s
Setting up the database – 4m 55s
Retrieving the full-year records – 5m 20s
Processing the full-year records – 10m 49s
Priming the date_recorded column – 7m 47s
Inserting the full-year data into the database – 6m 48s
Processing individual days – 6m 54s
Retrieving a year’s data a day at a time – 7m 41s
Keeping the data up to date – 4m 27s
Calculating the mean and median values – 7m 21s
Creating a web service – 6m 21s
Getting the required data – 6m 50s
Building the web service response – 10m 38s
2. Image Analysis – 49m 47s
Identify the image subset – 3m 14s
Overview of my solution – 3m 19s
Setting up the files – 2m 43s
Calculating the scaling ratio – 6m 28s
Using a custom class to scale images – 6m 25s
Generating the thumbnails – 7m 49s
Using subimage-search in ImageMagick – 4m 32s
Analyzing the image statistics – 4m 45s
Finding the cropped images – 7m 13s
Running the script and displaying the results – 3m 19s
3. Eight Queens – 39m 3s
A classic CS interview question – 2m 4s
Overview of my solution – 3m 48s
Finding all possible combinations – 6m 26s
Detecting horizontal attacks programmatically – 4m 8s
Implementing the checkLayout() function – 6m 25s
Rotating the chessboard – 4m 59s
Eliminating duplicate solutions – 6m 34s
Displaying the unique solutions – 4m 39s
4. Accessing Peripherals – 21m 33s
Build a musical instrument using mouse movements – 1m 35s
Overview of my solution – 2m 1s
Using the Web Audio API – 2m 47s
Creating the tone generator – 7m 39s
Controlling the frequency and volume – 7m 31s
5. Recursion and Directories – 31m 29s
Searching directories for photos NEW – 2m 44s
Overview of my solution NEW – 3m 24s
Finding the images NEW – 5m 30s
Extracting Exif and IPTC metadata NEW – 6m 18s
Extracting XMP metadata NEW – 6m 22s
Reorganizing the folder structure NEW – 7m 11s