You probably know it – there's a brilliant idea right from the start, but you didn't see it for years! Scenes is one of such things.
When you define layout i Qedy, you use model.graph
to do so. And most of the time you start by defining various screens, using QView or QForm Components.
When switching between those screens, you need to make it visible and hide all the other screens, because you don't know which one is visible at the moment.
At first I created a helper method swap
, which first argument was what comp to show and all other arguments were comps to hide. But if you add new screen, you have to modify many swap calls to add the new screen to be hidden as well. I'd like to automat that.
I kinda always liked the idea of iOS's Storyboard editor in Xcode, introduced for iOS 5 in 2011. It's very simple way of visualizing GUI of the whole app with flows between "scenes", which is basically just a View Controller:
In Unity3D, "scene" is not just level or piece of a game world, but also Main Menu or different parts of the game. This would fit nicely into the platform ecosystem, as the system could be repurposed from Qedy in Qard as well.
So, when parsing a model, scenes are created from all named components directly in graph.add
. And later, when switching scenes in the app, you call scope.scene("scene1")
for scene1 to appear.
I'm thinking about automate it even more and allow scene names to appear in path, so to call scene1 you just navigate to /path/to/scene1
. But I have to deal with path component mismatches first, as there will be plenty of edge cases.
With my wife we're keen travelers and our goal is to visit at least one new country every year. Our 62nd country was Indonesia – Java + Bali + Flores/Komodo + Lombok. It was interesting to see the huge difference between Java and Bali, it's like a difference between California and Hawaii. I can claim I was in the US when I only visited Hawaii, but I kinda wasn't, was I...
The reason why I mention this trip here is I was amazed about the level of digitalization there. First of all, it felt like one quite significant level of living standards is missing – especially garbage handling. It made me sad and hopeless to see garbage burned in the streets and dumped into rivers, especially with EU's Green Deal having some economic impact on us.
But, on the other hand, every major thing has its app and website, albeit often only in Indonesian and often somewhat partially broken or obsolete. I added six apps to my phone before the trip and two more during our time there. Later I found out the situation is quite similar even in my home country of Czechia.
We eat locally as much as possible, so tourist restaurants weren't option for us. We opted for local eateries called `warungs` instead. They often use a shallow woven basket with waxed paper inside instead of plate, but you can also have the food delivered to your hotel by an on-line services, like Grab or GoFood. Apps are very straightforward; it took me less than an hour from downloading the app to eating.
Everyone (including some businesses) is using WhatsApp and they often expect you to do so as well. Similarly to Costa Rica we visited last year, there are also mobile data plans, that exclude WhatsApp (and some other apps) traffic from the data cap, so you can chat away as much as you want.
Because of that, we purchased a local prepaid SIM card with a data plan. At the airport they offer only a single abundant plan (25 GB for Rp150,000), while our prepaid from a Telkomsel's stall on local market was sufficient 7 GB for just Rp25,000.
But the SIM card still needed an activation, that could be done only at their locations (called “GraPARI”), and it requires IMEI registration with the government, so the process takes at least 20 minutes. Take that into account, especially if there are other tourists already waiting before you.
Public Wi-Fi is on many places, especially airports. At Jakarta, Yogyakarta and Bali airport they use the same login process, which was quite... original. I tried my .cz
e-mail address, but it said it's not valid – Gmail was OK. Then they wanted my phone number, but a list of country prefixes was unsorted sorted by country name, but without the country names! So you either spent eternity scrolling thru dozens of prefixes, or you just gave up and entered a fake number.
Another login option was to use Facebook, but mine is secured by 2FA and on my iPhone I wasn't able to return to the login form without forced reload, after which I had to start over.
So I waited for authenticator code to refresh, I copied it and immediate connected to the network, which prompted the login screen to appear. I used password manager to quickly fill my credentials and in the next step used the 2FA code from clipboard – all in under 30 seconds, before the code expires. This can't be done in busy times, when the network is overloaded though.