I regularly use and love #Typescript. I used to use #Python the most – it’s what I learned in and I am more interested in backends than frontends. I also am regularly using and really enjoying #Kotlin (so much better than #Java). But truly Typescript is bae.
#Julia is a joy to work with. Very much like Python but more powerful. If it had the library support Python or #JVM has I would probably prefer to use Julia for backends.
But Typescript really changed the game and now that’s probably my favorite language not just because of the language itself but because it has web dominance. Until I can write #WASM with Python or Kotlin or Rust, and I’m building #web applications, TS is my lingua franca.
Am I being a bit dumb, or is making a database that has more than 1 table a Herculean Labour?
Scoundrels, Crews and Contacts.
A Scoundrel is in 1 Crew.
A Crew has 0+ Scoundrels.
Contacts are known to individual Scoundrels and/or Crews. A Contact has a Rating (Friend/Neutral/Hostile) with each Scoundrel/Crew.
I need to call each and every combination.
How complicated is this meant to be, as I seem to be making a pig's ear of the whole thing!
It's nice to know that the random tutorials you get from search engines in #Kotlin are just as out of date as the ones for #PHP. It provides a comfort, of sorts, while learning a new ecosystem.
I have just learned that "#Java Bean" has two completely different and incompatible definitions.
One is a dumb, badly designed data object with getters and setters.
The other is... a service object managed by the Spring framework IoC container.
Holy hell. This is 10x worse than #Laravel "facades."
Am I wrong here? This is what I'm finding from online tutorials. Is there more nuance that is not coming through, because for now I just hate #Spring even more.
Big Database Post: #Room#kotlin#android
I have my basic App. It allows Users to record details of Quests for #TTRPG.
It uses a single table, with mostly String fields.
I would like to expand, so that each field could hold more data.
e.g. Location ("The Swamp of Doom", "Wizard's Tower") could be it's own table, with each entry having more info.
I could write a sprawling SQL-Helper class to convert everything back and forth to the DTOs used by UI, but isn't Room meant to help?
more...
This week has been pretty busy at work. Hopefully it has resulted in absolutely awesome results!
✨ Cold start up time for Element X Android has significantly improved from 3-4sec to 100-150ms for accounts with 1000, 2000 or even 4000 rooms (≈30x speed up). That’s awesome! ✨
I’ll explain tomorrow how we did that. Async Rust and immutable data types simply rock.
Whelp, I'm being dumb again, but aren't tutorials meant to assume I'm dumb?
I have my 2 Entity tables, plus a CrossRef table (Scoundrels, Contacts, ScoundrelContactCrossRef)
I can read and write the 2 main tables.
How do I write a new "Scoundrel with associated Contacts" to the 3 tables? I've got it defined in my UI/Domain, and I click SAVE, and... what do I tell ROOM/SQL? #kotlin#room#sql#code#androidDev
Yet another plea for information:
Are there any resources out there that deal with writing data to multiple tables? #room#sql#kotlin
I have several tables, and need to both insert and update them with data from my UI/Domain Layer.
e.g. a new Scoundrel needs to Insert ScoundrelEntity, and maybe Insert new CrewEntity, and update CrewScoundrelCrossRef.
I need to do this for several Relationships.
I will also need to edit/delete
Is there any info on this?
With #Java's evolution (discriminated unions, pattern matching, virtual threads), are #Scala / #Kotlin still worth it?
Scala & Kotlin have a culture of doing things at compile-time, the former more so than the latter.
This yields safety & expressiveness, and is reflected in features that Java will never implement, in platforms that it will never target well, or in paradigms it will never embrace.
Java is still Java, and you're stuck with Spring, Hibernate, and Jackson, sorry.
...and I've run into the same problem I hit before...
I have 3 Entities (Scoundrels, Crews, Contacts)
I have "Scoundrel with Crew" working (Each scoundrel is in exactly 1 Crew. A Crew can have 0+ Scoundrels)
I need to add Contacts. Each Contact can be known to many Scoundrels, and Many Crews.
Each Contact also has a Rating ("Friend", "Neutral" or "Hostile") with each relationship.
I'd like to start by building adding Scoundrels/Contacts relationships
I can't deal with languages with optional semicolons! I like languages without semicolons, but when they're optional, especially if they feel "C-like", I always end up adding semicolons to some lines even when I try to write in a semicolon-less style. I'm writing some #kotlin now and I decided to just use semicolons consistently because the alternative is seemingly to use them inconsistently.
Strangely, this isn't an issue I have in #golang. I do have it in #rust however.
In other news, URLs are now delimited by a space rather than a comma when updating manifests. Komac uses a very small amount amount of memory and has been heavily optimised to minimise memory usage (especially heap allocations). Updating Android Studio (a 1GB+ binary) consistently took just ~3.5mb memory. Komac now has a...
Has anyone managed to implement any iOS delegate protocols from KMM?
Given most will/did delegate methods have the same names and argument types (application for application(willChangeOrientation:…) and application(didChangeOrientation:…)), Kotlin gets confused when I try to implement both, saying I'd already done ...will… when I do …did… .
If you’re working with external web APIs do I have the #JetBrains feature for you. With the new #WireMock plugin, you can mock any external API and test against it.
This makes it really easy to try different edge cases or replay failed request/response scenarios. Works in all IDEs starting in the 2024.1 release. You can try it now in the EAP releases.
My Kotlin Native project started giving me link errors after installing Fedora 39.
My Kotlin code links libgmp using cinterop, and when building on Fedora 39 I get this error:
undefined reference to '__isoc23_strtol', version 'GLIBC_2.38'<br></br>
I know that I'm probably one of very few people that uses Kotlin Native for a large project, so the chances of someone actually having stumbled across this issue is probably small, but I'm still mentioning it here in case anyone has any ideas.
Komac, the Kotlin program for creating Winget packages, has now been rewritten in Rust (github.com)
In other news, URLs are now delimited by a space rather than a comma when updating manifests. Komac uses a very small amount amount of memory and has been heavily optimised to minimise memory usage (especially heap allocations). Updating Android Studio (a 1GB+ binary) consistently took just ~3.5mb memory. Komac now has a...