You turn off Wi-Fi and mobile data, then reload a web page. Why doesn't it load?
The website was deleted Your device can't send the request, so it can't reach the server The server is broken Your browser forgot the website's name I'm not sure
Your server keeps the number of likes in a variable: let likes = 0. You get 50 likes, then you restart the server. How many likes does it show now?
50, because the server remembers 51 0, because the variable lived in memory and the process started again from the beginning It depends on how fast the CPU is I'm not sure
Your app works. You're about to ask the AI for a big new feature. What should you do first?
Nothing. If something breaks, the AI can fix it. Copy every file into an email to yourself Make a commit, so you have a save point to come back to Delete the .git folder so the AI has a clean start I'm not sure
Your app checks that a user is logged in. Then it finds an invoice with only the number in the web address. What can a logged-in user do?
See only their own invoices See anyone's invoice if they change the number in the web address Nothing, because the login check stops them See other people's invoices only if they are an admin I'm not sure
The AI suggests that you block apostrophes in every form to stop SQL injection. What is wrong with that?
Real names like O'Brien break, and the query still isn't parameterized Nothing, it fully prevents SQL injection Apostrophes are needed for passwords It makes the database slower I'm not sure
A teammate says: "Our API is safe from strangers, because CORS only allows our own frontend." What is wrong with that?
Nothing. CORS blocks every request from other origins. CORS only works on HTTPS sites CORS only limits what JavaScript in a browser can read. Anyone can call the API with curl or a script, so every route still needs its own login and permission checks. CORS only protects GET requests I'm not sure
Your laptop's .env file has the same DATABASE_URL as production, because you wanted "real data" while you built the app. You test a new "delete old accounts" script on your laptop. What happens?
Nothing serious, because the script runs on your laptop The script deletes accounts in the real production database The hosting platform blocks the script because it isn't deployed The database makes a copy for your laptop automatically I'm not sure
Your server asks a payment service to charge a customer. After 30 seconds, your code stops waiting. What do you know about the payment?
It failed, so it is safe to charge again It succeeded Nothing for certain: it can be failed, successful, or still in progress The payment service will always cancel it I'm not sure
The AI finished a new feature. It works on the preview link, and all tests pass. What does that tell you about its safety?
It is safe, because the tests pass Very little: most security holes do not show when you are the only user and you click through the happy path It is safe, because the preview link works It is unsafe, because AI code is always unsafe I'm not sure
To be safe, the AI suggests an index on every column of every table. What is the main problem with that?
Every insert, update and delete must also update every index. So writes get slower, and the database uses more disk space PostgreSQL allows only one index per table Indexes make reading data slower Nothing. More indexes are always better I'm not sure
A user has 10 credits. Two requests to spend 10 credits run at the same moment. Each one reads the balance (10), checks that it's enough, and writes back 10 - 10 = 0. What happens?
The second request fails because the balance is 0 The balance becomes -10 Both purchases go through, the balance ends at 0, and the user got 20 credits' worth for 10 The database refuses both requests I'm not sure
Your page at /account shows the logged-in user's name and address. Which Cache-Control header is safest for it?
public, max-age=3600 s-maxage=600 No header at all, so caches decide for themselves private, no-cache (or no-store for very sensitive pages) I'm not sure
Why is a slow service often more dangerous than one that is completely down?
A slow service costs more money to run A down service sends better error messages Calls to a down service usually fail fast, but calls to a slow service hold on to your resources while they wait There is no difference I'm not sure
Your route saves an order in the database, then publishes an "order placed" event to a message broker. A deploy restarts the server between the two lines. What happens?
The database rolls back the order automatically The broker notices and publishes the event itself The order exists, but the event is never sent, so no email goes out and nothing ships The order is saved twice I'm not sure
Before your app confirms an order, it must know whether the item is in stock. Should the stock check be an event or a direct call?
An event, because events are always better An event, and the order is confirmed before the answer arrives A direct call (or a check in the same database), because the app needs the answer before it can continue Neither, stock doesn't need checking I'm not sure