8.5 C
New York
Monday, June 23, 2025
Blog Page 26

Bizarre bug wipes out half of Apex Legends lobby instantly

Bizarre bug wipes out half of Apex Legends lobby instantly

Apex Legends players have been running into a new issue that is ruining matches before they can get underway – as they’re tossed outside the limits of the map.

Though there have been plenty of positives in Apex Legends latest season, bringing back old players with new content, and fans getting what they want with modes and maps, it hasn’t been entirely smooth sailing.

Players have run into bugs on a regular basis – ranging from pretty big issues that prevent fans from playing matches to small hiccups that you’ll ultimately laugh about after the fact.

Respawn Entertainment

Apex Legends players aren’t even getting the chance to play matches thanks to the new bug.

However, one player has showcased an all-new problem that is wiping out entire servers as players try to jump into a match.

As shown in the video, players are encountering a bug that sees them locked into the dropship as it is supposed to pass over the map but, instead, remains stuck in one place. After a few moments, every player remaining in the ship is tossed out at the limit of the map – forcing them to try and rescue themselves.

However, as dropping into the map has become a little out of reach, said players are unable to save themselves and end up falling to their death before they even have a chance to play a match. 

As this example came from World’s Edge, some onlookers might assume that is a problem with that particular map. Yet, that doesn’t appear to be the case.

In fact, another Reddit user claimed that they had also run into the same issue while attempting to play a game on Kings Canyon. 

These examples of the problem happening on different maps and in different games would point to it not being a small issue that has reared its head, but instead, something that could easily ruin more and more matches if it is not addressed.

The Respawn team has not commented on the subreddit or made a note of it on their Trello board, so, it remains to be seen as to whether or not they are aware of the brand new issue.

Read More

10 Android 10 features you should be using on your Galaxy S10 or Note10

10 Android 10 features you should be using on your Galaxy S10 or Note10

After a brief beta period, Samsung began updating its 2019 flagships to Android 10 in November last year. Now that the vast majority of S10 and Note10 users have received the update, let’s take a look at what’s new in Android 10 and what features Samsung users should start checking out.

Gesture navigation

Samsung already had a gesture navigation system in Android 9, and that hasn’t gone away. But this being Android 10, Google’s vision of navigation is included too. Head to display > navigation bar and press “more options” beneath the full-screen gestures card. From there, you can switch back and forth from Samsung’s “swipe from bottom,” and Google’s “swipe from sides and bottom.” Here you can adjust the sensitivity of the back gesture, just as you can on a Pixel or other Android 10 device.

Heading back to the main navigation menu, Samsung has added two little tweaks to this system. If you don’t like the thick black bar beneath your keyboard, you can switch it off. The same goes for the gesture hints, the small bar at the bottom of the display, giving you the choice of an immersive experience. The only caveat is that you can only use these gestures with Samsung’s launcher set to default, although that may soon change.

Notification management

Google introduced notification categories, a feature intended to help users organize their notification panels to focus on what’s important. Although Android 11 will take this further, it’s still a useful and prominent part of Android 10. Screenshots and other lower-priority notifications are located at the bottom in a separate “silent notifications” category.

What’s more, you can choose which notifications are assigned to this list. In this example, we’ll use Instagram. I want to see new posts from certain accounts in my notification shade, but I don’t want my phone to buzz when they arrive, or to show as a heads-up alert. By long-pressing on the message, I can set it to silent and then back again. You can also go to an apps notification menu in settings, and go through each notification channel and set things to silent or alert. This may sound like a lot of work, but it’s worth it. Once you have everything to your liking, you’ll see and hear the important stuff at the top of the list, while everything else is tucked away for when you have time.

Dark mode

Sure, Samsung did dark mode before it was cool and included it in Android 9. But now that it’s a standard part of Android, mainstream apps are finally starting to adopt this feature too. In the past, it was only the pre-installed Samsung apps that would match the system theme, but now apps like Instagram, WhatsApp, Reddit, and the majority of Google apps do so as well. You’ll find dark mode in the same place as before, only now there’s a setting that applies it to your wallpaper. Now, this isn’t going to magically make a dark and light mode of your wallpaper, dimming whatever wall you currently have instead.

Tighter location permissions

In previous versions of Android, once an app had location access, it could use it 24/7. Now then an app requests location access, you can deny it as before, or allow only while using the app. That means that apps like Instagram or Facebook can access your location when they’re open in the foreground, using the features that require that access, but they’ll lose it as soon as you close the app. This kind of restricted access is perfect for those of us who need to use certain apps, even if we don’t trust them. If you have an app that you want to give 24/7 location access to, you still can. Head to the info screen for that app in your settings, tap on permissions, and awa

Focus Mode

Focus mode, a new component of Digital Wellbeing, is designed to keep you focused on work or any other activity. By default, it has two profiles: work time and me time. Each one has a list of apps that you can edit to include things you need while focus mode is on.

For work time, you could include the phone app, calculator, settings, calendar, and anything else you want to use while at work. The apps excluded from this list will then become grayed out and inaccessible from the homescreen until focus mode is disabled. Even homescreen widgets pertaining to blacklisted apps will disappear, eliminating all distractions. There’s also a handy quick settings toggle to save you digging through settings when you need it.

