I find it strange that a company which provides taxi hailing/routing technology felt the need to write a code cleanup tool.
A company with billions in revenue, live updates routing around traffic, has complex machine learning modes predicting ride times and costs, and operates in something like 65 countries. Uber isn’t trivial
Uber open-sources tool to automatically clean up stale code
31–40 of 70 posts
Re: Uber open-sources tool to automatically clean up stale code
#32Earlier quoted context omitted.
You can make most of the Big N sound silly like this. Amazon? Basically a warehouse. Netflix, YouTube? They just stream video. Facebook, Twitter? CRUD websites. It all sounds like anyone can put something like that together, but try scaling up to billions of users.
For sure if you remove the scalability challenges and profits optimizations techniques, these websites aren't that exciting for engineers.
Re: Uber open-sources tool to automatically clean up stale code
#33Earlier quoted context omitted.
At $JOB, we have feature flags of innumerable shapes and sizes. Some are based on account standing, some are % gradual rollout at random, others are a more thoughtful low-risk to high-risk rollout across customers and hosts. Some are manual flipped per customer/only on certain dev hosts. Literally anything you can think of, we have tied behavior to it. But, we've got good frameworks in place such that at the call sit…
> if PermissionController.get().get(MyPerm.class): doA() else: doB(). oh, but if a behavior changes when a feature flag is active, there's a very strong case for it to be pluggable behavior strategy, so I like these so much better as an unconditional call to `self.getThingStrategy().execute()`
Re: Uber open-sources tool to automatically clean up stale code
#34Earlier quoted context omitted.
A company with billions in revenue, live updates routing around traffic, has complex machine learning modes predicting ride times and costs, and operates in something like 65 countries. Uber isn’t trivial
I didn’t know they did their own navigation, I assumed they would use one of the map services
Most drivers use a 3rd party app in practice but uber probably needs to run mapping to avoid a source of weakness/cost.
(Could be totally wrong about incentive structure)
Re: Uber open-sources tool to automatically clean up stale code
#35Earlier quoted context omitted.
> if PermissionController.get().get(MyPerm.class): doA() else: doB(). oh, but if a behavior changes when a feature flag is active, there's a very strong case for it to be pluggable behavior strategy, so I like these so much better as an unconditional call to `self.getThingStrategy().execute()`
Won't `getThingStrategy()` do something like `if PermissionController.get().get(MyPerm.class): doA() else: doB()` ?
Also, if the logic gets more complicated than just an if statement (if Permision... and date < cutoffdate: etc) you don't further pollute the parent function.
Re: Uber open-sources tool to automatically clean up stale code
#36Earlier quoted context omitted.
> if PermissionController.get().get(MyPerm.class): doA() else: doB(). oh, but if a behavior changes when a feature flag is active, there's a very strong case for it to be pluggable behavior strategy, so I like these so much better as an unconditional call to `self.getThingStrategy().execute()`
Won't `getThingStrategy()` do something like `if PermissionController.get().get(MyPerm.class): doA() else: doB()` ?
Better would be for whatever ThingFactory or getThingService instantiates the Thing to make the decision, and compute it up front.
If-else statements in application logic tangle the concepts of "what should be done and why?" with "let me do this Way 1" and "let me do this Way 2". Ideally a typical service (or model or similar) shouldn't be aware that "feature flags" as a concept exist, and this should be regarded as inimical to their encapsulation. It should just know that it delegates a decision to Way N.
Re: Uber open-sources tool to automatically clean up stale code
#37I haven't used it yet myself, but discovered it during a search inspired by this post and thought it would be worth sharing. Definitely a trickier problem to solve for dynamic languages, but looks useful.
Re: Uber open-sources tool to automatically clean up stale code
#38Earlier quoted context omitted.
I didn’t know they did their own navigation, I assumed they would use one of the map services
Those services charge corporate users. If uber develops nothing homegrown then it is subject to the whims of the major map services, mostly google. Most drivers use a 3rd party app in practice but uber probably needs to run mapping to avoid a source of weakness/cost. (Could be totally wrong about incentive structure)
Re: Uber open-sources tool to automatically clean up stale code
#39Re: Uber open-sources tool to automatically clean up stale code
#40We just wrote one that does something similar for Typescript if anyone wants us to OSS it... The idea is that any stale code causes a HUGE amount of headache and removing it can be a life safer.