Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "jcenter"
-
I released an Android lib on JCenter.
So far so good. What I didn't realize was that I had a terrible bug related to a content provider.
Since I was using the ContentProvider to make my CursorLoader work, if someone installed an app with my lib, you couldn't install another one with it because it would conflict the providers.
I had to quickly find a solution and dispatch a new release. -
Fucking java library publishing. It's a nightmare. You have to fucking own a domain to publish a shit onto jcenter/bintray/whatever. You have to own the domain, that your lib's package name is. And you MUST verify it, otherwise you won't publish anything. Or you can shit allover your lib with package name like com.github.dumbcoder.mycoollib.
You must to create a ticket for some shitheads that are going to verify your shit for two weeks. They gonna ask you for source.jar, docs.jar and whatever shit.jar they need.
What THE fuck? Who was the asshole that decided name packages in reverse domain name? No FUCKING more ecosystem has such a bullshit. In .net you just make a lib, create a free nuget account, fill some basic info and boom! you have .net package published. Same for npm and rust for example.
Because the fucking package name should be just for structure not for a some dick to own it. Namespace is name-fucking-space.
FUCK JAVA.7 -
Seriously, fuck Bazel. It's the most unintuitive build tool I have ever had the displeasure of coming across.
It works, but try compiling an Android app, that uses deps from gmaven, maven and jcenter and has java, as well as native dependencies.
It's fucking impossible. -
I've just joined a new company out of despair after several month out of jobs without being able to even get interviews.
I've been warned about the code being a bit behind with modern Android stack, they needed to migrate from rx to coroutine and compose is not a priority at the moment.
Fine with it, I like handling and planning migration, that's a nice challenge.
But if only that were the only problems !! Far from it, the code is a formidable mess, I've never seen so much amateurism... Most of it was written from the previous Lead Dev who stayed there for years and touched everything with their very bad practices.
I don't even know where to start honestly...
While the code is in Kotlin, it stink Java. Nothing wrong about Java, but if you code in kotlin, you need to understand what kotlin try to achieve. And that's not the case here. There is freaking nullable everywhere, for no reason at all, the data classes contains lot of var in their constructors, equals are override to compare only one or 2 params and no hashcode override with it.
Sealed class, what for ?! Let me just write a List<Pair<Enum, Any>> and cast your any depending on the enum !
Oh and you know what, let's cast everywhere, no check, and for once no null safe, there is enough nullable in the code !
What about the reactive part ? well let's recreate a kind of broken eventbus with rx ! Cause why not ?!
The viewmodel observable don't contain data, they just contain enum for the progress of the states we're checking.
In the viewmodel function we update that enum states and emit it to be observed and make the data available as a var for the view to pick it up when needed.
But why put the business logic in the viewmodel, let's put in the views, and grab and check the variable contain in the viewmodel whenever it fits.
Testing the business logic ? uh let me just test my variable initialisation in the viewmodel instead.
The vm, the views, make about 2000 lines, the test over 3000, and not a single test really test the business logic in it ! I've made big refactoring we're all the tests stayed green, while the function are full of side effects ! WTF ?!
Oh and what about that migration from rx to coroutine ? well better not break the existing code and continue writting like rx, everything is cold flow ! We just need to store a boolean saying if we already did our call to the data layer then we decide to start our flow or not.
As for the RecyclerView, having too many viewHolder is just so annoying, let's put all our different views in one, and hide what we don't need.
Keystore has been push on the repo, but it's private no ? So who cares ?!
And wait i'm not done ! Some of the main brick of the apps depends on library that hasn't been updated for years, and you know what... yes they were hosted on Jcenter and it's only now that they decide to do something about it, we we're warned about the sunset of jcenter 2 years ago !!!!
So what about compose ? What do you want with compose ?! there is no design system in that app obviously, so don't even think about it !
And there... among all of that mess, I'm supposed to do code review... how the fuck do you do a code review when all the code that is around stink ?!
And there is so much more but by now I'm afraid you're thinking i'm just pissing on the old code like everyone... but damn I guarantee, that's the worst code I've ever seen, and i've work on more than 15 app from small to big on different contract with a lot of legacy code, but nothing that bad !1