Privacy settings

Privacy settings houses everything related to, as the name implies, your privacy. This menu doesn’t add any extra features; instead it groups together all of the privacy settings that were hidden in various sub-menus on Android 9. Everything from managing your permissions to setting up your auto-fill service is here. It may not sound like much, but having everything in once place is more convenient than searching for them in all the other menus.

Smart replies add, well, smart replies to the notifications from messaging apps. For some strange reason, Samsung disables this by default, so to switch it on, you’ll need to go to the notifications menu in settings and turn them on. With that done, you’ll start to see suggested responses to messages, as well as buttons to matching apps. If someone sends you an address, a Google Maps button will appear.

Before Android 10, the share sheet was a bit of a pain to use. It was slow, sluggish, and glitchy and drove users mad. The one found in One UI 1.0 wasn’t as bad as that of Pixels and others, but it still wasn’t perfect. Android 10 finally fixed these issues, making it fast and smooth.

Once again, Samsung has added its coat of paint to the share sheet, moving some things around, and adding shortcuts to its own sharing services. Even so, the improvements Google made are welcome indeed.

Sharing Wi-Fi via QR codes

Sometimes joining a friend’s Wi-Fi network is a pain. Often you’re left dealing with the password that the router came with, and trying to work out an O from a zero, or a lower case L or an upper case I (to say nothing of a 1). Android 10 devices can generate Wi-Fi QR codes, as well as scan them to join a network.

If you’re sharing your Wi-Fi, head over to Wi-Fi settings, tap your network, and press QR code. Once your friend scans it, they’ll be connected. To scan a QR code and join a network, you have two options. Open the camera app, and Bixby Vision will detect the QR code and do everything for you. Otherwise, you can tap the QR button in the Wi-Fi menu and go from there.

Seek bar in media notifications

You can now seek through media right from the notification shade. This feature is particularly useful when listening to a podcast, and you want to hear a section again. Or if you enjoy a particular part of a song, and want to enjoy it a second time. The seek bar will show for all media notifications, without the need for the app to add support.

Those are the top 10 Android 10 features coming to your Galaxy S10 or Note10. There’s a lot more going on behind the scenes as well, so your phone will work better than ever before. On my S10+, I got even better battery life, and system performance improved as well. As soon as that update appears for you, make sure to install it.

Read More

“Reimagined” E3 2021 scheduled for next June

“Reimagined” E3 2021 scheduled for next June

The Entertainment Software Association has notified partners that E3 2021 will be held June 15th to 17th, 2021, according to GamesIndustry.biz. The ESA canceled E3 2020 last month due to concerns about the COVID-19 outbreak but is reportedly working on a “reimagined” event for 2021.

There’s still no word on whether North America’s biggest annual gaming conference, held annually since 1995, will return in some other form in 2020. When it announced the cancellation of this year’s E3, the ESA said “We are also exploring options with our members to coordinate an online experience to showcase industry announcements and news in June 2020.”

E3 has traditionally been one of the biggest weeks for new video game announcements, but several big companies, including Sony, had pulled out of the event prior to its official cancellation. Other gaming and tech events, including SXSW, the Game Developers Conference, Facebook’s F8, Nvidia’s GPU Technology Conference, Google I/O 2020 were also canceled this year amid the COVID-19 pandemic.

Read More

Comment: Why I ditched the Kindle in favor of Apple Books on iPad Mini

Comment: Why I ditched the Kindle in favor of Apple Books on iPad Mini

I have been using a Kindle for many years now. Most recently, I was using a Kindle Oasis as my primary book reader. As I was looking at some upcoming books a few weeks back, I realized that I was not too fond of the purchasing process on iOS for Kindle. I started thinking about if the Kindle (and the Kindle apps) were still the best place for me to purchase books. Apple Books vs Kindle: what’s the best way to read books and listen to audiobooks?

Amazon is undoubtedly the top e-book seller in the world, and there are plenty of reasons why. They offer low-cost hardware and run frequent specials on popular books. Over the past few years, I’ve picked up countless books as I built up my library. As I sat and looked at the mobile interface for purchasing Kindle Books, I started thinking about how slow and dated the overall Kindle interface has become. While I love the idea of the Kindle hardware, the software hasn’t advanced very much. The overall experience is quite clunky. It feels like the current Kindle hardware is still running the original software. I argued last summer that Apple should build a competitor to the Kindle as well. There is something to the e-ink display, but it needs a fresh approach.

Getting back to my original point, I closed out the mobile version of the Kindle website, and I reinstalled Apple Books. As I opened it, it felt like a breath of fresh air. The overall design is just stunning. I hadn’t spent a lot of time with the new interface that Apple released with iOS 12, but I was quickly blown away. I had a few purchases from years ago, so my library certainly isn’t as big as what it is on Kindle (I still think there should be a ‘Books Anywhere’ service). I am using a lot of Apple’s services in my daily life (iCloud, Apple Music, etc.), so does it make sense to move my book reading into Apple Books?

After pondering Apple Books vs Kindle for the rest of the day, I realized both of them have their benefits. Amazon has dedicated e-book hardware and a massive bookstore. Apple has excellent support on iOS with a built-in store. I feel like Apple’s overall app design is much stronger as well (comparing to the Kindle iOS app). Before I could change my mind, I sent a tweet asking if anyone wanted to buy my Kindle. I told myself that if I sold it that night, I would take the plunge into Apple Books.

