Live data from Hacker News

Java.evolved: Java has evolved. Your code can too

javaevolved.github.io

1–10 of 40 posts

Re: Java.evolved: Java has evolved. Your code can too

#3
post #2

Great idea, although it is quite inconvenient that you have to tap/swipe to show the modern version (at least on mobile). Makes it difficult to compare.

Hey mate, what UX would you suggest? Happy to explore ideas!

For a better visualization to compare old/new, just click on the card and it will open that particular pattern in a new page.

Re: Java.evolved: Java has evolved. Your code can too

#4
Anyone else getting annoyed by these statistics AI generated websites are adding to everything? Like in this example, “0 lines of Python”. What does that even mean? Cool site though, but is it an ad for Copilot? Seems like it, and should be disclosed as such if that’s the case imo.

Re: Java.evolved: Java has evolved. Your code can too

#5
post #4

Anyone else getting annoyed by these statistics AI generated websites are adding to everything? Like in this example, “0 lines of Python”. What does that even mean? Cool site though, but is it an ad for Copilot? Seems like it, and should be disclosed as such if that’s the case imo.

Re the Python thing, not really. I made that joke because originally yes the HTML generator was written in Python, but I deliberately asked to rewrite in Java.

https://github.com/javaevolved/javaevolved.github.io/tree/ma...

Re: Java.evolved: Java has evolved. Your code can too

#7
post #2

Great idea, although it is quite inconvenient that you have to tap/swipe to show the modern version (at least on mobile). Makes it difficult to compare.

Hey mate, what UX would you suggest? Happy to explore ideas! For a better visualization to compare old/new, just click on the card and it will open that particular pattern in a new page.

Maybe `ArrowLeft`/`ArrowRight` or `j`/`k` to flip through all of card pairs? Or just allow us to scroll through all the pairs. In either case, both old and new should be visible.

Re: Java.evolved: Java has evolved. Your code can too

#9
Not many people know this, but you can also write

    public int x, y;
instead of

    private int x, y;
    public int getX() {return x;}
    public void setX(int x) {this.x = x;}
    public int getY() {return y;}
    public void setY(int y) {this.y = y;}
this is compatible with any language version

Re: Java.evolved: Java has evolved. Your code can too

#10
post #9

Not many people know this, but you can also write public int x, y; instead of private int x, y; public int getX() {return x;} public void setX(int x) {this.x = x;} public int getY() {return y;} public void setY(int y) {this.y = y;} this is compatible with any language version

And the second you have anything other than a toy application you'll find out why getters, setters, and validation were invented, and why we them just moved everything to have consistent interfaces.
Post reply on HN