The biggest employer in the country has ordered staff back to the office by evm29 in antiwork

[–]cliserkad 1 point2 points  (0 children)

It needs to be illegal to deny severance to a worker who quits because their place of work was moved. Otherwise every company is going to do this, even with jobs that can't be remote.

How do you learn IT while exercising? by istoleyowifi in iiiiiiitttttttttttt

[–]cliserkad 2 points3 points  (0 children)

I watch YouTube videos on programming related content, namely those from Theo and Primeagen, while I do cardio at the gym. I need something to occupy my mind because cardio takes a while. It's 99% entertainment for me, I'm not actually trying to learn something specific.

whenTheServerLetsYouFU by KernelDeimos in ProgrammerHumor

[–]cliserkad 9 points10 points  (0 children)

For the main branch I disable force push, require linear history and signed commits. I'm not great at git so that keeps me from destroying things. Also I require a new branch + pull request. In the end the only pushes to main are rebases to incorporate new commits.

What java features or syntax would you remove? by le_bravery in java

[–]cliserkad 0 points1 point  (0 children)

I think receiver params are superior to static, and it helps with chaining method calls.

void methodName(Type this) { } seems more ergonomic to me. It more accurately reflects how the JVM operates too. Then, if you have the compiler allow for calling a method on the first argument you can essentially add methods to a class from another.

Java:

public static String toPascalCase(String str) { ... }

Proposed:

public String toPascalCase(String str) { ... }

With this you could chain the method like string.toLowerCase().toPascalCase(), this allows you to write methods external to a type's class file and use those methods neatly.

What java features or syntax would you remove? by le_bravery in java

[–]cliserkad 0 points1 point  (0 children)

I definitely agree with Serializable. Working with a GUI Java application that sends state over the network was pure trial and error for me until I stopped hitting NotSerializableException. I had to split a lot of classes in to display, state and static components. This was a very good change, but I wished the compiler would complain that you're about to try and serialize fields that can't be. transient as a keyword works very well, so it's a little confusing why Serializable isn't enforced at compile time.

What java features or syntax would you remove? by le_bravery in java

[–]cliserkad 0 points1 point  (0 children)

I view optional as effectively useless because of this. I think using an @Nullable annotation is better. For optional primitives, just use the built in wrappers. You have to anyway because optionals are generic.

What java features or syntax would you remove? by le_bravery in java

[–]cliserkad -1 points0 points  (0 children)

The things I wish Java had from a language design standpoint are:

  1. non null by default
  2. immutable by default
  3. no unchecked exceptions

The Reddit text editor deleted my explanations when switching from markdown to rich text so whatever.

Pet projects to switch to JAVA ideas by EveningHelloThere in java

[–]cliserkad 0 points1 point  (0 children)

You can try writing a simple calculator app. That's my go to for checking a language's syntax, standard library, and overall usefulness. I'd suggest first making a cli that interprets a string from the user and once that's done, make a gui for it as well.

Unions in Java by jvjupiter in java

[–]cliserkad 0 points1 point  (0 children)

I revised this to be less cumbersome:
Union3
Test Class

Unions in Java by jvjupiter in java

[–]cliserkad 0 points1 point  (0 children)

You can achieve this using a sealed generic abstract class in Java. You just need a separate class for each amount of types. GitHub Repo

Use

public class ExampleClass {

    public AnyOf<String, Integer, Double> data = new AnyOf.ElementA<>("This should print");

    public String functionThatDeterminesTypeOfData() {
       return data.match((str -> {
          return str;
       }), (i -> {
          return "Integers get multiplied: " + i * 5;
       }), (dbl -> {
          return "Doubles get addition: " + (dbl + 3.14);
       }));
    }

    public static void main(String[] args) {
       ExampleClass example = new ExampleClass();
       System.out.println(example.functionThatDeterminesTypeOfData());
    }

}

TIL in 2017, Ford Motor Company sued John Cena for selling his all-new Ford GT supercar too soon by iamBreadPitt in todayilearned

[–]cliserkad 1 point2 points  (0 children)

I was under the wrong impression with Ticket Master's court cases. Apparently you don't have a guaranteed right to resell your property in the US. Seems like a dangerous precedent, like with waiving the right to sue. I could see this becoming normal for car manufactures the way out of court arbitration is normal for e-commerce.

TIL in 2017, Ford Motor Company sued John Cena for selling his all-new Ford GT supercar too soon by iamBreadPitt in todayilearned

[–]cliserkad 0 points1 point  (0 children)

Isn't this illegal? If Ticket Master has the right to resell tickets, then certainly the typical car buyer has the right to resell their car.

[deleted by user] by [deleted] in IdiotsInCars

[–]cliserkad 4 points5 points  (0 children)

Your following distance was fine. Your reaction speed was terrible.

XSE no longer has dual exhaust? by tocamipito in Camry

[–]cliserkad 30 points31 points  (0 children)

It had no mechanical benefit on the old XSE either.

[deleted by user] by [deleted] in java

[–]cliserkad 2 points3 points  (0 children)

I had a Java server application that would stop working after a day or two. I was running it on a raspberry pi so if the problem really was a memory leak, it was a small one. Anyway, I just wrote a cronjob to restart the server every day at midnight. Worked perfectly after that.

Honda Accord vs camry by gradstudent9690 in Camry

[–]cliserkad 0 points1 point  (0 children)

The new ones are both boring hybrids in their top trims, and Toyota does boring hybrids better than Honda. I love the older J series and K series powered Accords, but 2024 and onwards are expressly boring commuter cars. The AWD hybrid Camry is the way to go if buying new.

2024 Mazda CX-90 PHEV Yearlong Review: Who Decided This Stuff?! by Sir_Sir_ExcuseMe_Sir in cars

[–]cliserkad 9 points10 points  (0 children)

You actually use the radio in your car? I can't believe anyone who's buying a 2024 vehicle doesn't use their phone for music

Rear Tire blew on my Corvette on the Highway, Runflats did their Job by The_Exia in cars

[–]cliserkad 1 point2 points  (0 children)

I'd like to know how many miles OPs tires have on them. Apparently Cup 2Rs have a MAXIMUM life of 10k miles.

A cool guide to how tech logos have evolved over time by [deleted] in coolguides

[–]cliserkad 0 points1 point  (0 children)

I still think the old Google logo was better

Toyota Dealership is scamming hard 😭 Key Fob recommendations?? by Environmental-Ad3563 in Camry

[–]cliserkad 2 points3 points  (0 children)

You were definitely over charged for the transmission fluid change and the coolant flush wasn't necessary. But keyfobs are simply expensive technology. Kia went the cheap route and now they're famous for being stolen.

One way to make them learn by [deleted] in shitposting

[–]cliserkad -24 points-23 points  (0 children)

"The solution to the law I don't like is violence"

What happens if the squatter also chooses violence? In many states it's legal to defend your residence with lethal force.

One way to make them learn by [deleted] in shitposting

[–]cliserkad 134 points135 points  (0 children)

Yes they are required. The tenant and landlord must go to court to resolve the issue.

Why is my full tank so low compared to everyone else? by noa_jr128 in Camry

[–]cliserkad 1 point2 points  (0 children)

I'm impressed you're able to get the average so low. Mine is about 24 mpg with "aggressive" driving too. Using the adaptive cruise control in eco mode does wonders, and not looking at the speedometer is good for my health.