Benefits of Apple Books

Once I sold my Kindle Oasis, I decided that the iPad mini would be the best device for reading books from Apple Books. While it’s more expensive than the 7th generation iPad, in the long run, it’ll be a more comfortable device to hold for reading.

One thing I quickly noticed was that Apple Books has audiobooks built right into the app. With Kindle on iOS, you generally use the Audible app. I expected Apple’s audiobooks to be very expensive as I remembered from a few years back, but to my surprise, they were all in line with Audible’s pricing. I picked up The Rise of Skywalker as an audiobook for the same price as the e-book version.

Overall, the interface for everything in Apple Books is first class. Reading books is delightful, and the audiobook player is also well done. You can sync audiobooks with Apple Watch as well. I’ve spent some time picking out some books I plan to purchase in the future. I am frustrated to lose access to my existing library by switching vendors, but I’ll wait till I have the urge to re-read them and buy them one at a time. I can always reinstall the Kindle app, as well.

Wrap-up on Apple Books vs Kindle

As good as the e-ink experience is on a Kindle, Apple Books provides a first-class experience from beginning to end. Purchasing books is easy, thanks to in-app purchases. It’s nicely integrated with iOS. Highlighting content is much easier on an iPad compared to an e-ink Kindle. I’ll miss the waterproof design of the Kindle, but that only helped me in the summer months at the pool. Since I have young kids, I didn’t get to read much by the pool anyways.

Are you using Apple Books? What are your thoughts on the overall experience?

FTC: We use income earning auto affiliate links. More.


Check out 9to5Mac on YouTube for more Apple news:

Read More

This week’s top stories: Apple acquires Dark Sky, new iOS 14 features, iPhone 9 is imminent, more

This week’s top stories: Apple acquires Dark Sky, new iOS 14 features, iPhone 9 is imminent, more

In this week’s top stories: iPhone 9 rumors continue, iOS 14 features, Apple acquires Dark Sky, and a hands-on look at a powerful CarPlay accessory. Read on for all of this week’s biggest news.

One of the most surprising announcements this week was that Apple has acquired the hyperlocal weather app Dark Sky. Dark Sky announced the acquisition in a blog post and explained that the app for iPhone and iPad is still available and there will be no changes at this time. The Android app, however, will stop working in July and the Dark API will shut down in December of 2021.

Apple this week began beta testing of iOS 13.4.5. The update focuses primarily on bug fixes and performance improvements, but there are a few things worth noting. The update includes a new feature for the Music app that makes it easy to share a song to Instagram and Facebook Stories. The update also corroborates details of the upcoming iPhone 9 and CarKey.

Speaking of iPhone 9, 9to5Mac learned this week that Apple’s release of the device is imminent. The iPhone 9 will be available in black, white, and PRODUCT(RED) in configurations of 64GB, 128GB, and 256GB.

Elsewhere, iOS 14 code has revealed an updated Activity rings system for the Apple Watch’s expected kids mode feature. This would change the move ring so it now longer focused on calories, instead emphasizing how long a child is moving throughout the day.

iOS 14 code also suggests that Apple is working on new features for the iCloud Keychain password manager. These features would enable support for two-factor authentication codes as well as increased awareness of when someone reuses a password across multiple websites.

Finally, iOS 14 code also indicates apparent support for Home screen widgets. Read our full coverage here to learn more.

9to5Mac’s Zac Hall took a close look at an adapter that turns standard CarPlay into Wireless CarPlay, concluding that “somehow it actually works.” Check out his full hands-on review here.

These and the rest of this week’s top stories below.

iOS | tvOS |

iPhone |

Apple Watch |

iPad |

Mac |

Top Apple stories, retail |

Apps |

COVID-19 |

HomeKit |

Top Apple stories, company |

Subscribe to 9to5Mac’s YouTube channel for more videos.

This week’s top videos |

9to5Mac Daily |

Listen to a recap of the top stories of the day from 9to5Mac. 9to5Mac Daily is available on iTunes and Apple’s Podcasts app, Stitcher, TuneIn, Google Play, or through our dedicated RSS feed for Overcast and other podcast players.

9to5Mac Watch Time episode #18 |

Shawn Dorsey is an Apple Watch Warrior in every sense of the word. After the former analog watch collector was gifted the original Apple Watch years ago, he’s found new ways to use the iPhone and Apple Watch to systematically improve his full body workouts. The best part is how open Shawn is with sharing his workouts throughout the week. He’s a continuous source of motivation for me, and hopefully now you as well.

Bonus Watch Time episode: Adapting daily routines during the health pandemic

Sponsored by: 

9to5Mac Watch Time is a podcast series hosted by Zac Hall. In this series, we talk to real people about how the Apple Watch is affecting their lives. 9to5Mac Watch Time is available on Apple Podcasts, Overcast, and your favorite podcast player through RSS.

Happy Hour Podcast #271 |

Benjamin and Zac unpack the week of news including more features coming to iOS 14 and watchOS 7, Siri for Spotify on Apple Watch, Apple’s COVID-19 app, the Amazon Prime Video App Store situation, new AirTag leaks, Apple buying Dark Sky, breaking 2020 iPhone SE news, and much more.

