This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "task_id": "20260508T193843_<id>", | |
| "instruction": "...", | |
| "natural_language_task": "...", | |
| "actual_task": "...", | |
| "task_completed": true, | |
| "alignment_score": 8, | |
| "efficiency_score": 5, | |
| "task_difficulty": 5, | |
| "reason": "...", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Live demo is available at: https://codesandbox.io/s/dark-lake-smy2jt?file=/src/App.tsx | |
| * | |
| * The three issues I've identified are: | |
| * | |
| * 1) It's using a Fetch-on-render pattern instead of a Render-as-you-fetch pattern. | |
| * - fetchUserProfile is only being executed in the component's useEffect once it has been rendered. | |
| * This goes against the principle of Suspense which tells us we should be initiating the fetch before we begin rendering. | |
| * | |
| * 2) It's prone to race-conditions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| < !--You must include this JavaScript file-- > | |
| <script> | |
| function evaluateSentences() { | |
| console.log(document.getElementById('caption')); | |
| const caption = document.getElementById('caption').innerHTML; | |
| const captionArray = caption.split(" . ") | |
| console.log(caption); | |
| console.log(captionArray); |