this post was submitted on 24 Feb 2024
818 points (100.0% liked)

Programmer Humor

23083 readers
2451 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 2 years ago
MODERATORS
 
all 39 comments
sorted by: hot top controversial new old
[–] [email protected] 65 points 1 year ago* (last edited 1 year ago) (2 children)

Does having to look back at 4 of your old code examples to write 10 lines count?

I didn't google it...

[–] [email protected] 30 points 1 year ago* (last edited 1 year ago) (2 children)

Isn’t that the idea. Like you know that you had a viable solution to a complex problem previously so why go through the trouble of solving it again if you already did. Even if you have to modify it, it saves time for new novel problems. I’m

[–] [email protected] 20 points 1 year ago (1 children)

a viable solution to a complex problem

You mean how to structure a for loop in a bash script? Lmao

[–] [email protected] 8 points 1 year ago (1 children)
[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

Yeah.

My company starts all new projects from a skeleton of the last project including shared directories of usual functions we’ve created over time.

[–] [email protected] 6 points 1 year ago (1 children)

Sorry I was trying the parse the "I'm" at the end of your comment

[–] [email protected] 11 points 1 year ago

Ah, just a typo. Or my alter ego almost escaped.

[–] [email protected] 8 points 1 year ago

That's the way. I've been programming for nigh on four decades, and it's almost a daily occurrence with junior devs going to stack overflow or chatGPT to solve an issue instead of just searching the code where nine times out of ten the problem (or a very similar one) is already solved.

[–] [email protected] 24 points 1 year ago (2 children)

Been doing a whole lot less of that now that copilot is up and running. Didn't expect it to be such a productivity booster tbh.

[–] [email protected] 3 points 1 year ago
[–] [email protected] 21 points 1 year ago* (last edited 1 year ago) (1 children)
myList = list(
    78,
    99,
    15,
    78,
    03,
    22,
    12,
    73
)
[–] [email protected] 4 points 1 year ago

Nice try, you clearly googled to make this /s

[–] [email protected] 12 points 1 year ago (3 children)

Me when I write a regrex without googling every bit of it.

[–] [email protected] 3 points 1 year ago (1 children)

"regrex" They should definitely be known as that!

[–] [email protected] 1 points 1 year ago

lol, didn’t even see my typo

[–] [email protected] 2 points 1 year ago

One day I'll pull that off...

[–] [email protected] 1 points 1 year ago
[–] [email protected] 12 points 1 year ago (1 children)

There are people who unironically believe this.

[–] [email protected] 12 points 1 year ago (1 children)

Me running an LLM at home:

The same image, but the farmer is standing in front of a field of poppy (for opioid production)

[–] [email protected] 4 points 1 year ago (2 children)

I am researching doing the same, but know nothing about running my own yet. Did you train your llm for programming in any way, or just download and run an open source one? If so which model etc do you use?

[–] [email protected] 2 points 1 year ago (1 children)

Have a look at llama file models they're pretty cool, just rename to xxx.exe and run on windows and chmod on Linux.

Though the currently supported ones are limited, you could try llama code.

[–] [email protected] 1 points 1 year ago (1 children)

Where do you get it? Hugging face?

[–] [email protected] 2 points 1 year ago (1 children)

https://llamafile.ai (though it's down for the moment)

https://github.com/Mozilla-Ocho/llamafile

Lot's of technical details, but essentially the llamafile is a engine + model + web ui, in a single executable file. You just download it and run it and stuff happens.

[–] [email protected] 1 points 1 year ago
[–] [email protected] 2 points 1 year ago (1 children)

Run an open source one. Training requires lots of knowledge and even more hardware resources/time. Fine tuned models are available for free online, there is not much use in training it yourself.

Options are

https://github.com/oobabooga/text-generation-webui

https://github.com/Mozilla-Ocho/llamafile

https://github.com/ggerganov/llama.cpp

I recommend llavafiles, as this is the easiest option to run. The GitHub has all the stuff you need in the "quick start" section.

Though the default is a bit restricted on windows. Since the llavafiles are bundling the LLM weights with the executable and Windows has a 4GB limit on executables you're restricted to very small models. Workarounds are available though!

[–] [email protected] 1 points 1 year ago

Im gonna give llamafile a go! I want to try to run it at least once with a different set of weights just to see it work and also see different weights handle the same inputs.

The reason I am asking about training is because of my work where fine tuning our own is going to come knocking soon, so I want to stay a bit ahead of the curve. Even though it already feels like I am late to the party.

[–] [email protected] 7 points 1 year ago

I always feel bad about how much I have to look up until I look at any programmer based forum. Then, I feel at home lol

[–] [email protected] 5 points 1 year ago

Apparently the average developer will get this much done in a single day's work anyways, so nice job being ahead of the curve!

[–] [email protected] 3 points 1 year ago
[–] [email protected] 3 points 1 year ago

Maybe you need to. 😬

[–] [email protected] 1 points 1 year ago
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Only 10 lines of code o.O, that much!