Sponsored by: 

9to5Mac Happy Hour is available on iTunes and Apple’s Podcasts app, Stitcher, TuneIn, Google Play Music, or through our dedicated RSS feed for Overcast and other podcast players.

Stacktrace Podcast 077 |

Deciding when to rewrite a piece of code, what makes Combine such a great way to do reactive programming in Swift, and the final part of our indie app development special series. Also, tips for coding beginners, Indie Support Weeks, and much more.

Sponsored by: 

  • Setapp: Try Setapp with over 170+ Mac apps completely free for the first week

Stacktrace by 9to5Mac is available on iTunes and Apple’s Podcasts app or through our dedicated RSS feed for Overcast and other podcast players.

Apple @ Work Podcast |

In this episode of the Apple @ Work podcast, Bradley is joined by Joel Rennich to discuss the FIDO Alliance and the future of password management for the enterprise and consumers.

Apple @ Work Podcast is brought to you by Jamf, the standard for Apple in the enterprise. Learn more at Jamf.com/9to5mac.

Stacktrace by 9to5Mac is available on iTunes and Apple’s Podcasts app or through our dedicated RSS feed for Overcast and other podcast players. .

Apple @ Work and Making the Grade |

Apple @ Work is a weekly series from Bradley Chambers covering Apple in education. Bradley has been managing Apple devices in an education environment since 2009. Through his experience deploying and managing hundreds of Macs and hundreds of iPads, Bradley will highlight ways in which Apple’s products work at scale, stories from the trenches of IT management, and ways Apple could improve its products for students.

Subscribe to get all 9to5Mac’s stories delivered to your inbox daily. And to 9to5Toys for the best deals from around the web.

FTC: We use income earning auto affiliate links. More.


Check out 9to5Mac on YouTube for more Apple news:

Read More

ilo sitelen, a handmade computer for Toki Pona



mi wile pali e seme?

ilo sona 💻 ale li wile toki kepeken toki Inli. ni li ike tawa mi. mi wile pali e ilo sona pi toki pona taso!

tenpo nanpa wan la mi toki e ni tawa mi: mi wile pali seme kepeken ilo mi?

jan Sate li pali e ilo nanpa. ilo nanpa li ken pali e nanpa pi toki pona. ilo ni li pona, musi kin!

mi pilin e ni: mi wile ken sitelen e toki mi kepeken ilo mi.

pilin ni la mi toki ala e ilo sona 💻 lon tenpo kama. mi toki e ilo sitelen! mi wile pali e ilo sitelen.

nasin sitelen

tenpo nanpa tu la mi pilin e ni: jan li sitelen toki pona kepeken supa nena seme?

toki pona li jo e nimi lili, e kalama lili. nena sitelen li ken lili sama!

ni li musi tawa mi. taso, mi pilin e ni – mi ken lili e ona!

mi pali e nasin sitelen “linja pi kute mute”. kepeken ona la jan li ken sitelen toki pona kepeken nena luka wan!

mi ken kepeken ilo ni kepeken luka wan taso! ni li pona!

ilo lawa en ilo lukin

mi esun e ilo lawa Wapewipi, e ilo lukin ni.

ilo lukin li pona – mi ken pana e sitelen tawa ona:

mi awen e ilo lawa lon monsi pi ilo lukin. o lukin e ona:

mi esun e supa nena lili ⌨️ . tenpo kama la mi ante mute e ona, mi pona mute e ona!

tenpo ni la mi jo e ijo ale. mi ken open e pali!

tenpo nena nanpa wan

supa nena li jo e nena sike. ni li ike tawa mi. mi tawa e nena ante tawa ona, mi pana e sitelen tawa supa ona:

ni li pona lili! ni la mi ken awen e pali!

sitelen pona

mi pilin e ni – mi wile sitelen lon sitelen pona. tan ni la mi sitelen e nimi ale pi toki pona:

mi pana e ilo pi nasin sitelen tawa ilo lawa (o lukin e ona lon kulupu Kitu).

ni li musi kin! (ni li musi kin, li pali mute kin 😅 ).

taso, pali li pini ala pini? ala!

mi wile pona e ona:

  • mi wile pana e selo tawa ona.
  • mi wile pona e nena ona.

selo

ilo sitelen li pona kin, taso ona li jo ala e selo:

mi wile kama sona e ni: selo li ken seme? ni la mi pali e selo nasa kepeken poki mute:

ni li pona e mi.

jan Mitaluka li jo e palisa nanpa mute:

kepeken ona la mi kama sona e nanpa mute!

mi pana e nanpa ni tawa ilo pali Pusijonsisisi:

ilo ni li wawa kin, li pona kin. ona li pana e sitelen tu tawa mi:

tenpo ni la mi esun e lipu wawa mute.

mi pilin e ni: mi ken pali e selo pona kepeken ona.

taso, mi lukin pali e selo kepeken ona, la pakala mute li lon:

mi kama sona e wile pi lipu wawa a a a!

taso, tenpo nanpa tu la ale li pona.

tenpo ni la ilo selo li pini ala pini? ala!

