|
I haven't used ChatGPT, yet, but could there be an analogy between the current AI tools and high level languages when they were first introduced? The language of the high level language had to be learned before you could generate correct code. Even with the correct language the compiler often generates machine code that an assembler programmer would reject.
Unfortunately the language of AI is not as clearly defined as, say, COBOL. Devs are teaching it the language. In five years it may have evolved to the point where you can describe and get exactly the code you need.
|
|
|
|
|
Hi Arthur,
inho, we are all struggling to "frame" an interesting new phenomena that suddenly challenges what we thought AI based on massive LLM's could do.
Tipping Point, Inflection Point, Paradigm Shift, Black Swan Event ?
If i start with this:
Quote: write a public interface named IRxAI with fields DateCreated, DateModified,
Name, Comments, List<irxai> Instances
with methods
write a public class named RxAIDemo that implements IRxAI
write constructor with all parameters and five minutes later, after a few prompts have this:Quote: using System;
using System.Collections.Generic;
// Define the IRxAI interface
public interface IRxAI
{
// Get-only property for the creation date
DateTime DateCreated { get; }
// Get-only property for the modification date
DateTime DateModified { get; }
// Get-only property for the name
string Name { get; }
// Get and set property for the comments
string Comments { get; set; }
// Get-only property for the list of instances
List<irxai> Instances { get; }
// Method to add an instance
void Add(IRxAI instance);
// Method to remove an instance
void Remove(IRxAI instance);
// Method to delete an instance
void Delete();
}
// Define the RxAIDemo class that implements the IRxAI interface
public class RxAIDemo : IRxAI
{
// Get-only property for the creation date
public DateTime DateCreated { get; private set; }
// Get-only property for the modification date
public DateTime DateModified { get; private set; }
// Get-only property for the name
public string Name { get; private set; }
// Get and set property for the comments
public string Comments { get; set; }
// Get-only property for the list of instances
public List<irxai> Instances { get; private set; }
// Constructor for the RxAIDemo class
public RxAIDemo(string name, string comments)
{
// Set the creation and modification dates to the current date and time
DateCreated = DateTime.Now;
DateModified = DateCreated;
// Set the name
Name = name;
// Set the comments
Comments = comments;
// Initialize the list of instances and add the current instance to it
Instances = new List<irxai> { this };
}
// Method to add an instance
public void Add(IRxAI instance)
{
// Add the instance to the list of instances
Instances.Add(instance);
}
// Method to remove an instance
public void Remove(IRxAI instance)
{
// Remove the instance from the list of instances
Instances.Remove(instance);
}
// Method to delete an instance
public void Delete()
{
// Implement your delete logic here
}
} are you impressed ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I am impressed. I'm just trying to find a paradigm I can use to approach this technology. It's easier to adopt if I'm coming from somewhere familiar.
---
I just spent the last two hours playing with ChatGPT and I'm even more impressed. I am building a personal-use application for wine making. In that 2 hours I got further along than I had in two days of conventional programing. It didn't take long to learn that the secret is telling it what you want rather than how to do it.
The most important thing is to be able to describe your requirements in unambiguous terms. That's something we've been trying to get our users to do as long as programming has been around. The role of dev may evolve to that of translator but will take on much more importance because bad translation may affect hundreds of thousands of lines generated code.
I'm not a convert. At least not yet. But for small projects I see the potential and will continue to study the catechism.
modified 18-Jul-23 18:14pm.
|
|
|
|
|
Arthur Humphrey wrote: Unfortunately the language of AI is not as clearly defined as, say, C B L
Why, why, why would you use that language as an analogy?
Cheers,
Vikram.
|
|
|
|
|
To give a vague indication of my age and to show how far I need to go. For a long time my learning curve was like this / but I dropped out for a couple of years. Now my learning curve is like |.
|
|
|
|
|
I've only just discovered "Peek definition"* - it opens a "floating window" into the code where that object is actually defined. Wow, but that's handy - I've been using "Go to Definition" for years and it's a pain because it opens in another window if it's in a different file (or you can use Window Split if it's in the same file).
How long has that been there? Probably years ...
* Right click any class, variable, field, property, or method and select "Peek Definition" or use ALT+F12
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
VS 2019
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg
|
|
|
|
|
|
It makes you wonder just how "robust" the code is, when a feature that's worked fine for at least 7 years gets broken in a new version even when it's not being changed.
|
|
|
|
|
I know about the Peek definition option, but still prefer to use "Go to Definition" and after that the Navigate backward button on the toolbar.
Old habits die hard I guess ...
|
|
|
|
|
If you have a mouse with a back button (usually the one around your thumb), same as going back in a browser, it works to go back in VS.
|
|
|
|
|
Microsoft is slowly over time, integrating all the most useful features of Resharper, into Visual Studio, with the hope of one day making Resharper obsolete, thus making VS even better and more useful.
"Peek Definition" was being written about in 2014, not entirely sure when it started exactly, but approx. 10 years, give or take.
Visual Studio Tip: Peek Definition | Microsoft Learn[^]
|
|
|
|
|
I have in it in vs2017 but not vs2015
|
|
|
|
|
It's in my copy of VS 2015 Community Edition ... which is what I'm still using, and use Peek Definition a lot...
|
|
|
|
|
Oh my gosh you're right! Mine too sorry everyone and Microsoft too, musta been vs2008 - yeah that's it.
|
|
|
|
|
|
|
LOL, totally agree!
Seems ChatGPT is a point of discussion today, I just posted a sample usage as well from one of our Q&A's.
For the dev that created the WormGPT, ouch, imagine what people can do with this! IF the returned code is worth the while...
|
|
|
|
|
Wordle 757 5/6*
🟨⬜🟨⬜⬜
⬜🟩⬜🟩⬜
🟩🟩⬜🟩⬜
🟩🟩⬜🟩⬜
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
⬜⬜🟨⬜⬜
🟨⬜🟨⬜⬜
🟨⬜🟨🟨🟨
🟩🟩🟩🟩🟩
Tough
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 757 3/6
🟨⬛🟨⬛⬛
⬛🟩🟨🟨⬛
🟩🟩🟩🟩🟩
Lots of luck involved here!
Ok, I have had my coffee, so you can all come out now!
modified 16-Jul-23 8:22am.
|
|
|
|
|
Wordle 757 4/6
⬛⬛🟨⬛⬛
⬛🟨🟨⬛🟨
🟨🟨🟨⬛🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 757 5/6
🟨🟨🟨⬛⬛
⬛🟩🟨⬛🟨
🟩🟩⬛🟩⬛
🟩🟩⬛🟩⬛
🟩🟩🟩🟩🟩
Looks like you tried the same words I did! 
|
|
|
|
|
Wordle 757 6/6
🟨⬜⬜⬜⬜
⬜🟨⬜🟨⬜
⬜⬜🟨⬜🟨
⬜🟩⬜🟩⬜
🟩🟩⬜🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 757 4/6
⬜⬜⬜🟩🟨
🟩🟩⬜🟩⬜
🟩🟩⬜🟩⬜
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|