problem

This is a page from my book, “A Survival Guide for New Consultants”

Learn how to influence people

“When you listen to someone, 
you should give up all your preconceived ideas 
and subjective opinions; you should just listen to him, 
just observe what his way is.”

Zen Master Shunryu Suzuki

If you’ve read the previous chapters, you’re now well past the basics. You’re a trustworthy person, a problem solver, you don’t create any problems for your sponsor, and you know how to make the big decisions. Now we’ll dig into a few of the finer points of being a consultant.

How to choose a Scala collection method to solve a problem

Note: This is an excerpt from the Scala Cookbook (partially re-worded and re-formatted for the internet). This is Recipe 10.3, How to choose a Scala collection method to solve a problem.

Back to top

Problem

There are a large number of methods available to Scala collections, and you need to choose a method to solve a problem.

Back to top

Solution

The Scala collection classes provide a wealth of methods that can be used to manipulate data. Most methods take either a function or a predicate as an argument. (A predicate is just a function that returns a Boolean.)

Table of Contents

  1. Problem
  2. Solution
Back to top

Android Studio on Mac OS X - Unable to find a valid JVM

After doing a little research, it looks like the creators of Android Studio made a quirky decision to want to enforce the use of Java 6 on Mac OS X platforms, presumably to have better font rendering. They did this by putting 1.6* in their Info.plist file instead of 1.6+ (and they’ve done this in more than one version of Android Studio. This image (from this link) shows the suggested way to fix the problem, but you can also edit the Info.plist file to solve the problem.

The Mac OS X (macOS) “won’t shutdown” (slow shutdown) problem

Since upgrading to Mac OS X 10.9 I’ve experienced the problem other people have reported, where their Mac won’t shutdown, or shuts down very slowly. We had a huge lightning storm roll in a few days ago, and when my 2008 iMac didn’t shut down after three minutes of waiting, I finally had to press and hold the button on the back to force it to shut down.

Since then I’m glad to say that the following series of defaults write commands has helped my iMac to shut down much more quickly:

The CakePHP form save, validate, and debug problem

CakePHP form save/validate/debug FAQ: How do I debug problems in the CakePHP form save/validate process?

One problem I've run into with CakePHP is that while the form validation approach works very well 95% of the time, when it fails it can be very hard to debug. Because the form validation process happens when you invoke the save() method, much of this debugging process seems to be out of your control.

iTunes movie error - movie was not copied to iPhone because it cannot be played on this iPhone

iTunes movie/video error FAQ: As I continue to explore the process of creating digital movie files I can play on my iPhone (or iPod), I keep running into an iTunes error message when I try to sync my movie file to my iPhone through iTunes.  Every time I try to sync my movie, iTunes gives me the following error message:

[Your movie] was not copied to the iPhone "Alvin Alexander's iPhone" because it cannot be played on this iPhone.

This iTunes movie sync error message is shown in the following figure: