24 April 2024

Android dessert names

 With version 10 Google stopped referring to Android versions using dessert names. Internally these names do still exist however. With version 13 I'm seeing external references to the desserts again.

  1. Quince Tart
  2. Red Velvet Cake
  3. Snow Cone
  4. Tiramisu
  5. Upside Down Cake
  6. Vanilla Ice Cream

14 April 2024

Not all AI content is spam, but I think right now all spam is AI content.

Jon Gillham

9 April 2024

Java -> Kotlin equivalents

If your starting Kotlin with prior java knowledge, here's a quick lookup table for some common equivalents:

 

Java

Kotlin

Accessibility modifiers:

  • private
  • protected
  • //default package private
  • public

     

    • private
    • protected
    • Internal // accessible in module
    • //default public

String [] anArray;

var anArray:Array<String>

(castType)

smart casting after is

as

public class Area {

private int length;

private int width;

 

//constructor

public Area(int length, int width){

this.length = length;

this.width =  width;

System.out.printf("Surface: %d",length*width);

}

 

//accessor

public int getCircumference(){

return 2*(length+width);

}

}

class Area(var length: Int , var width: Int) {

 

 

        //to add onstructor code

init {

println("Surface: ${length * width}")

}

 

 

 

 

//accessor

val circumference

get() = 2*(length + width)

 

}

anEnum.values()

anEnum.entries

class Shape{}

class Rectangle extends Shape{}

open class Shape {}

class Rectangle : Shape {}

final String aConstant="a";

val aConstant="a"

instanceOf

is

Primitives: int, double...

Int,Double...

lambda (shorter forms exist in both languages)

BiFunction<Integer, Integer, Integer> mutiply= (a, b) -> {

System.out.println("java lambda");

return a * b;

};

 

 

val multiply: (Int, Int)->Int = { a, b ->

println("kotlin lambda")

a * b

}

 

 

new Random();

Random();

Object

Any?

public static void main(String[] args){}

// Note: Java 22 has a preview of a main() function

fun main(args:Array<String>){}

static

companion

top level function

const

switch expression

when

int ternaryVar=test?1:2;

var ternaryVar = if(test) 1 else 2;

throw UnsupportedOperationException

TODO()

void

Unit

8 April 2024

intelliJ 2024.1 released

 

The yearly large IntelliJ release (2024.1) is out with a host of new features. Here's a list of highlights

  • the IDE comes wiith local language models trained to provide based line completion. It is included in the Ultimate Edition, you do not need an additional  AI Assistant license for this. Also, the AI assistant plugin has been unbundled: it was pretty useless if you did not have a dedicated license.
    You cannot run it in combinamtion with other external AI plugins like github copilot.
  • Refactoring inlay hint  when you rename something in your source code. Well that would be welcome, but I do not see this working??
  • Basic IDE features like code highlighting and completion are available during indexing, speeding up the IDE experience when switching projects.
  • There is a beta of a new, modern terminal. You get better assistance as you're used to have in the editor and can handle command reply interactions as blocks.
  • Freeze top lines: just like in a spreadsheet you can now freeze important top lines (start of cklass, method...) when scrolling
  • Better logging support: you can now navigate from logs to the statment that generated them. The IDE will also suggest inserting logging statements in your code.
  • The entire code review workflow is now implemented in your IDE. You can create merge requests from the IDE and reviewers and developers can interact on them from the IDE, without going to the github or gitlab websites.
  • You can now merge unrelated git histories
  • You can now download source code from the quick documentation popup.
  • Builtin CSS functions are now suggested by code completions
  • When debugging multiple statements in one line you get assistance on where exactly in that line you want to break. Useful, Given the ubiquitous use of lamda's.
  • Also in the debugger, when watching the call stack, subsequent calls to external libraries are folded, allowing you to pick calls to the code you wrote more easily
  • when running an npm script, you can now automatically launch a browser client.
  • When testing you get better feedback on which conditionals were not covered
  • The already great HTTP client now gets support for authentications like PKCE
  • Intellij now integrates with OpenRewrite refactorings to enhance you in version (and other) migarations.

More...

2 April 2024

Google to destroy data colleced in incongnito mode after lawsuit

After settling a lawsuit, Google will destroy tracking information it collected on websites containing google tracking (analytics) or advertising info for users browsing in incognito mode.

It only collected information if

  • users had a google account, even if the were not logged into it
  • users were not using firefox, which has better privacy

Data will be deleted on about 136 million users.

Separte from the lawsuit, Google is also phasing out usage of third party cookies in Chrome. Currently you can configure chrome to block third pary cookies, it just is not the default as it is in Firefox and Safari.

More...