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...

But...
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.

@Deprecated(forRemoval=true)

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.
More...

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

17 October 2017

KUL team cracks WPA2

The crypto team at the Katholieke Universiteit Leuven found a flaw in WIFI encryption, compromising its security. Anyone who can capture the signals during the handshake can decrypt the traffic and in some configurations insert and modify data sent over the protocol.
The crack replays message 3 (of 4) in the handshake of WPA2 that establishes the crypto channel.  The message is used to reinstall the encryption key and reset the nonce and replay counters.
Linux and Anroid implementations suffer most from the attack as another bug sets the new key to all zero's rendering decryption trivial.
The protocol can be patched in a backward compatible way. Look out for updates on all your WIFI devices!

11 October 2017

Oracle handing over java products and standards

Oracle is reducing its Java costs and commitment. The latest platform releases (Java SE 9 and Java EE 8) were surprisingly low key.
With the releases out of the door, Oracle is drastically reducing its teams and handing over control of related products.

Given that the EE spec moves to an organisation whose main product is a Java IDE, Apache seems a second choice for Netbeans, where it can rest in peace.
Only remaining question: with Oracle giving up control over the enterprise Java libraries, how long will it take before it stops developing the language?

6 May 2017

MS Word: keep tables on one page

Page breaks are an annoyance in word. Whenever you update your document they shift and mess up your layout.
Easily to avoid this by using the paragraph properties keep with next & keep lines together (and I don't know why these do not appear in the ribbon for east access).
But for some reason I never got tables to work with this.
Easy enough to select the table with the little cross in the left top that appears on hovering and setting the paragraph properties, but they did not take effect.
In a document with many small tables they kept on splitting across pages, and I had to revert to page breaks.
It appears that you have to make sure that in the table properties Text Wrapping is set to None. Now all is well!


29 March 2017

powerpoint: swap presenter view and demo

When presenting on windows, switching between a powerpoint (2016) presentation and a demo is problematic.

The goal

During a presentation I am projecting the slides in extended view behind my back to the audience and have the presenter view on my laptop in front of me.
When I switch to a demo I want to duplicate my laptop screen to the projector.
I want to swap easily between both modes.

The Problem

I set up my PC in extended view (F8 on my laptop)  and start the presentation: the full slide is projected and the presenter screen is on my laptop: fine.
When I start a demo, I duplicate my screen. The demo shows up in front of me and on the extended projected view: fine
When I switch back from demo view (duplicate screen) to extended view, the powerpoint presentation does not migrate back to the extended view.

The solution (sort of)

  1. Switch back to extended view
  2. right mouse menu in powerpoint presentation>duplicate slide show: the presentation is now shown in extended view (projector) and on my screen
  3. right mouse menu in powerpoint presentation>show presenter view: the presenter view is on my laptop, the full slide is on the projector.
I reach the result I want. Only this takes three steps. Isn't there more fluent way to do such a common task?

9 February 2017

UK: insurance for self driving cars

UK plans to have a car insurance that does not care whether you or the car is driving. In both cases, an accident is an accident, and you are insured either way by a uniform car insurance.
This is a major step towards the general acceptance of self driving cars.
more...

24 January 2017

Excel 2016: this workbook contains links to one or more external sources that could be unsafe

I get this message sometimes when opening a workbook. Generally I have copied a formula from another workbook instead of a value, but i always want to check before breaking things.

I used a Microsoft support article (ignored the Edge promo):

  1. Type CTRL+F (opens Find and Replace Window)
  2. Click [Options >>]
  3. Fill in these values
    1. Find What: \[
      1. the MS article uses [, but I got some false positives from that
    2. Within: Workbook
    3. Look in: Formulas
  4. Click [Find Next] to search
If after verification you want to get rid of the warning, use the advice you get by clicking the Help button in the box:
  1. On the Data tab, in the Connections group, click Edit Links
    Here you can also update and break the links, but you do not see in which cells they are used.
  2. Click [Startup Prompt...]
  3. Select the option that you want