Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My blogpost #532

Merged
merged 6 commits into from
Oct 11, 2024
Merged

My blogpost #532

merged 6 commits into from
Oct 11, 2024

Conversation

solita-andandersson
Copy link
Contributor

I wrote a blogpost about learning a new programming language or framework with the help of generative ai. It is part of the GenAI-twin project.

@tuk-solita
Copy link
Contributor

Is it AI or Ai or ai? I'd make sure you use consistent capitalization. I think I have seen AI used the most.


# The twin project application

After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.
Copy link
Contributor

@tuk-solita tuk-solita Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors.

Isn't it made, not make? Maybe you can use grammarly, word or even ChatGPT to check.
Also, there is a double space at the beginning of the sentence. I don't know if it matters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should actually be "make", because the context is that it "started to hallucinate and make..." in other words "make" is in its basic form

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be either or. I'd write it with "made".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the context of started to I think it should indeed be "make" because it is the basic form :)


# The first application

My first task was to make a very simple full stack-application for the purpose of learning the basics of C# and .NET. The method I used was to tell ChatGPT small tasks at a time, that I wanted to implement. For example, my very first comment was “I am a software developer that don't know anything about neither C# or .net, and I want to learn both by creating a simple application”. The process started, and ChatGPT suggested that I could create an online shop, which I did. I used the same chat window during the whole process, and step by step I asked questions about implementing different features as well as error handling. When needed, I asked about concepts and theory behind C#.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have the chats still saved, a screenshot of a session would be nice here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# Background

Generative artificial intelligence, or GenAI, is one of the biggest hypes in the software industry. With the introduction of applications like ChatGPT, AI-algorithms can produce text, generate images and even motion pictures and music. Due to the trends, there have been many discussions how GenAI may affect software development. How can it be utilized,for example for coding, learning new tools and frameworks, code reviewing?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the introduction of applications like ChatGPT, AI-algorithms can produce text, generate images and even motion pictures and music. -> I'd add an comma after "generate images, and ..."

How can it be utilized,for example for coding, learning new tools and frameworks, code reviewing? -> space missing before ",for example"

The last sentence feels a bit confusing. I'd modify at least the structure a bit: How can it be utilized, for example, for coding, learning new tools and frameworks, or code reviewing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


![A genAI-created picture of a robot coding](/img/2024-09-27-learning-a-programming-language-with-generative-ai/coding-robot.png)

In the GenAI-twin project, we wanted to find out these things. For the period of March-September 2024, we started to develop a full stack application in C# with .NET and React with the help of GenAI. In that way, we were able to get a picture of how GenAI can affect software development.
Copy link
Contributor

@marjampi marjampi Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In the GenAI-twin project" -> Do readers have an idea what "the" GenAI-twin project is? Should it be "In Solita's GenAI Twin project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


As a part of the journey, we also wanted to find out how GenAI can be utilized for learning a new programming language or framework. Myself as a junior developer, I did not have any prior knowledge of neither C# nor .NET and was assigned with the task.

Even though there are several GenAI-tools for coding, I decided to use ChatGPT since the purpose was to learn, rather than just develop. GenAI-tools for coding, like Cursor or Codeium, are used for giving suggestions for code rather than explain concepts and theory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rather than to just develop"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rather than explaining concepts and theory"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# The first application

My first task was to make a very simple full stack-application for the purpose of learning the basics of C# and .NET. The method I used was to tell ChatGPT small tasks at a time, that I wanted to implement. For example, my very first comment was “I am a software developer that don't know anything about neither C# or .net, and I want to learn both by creating a simple application”. The process started, and ChatGPT suggested that I could create an online shop, which I did. I used the same chat window during the whole process, and step by step I asked questions about implementing different features as well as error handling. When needed, I asked about concepts and theory behind C#.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"My first task was to make a very simple full stack-application for the purpose of learning the basics of C# and .NET. The method I used was to tell ChatGPT small tasks at a time, that I wanted to implement."

I think the hyphen is wrong, is should be just "full stack application".

The last sentence feels off. I think it should be something like "I asked ChatGPT to help me one small task at a time with the implementation."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


My first task was to make a very simple full stack-application for the purpose of learning the basics of C# and .NET. The method I used was to tell ChatGPT small tasks at a time, that I wanted to implement. For example, my very first comment was “I am a software developer that don't know anything about neither C# or .net, and I want to learn both by creating a simple application”. The process started, and ChatGPT suggested that I could create an online shop, which I did. I used the same chat window during the whole process, and step by step I asked questions about implementing different features as well as error handling. When needed, I asked about concepts and theory behind C#.

