this post was submitted on 31 Jul 2024
729 points (99.3% liked)

Programmer Humor

19149 readers
1179 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] KillingTimeItself@lemmy.dbzer0.com 15 points 1 month ago (13 children)

i think programmers need a self inflicted rule of it being less than 500 lines of code means you need to write it instead of using a pre written package/library.

On the other hand, we could make the packages like is-number the worst possible way of checking if something is a number, which would be really fucking funny...

[–] dan@upvote.au 8 points 1 month ago* (last edited 1 month ago) (3 children)

programmers need a self inflicted rule of it being less than 500 lines of code means you need to write it instead of using a pre written package/library.

That's what I do, but then I end up with similar utils across multiple projects (eg some of these array, map, and set utils: https://github.com/Daniel15/dnstools/tree/master/src/DnsTools.Web/ClientApp/src/utils) and wonder if I should create a library.

Then I end up doing that (https://github.com/Daniel15/jsframework is my most 'recent' one, now very outdated) but eventually the library gets outdated and you end up deleting most of it and starting again. (edit: practically this entire library is obsolete how)

It's the circle of life.

[–] KillingTimeItself@lemmy.dbzer0.com 1 points 1 month ago (2 children)

i wonder if maybe we just need personal package repos for shit like this, stuff that probably shouldnt be out on the internet and accessible, but that's also worth packaging for regular use. Like a sort of "code macro" which is something i see people doing a lot for certain boilerplate strings.

[–] felbane@lemmy.world 1 points 1 month ago (1 children)

You are describing a state of software development that has existed since the introduction of punch cards.

Practically every business I've worked at has had some internal library or repository of commonly used behavior that can be included in day to day projects.

obviously, i just mean more universally on an individual level today, maybe we just need package quality reviewers these days lol.

You could pretty easily add this feature into whatever shit ass IDE you use that consumes 8GB of ram by just existing.

load more comments (9 replies)