ma noka pi ilo lukin la ala li lon. mi wile e ni: nimi pi ilo ni li lon ma ni. mi esun e sitelen nimi tan esun Sitema.

ona li kama lon tomo mi, la mi pana e ona lon noka pi ilo lukin:

ona li pona tawa mi. selo li pini. pona kin!

nena

nena ni li ike lili tawa mi:

mi wile pona e ona. taso, kepeken nasin seme?

mi esun e lipu ni:

mi ken pana e sitelen tawa nena.

taso ni li ike. mi ken weka e sitelen tan nena kepeken luka mi:

mi wile jo e nena pona. taso, kepeken nasin seme?

jan Talamasa mi li toki e ni tawa mi: “mi jo e ilo pi pali kiwen. (ilo ni li ken pali e kiwen tan telo) ilo ni li ken pali e nena! sina pana e lawa nena tawa mi, la mi pali e nena.”

mi kepeken lawa nena tan jan ante. kepeken ona la mi ken pali e lawa pi nena mi:

mi pana e lawa ni tawa jan pona mi. ona li pali e ona, li pana e ona tawa mi:

ona li pona lukin! mi weka e palisa tan ona. mi pana e ona tawa ilo sitelen:

mi pilin e ni: nena pi kule wan taso li pona lili taso. mi wile pana e kula tawa ona!

mi pana e kula tawa ona kepeken palisa pimeja:

nasin kule ni li seme?

tenpo nanpa wan la mi pimeja ale e poki nena sewi:

tenpo nanpa wan la mi weka e ona kepeken lipu pi telo nasa. taso pimeja li awen lon lupa:

taso pimeja li lon lon lupa li awen 🙂 ni li pona lukin tawa mi. mi pimeja e nena ala kepeken nasin ni:

mi pana e ona tawa supa nena, la pali li kama pini. pali pi ilo sitelen li pini!

ilo sitelen li pini!

ilo ni li pona kin tawa mi. mi kepeken ona lon tenpo suno ale.

tenpo ni la sina sona e ni: pali pi ilo ni li pali mute. mi wile ala pali e ilo sitelen mute!

pona suli tawa jan Talamasa, tawa jan Mitaluka. ona li pona mute e pali mi, li pana e sona mute tawa mi. pona tawa ona!

Read More

When debugging, attitude matters

A while back I wrote What does debugging a program look like? on what to do when debugging (change one thing at a time! check your assumptions!).

But I was debugging some CSS last week, and I think that post is missing
something important: your attitude.

Now – I’m not a very good CSS developer yet. I’ve never written CSS
professionally and I don’t understand a lot of basic CSS concepts (I think I
finally understood for the first time recently how position: absolute works). And last
week I was working on the most complicated CSS project I’d ever attempted.

While I was debugging my CSS, I noticed myself doing some bad things that I
normally would not! I was:

  • making random changes to my code in the hopes that it would work
  • googling a lot of things and trying them without understanding what they did
  • if something broke, reverting my changes and starting again

This strategy was exactly as effective as you might imagine (not very
effective!), and it was because of my attitude about CSS! I had this
unusual-for-me belief that CSS was Too Hard and impossible for me to
understand. So let’s talk about that attitude a bit!

the problem attitude: “this is too hard for me to understand”

One specific problem I was having was – I had 2 divs stacked on top of one another, and
I wanted Div A to be on top of Div B. My model of CSS stacking order at the
start of this was basically “if you want Thing A to be on top of Thing B,
change the z-index to make it work”. So I changed the z-index of Div A to be 5
or something.

But it didn’t work! In Firefox, div A was on top, but in Chrome, Div B was on
top. Argh! Why? CSS is impossible!!!

I googled a bit, and I found out that a possible reason z-index might not work
was because Div A and Div B were actually in different “stacking contexts”. If
that was true, even if I set the z-index of Div A to 999999 it would still not
put it on top of Div B. (here’s a small example of what this z-index problem looks like, though I think my specific bug had some extra complications)

I thought “man, this stacking context thing seems really complicated, why is it
different between Firefox and Chrome, I’m not going to be able to figure this
out”. So I tried a bunch of random things a bunch of blog posts suggested,
which as usual did not work.

Finally I gave up this “change random things and pray” strategy and thought “well, what
if I just read the documentation on stacking order, maybe it’s not that bad”.

So I read the MDN page on stacking order, which says:

When the z-index property is not specified on any element, elements are stacked in the following order (from bottom to top):
1. The background and borders of the root element
2. Descendant non-positioned blocks, in order of appearance in the HTML
3. Descendant positioned elements, in order of appearance in the HTML

This is SO SIMPLE! It just depends on the order in the HTML! I put Div A after
Div B in the HTML (as a sibling) and it made everything work in both browsers.

better attitude: “let’s learn the basics and see if that helps”

This whole stacking problem turned out to really not be that complicated – all I
needed to do was read a very short and simple documentation page to understand how stacking works!

Of course, computer things are not always this simple (and even in this
specific case the rules about what creates a new stacking
context

are pretty complicated.). But I did not need to understand those more complicated rules in order to put Div A on top of Div B! I only needed to know the much simpler 3 rules above.

So – calm down for a second, learn a few of the basics, and see if that helps.

watching people who know what they’re doing is inspiring

