Live data from Hacker News

Uber open-sources tool to automatically clean up stale code

infoq.com

61–70 of 70 posts

Re: Uber open-sources tool to automatically clean up stale code

#61

Earlier quoted context omitted.

Won't `getThingStrategy()` do something like `if PermissionController.get().get(MyPerm.class): doA() else: doB()` ?

Naah, but at least that would make the decision simple and clear (if condition return doA else return 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 m…

That sounds a lot like enterprisy Java programming. I'm not always thrilled to work with the results of that. :-)

Re: Uber open-sources tool to automatically clean up stale code

#62
post #10

I find it strange that a company which provides taxi hailing/routing technology felt the need to write a code cleanup tool.

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

https://news.ycombinator.com/newsguidelines.html

Re: Uber open-sources tool to automatically clean up stale code

#63
post #48
post #47

Earlier quoted context omitted.

it stands for "open-source software". It's never abbreviated as "OS" for obvious reasons.

Thanks, I guess I'll add "Open Source Software" to my list of unusual yet widely understood verbs. The English language confuses a native German speaker once again!

I wouldn’t add that to your list of widely understood verbs based on a single HN comment. Any noun can be (mis)used as a verb in modern English, if speaking very informally, and often with a slight tongue-in-cheek humour about the clunky incorrectness of it. Some examples eventually become mainstream (to google something, to text someone, to roadmap it).

Re: Uber open-sources tool to automatically clean up stale code

#64
I like the concept using an analyzer like this but I've been looking for a tool that removes code that isn't perse stale but isn't executed for, say, x amount of time.

We have quite a few online services in production of which I'm sure have a lot of code that isn't executed/touched by our users.

As an example I'm thinking about code in if statements that are never reached because the statement always returns False. These tools discussed aren't capable of detecting such stale code.

Any suggestions?

Re: Uber open-sources tool to automatically clean up stale code

#65

I like the concept using an analyzer like this but I've been looking for a tool that removes code that isn't perse stale but isn't executed for, say, x amount of time. We have quite a few online services in production of which I'm sure have a lot of code that isn't executed/touched by our users. As an example I'm thinking about code in if statements that are never reached because the statement always returns False. T…

Do you already know the code that is not executed? If not, dynamic program analyses can help with identify the regions of code that are untouched (e.g., take a look at javaagent for Java programs). Subsequently, you can use some form of reachability analysis to determine which code blocks to delete without causing a compilation failure.

Re: Uber open-sources tool to automatically clean up stale code

#66

The latest place I work has a dusty monolith full of skeletons and zombies. They’ve been migrating off it to micro services for like 5 years now. I’d be nice to have a tool to clean it up. But the use cases is slightly different than this one.

Can you elaborate further? It will be interesting to see other use cases for code cleanup.

Re: Uber open-sources tool to automatically clean up stale code

#68
post #55
post #48

Earlier quoted context omitted.

Thanks, I guess I'll add "Open Source Software" to my list of unusual yet widely understood verbs. The English language confuses a native German speaker once again!

To be fair, I am a native english speaker and this is the first time I've seen it used as a verb. "OSS" generally acts as a noun. In this instance I would have used "open source" as the verb of what you could do to your proprietary Software, after which it would become OSS.

[deleted]

Re: Uber open-sources tool to automatically clean up stale code

#69
post #48
post #47

Earlier quoted context omitted.

it stands for "open-source software". It's never abbreviated as "OS" for obvious reasons.

Thanks, I guess I'll add "Open Source Software" to my list of unusual yet widely understood verbs. The English language confuses a native German speaker once again!

Other commenters saying it isn't used as a verb are wrong. They're correct that people never say "I open-source softwared my last project."

However you can definitely use "open-source" as a verb: "I open-sourced my last project." It's pretty common. And in this case "OSS" stands for "open-source", not "open-source software".

What's confusing you is that when we use the abbreviation "OSS" we're really intended people to read that as "open-source" even though the abbreviation technically means "open-source software". btw, you would never verbally spell out "OSS"—chiefly because it's the same number of syllables as "open-source".

Post reply on HN