serhii.net

In the middle of the desert you can say anything you want

04 Aug 2020

Day 582

Intellij idea CheckStyle plugin

CheckStyle-IDEA - plugin for IntelliJ IDEA and Android Studio | JetBrains exists and I had better luck w/ it than with importing the checkstyle file from Style in Settings. Gives highlights inside the code itself automatically.

Intellij idea - “Add comment” style - put them before the text, not at first column

  • Can be set in “Code generation”: Action gets used w/ Ideavim’s gcc etc.

To configure settings for where the generated line or block comments should be placed in Java, in the Settings/Preferences dialog Ctrl+Alt+S, go to Editor | Code Style | Java and on the Code Generation tab use options in the Comment Code section. 1

Intellij Idea Checkstyle highlights

Intellij Idea Checkstyle highlights seem to refresh when I change a character and similar edits, but not when I change indentation w/ IdeaVim.

Intellij idea Rainbow CSV plugin

Rainbow CSV plugin is nice and highlights columns of the CSV in different colours - something I didn’t know I needed.

Checkstyle documentation

checkstyle – Imports explains (“Rationale:”) the rules used and in general is quite well-written.

Checkstyle equalsavoidnull

"My_Sweet_String".equals(nullString); is the way to go for string comparisons apparently, it avoids potential nullPointerExceptions. 2

String similarity algorithms in Java

tdebatty/java-string-similarity: Implementation of various string similarity and distance algorithms: Levenshtein, Jaro-winkler, n-Gram, Q-Gram, Jaccard index, Longest Common Subsequence edit distance, cosine similarity … is awesome.

A library implementing different string similarity and distance measures. A dozen of algorithms (including Levenshtein edit distance and sibblings, Jaro-Winkler, Longest Common Subsequence, cosine similarity etc.) are currently implemented.

String similarity / string distances normalization #nlp

algorithm - Normalizing the edit distance - Stack Overflow has info about normalizing distances like Levenshtein etc. And how a normalized distance is not a metric anymore, as it violates the Triangle inequality w/ sum of two sides of the triangle not being longer than the third.

Longest common subsequence

Longest common subsequence problem - Wikipedia is different from Longest Common Substring is that subsequences are not required to be uninterrupted.

Nel mezzo del deserto posso dire tutto quello che voglio.