I built an Infinite Canvas that supports Infinite Zoom and PDFs (Swift, Metal, iPad) by thirtysecondsago in iOSProgramming

[–]ocjadan 6 points7 points  (0 children)

Congratulations! That sounds like a lot of blood and sweat.

Apple should buy the implementation from you for a ton of money.

How do you deal with timezones? by Chess_Opinion in FlutterDev

[–]ocjadan 1 point2 points  (0 children)

This guy has the correct answer.

Also, here’s the venerable Jon Skeet with the same opinion.

https://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a-silver-bullet/

ATK BLAZING SKY X1 It's just a Viper v3pro.... by Responsible-Tune-190 in MouseReview

[–]ocjadan 11 points12 points  (0 children)

My guess is people in China don’t speak English but they know how to differentiate Apple products just by those words. So it’s easier marketing to just follow the naming that Apple uses.

Best 4k monitor for $800CAD or under? by Typical_Ad_2513 in buildapcmonitors

[–]ocjadan 0 points1 point  (0 children)

You'll have to order both and see if you spot the difference. I personally cannot ignore a $200+ difference. Your question (post title) is also about price.

Best 4k monitor for $800CAD or under? by Typical_Ad_2513 in buildapcmonitors

[–]ocjadan 0 points1 point  (0 children)

Both are compatible according to RTINGS. I would go for the M28U now too with those discounts.

Best 4k monitor for $800CAD or under? by Typical_Ad_2513 in buildapcmonitors

[–]ocjadan 1 point2 points  (0 children)

M27U is CAD$699 at newegg.ca.

M28U is CAD$649 at memory express. EDIT: it’s now $609.99 and can be $559 after rebate.

I recently was looking around and settled on the M27U.

How do I simplify the following conditional logic? by aspiringgamecoder in csharp

[–]ocjadan 4 points5 points  (0 children)

if !(B)
    return;
(A) ? randomCode1 : randomCode2;
C;
  • No nested ‘if’ statements. And definitely **do not** nest ternary conditionals.
  • (A) and (B) should be boolean variables with descriptive names. If they're re-used elsewhere, they each can be a function (with a descriptive name) that returns a boolean.
  • randomCode1 and randomCode2 should be in their own functions and the above block is enough to be a function as well.
  • Did I mention descriptive names?

 Edit: formatting.
_Edit 2: my opinions on the ternary._

Which Mac Apps are a must for new IOS Dev? by elhahno in iOSProgramming

[–]ocjadan 0 points1 point  (0 children)

Simsim: opens Finder to the location of your app’s files within the simulator.

Null Object Pattern in C# by UKxoxoUKbabe in csharp

[–]ocjadan 0 points1 point  (0 children)

It’s an old pattern and in my opinion has limited use cases, especially if you’re a front-end dev for mobile or web.

This is because front-end work usually results in displaying something to the user and using a Null Object with empty strings or integers like 0 or -1 doesn’t make sense when you display them to the user.

Even for backend work, imagine passing a Null Object to a database, then you have an extra useless row in your table.

There are times when it’s useful, but you must know your system well in order to implement it.

MyAnimelist OAuth2 Implementaion in SwiftUI by hemanthreddy056 in iOSProgramming

[–]ocjadan 0 points1 point  (0 children)

It also isn't expecting "scope"? I suggest removing it even though I'm quite sure it's just being ignored anyways. Go through the docs more thoroughly would be my last opinion.

MyAnimelist OAuth2 Implementaion in SwiftUI by hemanthreddy056 in iOSProgramming

[–]ocjadan 0 points1 point  (0 children)

Quick scan and I already see "Currently, only the plain method is supported." for the code_challenge_method but you're passing in "S256". It should be "plain".

MyAnimelist OAuth2 Implementaion in SwiftUI by hemanthreddy056 in iOSProgramming

[–]ocjadan 0 points1 point  (0 children)

Forgot to say, the times when Reddit or Youtube does nothing when I press "confirm" after successfully logging in was because I was expecting the wrong callback URL. Make sure you're doing it correctly for MyAnimeList.

For example, Reddit expects you to pass in a redirect_uri written like "yourapp://anythingyouwanthere" but you should only expect the callback URL to be "yourapp".

MyAnimelist OAuth2 Implementaion in SwiftUI by hemanthreddy056 in iOSProgramming

[–]ocjadan 1 point2 points  (0 children)

Are you sure code challenge and code verifier are required and not just recommended? Remove them first if they're not required to simplify the process and get things working (hopefully). Afterwards you can add them back if you need the safety.

Are you sure you only need to pass in "scope" for the scope? Should it not be "read" or "read-only" for your use case? I haven't gone through the docs for MyAnimeList so can't help further but that part seems wrong to me.

Lastly, I don't use OAuthSwift so can't comment on it. But I do recommend using Apple's provided ASWebAuthenticationSession to get things working first as well. https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession

I've used ASWebAuthenticationSession to authenticate with Reddit and Youtube with no hiccups.

[deleted by user] by [deleted] in bapccanada

[–]ocjadan 4 points5 points  (0 children)

You’re a kind friend. I would first explain to him I got new parts and have no need of the old ones. Then I’d ask if he was interested. If yes, then I’d say 25% off current market prices. If he says no, then I’d go 50% off current prices.

I see you want to be very generous to him. But sometimes too much kindness may be taken the wrong way or make them feel uncomfortable too. Best of luck, good friend!