From time to time somebody who has seen the Samraworld website has asked me if there will ever be a way to enter comments about individual lessons. The latest ask came from my wife, and so with some spare time on my hands this spring in Tokyo, I decided to give it a shot.
It occurred to me at the outset that AI could help this little project along and maybe get the whole thing done for me in a flash. Boy was I wrong about that.
My subscription to ChatGPT entitled me to use their latest models. I started out with the ChatGPT 4o model.
To get started, I explained some of the requirements for capturing comments. I did not go into too much detail because I wanted to see if we could do this in an iterative way. I should say that I had coded a rudimentary version of comments some time ago, but never implemented it for the general public. It was only available for members, who are users that are logged into Samraworld.
So with that as a base, I gave it my code and basically said, make it better, and add the ability to accept comments from guests.
ChatGPT did a credible job of creating better, more functional versions of my code, both for JavaScript and PHP, which are the two languages in addition to HTML that comprise the codebase of Samraworld. In general the chatbot was impressed with me!

Some of my interactions with ChatGPT about certain requirements were interesting. One requirement was to instrument the lesson page with reCAPTCHA, Google's service for examining a user's attributes and deciding whether they were real or not, to put it in a nutshell. In other words, is the user a human or not?
We got into a long discussion about what version to implement, and how. There was a misunderstanding on ChatGPT's part about which version I wanted to use, though some of that was on me. It had seemingly promoted the use of the Enterprise reCAPTCHA, and after installing it and trying to get it to work, I discovered that to use it I would have to pay a fee. ChatGPT did not give me a heads up about that until I asked, unfortunately. But in the end we were able to get a free version working.



Another contentious topic was about time zones. If you enter a comment, you will notice that there is a note about what time the comment was posted. It will show "just now" when the comment initially gets posted, and over time that time will change to be relative to the initial time. For example, it will display "1 hour ago" or "3 weeks ago", depending on how long it has been since the comment was posted.
Well, we got into a discussion of what the database was storing for date and time, and how we could calculate the "time ago" value. This got a little crazy because ChatGPT thought the database was storing UTC time, but it was storing local time instead. This made the time ago value look crazy, sometimes in the future even. Once we got that understood, it generated the correct code for me.

So it was the end of the day, and ChatGPT had generated all the layers of code needed to implement a comment input capability. But there were bugs, and misunderstandings of the requirements. And to be honest, I was thinking of requirements on the fly, so I was to blame too. But apparently the chatbot felt it was time to celebrate, as we finally had a working version.
Sycophantic or sincere? You decide!" width="700" height="418" style="max-width: 100%; height: auto;">So I was getting this sort of praise all along, but it was getting a bit old. I was thinking that it was being purposely condescending, but why I have no idea. A bit too much praise for me, and was it sincere? That evening as I read a Times article about OpenAI, I discovered that OpenAI was aware of the issue. Sam Altman himself called the chatbot overly sycophantic, and the company subsequently made some changes to stop it.
At some point that evening it occurred to me that there is probably a better model to use to generate code. And in fact there was. It was ChatGPT 4o-mini-high. So the next day I began using that better model, and that was indeed interesting. Using that model, well, it was a lot less about praising me and more about giving guidance, which was exactly what I wanted. This advanced model refactored the previous code, and after a fashion I got it to work. It is in production today. Try it out and enter a comment after one of the lessons, and let me know what you think!
Vocabulary
Flash Card Drill-
I renewed my magazine subscription for another year.私は雑誌の定期購読をもう1年更新した。
-
The software works on a monthly subscription.そのソフトウェアは月額サブスクリプションで利用できる。
-
We used an iterative process to improve the design.私たちは設計を改善するために反復的なプロセスを使った。
-
The team made iterative changes based on user feedback.チームはユーザーのフィードバックに基づいて段階的な変更を行った。
-
She has only rudimentary knowledge of French.彼女のフランス語の知識はまだ初歩的だ。
-
The shelter had only rudimentary facilities.その避難所には最低限の設備しかなかった。
-
Honesty is one of her best attributes.誠実さは彼女の最も優れた特性の一つだ。
-
The database stores several attributes for each user.そのデータベースは各ユーザーの複数の属性を保存している。
-
There was a misunderstanding about the meeting time.会議の時間について誤解があった。
-
We cleared up the misunderstanding quickly.私たちはその誤解をすぐに解消した。
-
The new policy is highly contentious.その新しい方針は非常に議論を呼んでいる。
-
They had a contentious discussion about the budget.彼らは予算について論争的な議論をした。
-
The teacher praised the student for her hard work.先生はその生徒の努力を称賛した。
-
The film received praise from critics.その映画は批評家たちから称賛を受けた。
-
His condescending tone annoyed everyone in the room.彼の見下した口調は、その場にいた全員をいらだたせた。
-
She disliked the condescending way he explained simple things.彼が簡単なことを説明する時の見下した態度を彼女は嫌った。
-
The manager was surrounded by sycophantic employees.そのマネージャーの周りには、おべっかを使う社員たちがいた。
-
Her sycophantic praise made him suspicious.彼女のおべっかまじりの称賛は、彼に不信感を抱かせた。
-
The developer refactored the code to make it easier to maintain.開発者は保守しやすくするためにコードをリファクタリングした。
-
After the system was refactored, it ran more efficiently.システムがリファクタリングされた後、より効率的に動作するようになった。
-
I asked Claude Code to refactor the Samraworld suite of websites.私はクロード・コードに、サムラワールドのウェブサイト群のリファクタリングを依頼しました。