In general, the results were okay. A working application was created almost completely with the use of GenAI. At some points I had to google certain things, but ChatGPT made most of the work. The quality of the code was varying, although it mainly worked. Some methods were not the most effective possible, naming conventions were not followed, and other minor issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"At some points I had to google certain things" -> I'd say "search the web" but that's just my opinion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


My first task was to make a very simple full stack-application for the purpose of learning the basics of C# and .NET. The method I used was to tell ChatGPT small tasks at a time, that I wanted to implement. For example, my very first comment was “I am a software developer that don't know anything about neither C# or .net, and I want to learn both by creating a simple application”. The process started, and ChatGPT suggested that I could create an online shop, which I did. I used the same chat window during the whole process, and step by step I asked questions about implementing different features as well as error handling. When needed, I asked about concepts and theory behind C#.

In general, the results were okay. A working application was created almost completely with the use of GenAI. At some points I had to google certain things, but ChatGPT made most of the work. The quality of the code was varying, although it mainly worked. Some methods were not the most effective possible, naming conventions were not followed, and other minor issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The quality of the code was varying, although it mainly worked" -> "The quality of the code varied, although mostly it worked."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


In general, the results were okay. A working application was created almost completely with the use of GenAI. At some points I had to google certain things, but ChatGPT made most of the work. The quality of the code was varying, although it mainly worked. Some methods were not the most effective possible, naming conventions were not followed, and other minor issues.

# The twin project application
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the "twin" be written with a capital T?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# The twin project application

After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd end the sentence after "I implemented one of the user stories from the backlog" and continue with a new one after

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# The twin project application

After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"I created database entities as well as controllers, services, repositories and migration scripts in .NET." -> "I created database entities as well as controllers, services, repositories, and migration scripts in .NET." (I do love the Oxford comma 😇)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct


# The twin project application

