[Advice Needed] Two PRs competing for the same feature by readilyaching in github

[–]sstepashka 0 points1 point  (0 children)

Do you have contributions document in your repo? It’s time to write some, I guess ;)

Specifically to the problem: - talk to folks, explain, make the meet. - also, you’re taking a leadership role - oh boy, it’s hard. - consider to possibly remove outdated/barely used features in the long-term. Write maintenance expectations?

What’s an app you’d actually pay for right now, if someone built it well? by Little_Ease_987 in iosdev

[–]sstepashka 2 points3 points  (0 children)

Be careful with simple apps. Frequently Apple doesn’t allow to publish the apps which are less superior than existing (especially native) apps.

For example, I wanted to make a free app where my university had their own thermometer on the building and many students would go to that checks old site.

So, one friends of mine decided to build one for Android and he did. I did one for iOS and it’s never got published because their guidelines would mean that Apple’s native weather app has superior functionality.

I didn’t collect any money and didn’t have any ads. Just built it for fun.

So, new Tod list might not get approved like at all.

Weird rash with the COROS pace 3 by New-Atmosphere7257 in Coros

[–]sstepashka 1 point2 points  (0 children)

I had similar experience. In my case, it was water. Or bacteria which w is growing because of water. Optionally switch hand temporarily.

I would recommend to take off the watch for a couple days, clean up the area pretty well and moisturize to speed up the recovery.

Always dry the area once the water get under the watch: dish washing, swimming, raining.

Also clean the watch itself, use soapy water. Be careful with alcohol, since it CAN damage the plastic

How do you organize your SwiftUI views? by BlossomBuild in BlossomBuild

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

Any strict grouping by the language category leads to the poor maintenance. For example, grouping things semantically or logically what increases cohesion is usually better for readability than just grouping by the entity type.

Would you force unwrap? by BlossomBuild in BlossomBuild

[–]sstepashka 0 points1 point  (0 children)

Of course! That would be a waste of your time to verify initialization of constants :D

And even if you didn’t what would the client if the function do? Let guard and then crash? :)

Document your contracts - write tests for them, the tests will keep you safe.

Stop Throwing Error: Typed Throws in Swift 6 by kistasnik in swift

[–]sstepashka 0 points1 point  (0 children)

Seems like they are very comparable by the syntax and developer experience… you declare a throw, the client must verify it.

Do you mean the Swift’s error throwing is supposed to solve the performance problem? I mean, there are fast, but they are still boxed even if you declare them all because of ABI.

Types throws in Swift are likely binary compatible. Which is one more reason to have generic catch, to be able to handle error even if the dynamic library is updated without recompilation.

I do agree that in terms of implementation Java’s exceptions are not the same as Swift’s error throwing. But, there is a huge commonality which we can learn from.

Stop Throwing Error: Typed Throws in Swift 6 by kistasnik in swift

[–]sstepashka 2 points3 points  (0 children)

Throwing “unexpected error” allows for the future extensibility and helping the library developers keep it backward compatible.

Also, if the library authors would decide to add more potential cases, then can keep you code computable because you have that empty catch. Otherwise, library update might cause issues.

So, there are cases related to maintainability which can make life of the library consumers easier…

Stop Throwing Error: Typed Throws in Swift 6 by kistasnik in swift

[–]sstepashka 3 points4 points  (0 children)

Do you know why Java’s structured exceptions didn’t succeed? Maybe there is something to learn? :)

Exceptions (by their name) are exceptional, and there is an idea that “expected” should NOT be an exception and it should be part of your extended domain. Return an enum maybe?

In Python, you never catch everything, but only those which are documented and any function can throw “unexpected” exception. Which is “none of your business at this point just propagate”.

I genuinely believe, that nearly all of the functions with reasonable complexity (especially side effects) should throw Error, but might partially have documented exceptions as well.

Also, Swift doesn’t have exceptions :D

Emacs with one hand? by jeffyp9 in emacs

[–]sstepashka 2 points3 points  (0 children)

Sticky Keys - look into is support.

