Skip to main content
 

some Bluetooth speakers can also operate as a speakerphone over USB, which works great for GVC calls.





 

Protip: don't fill your GCP disk 100%. Instance starts but you can't login since there's no place to put an ssh key..
The fixes are.. Not good. (resize not supported on OS, so have to clone, mount on new VM, and then build a new VM with the cloned disk...)

Probably just going to burn it down and start over...





 

 - Use _cs -local_ to edit  files found by a code search query.  Here's me cleaning up an experiment this morning:

  *emacs *

If I know all the files need editing I'll also do bulk g4 edit first:

  *g4 edit *









 

Parameterized tests in Junit 3 -- another Java

Adding some experimental code that modifies a junit3 test?  Yearning for Junit4 @RunWith(Parameterized.class) annotation?

For simple things like an experiment flag you can do this:

Add the flag to the base test class.

   boolean experiment = false;

Create a subclass of your test and change the value in your setUp method:

 class FooWithExperimentTest extends FooTest {

 @Override
 protected void setUp() throws Exception {
    this.experiment = true;
    super.setUp();
  }
}

Your subclass will run with the varying value.









 

TAP submit speedup 

- You mail a CL
- The presubmit automatically starts a TAP run.
- You get an email with the results.
- You did *not* change the CL after you mailed it.

If all of the above is true, use the TAP base with *--rerun* when submitting to save time.  The base is in the email TAP sends you and it looks like this:

  OCL:53489329:BASE:53489326:1380560146993









 

Protip: Use Optional#asSet() to populate collections from optional values.

Was annoyed with lots and lots of code that looks like this:
   Optional<Foo> foo = getFoo();
   if (foo.isPresent()) {
     collection.add(foo.get());
   }

Turns out there's asSet which lets you write code like this:

  collection.addAll(getFoo().asSet());









 

ugh.. protip for protesters @google-- have data to back up your claims.

Right now there's a grim reaper effigy and carpenter union folks handing out flyers. Flyer is hyperbolic to the extreme and doesn't have any real data other than that a specific contractor used by google pays below the prevailing union wage. The only action requested is to email REWS.

So I ask the person there: does this apply to projects at Google or is this just a problem with this contractor in general? How many companies employ this contractor? How many people are being paid below wage? What other actions have you taken, if any?

No effing clue on any of those questions nor any passion.

I never thought I'd say it, but it made me nostalgic for eng-misc.