toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

240
active users

#timers

0 posts0 participants0 posts today

🕒 What if countdowns weren’t circles?

Today I had this random idea during a convo with a friend:
“What if a countdown looked like a triangle?”

Turns out… shapes make progress more visible than a circle.
So I prototyped it in Timix — triangle, square, hexagon… each side is a timer.

Availble on TestFlight → testflight.apple.com/join/3hZ5
More → rogy.app/timix

Would love your thoughts!
#TimixApp #Prototype #IndieDev #SwiftUI #UX #Timers #iOSDev

The next release of #swad will probably bring not a single new feature, but focus on improvements, especially regarding #performance. Support for using #kqueue (#FreeBSD et al) to handle #signals is a part of it (which is done and works). Still unsure whether I'll also add support for #Linux' #signalfd. Using kqueue also as a better backend for #timers is on the list.

Another hopefully quite relevant change is here:

github.com/Zirias/poser/commit

In short, so far my #poser lib was always awaiting readiness notification (from kqueue, or #epoll on Linux, or select/poll for other platforms) before doing any read or write on a socket. This is the ideal approach for reads, because in the common case, a socket is NOT ready for reading ... our kernel must have received something from the remote end first. But for writes, it's not so ideal. The common case is that a socket IS ready to write (because there's space left in the kernel's send buffers). So, just try it, and only register for notifications if it ever fails, makes more sense. Avoids pointless waiting and pointless events, and e.g. with epoll, even unnecessary syscalls. 😉

GitHubConnection: Try writing without notification · Zirias/poser@798f235Don't directly register for "ready to write" notifications when attempting to write something. Instead, when there's something to write at the end of the event loop, try just doin...
Continued thread

I really enjoy *deleting code* (when the reason is that I came up with a better solution) 😁

github.com/Zirias/xmoji/commit

A GUI application needs individual timers for several things (tooltips, cursor blinking, timeouts communicating with other clients, etc). Using #POSIX interval #timers independently of my event loop was ugly:

* I had to use the messy "thread" notification method, which also required a dummy pipe to get the event back to the main thread, wasting two file descriptors.
* I had to allocate a POSIX timer for each of my timer instances. That's a problem, because these are very limited (typically 32). So I had to find ways to share timer instances in my application code, also ugly.

Moving the implementation to my "poser" lib allows to use signals for notification and to dynamically map between POSIX timers and instances of the timer class, so I only need as many POSIX timers as timers are concurrently running. Added benefit: Another ready-to-use component in my personal toolbox 😎

GitHubDrop Timer, use PSC_Timer instead · Zirias/xmoji@d2f4f77Moved timer implementation to poser-core, where it can be integrated with the event loop. This way, it can use notification by signals instead of the clunky thread notification interface, also elim...

⏰ Best Practice for Using Timers in .NET C# ⏳

➡ When using System.Timers.Timer in your .NET C# application, you might face problems with abstracting it and being able to cover your modules with Unit Tests.

➡ In this article, we would be discussing the Best Practices on how to conquer these challenges and by the end you would be able to achieve 100% coverage of your modules.

developmentsimplyput.com/post/

📭 developmentsimplyput.com/subsc

A few years back, I wrote a timer app for my wife since she was tired of how you can’t have more than one iOS timer running at a time. She would want to have two or more timers running at the same time and you just couldn’t do it with the default iOS timer …

At that time, I was heavily into Flutter and so did the app in Flutter so that we could have the timer on either iOS or Android.

After some time, my wife stopped using the app for some reason (we don’t remember why now) and I stopped working on it.

A few days ago, I wanted a recurring timer — one which would fire hourly for say 10 hours during the day and couldn’t find something that worked and wasn’t full of ads 🙂 So I went back to my old timer app.

So much time had passed that the Flutter app took me about a day to get back to working condition. But I kept feeling as if the process was slow … too slow. Just compiling the code to run the app would take a couple of minutes and that just added up. Plus there were other issues.

So I did some scrounging around and found that I had another version of the code — an early attempt to turn the app into a SwiftUI app. It took me only about a day of work and I already have that doing the basic stuff and getting close to feature parity to the Flutter version.

It’s interesting how different languages evolve and change over time and what you thought was the best at one point no longer is …

Screenshots for comparison below.

#Timers #Coding #iOS #Flutter #SwiftUI
Screenshot of an iOS app with m…
Screenshot of an iOS app writte…