Don’t you hate when the computer does exactly what you told it do versus what you think you told it to? I’ve been burned in the past with lazy collection/stream/iterator operator evaluations in the past. Specifically I am burned by the fact that Dart doesn’t force you to explicitly ask for a new iterator. It is a common thing to be careful about but it burned me in the refactoring of my Twitter Account Shredder just now. Even though it only burned up a couple minutes of time I figured I’d re-document for posterity here for others. I had another more detailed post on the topic is here earlier this year.
(More ...)As a part of leaving Twitter I decided to write a script that would delete all of my Tweets, Retweets, Likes, and Follows. The idea was that when it was done I would again have a bare profile. First I downloaded my archive. In it were over 1500 follows, 20,000 tweets, and 95,000 likes. Due to rate limits placed on the Twitter API by Twitter it is only possible to go through 200 delete operations per hour. Therefore deleting all that data would take over three weeks. That is why I was shocked to see that the operation completed in about two days. The more I dug into what was happening the more I saw how amiss things were with Twitter’s data consistency.
(More ...)In dart one can have optional named parameters instead of positional parameters. This not only allows one to allow named arguments when calling methods but also default values:
void writeCount({int count = 5, String prefix = ''}) {
List.generate(count, (i) => i + 1).forEach((e) => print('$prefix$e'));
}
void main(List<String> arguments) {
writeCount();
writeCount(count: 3);
writeCount(count: 3, prefix: 'Last one: ');
}
As I frequently lament the over-concentration of money, power, and control into the same few big companies I try to counter that by looking at alternatives. One I found which works okay but not great has been Bookshop.org as a replacement for Amazon. Their prices are a bit higher and delivery times a bit longer but their big advantage is that they are networking small bookshops and providing ways to see what is in local bookshops that you can visit rather than it always be delivery. The biggest detractor for me isn’t any of the above. It is that I don’t generally want to buy or read hard copy. I want to buy digital books. In the past I’ve used Kodo, Kindle, and some other readers. I even started working on my own mobile e-book reader to run under Blackberry a long time ago (that went nowhere of course). While exploring Bookshop I noticed they had a tie in to an e-book platform named MyMustReads . I therefore decided to give it a try to see how I liked it. I wish I could say I was so blown away it’d be easy to ditch Kindle for this but sadly that is not the state of affairs.
(More ...)one month ago I started a new digital/fast news detox experiment . I haven’t had a perfect run of it. I’ve certainly indulged in a bit more social media than I should have, on Friendica mostly but a little bit on Facebook. I definitely indulged more in instant messaging to fill in some of the time. I also wasn’t good about timeboxing my RSS feed reading to the evening hour either. I was bad about cutting down on my YouTube time as well, but I did keep that almost exclusively to tech and food topics not current events and not short clips either. Even with all of that it was a radical change in my consumption habits and a radical reduction in the dopamine fix seeking. It was successful enough I plan on rolling it into a second month with some tweaks.
(More ...)I’ve had a Friendica account on the fediverse almost since day one, even if I didn’t actively use it initially. In 2018 I started heavily using Diaspora and Mastodon instead of it since I preferred their simpler UIs. It wasn’t until early 2019 that I revisited Friendica since it tied together all of the Fediverse into one experience. It has been my primary portal into all of those networks ever since. Despite a lot of effort by a lot of people it hasn’t been all roses though. As I want to adopt a social media system that I could recommend to my dad the warts of the system still weigh on me. As I host my own I see some big ones there too. What I need to decide is if I want to do the leap to help trying to fix them, if they are fixable, or do the leap off of the platform into something else.
(More ...)My social media posts on the most vexing of topics, the current state of politics in my state and country, are probably a giant flag about how totally torqued up I am about things. A day doesn’t go by that there isn’t some new insanity that is visited on non-Republicans and Independents by the Republicans and the completely inept coverage of these things in the mainstream media out of fear of being labeled “biased”. I can’t even blame the social media algorithms for this. I’m doing it to myself since my social media experience is all self-created and visited lists that are in reverse chronological order. I can feel the compulsion to check over and over to see what new fucked up thing has happened and how it isn’t covered at all, covered with the Republican framing, or at best bothesidesismed to death by the main stream media, to say nothing for the treatment in the right wing media silos. To what end though? I’m just driving myself crazy with this stuff. I’m beyond trying to stay informed. I’m essentially beating myself up out of compulsion, lack of reactive response control, and probably a subconscious craving for the dopamine hit. Combine that with the impending take over of Twitter by a sociopathic narcissistic megalomaniac, to go along with the one running Facebook, my hand is probably going to be pushed on radically changing my social media behaviors anyway. It is for all those reasons I’m going to try to do another digital detox.
(More ...)I spent way too long this morning trying to debug some processing code in a Flutter app when I discovered that I was getting bitten by an artifact of lazy evalution of a collection stream operator. That caused me to do a deep dive of how they work in Dart and other languages. For posterity and my own memory I am documenting it all here.
(More ...)The year was 2005. The news of the father of Linux, Linus Torvalds, rage quitting his source code management system (SCM), BitKeeper, spread widely because he said he was stopping all his Linux development until he made a new SCM system that would be better than all others. Could he pull off another genius move like he did with Linux again? Would it in practice be just for his use or would it be the new defacto standard that would revolutionize how we did source code management?
We now know that he did hit another home run with his SCM system, called Git. It is the defacto standard for SCMs around the world. It is no exaggeration to say that it revolutionized the scalability of development and has transformed the way we work with SCM systems. We forget how much harder it was to imagine this endpoint back then though. Tripping across this presentation he gave on Git in 2007 at Google really brought all those memories forward for me though.
(More ...)Yesterday’s post on Server Side Dart REST Framework performance really started from what I’m documenting today: figuring out if Go was really much faster than Dart for REST service work. I’m taking time in the month of February to try to learn Go. I came up with the idea of making a little E-Book REST service which takes an epub book from Project Gutenberg and re-hosts it as a series of chapters in simplified text complete with linking between chapters, table of contents, etc. Unfortunately the only epub reader library for Go doesn’t work well. I did find a good one for Dart though! I then began thinking about writing the whole thing in Dart, or at least the epub processor. That would defeat the purpose of the project in the first place but it did get me asking myself the question, “Is Go really going to be any faster than Dart for this sort of thing?” And thus this whole project began. The previous post detailed the various layers of Dart performance. This is looking at Dart vs. the built in Go HTTP server library. The code and data can be found in this Gitlab repo .
(More ...)