1009
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 25 Jul 2024
1009 points (97.5% liked)
Technology
59038 readers
4107 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
The workload that's starting now, is spotting bad code written by colleagues using AI, and persuading them to re-write it.
"But it works!"
'It pulls in 15 libraries, 2 of which you need to manually install beforehand, to achieve something you can do in 5 lines using this default library'
I was trying to find out how to get human readable timestamps from my shell history. They gave me this crazy script. It worked but it was super slow. Later I learned you could do history -i.
Turns out, a lot of the problems in nixland were solved 3 decades ago with a single flag of built-in utilities.
Apart from me not reading the manual (or skimming to quick) I might have asked the LLM to check the history file rather than the command. Idk. I honestly didn't know the history command did anything different than just printing the history file
man 3 history
info history
Also, your .bashrc file in your $HOME Dir contains env variables you can set to modify the behaviors of the history function.
Oh I need to learn more
Honestly, I thought I knew lots.
Then, one day, I decided to read
man intro
Then I knew I knew I didn't know much.
I still don't.
But I now have a much better grasp of what/how.
I really need to alias man to man -a.
I
man -k
a lot.What's that?
The option
-k
for the commandman
allows you to search the manual pages for specific terms.Similar to the command
apropos
Examples of both in the image
I didn't know about this. Thank you for the knowledge fellow human!
I don't run crazy scripts in my machine. If I don't understand it's not safe enough.
That's how you get pranked and hacked
TBH those same colleagues were probably just copy/pasting code from the first google result or stackoverflow answer, so arguably AI did make them more productive at what they do
yay!! do more stupid shit faster and with more baseless confidence!
2012 me feels personally called out by this. fuck 2012 me that lazy fucker. stackoverflow was my "get out of work early and hit the bar" card.
I asked it to spot a typo in my code, it worked but it rewrote my classes for each function that called them
I gave it a fair shake after my team members were raving about it saving time last year, I tried a SFTP function and some Terraform modules and man both of them just didn't work. it did however do a really solid job of explaining some data operation functions I wrote, which I was really happy to see. I do try to add a detail block to my functions and be explicit with typing where appropriate so that probably helped some but yeah, was actually impressed by that. For generation though, maybe it's better now, but I still prefer to pull up the documentation as I spent more time debugging the crap it gave me than piecing together myself.
I'd use a llm tool for interactive documentation and reverse engineering aids though, I personally think that's where it shines, otherwise I'm not sold on the "gen ai will somehow fix all your problems" hype train.
I think the best current use case for AI when it comes to coding is autocomplete.
I hate coding without Github Copilot now. You're still in full control of what you're building, the AI just autocompletes the menial shit you've written thousands of times already.
When it comes to full applications/projects, AI still has some way to go.
I can get that for sure, I did see a client using it for debugging which seemed interesting as well, made an attempt to narrow down where the error occurred and what actually caused it.
I'll do that too! In the actual code you can just write something like
and it'll auto complete an answer based on the code. It's not always 100% on point, but it usually leads you in the right direction.