Profile avatar
davetron5000.com
Author of Sustainable Web Development with Ruby On Rails, https://sustainable-rails.com - former Mood Health, Stitch Fix, LivingSocial, Opower. I play bass and love to scuba dive.
289 posts 430 followers 59 following
Regular Contributor
Active Commenter

Anyone know how to initiate drag and drop on Mobile Safari? It is documented to work, and I have implemented it such that it works in a desktop browser, but I cannot get it to work on mobile safari. Even demos of open source libraries don't seem to work. What am I doing wrong?

One downside of Ruby's ability to make configuration easy in the base case is that you end up having configuration spread all over the place: initializers, env vars, command line flags, yaml files, etc. All to avoid writing code to instantiate a class.

What I see is if you define elements before DOM is loaded, when connectedCallback() is called, element has no innards, so making an "HTML Custom Element" is very hard to do. Using mutation observers is extremely fraught because the element may mutate itself and you can get stuck in a loop

IME flexibility like this is a net negative. What I do is: • define() method like this that uses a static tagName • no option to change it - you will learn to love my (namespaced) tag names • MyLib.defineElements() defines them all, but you must call it • or call define() on your own per element

Been digging into the browser Performance API. It's very clear why a lot of websites are slow and my Just Add More React™ doesn't ring alarm bells. The API is inconsistently supported across browsers and pretty difficult to use. Sure, I can install google's 300K library but I should not have to…

When creating data types in Ruby, I often make a factory method that does 2 things you can't do in an initializer: 1 - if the argument is nil, return nil 2 - if the argument is already of the data type, return it https://gist.github.com/davetron5000/1a6b394f4295f1b70062baab013d297f#file-factory-rb

OTel's docs are so relentlessly bad (impenetrable specs and oversimplistic examples + out of date API docs) that I had to use ChatGPT to understand how to use it. And, it's answers were mostly correct and super helpful. I would be at a standstill without it.

How much would life improve if a) this code was in Ruby stdlib and b) `nil?` was a protocol to control falseyness in an if statement? I can't imagine a single problem this would cause nor any way to abuse these features 😈 https://gist.github.com/davetron5000/e3fd4b90eadf22ca2bd192607769e918

I honestly think the continued layoffs in tech are not AI replacing programmers - it's a correction from years of overhiring. I interviewed someone that was a Dir of E at Twitter and they told me that a HUNDRED people worked on their mobile app. That's just not necessary.

Cool, the dems are going to the time-honored strategy that totally works and has won elections: SMS spamming the shit out me for money to be used for…I don't know what. WTF is wrong with these people? Of note, I live in DC so have no senator and my rep is non-voting.

I have tried to use the new image playgrounds twice. The first time, I described "Eddie Van Halen and Ronnie James Dio" and got an old lady. The second time I clicked on myself and got an absolutely horrifying and terrible caricature of myself. Who the fuck asked for this?!?!?!

Doing some research about some scuba equipment and was reminded what absolute shitheads people on forums can be. There was a period between the reign of PHPBB and the death of Stack Overflow where I never had to go to a forum to find info. It was so nice.

Got a call from comcast (I don't use them but I manage my parents' account) and they wanted to validate stuff. They sent me a text asking for the code. In case it was phishing, I gave a false code. They accepted it. So now I wonder if it was comcast and they just need to know if I got ANY code?

If you bought https://sustainable-rails.com from Pragmatic Bookshelf, the updates I spoke of earlier should be available to you now. Changelog: https://sustainable-rails.com/changelog.html If you have any issues, reach out to https://pragprog.com/support/ for support, but I can also help, too.