samus7070

joined 1 year ago
MODERATOR OF
[–] samus7070 2 points 1 week ago

Similar to the concept of asking why five times, there’s an idea that who you ask should also be six levels deep from the CEO. You’re not going to be able to know everything so cultivate contacts in low places. There are the people that are closest to the problem and have the best answers.

From a more hands on side, perhaps you can convince your boss to let you embed in different teams for a sprint once per quarter.

[–] samus7070 3 points 3 weeks ago (3 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 14 points 1 month ago (1 children)

If your primary exposure to programming is only typescript or JavaScript maybe you shouldn’t be jumping straight into something like rust. JS is a high level language and rust is aimed at the lower levels where things can’t be as automatic. There are many languages out there like C#, Kotlin and Swift that will help you get used to the idea of strong types and immutability.

[–] samus7070 2 points 3 months ago

Such a polarizing book. I like it but I tell everyone that I recommend it to, to not go to the depths that the book recommends. Never go full Clean Code.

[–] samus7070 2 points 3 months ago

The reflog is your friend in situations like that.

[–] samus7070 1 points 4 months ago

I think there might be something to do that in Foundation. You would have to cast to an NSString to access it though. I might be mistaken and there’s only a title case method. Sentence case is easy minus the not converting proper names to lower case problem.

[–] samus7070 6 points 6 months ago (1 children)

I would argue that Biden can say and do plenty of crazy things as long as he never goes full Trump.

[–] samus7070 4 points 6 months ago

That’s really a lame dividend. I have no idea why the stock would shoot up 15% to $160 on the news that shareholders will receive $0.20 per share. Even with the buyback program it won’t be that big of a boost. The better asset allocation would’ve been to keep innovating but I guess they’re out of ideas?

[–] samus7070 9 points 6 months ago (1 children)

It was originally meant as a better JavaScript and it was. It failed when none of the other browsers expressed interest in supporting it. It languished for a while and then was taken up by the Flutter team. At the time Flutter took it up it was somewhere around the level of Java 8 in features but not quite on par. Since then it’s seen some massive improvements to the type system and language. It’s completely null sound, not just null safe like Kotlin. It recently got records/tuples and one of the more capable pattern matching syntaxes I’ve ever seen in a functional imperative hybrid language. The next stable version of dart will introduce a compiler macro system that is very promising. The syntax isn’t always the prettiest due to it trying to not totally break old code. I do think that it offers a wide range of modern language features that competes heavily with Swift and Kotlin in the mobile space.

[–] samus7070 11 points 7 months ago

The only things JSON has over xml is that it’s easier to write a parser for it and the format is less verbose and less complicated. There are extensions to JSON that can add features that xml has and the JSON spec doesn’t have. Overall the xml spec is bigger and has more features but that also makes it overkill for many of the cases that it would be used in.

[–] samus7070 16 points 7 months ago

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

[–] samus7070 1 points 7 months ago

Because ChatGPT thought that was a pro?

8
WWDC24 Announced (self.ios_dev)
submitted 7 months ago by samus7070 to c/ios_dev
 

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

8
Masking Third Party Dependencies (www.swiftjectivec.com)
submitted 1 year ago by samus7070 to c/ios_dev
 

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.

2
submitted 1 year ago by samus7070 to c/ios_dev
 

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.

4
Swift Data by Example (www.hackingwithswift.com)
submitted 1 year ago by samus7070 to c/ios_dev
 

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.

 

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.

view more: next ›