Developers Blog


So I asked ChatGPT if it could code Classic ASP. Few seconds later, it came up with an application to "manage contacts". Click here for a dump of my 2 minute chat

I followed the instructions and guess what... this works! It does 100% what I asked for. Amazing. I attach the "full application" to this message, but guys, DO NOT USE THIS ON A LIVE SERVER... because...

.. having a closer look at the code, I realised that:

  1. No HTML5 standards were used. No doctype.
  2. The code is not UTF-8-proof. It'ill only work fine for ASCII characters. Any other character will be saved in encoded HTML. This ends up in a data-nightmare. To fix this, you need only 2 things: <meta charset="utf-8"> in the front-html and <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> as the very first line in your ASP code.
  3. As ChatGPT indicates itself, the generated code is prone to SQL Injection (SQLI), Cross-site request forgery (CSRF), HTML Injection and XSS. Good luck with that.

Why is ChatGPT generating such very poor and weak code anyway? Are these the standards for AI to take over our lives as developers? I don't think so.

I don't want to be too severe though. Having AI at your fingertips to learn to code classic ASP is an amazing thing. I wonder how far I can take this.

I think "communication" will become a key element. So far developers had to be good with code. The developers of tomorrow will have to be able to communicate and organise their way through the AI opportunites they'll face. And AI needs to be able to learn from developers by asking for help and feedback in order to optimize its code. And that will then end up with even better AI and better development.

© QuickerSite webCMS 2023

backtotop