Readit News logoReadit News
joe_fishfish commented on Traps to Developers   qouteall.fun/qouteall-blo... · Posted by u/qouteall
mdaniel · 8 days ago
> A method that returns Optional<T> may return null.

projects that do this drive me bananas

If I had the emotional energy, I'd open a JEP for a new @java.lang.NonNullReference and any type annotated with it would be a compiler error to assign null to it

  public interface Alpha {}
  @java.lang.NonNullReference
  public interface Beta {}

  Alpha a = null; // ok
  Beta b = null; // compiler error
javac will tolerate this

  Beta b;
  if (Random.randBoolean()) {
    b = getBeta();
  } else {
    b = newBeta();
  }
but I would need to squint at the language specification to see if dead code elimination is a nicety or a formality

  Beta b;
  if (true) {
    b = getBeta();
  } else {
    b = null; // I believe this will be elided and thus technically legal
  }

joe_fishfish · 7 days ago
In Kotlin this would already be a compile error, no need for another annotation.
joe_fishfish commented on What’s new in Swift 6.2   hackingwithswift.com/arti... · Posted by u/ingve
cosmic_cheese · 3 months ago
As someone frequently flipping between Swift and Kotlin, while I don’t necessarily feel like Swift is massively superior, I often find myself thinking “why is this so quirky and pedantic” when writing Kotlin.

For example, I really really wish Kotlin would adopt Swift style if let/guard let statements. Kotlin smart casting doesn’t work just often enough to not be able to consistently rely on it and the foo?.let { } syntax is ugly.

Combined with the JVM warts of gradle and jankiness of code stripping and obfuscation, generally speaking if I could opt to use Swift in place of Kotlin for Android dev I would do so in a heartbeat.

joe_fishfish · 3 months ago
Ha, I switch between the two as well, but I feel the opposite. Kotlin is much more intuitive for me, and Swift is more clunky. I do miss guard lets in Kotlin, but that’s about it.
joe_fishfish commented on UK ICO response to Google's policy change on device fingerprinting   ico.org.uk/about-the-ico/... · Posted by u/walterbell
madaxe_again · 8 months ago
The hell they do.

Enforcement action by the IÇO is as rare as hen’s teeth, and when they do enforce, it’s a mild slap on the wrist for large businesses, and “put you out of business” for small businesses. Lose 2,000,000 sets of customer information because you accidentally left it public? Reprimand. Don’t do it again. 1000 spam calls? £100k fine. Go to prison.

If you have a U.K. Ltd company, you must pay them their annual fee.

Quite the gig they have. Do next to nothing, collect a tax on every business in the country.

Electoral commission: 40,000,000 U.K. voter records leaked. No fine. https://ico.org.uk/action-weve-taken/enforcement/the-elector...

Random company, 60,000 spam SMS, £120k fine. https://ico.org.uk/action-weve-taken/enforcement/quick-tax-c...

Make it make sense.

joe_fishfish · 8 months ago
I don’t have a problem with the fines for the spam texters, if anything it should be higher, but not punishing the electoral commission for that is utterly insane.
joe_fishfish commented on I kind of like rebasing   rednafi.com/misc/on_rebas... · Posted by u/nalgeon
Carrok · a year ago
> Some like to rebase, while others prefer to keep the disorganized records.

Keeping disorganized records is the only thing you can say in favor of merge commits, and I'm unconvinced that's a positive thing to begin with.

joe_fishfish · a year ago
You can’t do stacked PRs without merge commits, not unless you really like conflicts anyway.
joe_fishfish commented on A Rant about Front-end Development   blog.frankmtaylor.com/202... · Posted by u/xlinux
__MatrixMan__ · a year ago
I think the flaw is that we've got one type of browser for everything.

Let's just have a bank browser for banking and a restaurants browser for deciding where to eat. Then the banker need only indicate that the account is overdrawn and the restauranteur need only indicate that the fries are gluten free.

The number of people who need to care about how these things are presented to the user could decrease by a factor of 1000 if we just standardized a little and stopped trying to control every little thing.

joe_fishfish · a year ago
> a bank browser for browsing and a restaurants browser for deciding where to eat

you mean like native mobile apps?

joe_fishfish commented on Why is Android Development so difficult/complex? (compared to Web and Desktop)    · Posted by u/pyeri
joe_fishfish · a year ago
Couldn’t agree less. I’ve been a developer for nearly 20 years, working with Python, PHP, JavaScript, ObjC, Swift, Java, bash scripting, SQL, Terraform, and a bunch of others. Written code for data transformations, web servers, client side JS apps, native mobile apps, and games.

Android has been my favourite platform to work with and has offered the best developer experience I’ve found. It’s not particularly close. The SDK has improved significantly over the years, the IDE is wonderful, the feedback loops are short, Kotlin hits the sweet spot between functional and OO code, and Compose is a joy. Although yes, Gradle is a sore spot.

IMO the reason why Google have gone all-in on Android Studio is because it’s really, really good. Compare it to Xcode. If you’ve never used a JetBrains IDE, it can feel a little unfamiliar, but I’ve never felt as productive in any other programming environment.

joe_fishfish commented on Don't DRY Your Code Prematurely   testing.googleblog.com/20... · Posted by u/thunderbong
haswell · a year ago
One of the #1 issues I’ve seen with DRY over the years seems to stem from a misunderstanding of what it means.

DRY is not just about code duplication, it’s about information/knowledge duplication, and code happens to be one representation of information.

Hyper focusing on code duplication quickly gets into premature optimization territory, and can result in DRYing things that don’t make sense. Focusing on information duplication leaves some leeway for the code and helps identify which parts of the code actually need DRY.

The difference is important, and later editions of the Pragmatic Programmer call this out specifically. But the concept of DRY often gets a bit twisted in my experience.

joe_fishfish · a year ago
This is a more insightful comment than the comment at the top, and also more useful than the blog post.
joe_fishfish commented on The success of EVs is massively underreported   evuniverse.io/p/evsales20... · Posted by u/juurikas
mschuster91 · a year ago
I mean, I'm firmly in the pro-EV camp, but how the fuck are lower-class people not rioting in the streets daily? 3.6k a year just because you're too poor to afford a new 40k+ vehicle, and that on top of inflation and Brexit aftereffects? That's frankly insane.
joe_fishfish · a year ago
They're not rioting because it's not true
joe_fishfish commented on IAC sold 17 apps to Bending Spoons. $100M deal, all 330 employees fired   twitter.com/rjonesy/statu... · Posted by u/tomaskafka
magicalhippo · 2 years ago
Speaking of, is there a good replacement for Meetup if you just want to organize some informal activities, like a user group or going biking?
joe_fishfish · 2 years ago
Sadly most people (at least in my country) use Facebook for this.
joe_fishfish commented on Staring at a Wall: Embracing Deliberate Boredom   ch3ngl0rd.com/staring-at-... · Posted by u/ch3ngl0rd
basisword · 2 years ago
The options aren’t iPad or uncontrollable noise. I think you’re missing the third option - parenting the kids. Disciplining children (even just verbally) seems to be something nobody wants to do anymore. If I was told to be quiet as a kid I did it because I knew I’d get in trouble otherwise.
joe_fishfish · 2 years ago
You don’t have children.

u/joe_fishfish

KarmaCake day293August 31, 2007View Original