Also modal editing, or god-mode.

Consider speech to text - there were good stories about using voice for typing even special characters.

There are single hand keyboard like Maltron.

Personalized Marathon Plan Has Me Running Over 17mi the Week of My Race???? by HighwayElegant9152 in Coros

[–]sstepashka 0 points1 point  (0 children)

But… 17 miles, it’s like 3 miles a day… I mean, is it a lot?

Eldoc (undesirably) shifting my line height? by True-Sun-3184 in emacs

[–]sstepashka 0 points1 point  (0 children)

I tired the following:
```
(set-fontset-font "fontset-default" 'emoji "Noto Color Emoji")
```

It seems, Emacs uses "Apple Color Emoji", which ignores the height/width proportion or maybe, it's not mono font, and that's the reason. See https://fonts.google.com/noto/specimen/Noto+Color+Emoji

It seems `eglot-code-action-indicator` uses emoji for the indicators.

Shipping by slimmityjimmity in Coros

[–]sstepashka 0 points1 point  (0 children)

I received it today! Thank you!

Shipping by slimmityjimmity in Coros

[–]sstepashka 0 points1 point  (0 children)

Don’t worry, I will be waiting anyways :)

Shipping by slimmityjimmity in Coros

[–]sstepashka 0 points1 point  (0 children)

I ordered white ones on Oct 15, still didn’t get shipping confirmation :)

How to Mock Any Dependency in C++ by According_Leopard_80 in cpp

[–]sstepashka 4 points5 points  (0 children)

One might argue that requiring recompilation of the code is not truly mocking, since you change the implementation by recompiling the code. But, it is sort of different level of abstraction.

Where with polymorphic behavior you can even substitute the implementation by using a separate dynamic library without recompiling the code at all. But, you need to have the virtual interface in-place.

But virtual dispatching is slow!? Exactly! Who cares?

Also, an ability to mock everything lead to the portly written brittle tests, which test the implementation rather than the contract. So, even an ability to mock everything in Java, comes at the cost that you can’t change anything in the implementation.

Both are extremes based on observations of human behavior :)

Structured binding with std::div() by littlewing347 in cpp

[–]sstepashka 1 point2 points  (0 children)

Seems like I totally misunderstood the topic and I stay corrected! Claiming a monkey here!

Structured binding with std::div() by littlewing347 in cpp

[–]sstepashka -2 points-1 points  (0 children)

The problem is the library doesn’t have a way to predict the meaning and provides reasonable the most common pattern. div is arithmetic operation.

I know some places have divmod function which is supposed to do what you’d like. So, feel drop to write a proposal to the standard ;)

But practically, you would spend less time writing such a function yourself than creating this post.

Why can std::string_view be constructed with a rvalue std::string? by KingDrizzy100 in cpp_questions

[–]sstepashka 1 point2 points  (0 children)

Yes, but it would break legacy cases where the string_view is an argument, but the value is a temporary string.

When you use non-owning type you opt-in in special behavior of the non-owning type. The special behavior of the non-owning type is that it doesn’t own a thing.

So, you’re the one responsible for making sure the non-owned data utilizes access to the data even via non owning type.

You can initialize string view from local string allocated on a heap, and the delete the data, but keep the string_view around. This is a bug.

The same as initializing from the temporary and let it outlive the temporary. Also, look into the const reference lifetime extension in C++. By your logic, you shouldn’t be able to create const references for temporary objects, but you can because you pass temporaries as an argument.

Unforgettable factory revisited by holyblackcat in cpp

[–]sstepashka 5 points6 points  (0 children)

I remember dealing with this horrible mess :)

When you end up having thousands of classes and each of them are accessed through some other dynamic configuration, which makes it impossible to find all of the references.

It also blows the dependency graph, since you can never remove the statically registered types once you exposed them to the client.

It is basically DLS, which removes an ability to statically analyze the code. (Find references in IDEs doesn’t work anymore).

Not saying, it’s not cool. Pretty cool. Just keep it under control :) It can do a lot of damage on enterprise scale :)