Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how many lines of code from big open source applications are generic enough to be reused in other projects.

Firefox and Google Chrome probably have the equivalent of many small high quality libraries embedded in them, implementing 'business' logic or protocols, that could be reused in more places.

I guess a large scale study on github could be done, with a graph analysis to show potential "cut off" points in codebase.



This is one of the goals of our Android-components project. Take a peek. Many components are reusable across browsers/applications.


One issue is that if a bunch of code of a similar theme can be broken off, many times it will be (depending on the culture of the software team). Is looking at the source code of a big project with a hundred dependencies that were all libraries spun off to support the project different to looking at a project where people tried to keep everything monolithic (where you’d expect better re-use potential per line-of-code?)


Yeah... the gesture is nice, but good luck extracting any code from a massive project. Might as well say “Here’s some free oil; all you have to do is dig for it.” Unlike oil, this might not be worth the excavation.

It’s a bit telling that they linked to the GitHub repositories rather than specific lines of code they were talking about.


Here's their kotlin implemenation, looks fairly straightforward/self-contained: https://github.com/mozilla-mobile/android-components/tree/ma...


Android components is a foundational technology for our browser products on Android but also for many other applications. We’ve designed things in such a way that you can pull in just those things that you need. If that is not the case, file an issue and we will take a look at how to improve things.


Looking at the iOS project linked, https://github.com/mozilla-mobile/firefox-ios/blob/76faae8c6... , other than being written swift, it looks pretty self-contained/ok?


There is also a content script I think and storage for these icons and their meta data. It is probably less generic on iOS than on Android but should be fairly simply to take some big chunks for reuse.


Yeah, let's violate privacy instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: