help

If you are motivated by a wish to help on the basis of kindness ...

“If you are motivated by a wish to help on the basis of kindness, compassion and respect, then you can do any kind of work, in any field, and function more effectively with less fear or worry, not being afraid of what others think or whether you will ultimately reach your goal.”

~ the Dalai Lama, in this tweet

XO Play help text

This is the “help” text for my Android football game XO Play.

Changes in Version 1.4

Released on July 14, 2019, Version 1.4 introduces four new game levels:

A Drush 9 list of commands (for Drupal 8)

I’m sure there’s something I’m missing here, but ... as I’m just getting started using Drush 9 to manage a Drupal 8 website, I can’t find a list of Drush 9 commands on the drush.org website. Therefore, in an effort to make my life easier (and hopefully yours), here’s a list of Drush 9 commands.

You can run the `javap` command inside the Scala REPL

As shown in the image, I was just reminded that you can run javap inside the Scala REPL. The REPL help command shows some other things you can do:

scala> :help

All commands can be abbreviated, e.g., :he instead of :help.
:edit <id>|<line>        edit history
:help [command]          print this summary or command-specific help
:history [num]           show the history (optional num is commands to show)
:h? <string>             search the history
:imports [name name ...] show import history, identifying sources of names
:implicits [-v]          show the implicits in scope
:javap <path|class>      disassemble a file or class name
:line <id>|<line>        place line(s) at the end of history
:load <path>             interpret lines in a file
:paste [-raw] [path]     enter paste mode or paste a file
:power                   enable power user mode
:quit                    exit the interpreter
:replay [options]        reset the repl and replay all previous commands
:require <path>          add a jar to the classpath
:reset [options]         reset the repl to its initial state, forgetting all session entries
:save <path>             save replayable session to a file
:sh <command line>       run a shell command (result is implicitly => List[String])
:settings <options>      update compiler options, if possible; see reset
:silent                  disable/enable automatic printing of results
:type [-v] <expr>        display the type of an expression without evaluating it
:kind [-v] <type>        display the kind of a type. see also :help kind
:warnings                show the suppressed warnings from the most recent line which had any

More Scala/javap examples

Here are a couple more javap examples in the Scala REPL that help to show what details are available:

scala> class Person (var name: String, var age: Int)
defined class Person

scala> :javap -public Person
Compiled from "<console>"
public class $line3.$read$$iw$$iw$Person {
  public java.lang.String name();
  public void name_$eq(java.lang.String);
  public int age();
  public void age_$eq(int);
  public $line3.$read$$iw$$iw$Person(java.lang.String, int);
}

scala> :javap -private Person
Compiled from "<console>"
public class $line3.$read$$iw$$iw$Person {
  private java.lang.String name;
  private int age;
  public java.lang.String name();
  public void name_$eq(java.lang.String);
  public int age();
  public void age_$eq(int);
  public $line3.$read$$iw$$iw$Person(java.lang.String, int);
}

javap help

Finally, here’s the output from the javap -help command that helps to explain that output:

> javap -help
Usage: javap <options> <classes>
where possible options include:
  -help  --help  -?        Print this usage message
  -version                 Version information
  -v  -verbose             Print additional information
  -l                       Print line number and local variable tables
  -public                  Show only public classes and members
  -protected               Show protected/public classes and members
  -package                 Show package/protected/public classes
                           and members (default)
  -p  -private             Show all classes and members
  -c                       Disassemble the code
  -s                       Print internal type signatures
  -sysinfo                 Show system info (path, size, date, MD5 hash)
                           of class being processed
  -constants               Show final constants
  -classpath <path>        Specify where to find user class files
  -cp <path>               Specify where to find user class files
  -bootclasspath <path>    Override location of bootstrap class files

If you ever want to use javap inside the Scala REPL, I hope this information is helpful.

Real marriage is when ...

“Real marriage is when two individuals share the same goals in life, and want to help each other attain those goals.”

~ Swami Satchidananda

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

You can’t always save the client

“When you can do nothing, what can you do?”

A Zen koan

As I’ve mentioned, you’re hired to be a consultant because you’re a problem-solver, so it really hurts when you can’t help a client. It’s a tough lesson, but it’s an important one:

Despite your best efforts,
you can’t always save the client.

This is a page from my book, “How I Sold My Business: A Personal Diary”

Monday, June 20, 2005

I'm trying not to swear in this diary, but I hate coming to this #!@% office -- and this is supposed to be my company. Every time I come back to the office there's another project falling apart, or infighting between different groups that I have to work out. A few weeks ago when I was heading out the door for a sales call there was something that had to be done that "only I could do", and I had to run late to that meeting, and again today there were several more near-disasters, and everyone pounced on me before I could set my laptop bag down.

Android: How to store static Help text in an Android XML file

As a note to self, when you’re writing an Android application and you think you want to store some static text in an external file, a better approach can be to create a resource file under res/values.

For example, I’m currently adding some help text to an Android app, and to do that I created a file named strings_help.xml under the res/values directory. That file contains HTML wrapped in an XML CDATA tag, like this:

Getting help on Play Framework console commands

It took me a few minutes to figure out that when you want help on Play Framework console commands (i.e., the Play command line tool), you may get more useful help by typing help play instead of just help. Using the first command shows information on commands like clean, compile, console, etc., which is what I'm more interested in.

To take a quick look at this, here's what you get when you type help play: