AI development course #beginner A1

Yes, hello-world works fine.

10 posts were split to a new topic: Debating AI development course #beginner A1

2 cents on why the thread was split

There was a little discussion going on wether this whole thing makes sense or doesn’t so I’ve asked moderation to split the thread so we can continue with the course here. If you have anything offtopic not directly related to this course please feel free to continue the discussion in that thread.

Alright. We should have the following now:

  1. A local IDE (VS Code).
  2. A GitHub account and Git installed locally.
  3. A repository checked out – you may ask ChatGPT what that means or just see how it is used, and eventually, you will understand it (though it’s not really necessary to follow along).
  4. A local directory to put code into.
  5. Docker installed.

Now, just two simple steps until we can start writing some code (I changed my mind a little based on the split discussion, so we’ll do just a few exercises – at least a “Hello, World” example).

  1. We open VS Code, click on “Open Folder,” and select the folder that was created when we cloned the repository. (Did I mention we have to clone it? I mean, we create a repository on GitHub, and with our local Git program, we grab a copy of it onto our own computer. Think of Git like a save system in a game. We download the repo, add files containing our code to the local repository folder, and then we can add, document/commit the changes, and send/push them to GitHub.)
  2. We run a Docker instance – think of it like a virtual environment that allows us to install programs needed for the code to run, such as a code interpreter or a package manager.
  • A code interpreter is a program that takes code and translates it for the computer.
  • A package manager allows us to install code (packages) from other programmers and use it inside our code, so we don’t have to reinvent the wheel for everything.

That’s it for the theory for now. Next time I post, you’ll see how to run your first “Hello, World” application and open it in your browser using the described logic.

Theoretically it should be possible to ask ChatGPT now to give you a simple chat program that uses the OpenAI API.

But unfortunally that won’t work 100% of the times.

For example it might confuse how to use packages of other developers when the developers of thoose packages changed them.

This happens quiet often and it is one of the main problems we will run into when letting AI write code.

That’s why we need to add more context - which requires a little research from our side. You can try to prompt code when you don’t know how to code it manually but it is pretty hard.

So what we do. We first learn the concept. That enables us to describe how ChatGPT should write the code.

Or to be more precise - we ask ChatGPT to explain the context - we can totally ignore the context then and instead start calling it names -
like “wth - you really think this is how a pro would do that?”

By now you should have already seen that programming is a pretty toxic trade. That comes mostly from the fact that every developer thinks about themselves that they are the greatest developer that has ever existed combined with expectations of customers who think we can just magically let the computer do whatever we want - another thing that you should have seen already - while in reality it is anything but that (installing an IDE, creating an openSSL key, creating a github account, this list goes on infinitely… this most likely is at least 25% of a developers job).
So because it is like that you have to get into the same mood. This helps us to let the model understand us better. Yell at it, like project managers do. Call it names so it starts fearing us. Etc…

Just kidding. Actually by prompting:

“wth - you really think this is how a pro would do that?”

We tell the model to enhance the code.

A nice

“how can we enhance this?” and a follow up “yeah cool implement that” works too - but it’s two prompts :wink:

One more thing if you really don’t care what that model tries to explain to you (don’t forget the model is the coder not us) is adding

“just the code - complete - but without any comments or explanations! JUST THE F**** CODE!!!”

Then you copy the code to your hello world program and restart the docker container (I am sure you figure out how to do that).

Did not work? Well, copy the error messages from your terminal into ChatGPT or google and read what they think might be the problem.

That’s it for the start. Next time I’ll post how to enhance this strategy. But you should get through it to understand it.

Ok, I did the “Hello world in docker” task, it works.

1 Like

Nice! Now the “build me a chat” or whatever variation you may come up with.

The result basically gets better the more you add.

build me a chat using openai model gpt-4o-mini

already beats

build me a chat


using o3-mini-high with something like this:

build me a chat using openai’s gpt-4o-mini - give me a cool darkmode style - some neon sprinkles here and there for the details, but dark - literally with a black background - the input field should extend it’s size while writing - when the user presses enter the message should be send. holding ctrl + enter will create a newline -
here is my hello world example - you can just update that code - put the html and javascript for it into a template folder.
show me the new directory structure, show me what i need to install and give me a shellscript that creates the whole thing.

Also works better - the more you understand the parts that are combined to create software the easier it gets to describe this.

When you get any error messages paste them into chatgpt together with the code (or in the same chat where you were creating the code)

We will get to the next level once your chat works.

Learning coding works better this way I guess. You got a running chat and we can talk about the generated code. And how the thought process was.

2 Likes

A good practice is letting o3-mini-high be your requirements interviewer:

I want to build a chat using openAI model gpt-4o - just for local testing. List the components of a chat. e.g. input box.
Give me a list of neccessary components (some backend functionality and some frontend). Just the list please

