User Controls
Posts by Kafka
-
2024-01-04 at 2:34 AM UTC in Sophie's Bag o' Lulz.
Originally posted by aldra there's more to being a programmer than just knowing how to write code. I'm just going to leave it at that
So you're not talking about understanding code anymore, but about knowing how to write it. Keep changing your tune because you don't know what the fuck you're on about. -
2024-01-04 at 2:21 AM UTC in Sophie's Bag o' Lulz.It seems your aim is to confuse people. You've gone from talking about people not understand code now the scenario is that everyone understands it.
-
2024-01-04 at 2:19 AM UTC in Sophie's Bag o' Lulz.
Originally posted by aldra in this scenario everyone understands code, you will just have difficulty understanding code that you have not personally written regardless of how experienced you are.
because having AI generate code for you to work with is comparable to having someone else on your team write code for you to work with, only there are more problems involved
That's common for colleages to have to share their code and review it. How do you know there are more problems with reviewing code AI has written than with a human? -
2024-01-04 at 2:11 AM UTC in Sophie's Bag o' Lulz.
Originally posted by aldra an example might be cleaning up data entry and looking for errors before importing it into a database - instead of either having someone go through every entry, or writing code to check for every kind of error you can think of it could be more worthwhile to have an AI module check for common errors and just do a quick pass over it manually.
you might have to write a slightly different function to read or process a hundred different types of data, since it's a fairly simple but time-consuming process you could use AI to rewrite your function a hundred times for the different types rather than doing it yourself.
in these cases there are minimal security concerns because the AI code isn't directly exposed to user input and they're simple enough that you should be able to immediately see a problem and either fix it or have the AI rewrite the code with the fix in mind
it's one thing to have commented code so you understand what each line does, but the overarching logic is a different story, especially when you're dealing with thousands of lines of code. when you're working on a team and have to deal with code written by other people you often have to talk to them to understand why they did things in a certain way so as to plan how that code fits into the larger project, how to troubleshoot it if there are problems, what you can change to suit another component without breaking their plans for future compatibility etc
What you just said doesn't actually relate to what I said. Now you're talking about people who don't understand code having to work in teams with people who do and them having to use their code? -
2024-01-04 at 2:05 AM UTC in How are you feeling at the moment..I have to deal with the same incompetant staff member again so I don't know if this issue will be sorted. If it is sorted I have a lot to stress about. Mental note to make Junji Ito inspired outfits. I forget about all the clothes I have and there's these Japanese work clothes I haven't tried on yet. The blouse is nearly translucent, black pussybow and pencil skirt, so not my thing but I want to see if I can make a Junji Ito outfit. On Saturday I'm meeting Donald Trump and GG to check out a house to squat in so that will be an interesting start to 2024. Now you know who to blame if I don't return here. I'm not sure what I should be doing right now I spaced out.
-
2024-01-04 at 1:47 AM UTC in Sophie's Bag o' Lulz.
Originally posted by aldra in terms of coding it should only be used for small, repetitive tasks where things like security and efficiency aren't a major issue compared to the amount of time it takes just to write the code.
if you use it for more complicated projects or actual problem solving you end up with a large chunk of code that may work, but you have no idea how it works so if it fails or doesn't perform how you want it to you have to spend time learning the logic before you can make any corrections or solve problems.
with the state of AI code writing tools now it's likely just to be a frankenstein's monster that you can't really fix because it was stitched together from random code rather than being designed from the beginning to perform a specific function
I don’t understand what you mean by efficiency not being a major issue, in what if any cases is it not important? I don’t understand what you mean by comparing it to the time it takes to write code.
Your second paragraph assumes no one has succeeded in acquiring code from AI that works after not being able to acquire it before whilst not understanding the code. -
2024-01-04 at 1:39 AM UTC in Sophie's Bag o' Lulz.No one's going to click links so I've copied and pasted tips:
1.Generate boilerplate code
Prompt formula:
Generate boilerplate code for an app that [explain what you need this app to do]. Please use
[explain what languages and frameworks should be used].
Prompt example:
Generate boilerplate code for an app that integrates to an external API. Please use javascript
code on the express.js framework.
2.Compare frameworks/algorithms
Prompt formula:
I'm building a new [explain what you’re building], and want to compare [first comparison
item] with [second comparison item]. Please propose the scope for a simple [what you’re
building], and generate two code bases that fulfill that scope, one using[first comparison item]
and another using [second comparison item]. Please redact clear instructions for me to run
both apps on my local machine.
Prompt example:
I'm building a new frontend app, and want to compare React.js with Vue.js. Please propose the
scope for a simple frontend app, and generate two code bases that fulfill that scope, one using
React.js and another using Vue.js. Please redact clear instructions for me to run both apps on
my local machine.
3.Explain code
Prompt formula:
Explain this code to me:
Prompt example:
Explain this code to me:
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (!groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
4.Comment code
Prompt formula:
Regenerate the code snippet below, but please include comments to each line of code:
[code to be commented]
Prompt example:
Regenerate the code snippet below, but please include comments to each line of code:
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (!groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
5.Generate test cases
Prompt formula:
Write test cases for [cases to be tested] to the below code snippet. First outline the test cases
you'll write. Second, write the test cases in [language and framework to be used to write the
tests].
[code to be tested]
Prompt example:
Write test cases for the main edge cases that could happen to the below code snippet. First
outline the test cases you'll write. Second, write the test cases in javascript using the Jest
framework.
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (!groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
6.Generate documentation
Prompt formula:
Generate documentation for the code below. You should include detailed instructions to allow a
developer to run it on a local machine, explain what the code does, and list vulnerabilities that
exist in this code.
[code to be documented]
Prompt example:
Generate documentation for the code below. You should include detailed instructions to allow a
developer to run it on a local machine, explain what the code does, and list vulnerabilities that
exist in this code.
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (!groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
7.Generate regexes
Prompt formula:
Generate a regex to match [the pattern you want to match]
Prompt example:
Generate a regex to match an email address
8.Rewrite code using correct style
Prompt formula:
Rewrite the code below following the [guidelines to be followed].
[code you want to rewrite]
Prompt example:
Rewrite the code below following the Google style guidelines for javascript.
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (!groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
9.Find bugs in code
Prompt formula:
Please find the bug in the code below. This is what it should be doing:
[outline of the desired functionality]
Code:
[code to be debugged]
Prompt example:
Please find the bug in the code below. This is what it should be doing:
1. Fetch the response from the stripe API for payments received last month.
2. Parse the response json into an arrays with all transactions.
3. Traverse the array to group all transactions from the same entity, and sums their amounts.
The result is stored in a different array.
3. Sort the resulting array by amount received, descending.
4. Write to the console all payments, sorted by date, with money amounts rounded up to the
integer.
Code:
fetch("https://api.stripe.com/v1/payments?created[gte]=last_month")
.then(response => response.json())
.then(data => {
let transactions = data.transactions;
let groupedTransactions = {};
transactions.forEach(transaction => {
if (groupedTransactions[transaction.entity]) {
groupedTransactions[transaction.entity] = transaction.amount;
} else {
groupedTransactions[transaction.entity] += transaction.amount;
}
});
let sortedTransactions = Object.entries(groupedTransactions).sort((a, b) => b[1] - a[1]);
sortedTransactions.forEach(transaction => {
console.log(${transaction[0]}: $${Math.ceil(transaction[1])});
});
});
}
10. Solve leetcode type algorithms
Prompt formula:
Generate code in [desired language] to solve the following challenge:
[outline of the challenge to be solved]
Prompt example:
Generate code in javascript to solve the following challenge:
● We have one 2D array, filled with zeros and ones.
● We have to find the starting point and ending point of all rectangles filled with 0.
● It is given that rectangles are separated and do not touch each other however they can
touch the boundary of the array.
● A rectangle might contain only one element.
Example array:
Input = [ [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1,
1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1] ]
Final note
Please use your best judgment and critical thinking when reviewing other’s code (either your
colleagues, someone on the internet or generative AI tools). ChatGPT can provide incomplete
or wrong answers. Do NOT push any responses to prod before thoroughly reviewing them. -
2024-01-04 at 1:27 AM UTC in Sophie's Bag o' Lulz.
Originally posted by aldra we're talking code, generating code you don't understand is a recipe for disaster that causes all sorts of problems down the line
the electric pajeet
Are you saying it should just be used for repetitive tasks for people who don't understand coding or for everyone? You didn't make a distinction. -
2024-01-04 at 1:06 AM UTC in Sophie's Bag o' Lulz.
-
2024-01-04 at 12:57 AM UTC in Sophie's Bag o' Lulz.
Originally posted by maddie Basically in the end if someone has to rely on AI to create malware, they most likely won't have the knowledge to modify the AI generated code for it to even bypass IDS/AV.
Not to mention reading the AI generated code and trying to figure out exactly what its doing. Plus AI trying to pack it, create the stub, etc are all headaches in itself.
Ask the AI to include comments explaining the code when you prompt it. -
2024-01-04 at 12:40 AM UTC in Sophie's Bag o' Lulz.
Originally posted by maddie Kafka, love..
Until you are able to offer knowledge pertaining to topics in this forum, I and ignoring you, as your messages are just a waste of time for me to read, and they are completely irrelevant to the topic in hand.
Have a good day!
Being able to offer knowledge is something I may already possess, sharing it is another thing. So you should be able to acknowledge me now. I understand that you don't view self-improvement as important, but I will still correct errors if I feel like it. -
2024-01-04 at 12:16 AM UTC in Sophie's Bag o' Lulz.If you don't want my moth wings to flutter by you should try to improve; Aspies can't resist correcting flawed logic.
-
2024-01-04 at 12:06 AM UTC in Sophie's Bag o' Lulz.Also, one person finding an error that a majority misses doesn't mean the error isn't there.
-
2024-01-03 at 11:56 PM UTC in Sophie's Bag o' Lulz.
Originally posted by maddie Or perhaps you are the only one who has the issue of understanding me.
That would be a clear sign that you are the known difference, which then concludes that you are in fact the actual problem and not me.
My pointing out your errors doesn't logically conclude that I'm the only person who's having trouble understanding you. If you really are this way and not trolling you need help. -
2024-01-03 at 11:55 PM UTC in Sophie's Bag o' Lulz.
-
2024-01-03 at 11:52 PM UTC in Sophie's Bag o' Lulz.She has to be trolling, no one can really be that illogical unless they're senile.
-
2024-01-03 at 11:46 PM UTC in Sophie's Bag o' Lulz.
Originally posted by maddie This is implied in what I originally said, and it makes complete sense to someone with any technical knowledge.
But since you're in a thread that you don't belong in due to your lack of any technical knowledge I will explain to you one time. Now: since this thread is 8 years old, I have 8 years worth of Botnets, DDos, Exploits, Keyloggers, Ransomware, RAT, Worms, and More!
Fucking idiot. I swear.
The thread being 8 years old doesn't logically conclude that you have 8 years worth of items. -
2024-01-03 at 11:11 PM UTC in Sophie's Bag o' Lulz.
Originally posted by maddie Well since you brought this thread back up, I have half of what Sophie mentioned above ^ plus like 20x more stuff (since you know it's been 8+ years).
If interested feel free to dm me.
I don't actually know how you function, nothing you say makes sense. Are you assuming that we all know you've been collecting things for more than 8 years or implying that you're Sophie? -
2024-01-03 at 7:35 PM UTC in HeyIdk why I'm so invested in this thread. I'm dreading Valentine's Day already and have half a mind to buy myself gifts for it.
-
2024-01-03 at 7:35 PM UTC in Hey