News for hackers. Stuff that matters.
Re:Ask HN: When does it make sense to roll your own X? by franciscop on Sunday July 14, 2019 @12:59AM (#20431720)
Ah this is a very difficult, multi-variable question. I think this question should be given with a lot more context. Of importance, out of the top of my head, are:

- Do you need the get results now, or long-term maintenance is more important?

- Are you going to roll your own internal tool or publish it as open source?

- How responsive are the developers of the original library? Did you attempt to ask them for help/consulting/etc?

- Can you wrap the library so that you get 80-90% of the work out of the way? Can you fork it so that you get 50-70% of the work already done? As everyone mentions here, licensing is important for this question.

- Do you have people who have created and maintained libraries before? Do you know what it takes to publish your own library?

For example, I've written hundreds of small libraries and projects in Javascript, so I know the tools, common issues and details of creating a new library. So for me, creating a new one is fairly easy. For someone who has written the same amount of code in their career, but mainly focused on a single codebase, the cost (both short and long-term) of creating a new library is a lot higher.

Re:Ask HN: When does it make sense to roll your own X? by kd5bjo on Sunday July 14, 2019 @01:31AM (#20431823)
I heartily agree with all the concerns here, but there are also business and professional development factors to consider, in addition to your present situation:

- How stable are your needs? Will your ideal setup be the same 6 months from now?

- Is this a core piece of the business or a peripheral concern?

- Which is more valuable: developers that understand the underlying theory, or developers that are familiar with the preexisting library?

- Will the act of rolling your own library make your team more valuable? Will it make them too expensive?

- How will this choice affect developer retention? Your ability to hire new developers?

Re:Ask HN: When does it make sense to roll your own X? by candiodari on Sunday July 14, 2019 @07:06PM (#20436846)
A problem I wonder about is that frameworks and doing things well are often diametric opposites. For example, studies keep pointing out that for e-commerce, low latency and ridiculously fast sites matter a lot. They get you from zero to functional really fast, and then you're stuck.

You're not getting that with django, or ror, or ... And no, caching will not get you there, especially not if you take every framework's approach to caching: always set cache headers to never ever cache because it might be dynamic.

The thing is, if you expect to really grow, you're going to have to roll your own, as that's the only way you'll ever get it really fast, really doing what you want.

Re:Ask HN: When does it make sense to roll your own X? by kd5bjo on Sunday July 14, 2019 @07:22PM (#20436922)
Take two nominally identical physical products (from IKEA, for example), one that’s on the shelves today and the other produced several years ago. There’ll be lots of subtle changes that got made as the manufacturer figured out how to improve the product, by cutting costs or improving reliability.

The frameworks you mention are great prototyping tools but as a community, we’re missing the knowledge of how to take a proven prototype and continue improving the quality rather than bolting on questionable new features.

Re:Ask HN: When does it make sense to roll your own X? by dragonwriter on Sunday July 14, 2019 @08:39PM (#20437234)
> as a community, we’re missing the knowledge of how to take a proven prototype and continue improving the quality rather than bolting on questionable new features.

No, we aren't. We know how to do that, and can do it when we want to. In software dev we rarely want to, because (loaded use of the qualifier “questionable” aside) product teams tend to perceive (not entirely inaccurately, though sometimes the particulars are in error) market demand for additional features. (Also, what physical products are very often optimizing is unit production cost for equivalent products, not quality. But software already has an essentially zero unit cost, so there's essentially no gains to be had optimizing that.)

Re:Ask HN: When does it make sense to roll your own X? by franciscop on Sunday July 14, 2019 @03:39AM (#20432233)
Oh yeah, I just realized I missed a whole category: personal development. I would definitely not be here (probably not in software at all) if I hadn't reinvented the wheel again and again for fun and learning.
Re:Ask HN: When does it make sense to roll your own X? by ptx on Sunday July 14, 2019 @12:12PM (#20434192)
> Will the act of rolling your own library make your team more valuable? Will it make them too expensive?

Are you saying that developers should be kept ignorant and incompetent so that they'll have no choice but to stay at your company writing poor-quality software?

Re:Ask HN: When does it make sense to roll your own X? by kd5bjo on Sunday July 14, 2019 @12:53PM (#20434417)
I’m saying that pushing your developers to improve will increase their market value, possibly outside your personnel budget. One possible outcome here is that they decide to leave and join a company that will give them a higher salary to reflect their increased skills.

On the other hand, withholding opportunities for growth is also a way to frustrate employees and cause them to leave. Know your people, and take their changing needs into consideration when planning business strategy. There’s lots of strategies that can work here, but not all of them are right for every company. A few off the top of my head:

- Build a training pipeline so you can regularly hire promising young developers for cheap and help them grow into a more senior position elsewhere.

- As your developers improve, be prepared to give raises and promotions to reflect their increasing value.

- Hire experienced developers with the skills you need at a fair price and offer stable employment instead of fast-track growth.

Re:Ask HN: When does it make sense to roll your own X? by chii on Sunday July 14, 2019 @01:13AM (#20431762)
the most important aspect: is the functionality provided by the library core to your business need, or just an incidental need?

E.g., you need a web-framework to program your e-commerce site, The web-framework is not a core business need (you are just selling shit online), but incidental. Therefore, don't roll your own.

You need a web-framework to implement a SaaS app, and this SaaS app is your main business (think Canva, or lucid charts etc). Therefore, you should roll your own to suite your SaaS app, and make it fit intimately with your business needs.

Re:Ask HN: When does it make sense to roll your own X? by franciscop on Sunday July 14, 2019 @07:53AM (#20432954)
OP doesn't mention a company at all. If they are doing a fun side project at uni, or a research project, it might that business needs are not be the most important aspect!
Re:Ask HN: When does it make sense to roll your own X? by chii on Sunday July 14, 2019 @09:00AM (#20433131)
> If they are doing a fun side project

in that case, their business need is to have fun! And i would say writing it all from scratch is most fun of all.

Re:Ask HN: When does it make sense to roll your own X? by sova on Sunday July 14, 2019 @01:10AM (#20431755)
Isn't it always better to open-source something that you need a solution to? (as someone else will likely need it, too)
Re:Ask HN: When does it make sense to roll your own X? by TAForObvReasons on Sunday July 14, 2019 @01:18AM (#20431788)
If it's something that others will likely need and will likely pay for, it may make more sense to build it and sell to them. By open sourcing, you eliminate one major potential revenue stream for unknown benefit.
Re:Ask HN: When does it make sense to roll your own X? by kd5bjo on Sunday July 14, 2019 @01:35AM (#20431843)
That someone may be a direct competitor to you. Giving them access to your R&D may let them undercut your prices and make it harder for you to find clients.