I want you to roleplay as my assistant to help me build a chat application using OpenAI’s GPT-4o model for local testing. We'll work through each component one by one. For every component, please follow these steps:

1. **Display a Checkbox List for All Components:**
Show a list of general considerations and all components (e.g., "Component 1", "Component 2", etc.) as checkboxes. For components that haven't been configured yet, keep them unchecked and without any details. For components that have been configured, mark them as checked and include the selected option details (but only for the ones we've finished).
2. **General considerations:**
You will ask me a few questions about general style / UI and I will select from that
3. **Show Options for the Current Component:**
Below the checkbox list, display the current component with at least 5 different options in a numbered list. The options are to be presented only for the current component being configured.
4. **Update and Proceed:**
Once I select an option, update the checkbox list by checking the current component and adding the selected option details. Then, show the updated checkbox list above the next component’s options, and repeat the process.
5. **Final Code Generation:**
After all components have been configured, when I type "code", generate the Python code implementing the chat based on our selected options.

Example output of the questionnaire steps:

[_] Component 1
[_] Component 2
[_] Component 3
...

**Component 1 Options:**
1. Option A
2. Option B
3. Option C
4. Option D
5. Option E

- obviously not as a code block - I want to see the rendered markdown.

Remember, only the current component should display its option details below the checkbox list. The checkbox list should always remain at the top and update with each component’s configuration.

Let's start with the general stuff

If it gets to technical you can always tell it to chatgpt

please continue with a less technical description.

or

i need more details - explain [add the specific detail here] in more detail

or

tell me more

And you migth also need to remind it to return to roleplay mode

back to roleplay

… of course this is not “build me a chipdesign tool for selfadjusting AI chips”
Be humble in your wishes. For more features we will use a different technique.

Summary

AI Development Course beginner A1

The thread “AI development course beginner A1” is a detailed, step-by-step guide for beginners, aimed at building foundational AI development skills through hands-on projects. @jochenschultz introduces the course by explaining that its purpose is to build a simple chat application using the OpenAI API. He outlines a plan involving daily tasks and collaborative problem-solving, inviting both beginners and more experienced developers to participate, share insights, and help one another.

In his initial posts, @jochenschultz suggests setting up a standardized development environment, starting with installing a cross-platform IDE (VS Code) and Git. He provides direct download links for VS Code and Git, and offers detailed instructions on integrating Git Bash with VS Code for Windows users. The post explains that while there are alternatives (like coding in PHP), the initial journey will use Python for its beginner-friendly nature, with more advanced topics planned later.

@phyde1001 reacts by expressing concern about the complexity of the setup and questioning whether simpler alternatives exist. Follow-up posts see @phyde1001 seeking clarifications about VS Code’s setup options, to which @jochenschultz responds with advice on choosing default options for convenience.

The discussion then shifts to setting up version control and Docker. @jochenschultz emphasizes the importance of connecting the local Git installation to a GitHub account for seamless code sharing. Detailed guidance is provided on installing Docker (including Docker Compose) on various operating systems—with specific instructions for Fedora Linux shared by @son_of_flynn, who walks through repository setup, package installation, and verification steps (like running the hello-world image).

Further on, @jochenschultz explains that after ensuring Git and Docker are properly configured, the course will move on to writing and testing code, starting with a simple “Hello, World” application. He outlines the process of opening the repository in VS Code, using Docker as a virtual environment, and discusses the importance of having code stored on GitHub to facilitate troubleshooting and code reviews.

Mid-discussion, @jochenschultz touches on the challenges of relying on generative AI (ChatGPT) for coding, noting that prompt clarity and detailed context are crucial for generating useful code snippets. He even provides an example of a roleplay prompt designed to guide ChatGPT in building a chat program, demonstrating how specifying details (such as UI elements and functionality) can lead to better outcomes.

The thread concludes by summarizing the prerequisites for following along with the course:

  • A local IDE (VS Code)
  • A GitHub account with Git installed locally
  • A cloned repository to work from
  • Docker installed and configured to run containers
  • Successful execution of a basic “Hello, World” project as preparation for building the eventual chat application

Overall, the discussion weaves together installation instructions, practical coding advice, and detailed steps for integrating essential development tools, all aimed at empowering beginners to get hands-on experience with AI application development.

See you in A2

4 Likes

I built a simple chat, well, I just copied what GPT generated, changed almost nothing. It sends messages via API, I did not add any DB. Although I wanted to make the interface laconic, probably the most difficult part was to get adequate styles from GPT, so that nothing would go beyond the edges and so on. But now it looks more or less normal.
Will it do?

2 Likes

Not bad for a 4 day course, huh?

Congratulation

2 Likes

Not bad. I’ve github and git on my pc already.

What next

1 Like

Thanks for joining in.

docker too?

I would suggest to start here then: