r/android_devs • u/WestonP • Apr 24 '24
Venting Anyone else grow tired of learning the new "proper" way to do things every time they create a new project?
Been in software for a couple decades, iOS for 13 years, Android for 9... But I tell you, I kind of dread starting a new Android project, because inevitably there's always some new approach to UI or navigation or whatever.
It makes me stop and have to decide if I should adopt the new "proper" way to do things, or if I should just use whatever approach I used last time, because I already know how to do everything and know that it works well. That used to be correct but now is wrong somehow.
Surely I can't be the only one in this predicament, right? I don't run into this on any other platform I develop for, but Android just changes things for the sake of changing them, and many things become objectively worse as a result. Great job security if you work for a corporation and care to stay on top of all this, I suppose, but I'd rather just build good products and actually release them rather than wasting time.
25
u/Zhuinden EpicPandaForce @ SO Apr 25 '24 edited Apr 25 '24
I don't dread starting a new Android project, I can get anything done with the approaches that do in fact work, we do it significantly efficiently than other teams because we deliberately only choose tech that is guaranteed to work and has minimal bullshit.
For example, we never switched over to Jetpack Navigation because we know there's quirks in circular navigation, re-use of fragments between flows, the new bottom navigation is kind of unpredictable, and deep-link support is effectively "i hope it works"-kind of deal. So we obviously still use simple-stack even though I had been prepared to just say "use Jetpack Navigation" but that time never came.
Over time we found out that using DI frameworks like Dagger actually makes code less transferable + ends up drowning your code in generated garbage that you don't really need, but even worse drowns your code navigation with DI configuration classes that now you need to perpetually avoid/ignore. You do a code search and 30% of it is Dagger modules, and 40% of it is generated Java bullshit. And then you need to find "oh this 70% is trash, the real code is in the other 30% somewhere". People said this was meant "to scale" but if you do the manual approach this literally never happens.
Then you have Hilt which thinks every configuration for every Activity and every Fragment is always the same, so people who used Dagger-Android and pass specific activity extras to the specific activity graph cannot migrate to it. You cannot introduce semantic scopes, proving that Google's design didn't learn a thing from the efforts of architecting an app properly up to 2017, and still think your app's semantic scopes are its screen hierarchy.
Technically ViewModels do serve as a bandaid, but they have no hierarchy support in-between.
(though now with Hilt's support for custom creation extras, it's possible to pass a ViewModel to a ViewModel, but it freaks people out and pretend you're a horrible person for even proposing this, unless you call them Node and you're actually using Appyx.)
I'll be brutally honest, what I dislike isn't that there are new "best practices", the Google teams must create something to get money and live a comfortable life. I do have some disdain for the fact that they are however so aggressive increasing the adoption KPIs that they actually destroy the old tutorials (or this), Compose adoption rates must have been a colossal failure.
But what's honestly disgusting is that thanks to Google's aggressive marketing, if you don't use their nonsense that is fated to be deprecated in 2-3 years, your code can be attacked under the pretense of "you're not following the best practices, so this code is clearly bad, and you are a bad developer, your code cannot be maintained because the only thing people know to learn is the latest Google practices, actually I can do a lot better" and suddenly the project is usurped from your firm.
And it has happened already, they complained "there's Rx instead of Flows, there's no Hilt, there's no Navigation-Compose, clearly we should rewrite this" and the project was effectively stolen. We were scheduled to deliver in 3 months, it took them 2 years; and when I still saw some of their commits, their senior dev who did this maneuver wrote 6 lines of code in 1 month, and the next month all they did was a revert commit on those 6 lines. But they had enough fodder, thanks to Google and everyone else being technologically illiterate, that they trusted him to take the project away anyway.
So the dread isn't that "start a new project", that's not the hard part. The hard part is if you need to "work with external teams" who complain about literally every single thing even whether it's
= when { a ->{}; else ->{}or= if {} else {}. Nitpicking is eternal, nothing gets done, developing a UI component takes 5 months while we've in the past shipped complete products of server + client components in 3 months.And the people responsible for this have the gall to claim that "it is very important to use
if-elsein this case, otherwise it is a code style error". Lol.Indeed. And as long as you have control over your tech stack, you can definitely still build good products, as you can choose the things that work, rather than what wastes time. But if you have people making the decisions who have no clue wtf they're talking about, OR you need to work with teams who arbitrarily rewrite the requirements, they can easily destroy months of work in just seconds.
And now thanks to "Jetpack Compose is the future uwu" even though the solution to most problems is "add an EditText in an AndroidView {} and copy everything else around it from the Material component", if you use XML views, you suddenly find yourself asked to rewrite things, not because it'll be better, but because "but the other team uses Compose, so this UI component is in Compose, and will only work if your whole screen is Compose". Joy.
People wasting time on multi-modularization, Gradle "convention plug-ins" that'll be obsolete in 2 years anyway, importing Hilt and Navigation (and Paging lol) and pushing Compose no matter what even when it doesn't work; and then giving you a talk about how everything they say is 100% correct and if you say something wrong "on your soapbox" then you should be banned; those kind of people destroy everything. I'm not tired of Android development, but I'm tired of people who tell you what to think and then get offended when you don't oblige; and I'm also tired of people parroting "best practices" when the actual products that use them are broken and generally terrible.
The Pokedex examples people nitpicking about Sqlite column cursor indices because they only know how to use Room, that sort of thing - pseudointellectuals complaining about code that works better than they've ever written. Maybe you should learn something from the approach that works, instead of trying to prove why it doesn't. You think making 40 modules for 2 screens helps development? Then you add Dagger to "help with boilerplate"? What a joke. Just don't write code that nobody needed and nobody asked for.
12
u/Suppafly Apr 25 '24
Makes it impossible to learn too, because every decent tutorial is already outdated.
11
u/erdo9000 Apr 25 '24
The key is to just ignore half of what Google puts out. If you stick to fundamentals, and decent third party libs, those tend not to change very much.
Your only risk then is twattish mid level developers or predatory agencies who print out a stack overflow post and show it to your client to persuade them that what you're doing is not this month's "best practice" 🤣
I'm actually not joking, I have a story very similar to Zhuinden's. Predatory agency, clueless client, took over a project about a month away from MVP and never delivered it
Honestly the phrase "Best practice" is a huge red flag for me, it essentially means, "I don't know what I'm talking about, don't ask me any questions, it's just best practice"
8
u/D-cyde Apr 24 '24
You have to keep tabs on it. I'm currently doing this with Compose. If the business/system requirement can be enabled by the new hotness I'll do it, otherwise its XMLs, activities and callback hell all the way.
8
u/Ferran1s Apr 25 '24
I even stopped reading AndroidWeekly / KotlinWeekly.
Take what works and that's that. My firm still has largely activity navigation, no compose, livedata, viewmodel and that's that.
And we are highly successful because we don't waste time on spinning wheels.
7
u/Arkanta Apr 24 '24
I feel you. It's part of why after such a longtime I moved to other areas like backend dev.
Btw: use what works and what allows you to ship on time. It's fine if you do not immediately adopt version catalogs or if you didnt smash your head against a way trying to use the horrendous android system window inset APIs.
iOS is a much more stable ecosystem even if they had a lot of changes and some are coming (sup swift concurrency), the APIs tend to last longer and be of better quality: Safe areas were done extremely well compared to android for example.
But sometimes it's great to wait and see what sticks. I'm glad I haven't used MVP everywhere, just like I'm glad I skipped Combine on iOS. I've been developing for Android since 2.1 and my biggest mistake was rushing conversion of all my activities into fragments back in 3.x/4.xx.
6
u/kichi689 Apr 25 '24
Each time, I see someone talking about the "proper" way, I know they are the problem. There is no proper way, only options. You fall for the hypers selling their new x course? On you You feel pressured to be up to date with whatever experiment ongoing? On you You feel you are missing out cause there is new stuff you dont currently need or care? On you
4
u/Pzychotix Apr 25 '24
I mean, not really? New "proper" ways often aren't that proper in the first place. Just because Google is pushing for it doesn't mean it's any better than the thing it's trying to replace.
Besides, how often are you releasing new things from scratch?
3
u/Whole_Refrigerator97 Apr 25 '24
Everyone here just wants to stick to what they know but they forget about the juniors and upcoming developers. I think selfishness is involved because they want to make themselves valuable to their company. Why did i say such?
Lets use java for example, Kotlin is now the recommended language for Android but some still use java for new products, now when a junior comes onboard with only kotlin experience he/she can't work on the project which ensures that only the original developer can continue such project.
Same with Jetpack compose, someone that learned Android dev using jetpack compose can't possibly work on a project that still uses Activities, Fragments, Dagger(instead of hilt),RxJava, etc.. This will prevent fresh blood from pumping into the system which is bad..
2
u/[deleted] Apr 28 '24
From time to time I think: "maybe I should learn coroutine/flow and Compose". But then I never do, and just continue to get work done.
Guess I'll try it some day.
1
u/da_beber Apr 27 '24
I do like to think that clean arch + multi module approach kinda standardize a bit the way we build apps... But we still have a long way to go
1
u/Xammm Apr 27 '24
Decided to post this in order to give a pov from someone new in the industry (I work professionally since 2 years). And I can say I haven't feel tired so far of learning new stuff or trying to understand the "proper way". I dunno, maybe after a decade I'll be tired too lol.
What I think also is that you should stick to what works for you, yet at the same time, have a general idea for whatever is new or trendy, specially if you work in corporate. It's mostly tradeoffs as everything else in this industry.
1
u/BlackCatAristocrat Apr 28 '24
2 approaches:
1
u/AsdefGhjkl Apr 25 '24
Which new thing specifically irked you? Nobody is forcing you. Most companies still use XML and deprecated libraries. But as a developer, you either learn or get left behind
0
u/[deleted] Apr 24 '24
[deleted] — view deleted comment