News for hackers. Stuff that matters.
Re:Long Term Software Development by t-writescode on Monday December 23, 2024 @12:27AM (#42492028)
> I also find it difficult to rationalize third-party dependencies these days

I would love a deeper insight into what you mean by this. I can't imagine you're rolling your own http server, database communication layer (as in like, postgresql's jdbc driver), json parsing engine, etc.

Re:Long Term Software Development by pdhborges on Monday December 23, 2024 @04:17AM (#42493034)
Web dev context here. Just from the top of my head: django-constace breaks storage format with no built-in no downtime transition, django-modeltranslations, want to add translations to a heavily used field and you are using a database without transactional ddl good luck with that, django-importexport used a savepoint per row making it useless if you want to import csvs with a few thousand rows, requests doesn't officialy declare thread safety, I could go on and on ...
Re:Long Term Software Development by graemep on Monday December 23, 2024 @01:07PM (#42496322)
Most of my work is Django and I think its fairly easy to keep dependencies low because Django is very batteries included.

A good case where people use an unnecessary dependency is calling REST (or other http) APIs. If there is a wrapper, people tend to use the wrapper, which is not really needed if the in many/most cases. AT the most use something like requests which is what a lot of things use anyway.

> django-importexport used a savepoint per row making it useless

That is pretty crazy.

It is also another example of something that is easily avoided.

Re:Long Term Software Development by throwaway290 on Monday December 23, 2024 @04:13AM (#42493015)
JSON parser, http server are provided by many runtimes and if a runtime does not provide something it provides primitives that make it often trivial to build
Re:Long Term Software Development by lmz on Monday December 23, 2024 @06:28AM (#42493640)
I'm not saying it's impossible, but writing your own HTTP server ("trivial to build"?) to avoid bugs in other implementations doesn't sound like a good idea to me.
Re:Long Term Software Development by throwaway290 on Monday December 23, 2024 @09:06AM (#42494450)
Read more carefully. We talk about "third-party dependencies" not about "other implementations". Using HTTP server from your runtime is not against the recommendation of avoiding third-party dependencies. Your runtime is usually not counted as "third-party dependency", normal runtimes don't have breaking changes every other moon

(Even if you need to implement something like that from scratch it may be OK, your requirements don't need all of the functionality a third package includes because someone else needed it)

Re:Long Term Software Development by lmz on Monday December 23, 2024 @06:28PM (#42498427)
It's the "trivial to build" thing I have issues with - especially for the HTTP server. Not runtime vs third party.
Re:Long Term Software Development by rurban on Monday December 23, 2024 @10:00AM (#42494844)
I had to write one recently. One third page of code, multi-threaded. Really trivial, and no security nightmares as with overblown 3rdparty deps.
Re:Long Term Software Development by perlgeek on Monday December 23, 2024 @12:31PM (#42496042)
The original piece was on developing with a long-scale time horizon (10 years), so you could go with software that has been very stable over comparable time scales.

For example, there are corners of the Perl ecosystem that have been really stable for a long time. Perl itself is very conservative with backwards-incompatible changes, and DBI, the module that abstracts away database interactions, has been around for a long time (the oldest changelog entry is from 1995, but that was for version 0.58, I'd be surprised if it weren't even older).

Of course, then you don't get the fancy, modern libraries, but going with DBI plus DBD::Pg is probably more efficient than coding your own, and stable enough for a ten-year horizon.

Another approach might be to move the really critical pieces of your software to a much simpler interface. For example, HTTP/2 looks much more complicated than HTTP/1.1, so your software might only implement (a subset of) a HTTP/1.1 server, and then you can use an off-the-shelf reverse proxy to expose it to the "modern" internet. This reverse proxy then is easier to replace, because it doesn't handle the core logic of your application.

Or you go really old-school and use CGI, which is an even simpler interface than writing a HTTP server, and any HTTP server that implements CGI would do as a frontend.

Re:Long Term Software Development by paulryanrogers on Monday December 23, 2024 @04:05PM (#42497589)
> Perl itself is very conservative with backwards-incompatible changes

So much so that Perl 6 became a whole separate (doomed?) language after trying to change too much.