After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does "I decided to implement additional chats" mean multiple chats with chatGPT? I think that sentence need a bit clarifying, for example "At this point, I decided to have multiple chats open with chatGPT to best keep the problems separate." (or whatever was your reason for it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct


After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.

Now and then it generated not working and non-coherent code. Because of that I could not rely solely on ChatGPT but also had to google certain subjects as well as reading code documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"it" -> should it be "chatGPT"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you refer to?


After finishing the first application, I continued to develop and learn with the actual application of the project. I implemented one of the user stories from the backlog, the purpose was to implement a data model, or in other words create database schemas and their required logic on the backend. The method was still learning by doing. I created database entities as well as controllers, services, repositories and migration scripts in .NET. As this task was much bigger than the previous one, ChatGPT started to hallucinate and make several errors. I decided to implement additional chats. In the end I had one for the timeline of the user story, one for error handling, and one for coding with .NET.

Now and then it generated not working and non-coherent code. Because of that I could not rely solely on ChatGPT but also had to google certain subjects as well as reading code documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Because of that I could not rely solely on ChatGPT but also had to google certain subjects as well as reading code documentation." -> "... but also had to read documentation and search the web for certain subjects." would be easier to read imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# The learning experience

Now and then, talking with ChatGPT might feel like having a conversation with a real person. Something that has come to my mind more than once is the Turing test. For a recap, it states that a machine can be seen as intelligent as a human, if it can engage in a conversation without being detected as a machine. I would say that the test might now be considered as succeeded. ChatGPT can engage in a conversation by answering questions. The answers are usually grammatically correct and remind of human generated text. And like when asking questions from a real person, the answers are not always true. The risk with a succeeding Turing test is that one might have the illusion of conversing with a human but forget that humans make mistakes. On the other hand, as it is not asking any own questions, a discussion with ChatGPT may not be a conversation in the traditional form.
Copy link
Contributor

@marjampi marjampi Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double space ...as a machine. I would say... And ...generated text. And like...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


Now and then, talking with ChatGPT might feel like having a conversation with a real person. Something that has come to my mind more than once is the Turing test. For a recap, it states that a machine can be seen as intelligent as a human, if it can engage in a conversation without being detected as a machine. I would say that the test might now be considered as succeeded. ChatGPT can engage in a conversation by answering questions. The answers are usually grammatically correct and remind of human generated text. And like when asking questions from a real person, the answers are not always true. The risk with a succeeding Turing test is that one might have the illusion of conversing with a human but forget that humans make mistakes. On the other hand, as it is not asking any own questions, a discussion with ChatGPT may not be a conversation in the traditional form.

![The turing tes](/img/2024-09-27-learning-a-programming-language-with-generative-ai/turing-test.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Could also be more descriptive text

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if it is necessary as it is stated above what the Turing test is, and the picture is quite descriptive. I think somehow less is more and should not state the obvious


# How to learn with GenAI

Myself, I used a learning by doing approach. There are however, many ways one can learn with GenAI. Another way to learn a new programming language could be to step by step letting ChatGPT talk about the language in question, including its syntax, variables, typing, data structures and so on. I, however, would not find this approach useful as there are already online-documentation and books for most programming languages that can be used in the traditional way, and that are also reliable. Regardless of the way, there are some practices that are good to take into consideration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Myself, I used a learning by doing approach." feels a bit funny, could it be "Myself, I used a 'learn by doing' approach."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# How to learn with GenAI

Myself, I used a learning by doing approach. There are however, many ways one can learn with GenAI. Another way to learn a new programming language could be to step by step letting ChatGPT talk about the language in question, including its syntax, variables, typing, data structures and so on. I, however, would not find this approach useful as there are already online-documentation and books for most programming languages that can be used in the traditional way, and that are also reliable. Regardless of the way, there are some practices that are good to take into consideration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"There are however," -> "There are, however,"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# How to learn with GenAI

Myself, I used a learning by doing approach. There are however, many ways one can learn with GenAI. Another way to learn a new programming language could be to step by step letting ChatGPT talk about the language in question, including its syntax, variables, typing, data structures and so on. I, however, would not find this approach useful as there are already online-documentation and books for most programming languages that can be used in the traditional way, and that are also reliable. Regardless of the way, there are some practices that are good to take into consideration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"typing, data structures and so on." -> "typing, data structures, and so on."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# How to learn with GenAI

Myself, I used a learning by doing approach. There are however, many ways one can learn with GenAI. Another way to learn a new programming language could be to step by step letting ChatGPT talk about the language in question, including its syntax, variables, typing, data structures and so on. I, however, would not find this approach useful as there are already online-documentation and books for most programming languages that can be used in the traditional way, and that are also reliable. Regardless of the way, there are some practices that are good to take into consideration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"online-documentation" -> "online documentation"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# How to learn with GenAI

Myself, I used a learning by doing approach. There are however, many ways one can learn with GenAI. Another way to learn a new programming language could be to step by step letting ChatGPT talk about the language in question, including its syntax, variables, typing, data structures and so on. I, however, would not find this approach useful as there are already online-documentation and books for most programming languages that can be used in the traditional way, and that are also reliable. Regardless of the way, there are some practices that are good to take into consideration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"and that are also reliable" -> "which are also reliable"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected

- ChatGPT is probably the best option for learning. AI-tools for coding do not explain and tell theory and concepts as well as ChatGPT
- If using ChatGPT, it is preferable to use the paid version and create a customized agent. That will be trained to focus as much as possible on the subject in question.
- Fact check, fact check, fact check! GenAI is not all knowing and will make mistakes!
- Do not over rely on GenAI. When the learning seems to be going well, there is always the risk that one will trust it too much. That might lead to forgetting of fact checking as well as passivity and decreased learning, as GenAI is doing most of the job.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"That might lead to forgetting of fact checking as well as passivity and decreased learning" -> I find this hard to understand. Could is be something like "Too much trust might cause you to forget to fact check as well as causing passivity and decreased learning." Idk, that's a difficult sentence

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected


# Conclusion

GenAI can be seen as a learning assistant or tutor. It is by no means an oracle or a guru. Just like a real tutor, it can make mistakes, and is even likely to do so. The information and answers it gives is gathered from the internet without any guarantees of fact checking or correctness. My tasks succeeded in the sense that I learned the basics of .NET and C#. In my opinion, using ChatGPT for learning a new programming language or framework might be beneficial when having the option of learning by doing. It may also be useful if one needs an explanation of a certain topic, as it is answering questions. One should, however, always consider the possibilities of flaws and hallucinations, and remember to not over rely on ChatGPT. It will certainly not replace traditional learning.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The information and answers it gives is gathered" -> "The information and answers it gives are gathered"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected

Copy link
Contributor

@marjampi marjampi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could try asking chatgpt to review your language. That's what I did with my latest blog post 😅

Also Grammarly is a good service to check your language for fluency and mistakes.

@tatut tatut merged commit 873dacc into solita:master Oct 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants