joshhug
Joined 6 years ago
Joined 6 years ago
} else if (mode === 'python') { if (cmd === 'exit()') { mode = 'sh'; } else { try { // Safe(ish) eval for demo purposes. // In production, never use eval. Use a JS parser library. // Mapping JS math to appear somewhat pythonesque let result = eval(cmd); if (result !== undefined) output(String(result)); } catch (e) { output(`Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n${e.name}: ${e.message}`, true); } }
Somewhat amusing 4th wall breaking if you open Python from the terminal in the fake Windows. Examples: 1. If you try to print something using the "Python" print keyword, it opens a print dialog in your browser. 2. If you try to open a file using the "Python" open keyword, it opens a new browser tab trying to access that file.
That is, it's forwarding the print and open calls to your browser.
"Why was the scarecrow given an award?"
"He was out standing in his field."
The fact that a scarecrow's job is to be "out standing in his field", and that excelling at one's job can be phrased as being "outstanding in his field" is an incredible linguistic coincidence.
But very cool!
That semester, I made a slight mistake on the final exam where I asked students to create an algorithm that could find the second shortest path from s to every other vertex in a graph. I forgot to specify that the second shortest path should be simple (i.e. should not reuse any vertex twice). Having to deal with non-simple paths makes the problem much much harder.
None of the students figured it out in the time available, and I'm sure I would also have been stumped if I had tried to solve the problem. Bob figured it out though. And then I remember he graded all 150 solutions to the problem himself, having as a blast as he went through students attempts at an effectively impossible problem.
I asked it "I was watching a show and in the subtitles an umlaut u was rendered as 1/4, i.e. a single character that said 1/4. Why would this happen?"
and it gave a pretty thorough explanation of exactly which encoding issue was to blame.
https://chatgpt.com/share/66e37145-72bc-800a-be7b-f7c76471a1...
But then I asked her to integrate sin(x) * e^x and got this bizarre answer that started out as speech sounds but then degenerated into chaos. Out of curiosity, why and how did she end up generating samples that sounded rather unlike speech?
Here's a recording: https://youtu.be/wWhxF7ybiAc
FWIW, I can get this behavior pretty consistently if I chat with her a while about her voice capabilities and then go into a math question.
1. Given the limited amount of scarce student time I want to spend on this, do pull requests / GitHub actions tests (provided for them) / code reviews seem like the right team processes to introduce?
2. Each student's work is independent of every other student's. Is there some way to have them working on different pieces of the same problem, or having the students solutions interact in some deeper way than random selection in a lottery? On my first post of this idea, a user named taftster imagined taking inspiration from Factorio in some way, with students each contributing some piece of a large system.
3. Is there a way we could naturally allow pull requests for the contest code or maybe even the README that establishes how to review pull requests? I'm thinking a bit about Fluxx or Nomic here.
1. Given the limited amount of scarce student time I want to spend on this, do pull requests / GitHub actions tests (provided for them) / code reviews seem like the right team processes to introduce?
2. Each student's work is independent of every other student. Is there some way to have them working on different pieces of the same problem, or having the students solutions interact in some deeper way than random selection in a lottery? A user named taftster imagined taking inspiration from Factorio in some way, with students each contributing some piece of a system. I've so far lacked the creativity to imagine what the API for this might look like for this assessment.
3. Is there a way we could have students make pull requests for the contest code itself? I'm thinking a bit about Fluxx here.
Student time is incredibly precious. The hope here is that students will spend less than an hour on this, and in the process get a taste of how code reviews / automation can help teams function better. I'm hoping I can thread the needle and give them tools that will help them more efficiently complete their capstone project at the end of the semester, without spending too much of their time teaching them these tools.
FWIW, we have discussed the idea of a lower division software engineering class, and I was really hoping Pamela Fox would do this before she headed back to industry (interesting story there: https://blog.pamelafox.org/2022/05/my-experience-as-unit-18-...). We do have an upper div software engineering course as well, though it's not taken by most of our students.