samus7070

joined 1 year ago
MODERATOR OF
[–] samus7070@programming.dev 3 points 2 weeks ago (1 children)

I think the responder means that duplicate code is usually easy to refactor into single methods. Typically I see copy pasted code that is changed just a little bit. However much of a duplicated function can be broken into smaller functions and the redundant code removed in favor of calling into the functions. Often what is left then becomes easier to reason about and refactor accordingly. I love the PRs that I make which delete more code than I add but still manage to add functionality. It doesn’t happen often but it’s fun when it does.

[–] samus7070@programming.dev 1 points 3 months ago

The reflog is your friend in situations like that.

[–] samus7070@programming.dev 10 points 7 months ago

Claims top 5 and offers zero evidence and very little content beyond what an LLM might write.

 

It’s another virtual conference year with an optional and free in person opening day. https://developer.apple.com/wwdc24/

[–] samus7070@programming.dev 3 points 8 months ago (1 children)

I’m going to sound very negative here and it isn’t because I don’t like open source software. I use it and contribute to it. The problem with OSS apps is that they get cloned by people who don’t care about the license and repackaged with predatory subscriptions or with malware. In the case of malware these lowlifes go out on sites like Fiver and offer to pay unsuspecting developers to distribute the app. If the app is downloaded even once, that developer now faces a lifetime ban from distributing Android apps. I suspect similar things happen on the App Store. It’s just more visible in the Android forums I follow than it is in the iOS ones.

I have seen stories of oss apps being cloned and then Apple mistakenly not letting the original dev upload updates because the app has been flagged in their system as being a spam app or built from a template. This is usually correctable with enough email to support.

My recommendation is to keep your app closed source on both platforms. If you want to contribute to the communities, release a library or contribute to one. If you want to show How to write an app, make something minimal and trivial like a todo list. You can also create a blog.

[–] samus7070@programming.dev 2 points 8 months ago

I would guess that it has more to do with the Amazon App Store. The catalog is not very big and just a fraction of what the Play Store is.

[–] samus7070@programming.dev 10 points 11 months ago (1 children)

Baking recipes should be in weights for any dry ingredient. Converting them to volume measurements produces inaccurate results. One person may pack the flour in harder than the next. However baking requires precise ratios to be right. Change the ratios too much and that bread recipe just became a cookie recipe.

[–] samus7070@programming.dev 4 points 1 year ago (1 children)

I read his book “Extraterrestrial: The First Sign of Intelligent Life Beyond Earth” about Oumuamua. https://en.wikipedia.org/wiki/%CA%BBOumuamua it was well thought out and examines the object from many angles. He never says it was aliens. He only says that everything we know about it says it isn’t natural and could be aliens. He does say that it passed through so quickly that we really didn’t get a great look at the object and have to make some guesses about it based on observations.

 

I did something like this for analytics on the company app. It needs to record analytics to multiple providers for which a fan out pattern was a good fit. There's a single entry point to log an event. Any number of loggers then pick up that event and send it out to the provider. It has worked well and is even used for functionality inside of the app that should happen after a certain set of events occur in the app. For instance it prompts the user to rate and review the app after the user has performed a conversion event. A similar set of events will trigger the app to prompt the user to allow push notifications.

 

It's a nice explanation and exploration of how state in SwiftUI works.

 

Last year, we partnered with the team at gSkinner to develop Wonderous, a reference app to showcase the high-quality experiences possible with Flutter. One of the goals for creating Wonderous was to provide an open-source example that demonstrates best practices. In that same spirit, we audited Wonderous against Android’s large screen guidelines.

It's a Medium article but shouldn't count against any stupid quotas since it is from the Flutter team.

 

I haven't seen any of the issues mentioned in the article. I suspect it is related to the libraries the author's project is using and I may not be using. These look like good temporary workarounds until fixes in the libraries can be rolled out.

 

Android 14 is already here, so I took the documentation, experts’ reviews, and other available resources to sort out all the important changes that will affect most application developers. Let’s examine new restrictions on background mode, changes in Foreground Service, new restrictions on the work of Intent and BroadcastReceiver. In this release, we have many restrictions, but we’ve also got new features.

 

Apple introduced the new Observation framework powered by the macro feature of the Swift language. The new Observation framework, in combination with the Swift Concurrency features, allows us to replace the Combine framework that looks deprecated by Apple. This week, we will learn how to use the Observation framework to handle data flow in our apps.

I'm not sure that I buy the idea that Combine is deprecated. This does help reduce one use for it where it while increasing performance.

 

SwiftData by Example is the world's largest collection of SwiftData examples, tips, and techniques to help you build apps, solve problems, and understand how SwiftData really works.

[–] samus7070@programming.dev 1 points 1 year ago

Prior to sealed classes, I wished they were more like swift enums that could carry dynamic data and have different associated types per case. Now if I want that, I can do that with a sealed class. It’s still nice to have smarter enums if I need a little extra smarts and want to keep the logic close to the enum.

[–] samus7070@programming.dev 1 points 1 year ago

Maybe the code generator? I have no idea. It seems like there shouldn’t be an issue.

 

Here's a nice simple article explaining enhanced enums that have been around for a while but may be something overlooked. Between these and sealed classes I think Dart has an excellent story for pattern matching.

 

async/await in Swift was introduced with iOS 15, and I would guess that at this point you probably already know how to use it. But have you ever wondered how async/await works internally? Or maybe why it looks and behaves the way it does, or even why was it even introduced in the first place?

 

Randal Schwartz takes the .when from Riverpod's AsyncValue and creates it for an AsyncSnapshot, using Dart 3 pattern matching.

[–] samus7070@programming.dev 1 points 1 year ago

It works fine for me. Does your phone trust the computer? Did Xcode properly prepare the phone for development? Developer mode must also be turned on in the phone’s settings. It’s under privacy and security.

[–] samus7070@programming.dev 1 points 1 year ago

I find zipline to be interesting and so is the companion project treehouse. My main problem would be basing an application off of it at any company that isn't CashApp. If I start using a 3rd party open source dependency I always consider how vital it is and how comfortable I would be trying to maintain and support it if the creators decided to abandon it. That or how easy would it be to switch to something similar. It just feels risky but I do like reading about it from the sidelines.

[–] samus7070@programming.dev 2 points 1 year ago

Fellow American here, I definitely read it the wrong way.

view more: next ›