Another area of CSS that I thought was “too hard” for me to understand was this
whole position: absolute and position: relative business. I kept seeing
(and sometimes using!) examples where people made complicated CSS things with
position: absolute but I didn’t understand how they worked. Doesn’t position: absolute mean that the element is always in the same place on the screen? Why are these position: absolute things moving when I scroll like the rest of the document? (spoiler: no, that’s position: fixed.)

But last week, I paired with someone who’s a lot better at CSS than me on some
code, and I saw that they were just typing in position: absolute and
position: relative confidently into their code without seeming confused about
it!! Could that be me?

I looked up the documentation on MDN on position: absolute, and it said:

The element is removed from the normal document flow, and no space is created
for the element in the page layout. It is positioned relative to its closest
positioned ancestor… Its final position is determined by the values of top, right, bottom, and left.

So things with position: absolute are positioned relative to their closest
positioned ancestor! And you just use top/bottom/right/left to pick where!
That’s so simple!

documentation that you can trust makes a big difference

I think another big source of my frustration with CSS is that I didn’t have the
best grasp of where to find accurate information & advice. I knew that MDN was a reliable
reference, but MDN doesn’t really help answer questions like “ok but seriously
how do I center a div???” and I found myself reading a lot of random Stack Overflow
answers/blog posts that I wasn’t 100% sure were correct.

This week I learned about CSS Tricks which has a lot
of GREAT articles like Centering in CSS: A Complete Guide which seems very reputable and is written
in a super clear way.

that’s all!

I don’t really know why I started to believe that it was “impossible” to
understand basic CSS concepts since I don’t believe that about computers in
general. Maybe because I’ve been writing CSS at a beginner level for a very
long time but hadn’t ever really tried to do a more involved CSS project than
“let’s arrange some divs in a grid with flexbox”!

But this attitude really got in the way of me writing the CSS I wanted to
write! And once I let go of it and used my normal debugging techniques I was
able to get a lot more things to work the way I wanted.

Read More

Your configs suck? Try a real programming language. | beepb00p

Your configs suck? Try a real programming language. | beepb00p

Or yet another rant about YAML

In this post, I’ll try to explain why I find most config formats frustrating to use and
suggest that using a real programming language (i.e. general purpose one, like Python) is often a feasible and more pleasant alternative for writing configs.

1 Most modern config formats suck

In this section, I’m mostly referring to JSON/YAML/TOML/ini files, which are the most common config formats I encounter.

I’ll refer to such configs as plain configs. Not sure if there is a better name for it, please let me know!

An incomplete list of my frustrations:

  • JSON doesn’t have comments, by design 🤯
  • bits of configs can’t be reused

    For example, while YAML, in theory, supports reusing/including bits of the config (they call it anchors),
    some software like Github Actions doesn’t support it

    Usually, you just don’t have any means of reusing parts of your config and have to copy-paste.

  • can’t contain any logic

    This is considered as a positive by many, but I would argue that when you can’t define temporary variables, helper functions, substitute strings or concatenate lists, it’s a bit fucked up.

    The workarounds (if present) are usually pretty horrible and impose cognitive overhead. Programming language constructs are reinvented from scratch:

    • variables and string interpolation
      • Ansible uses Jinja templates (!) for variable manipulations.
      • Github Actions use a custom syntax for that

        In addition, they’ve got their own set of functions to manipulate the variables.
        Have fun learning a new language you never wanted to!

    • scoping

      I.e. there are several custom scopes for env directive in Github Actions.

    • control flow
      • for loop: build matrices and ‘excludes’ always give me a headache
      • if statement: e.g. when in CircleCI
  • can’t be validated

    You can validate the config syntax itself (i.e. check JSON for correctness), but you can’t do semantic checks.

    This is kind of a consequence of not having logic in the config files.
    Typically you’ll have to write a supplementary program to check your configs and remember to call it before passing to a program.

    Very few programs bother with that and usually, your program crashes because of something that would be trivial to catch with any simple type system.

  • YAML simply stands out with its implicit conversions and portability issues

    There are enough rants about it, so I’ll just leave a link to a good one: “YAML: probably not so great after all”.

Summary: we spend time learning useless syntax, instead of productive work.

2 Workarounds

So what happens when people encounter these problems?
Often they end up using a ‘real’ (i.e. general purpose, Turing complete) programming language anyway:

  • you write a program to filter out custom comment syntax
  • you write a program to merge configs or use a templating engine
  • you write a program that ‘evaluates’ the config

    Often, you end up reimplementing an interpreter for a simple functional language in the process.

  • you write a program to validate the config

    For the most part, it’s boilerplate for type checking. You’re not only working on a solved problem but in addition, end up with mediocre error messages as a result.

All this stuff is unpleasant and distracts you from your main objective.

Perhaps you can see where I’m coming with this.

3 Use a real programming language

The idea is to write your config in your target programming language.
I’ll have Python in mind here, but the same idea can be applied to any dynamic enough language (i.e. Javascript/Ruby/etc).

