10 December 2017

Google Drive File Stream: Drive letter changing on Windows (bug + workaround)

Google is replacing Google Drive with Google Drive File Stream (GDFS).
With GDFS you can (finally) cherry pick the folders that are synchronized to your local Drive (default: none).
GDFS mounts all network shares by default to drive G (what did you expect?).
Under G you will find a folder for your personal Drive and another folder for team drives you are member of (new with GDFS).
If the G drive is taken, GDFS takes the H drive and so on...

Every once in a while GDFS mistakenly thinks the G drive is occupied and switches to H, next time it is back on G again... Very annoying if you have an absolute path reference to something on your drive (shortcuts, scripts...). The solution is a classic Windows trick: stop and restart:

  1. Go to your task bar tray, right click the GDFS icon and choose quit
  2. Start Drive File Stream again from the Start Menu.
Users are really annoyed by this bug, so let's hope it's fixed soon.

6 December 2017

Java 9 @Deprecated

That is to say: Java 9 enhances Deprecated.


The @Deprecated annotation has a new parameter forRemoval (default: false).
If the parameter is true, the item will be removed in a future version, according to javadoc.
This used to be the meaning of Deprecated in the beginning (when it was still a javadoc tag), but Java never actually removed anything marked Deprecated AFAIK.
That is, until Java 9, where some items effectively got pruned, to avoid cyclic dependencies in the new module system (in java.beans.PropertyListener).
Oracle says that, for Java SE, the intend is that something marked with @Deprecated(forRemoval=true) in Java 10, will be gone in Java 11 (ouch).

Suppressing warnings

Deprecation warnings are also impacted.
You can surpress compiler deprecation warnings with @SuppressWarnings(“deprecation”) in your code.
This does not work for imports, but that is a bug that is (finally) solved in Java 9.
On the other hand, In Java 9 the @SuppressWarnings(“deprecation”) will not work for @Deprecatedor(forRemoval=true). And rightfully so, given that people suppress the warnings because they assume nothing is going away any time soon.
 In Java 9, to suppress forRemoval=true warnings, use  @SuppressWarnings(“removal”).
To suppress both forRemoval=false and forRemoval=true, use @SuppressWarnings("deprecation", “removal”).

22 November 2017

Oracle discontinuing Java Tutorials?

The long running and excellent Java Tutorials by Oracle (and earlier Sun) now contain this message:

The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases.
This seems to indicate that the Java Tutorials won't be updated anymore for recent JDK releases.
Just another sign of Oracle's disinvestment from Java.

15 November 2017

Windows: software to add (updated)

Current list of software I'm running:

10 November 2017

Java persistent memory

There is the move from disk to SSD, allowing us to save our data to persistent random access memory.
There is the move to in memory computing, where we deal with large amounts of data without having to go to persistent memory.
It's only logical that eventually we will be able to compute in persistent memory.
Intel is working on hardware that supports this paradigm.
And they are reaching out to the java community to add API support.

8 November 2017

Customizing your IntelliJ project appearance by setting a background image

When developing I sometimes have closely related projects open simultaneously.
And as you may expect, I end up messing around in the wrong project.
Here's a little trick to easily distinguish between projects: give the editors a different background image.
It's an option that is not even in the menu's, but you can search for the action to execute it, as explained in the manual. Make sure you check This project only.

7 November 2017

Nobody uses Maven,
Maven uses you.

Venkat Subramaniam