Skip to content

Instantly share code, notes, and snippets.

View JasonObeid's full-sized avatar

Jason Obeid JasonObeid

View GitHub Profile
{
"task_id": "20260508T193843_<id>",
"instruction": "...",
"natural_language_task": "...",
"actual_task": "...",
"task_completed": true,
"alignment_score": 8,
"efficiency_score": 5,
"task_difficulty": 5,
"reason": "...",
@JasonObeid
JasonObeid / App.tsx
Last active June 14, 2022 02:08
Contra front-end assessment
/**
* 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.
@JasonObeid
JasonObeid / form.html
Created March 22, 2021 13:11
Custom Mechanical Turk Form
< !--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);