Then, you simply import/evaluate your config file and viola – you’re done. That’s it.

  • Toy example:

    config.py

    from typing import NamedTuple
    
    class Person(NamedTuple):
        name: str
        age: int
    
    PEOPLE = [
        Person('Ann'  , 22),
        Person('Roger', 15),
        Person('Judy' , 49),
    ]
    

    Using the config:

    from pathlib import Path
    
    config = {}
    exec(Path('config.py').read_text(), config)
    people = config['PEOPLE']
    
    print(people)
    
    [Person(name='Ann', age=22), Person(name='Roger', age=15), Person(name='Judy', age=49)]
    

I find it pretty neat.
Let’s see how it helps us with the problems I described:

  • comments: duh
  • includes: trivial, use imports

    You can even import the very package you’re configuring.
    So you can define a DSL for configuration, which will be imported and used in the config file.

  • logic

    You have your language’s syntax and libraries available to use.
    For example, something like pathlib alone can save you massive amounts of config duplication.

    Of course, one could go crazy and make it incomprehensible.
    But personally I’d rather accept potential for abusing rather than being restricted.

  • validation

    You can keep validation logic right in the config, so it would be checked at the time of loading.
    Mature static analysis tools (i.e. JS flow/eslint/pylint/mypy) can be used to aid you.

Downsides

Are there any problems with that approach? Sure:

  • interoperability

    Okay, maybe if your program is in Python it makes sense. But what if it isn’t, or you’ll rewrite it to another language (i.e. compiled, like c++) later.

    If you’ll be running your software somewhere without an interpreter, then sure, good point.
    Modern FFI is tedious and linking against your config is going to be pretty tricky.

    In case of Python specifically, it’s present in most modern OS distributions. So you might get away with the following:

    1. make your Python config executable
    2. in the main() function, build the config, convert to JSON and dump to the stdout

      This step is possible with no boilerplate due to Python’s dynamic nature.

    3. in your c++ code, execute the Python config (i.e. use popen()), read the raw JSON and process

    Yep, you will still have to manually deserialize config in the c++ code. But I think that’s at least not worse than only using JSON and editing it manually.

  • general-purpose programming languages are harder to reason about

    This is somewhat subjective. Personally, I’d be more likely overwhelmed by an overly verbose plain config. I’d always prefer a neat and compact DSL.

    A large factor here is code style: I’m sure you can make your config file readable in almost any programming language,
    even for people not familiar with the language at all.

    The biggest issues are probably security and termination checking.

  • security

    I.e. if your config executes arbitrary code, then it may steal your passwords, format your hard drive, etc.

    If your configs are supplied by third parties you don’t trust, then I agree that plain configs are safer.
    However, often it’s not the case, and the user controls their own config.

    In addition, this is something that can be potentially solved by sandboxing. Whether it’s worth the effort depends on the nature of your project, but for something like CI executor you need it anyway.

    Also, note that using a plain config format doesn’t necessarily save you from trouble. See “YAML: insecure by default”.

  • termination checking

    Even if you don’t care about security, you don’t want your config to hang the program.

    Personally, I’ve never run into such issues, but here are some potential workarounds for that:

    • explicit timeout for loading the config
    • using a subset of the language might help, for example, Bazel

      Anyone knows examples of conservative static analysis tools that check for termination in general purpose languages?

    • note that using a plain config doesn’t mean it won’t loop infinitely

      See “Accidentally Turing complete”.

    • your config can take very long time to evaluate, while technically taking finite time to complete

      See “Why Dhall advertises the absence of Turing-completeness”

      While an Ackermann function is a contrived example,
      that means that if you truly care about malicious inputs, you want to sandbox anyway.

Why Python?

Some reasons I find Python specifically enjoyable for writing config files:

  • Python is present on almost all modern operating systems
  • Python syntax is considered simple (not a bad thing!), so hopefully Python configs aren’t much harder to understand than plain configs
  • data classes, functions and generators form a basis for a compact DSL
  • typing annotations serve as documentation and validation at the same time

However, you can achieve a similarly pleasant experience in most modern programming languages (provided they are dynamic enough).

Who else does it?

Some projects that allow for using code as configuration:

  • setuptools, the standard way of installing Python packages

    Allows using both setup.cfg and setup.py files. That way if you can’t achieve something solely with plain config, you can fix this in setup.py.

  • Jupiter, interactive computing tool

    Uses a python file to configure the export.

  • Emacs: famously uses Elisp for its configuration

    While I’m not a fan of Elisp at all, it does make Emacs very flexible and it’s possible to achieve any configuration you want.

    On the other hand, if you’ve ever read other people’s Emacs setups, you can see it also demonstrates how things can get out of hand when you allow
    a general purpose language for configuration.

  • Surfingkeys browser extension: uses a Javascript DSL for configuration
  • Bazel uses a subset of Python for describing build rules

    While it’s deliberately restricted to ensure termination checking and determinism, configuring Bazel is orders of magnitude more pleasant than any other build system I’ve used.

  • Nix: language designed specifically for the Nix package manager

    While a completely new language feels like an overkill, it’s still nicer to work with than plain configs.

  • Dhall: language designed specifically for config files

    Dhall advertises itself as “JSON + functions + types + imports”. And indeed, it looks great, and solves most of the issues I listed.

    One downside is that it’s not widespread yet. If you don’t have bindings for your target language, you’d end up parsing JSON again.
    However, at least it makes writing configs pleasant.

    But again, if your program is written in Javascript and doesn’t interact with other languages, why don’t you just make the config Javascript?

