Conversation
remarcmij
left a comment
There was a problem hiding this comment.
Hi @HamedRazizadeh-hub, task 1 is fine but task 2 only uses dummy data, not LLM responses. Let me know whether this is still coming soon, and I will continue the review.
| #secondsFromMidnight; | ||
|
|
||
| constructor(hours, minutes, seconds) { | ||
| this.#secondsFromMidnight = hours * 3600 + minutes * 60 + seconds; |
There was a problem hiding this comment.
Although the numeric constants are not that difficult to reason about, it would be even clearer if you created a couple of constants for these "magic" numbers and then used them throughout your code. For instance:
const SEC_PER_MINUTE = 60;
const SEC_PER_HOUR = 60 * SEC_PER_MINUTE;
const SEC_PER_DAY = 24 * SEC_PER_HOUR;
task-2/index.js
Outdated
| } | ||
|
|
||
| // Generate quiz questions (fake data for testing) | ||
| // This can later be replaced with an AI API call |
There was a problem hiding this comment.
What do you mean, later? Using the LLM is what this exercise is about. When I tried your app for programming topics I get this response.
jimcramer@Jims-Mac-mini task-2 % node index.js
🎮 AI Quiz Game
Choose topic:
1. General Knowledge
2. Programming
3. Geography
Select topic (1-3 or q to quit): 2
Choose difficulty:
1. Easy
2. Medium
3. Hard
Select difficulty (1-3 or q to quit): 1
Starting quiz: Programming | Difficulty: easy
Question 1: (easy) What is the capital of Netherlands?
1. Rotterdam
2. Amsterdam
3. Utrecht
4. Eindhoven
Your answer (1-4, h for hint, q to quit):
|
Hi dear Jim
Yes, you are absolutely right. This was my understanding case, I am working
on the problem now. I will push the new file soon and let you know on Slack.
…On Thu, 26 Mar 2026 at 12:35, Jim Cramer ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Hi @HamedRazizadeh-hub <https://github.com/HamedRazizadeh-hub>, task 1 is
fine but task 2 only uses dummy data, not LLM responses. Let me know
whether this is still coming soon, and I will continue the review.
------------------------------
In task-1/Time.js
<#5?email_source=notifications&email_token=B4XASZDICFBUTC5CVBRCNZL4SUIXBA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBRGMZTCNRXHE4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJL3QOJPXEZLWNFSXOX3DNRUWG2Y#discussion_r2994196045>
:
> \ No newline at end of file
+ #secondsFromMidnight;
+
+ constructor(hours, minutes, seconds) {
+ this.#secondsFromMidnight = hours * 3600 + minutes * 60 + seconds;
Although the numeric constants are not that difficult to reason about, it
would be even clearer if you created a couple of constants for these
"magic" numbers and then used them throughout your code. For instance:
const SEC_PER_MINUTE = 60;const SEC_PER_HOUR = 60 * SEC_PER_MINUTE;const SEC_PER_DAY = 24 * SEC_PER_HOUR;
------------------------------
In task-2/index.js
<#5?email_source=notifications&email_token=B4XASZDICFBUTC5CVBRCNZL4SUIXBA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBRGMZTCNRXHE4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJL3QOJPXEZLWNFSXOX3DNRUWG2Y#discussion_r2994223219>
:
> +});
+
+// Track player's score
+let score = 0;
+
+// Store selected topic and difficulty
+let topic = "";
+let difficulty = "easy";
+
+// Helper function to ask questions in CLI using Promises
+function ask(text) {
+ return new Promise((resolve) => rl.question(text, resolve));
+}
+
+// Generate quiz questions (fake data for testing)
+// This can later be replaced with an AI API call
What do you mean, later? Using the LLM is what this exercise is about.
When I tried your app for programming topics I get this response.
***@***.*** task-2 % node index.js
🎮 AI Quiz Game
Choose topic:
1. General Knowledge
2. Programming
3. Geography
Select topic (1-3 or q to quit): 2
Choose difficulty:
1. Easy
2. Medium
3. Hard
Select difficulty (1-3 or q to quit): 1
Starting quiz: Programming | Difficulty: easy
Question 1: (easy) What is the capital of Netherlands?
1. Rotterdam
2. Amsterdam
3. Utrecht
4. Eindhoven
Your answer (1-4, h for hint, q to quit):
—
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=B4XASZHXW4ZOSZMZ3BSW5UL4SUIXBA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBRGMZTCNRXHE4KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJPLQOJPXEZLWNFSXOX3ON52GSZTJMNQXI2LPNZZV6Y3MNFRWW#pullrequestreview-4013316798>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B4XASZB5AEQB2TFEOKIOLOD4SUIXBAVCNFSM6AAAAACW7EOEISVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DAMJTGMYTMNZZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
📝 HackYourFuture auto gradeAssignment Score: 0 / 100 ✅Status: ✅ Passed Test Details |
remarcmij
left a comment
There was a problem hiding this comment.
Hi @HamedRazizadeh-hub, task 2 is looking good! I do want to flag that some sections of the code have characteristics that are often associated with AI-generated output. Happy to chat about it if you'd like.
I'll approve this PR anyway.
| const GITHUB_TOKEN = process.env.GITHUB_TOKEN; | ||
|
|
||
| if (!GITHUB_TOKEN) { | ||
| console.error("⚠️ Please set GITHUB_TOKEN in your .env file"); |
There was a problem hiding this comment.
Annoying, but AI tools often generate emojis like this in console.log statements.
| D) Option 4 | ||
| Correct: B | ||
|
|
||
| Do NOT use JSON. |
There was a problem hiding this comment.
I noticed this later. It is simpler if you ask the LLM to return (only) JSON. Then you do not have to parse the text response yourself, but instead can use JSON.parse().
No description provided.