Skip to main content

Teaching an AI What WYSIWYG Actually Means


I wanted to integrate a WYSIWYG Markdown editor into my ReactJS application. I carefully explained what I was trying to achieve—but notably did not specify which library I wanted to use. This was intentional. I was curious to see how the agent would choose a library on its own, and whether it could reliably search for and identify a good tool for the job.

I was using Opus with Cursor. After executing my request, I opened the page and immediately noticed something peculiar: although I could “edit” the content, the editing experience was limited to raw Markdown. The nicely formatted text—the whole point of WYSIWYG—was available only in preview mode. Naturally, I asked the agent to modify the application so users could edit the formatted text directly, like civilized people.

The agent began to think. And think. I’m confident these were deep thoughts, because the pause was longer than usual. After a few seconds of coding, it triumphantly declared, “There you go—sorry, I didn’t understand it the first time.” Encouraging! I tested the result and quickly realized that the only change was the layout: the editor and preview were now displayed side by side.

I was both surprised and mildly annoyed that nothing had changed except the furniture arrangement. Once again, I explained—politely, and with great emotional maturity—what was missing and what I was actually trying to achieve. The agent apologized, went back into deep contemplation, and resumed working. After a short pause, it announced that the chosen library didn’t support true WYSIWYG Markdown after all. The solution, it said, was to use a different library, and it politely asked for permission to install one.

Progress! Or so I thought.

After the new implementation, I noticed two small issues:

  1. I could still only edit the text in Markdown.

  2. The new library had been added, but the old one was still very much there.

At this point, I decided to take matters into my own hands. I researched available packages, found a solid candidate, and asked the agent to implement the feature using that specific library. This time, it worked perfectly. We were both happy. There was a brief but meaningful moment of mutual satisfaction.

That said, the experiment made one thing clear: while the agent is quite capable of implementing features once pointed in the right direction, its ability to search for and evaluate libraries still leaves something to be desired. Due diligence, it seems, remains a human responsibility—for now.





Comments

Popular posts from this blog

Installing MS SQL Server driver on Ubuntu Linux

Although making a connection to SQL Server can be done using unixODBC and FreeTDS, it does not work with some collations on SQL Server 2008. Recently, Microsoft released an ODBC driver for Linux that works on 64-bit systems only. Installing the driver is tricky. I begin by installing the build-essential, which is required for compiling from source. Checkinstall can be installed if you want to add the following application to the package manager. $ sudo apt-get install build-essential  Download unixODBC-2.3.0  and Microsoft ODBC dirver  and extract. $ sudo wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz $ tar xvf unixODBC-2.3.0.tar.gz $ wget http://download.microsoft.com/download/6/A/B/6AB27E13-46AE-4CE9-AFFD-406367CADC1D/Linux6/sqlncli-11.0.1790.0.tar.gz $ tar xvf sqlncli-11.0.1790.0.tar.gz  Install the unixodbc using the following commands: $ ./configure --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-ico...

Installing pyodbc on ubuntu

Installing pyodbc is straight forward but if  getting     "error: command 'gcc' failed with exit status 1"  when installing pyodbc, make sure you have installed  requirements  as below. sudo apt-get install unixODBC-dev g++ pip install pyodbc

Monkey Patching Django Model Class

Django is shipped with some useful application, also there are lots of third party re-usable application written for Django. Sometime you need to modify or customize these applications(Models of application) to meet your software requirements. One of the usual solution is adding a Model class to have a one-to-one relationship with the third party Models. This solution has some disadvantages such as having more tables and classes which can highly adversely affect database performance, scalability and add more complexity to the software development.  I think of another solution to this problem. I used Django South along with monkey patching of third party Model classes. I added a field to Django user class. Here is a walk through over this approach. 1. Add an application: python manage.py startapplication userpatch 2. Add the following  code to add the new field to the user class from django.db import models from django.contrib.auth.models import User ...