4 What if you don’t have a choice?

Some ways I’ve found to minimize the frustration while using plain configs:

  • write as little in config files as possible

    This typically applies to CI pipeline configs (i.e. Gitlab/Circle/Github Actions) or Dockerfiles.

    Often such configs are bloated with shell commands, which makes it impossible to run locally without copying line by line.
    And yeah, there are ways to debug, but they have a pretty slow feedback loop.

    • use tools that are better suited to set up local virtual environments, like tox-dev/tox
    • prefer helper shell scripts and call them from your pipeline

      It is a bit frustrating since it introduces indirection and scatters code around.
      But, as an upside, you can lint (e.g. shellcheck) your pipeline scripts, and make it easier to run locally.

      Sometimes you can get away if your pipeline is short, so use your own judgment.

    Let the CI only handle setting up a VM/container for you, caching the dependencies, and publishing artifacts.

  • generate instead of writing manually

    The downside is that the generated config may diverge if edited manually.

    You can add the warning comment that the config is autogenerated with the link to the generator, and make the config file read-only to discourage manual editing.

    In addition, if you’re running CI, you can make the consistency check a part of the pipeline itself.

6

A followup question, which I don’t have an answer for: why is is that way?
I’m sure Ansible/CircleCI or Github Actions are developed by talented engineeres who have considered pros and cons of using YAML.
Do the pros really outweight the cons?

Open to all feedback, and feel free to share your config pain and how are you solving it!

Read More

Rough.js

Rough.js

Rough.js

Rough.js is a small (<9kB gzipped) graphics library that lets you draw in a sketchy, hand-drawn-like, style.
The library defines primitives to draw lines, curves, arcs, polygons, circles, and ellipses. It also supports drawing SVG paths.

Rough.js works with both Canvas and SVG.

Install

Install from npm:

npm install --save roughjs

And use it in your code:

import rough from 'roughjs';

Usage

View Full Rough.js API is available on Github.

const rc = rough.canvas(document.getElementById('canvas'));
rc.rectangle(10, 10, 200, 200);

or SVG

const rc = rough.svg(svg);
let node = rc.rectangle(10, 10, 200, 200);
svg.appendChild(node);

Lines and Ellipses

rc.circle(80, 120, 50); 
rc.ellipse(300, 100, 150, 80);
rc.line(80, 120, 300, 100);

Filling

rc.circle(50, 50, 80, { fill: 'red' }); 
rc.rectangle(120, 15, 80, 80, { fill: 'red' });
rc.circle(50, 150, 80, {
fill: "rgb(10,150,10)",
fillWeight: 3
});
rc.rectangle(220, 15, 80, 80, {
fill: 'red',
hachureAngle: 60,
hachureGap: 8
});
rc.rectangle(120, 105, 80, 80, {
fill: 'rgba(255,0,200,0.2)',
fillStyle: 'solid'
});

Fill styles can be: hachure(default), solid, zigzag, cross-hatch, dots, sunburst, dashed, or zigzag-line

Sketching style

rc.rectangle(15, 15, 80, 80, { roughness: 0.5, fill: 'red' });
rc.rectangle(120, 15, 80, 80, { roughness: 2.8, fill: 'blue' });
rc.rectangle(220, 15, 80, 80, { bowing: 6, stroke: 'green', strokeWidth: 3 });

SVG Paths

rc.path('M80 80 A 45 45, 0, 0, 0, 125 125 L 125 80 Z', { fill: 'green' });
rc.path('M230 80 A 45 45, 0, 1, 0, 275 125 L 275 80 Z', { fill: 'purple' });
rc.path('M80 230 A 45 45, 0, 0, 1, 125 275 L 125 230 Z', { fill: 'red' });
rc.path('M230 230 A 45 45, 0, 1, 1, 275 275 L 275 230 Z', { fill: 'blue' });

SVG Path with simplification:

Examples

View examples here

API & Documentation

Full Rough.js API

Credits

Core algorithms for drawing lines and ellipse outlines were adapted from handy processing lib.

Algorithm to convert SVG arcs to Canvas described here was adapted from Mozilla codebase

License

MIT License (c) Preet Shihn

Read More

Csound: A sound and music computing system

About Csound

Csound is a sound and music computing system which was originally developed by Barry Vercoe in 1985 at MIT Media Lab. Since the 90s, it has been developed by a group of core developers. A wider community of volunteers contribute examples, documentation, articles, and takes part in the Csound development with bug reports, feature requests and discussions with the core development team.

Although Csound has a strong tradition as a tool for composing electro-acoustic pieces, it is used by composers and musicians for any kind of music that can be made with the help of the computer. Csound has traditionally been used in a non-interactive score driven context, but nowadays it is mostly used in in a real-time context. Csound can run on a host of different platforms including all major operating systems as well as Android and iOS. Csound can also be called through other programming languages such as Python, Lua, C/C++, Java, etc.

One of the main principles in Csound development is to guarantee backwards compatibility. You can still render a Csound source file from 1986 on the latest Csound release, and you should be able to render a file written today with the latest Csound in 2036.

See, what others do with Csound:

Projects Using Csound
Music by Csounders

Read More