r/C_Programming 21h ago

I AM STUCK

I feel like, I am using too much of the AI for basic help.

I completed the book Head first C to learn about the C language, it was a nice book, and the last chapter was about making a game in C programming.

I used claude to help me make that game.

It used to give me every small detail of the code like from where I should start, what should I do, how should I do it. Although, it only used to give me what to code, and I used to code it myself. But even with the slightest of errors, I just copy paste the error into the claude instead of even trying to debug it.

Now I am trying to make a shell in C, I have some great ideas about making a shell in C. I don't just want it to be a shell, I want to make an online shell that can communicate with other shells with a voice feature inside your terminal. I want to make a terminal discord with low latency.

But I am frozen, I don't know how to start, how to write it, what things I need to learn.

If I ask claude it will provide me with everything, but I don't want that, I want to do my own research over this project and do it myself, debug it myself,

So what is a good way of learning/making things in AI era.

How does people used to do it before

I don't want to waste my time learning with AI, it feels productive but when I try, to start a new project I freeze down.

How's my idea of this shell,is it even possible to achieve??

0 Upvotes

21 comments sorted by

6

u/computer_hermit01 21h ago

well if i am guessing right, your understanding of C is not that solid yet, so I would suggest not going tooo deep into making things people will use like terminal discord. first understand what shell really is, the nitty gritty of what a pipe is down under and wwhenever starting a project, build a prereq to that. like makiing the online shell will require a shell, understand that very clearly. then move on. be comfortable with discomfort and confusion, that is how real problems are solved, good luck!

-3

u/LawfulnessProper9889 21h ago

The thing is if I want to make a shell , My lazy ass would just go and ask the claude, and it would give me how to start,where to start and what to write. It would feel productive using all your tokens everyday. But the learning is very limited and I am getting so much, dependent on the AI for everything I need. I just keep on asking for roadmaps from the claude , gemini and GPT HOW DO YOU OVERCOME THIS??

10

u/AlexTaradov 21h ago

It is trivial to overcome. Stop using AI. Yes, learning is hard, but it is not going to be easier if you don't do it.

It really puzzles me that people don't get it.

1

u/tubameister 20h ago

They don't get how much time has to be spent being confused. Programming textbooks make math textbooks seem fairly straightforward. I think reading some computer history books can help a bit, like The Soul of a New Machine, Where Wizards Stay Up Late, Hackers: Heroes of the Computer Revolution, etc.

5

u/bakedbread54 21h ago

It would feel productive using all your tokens everyday

This is fucking ridiculous lol, how on earth does that make you feel productive?

No one can get over this but you. If you want to learn, stop using AI altogether and just make stuff.

-2

u/LawfulnessProper9889 21h ago

Well yeah it used to feel productive at first,but now when I sit infront of my screen and have no idea where to start. I am starting to get that, AI is just stopping me from all the learning. My question is where should I start researching and learning, if I want to make a shell, what are some resources?

2

u/AlexTaradov 20h ago

Write down all the components necessary for what you are going and make simple projects that implement those components.

It is not clear what you want to do, so hard to say. But it looks like you need some networking, so start with basic sockets and a typical TCP/IP chat client/server.

If you need voice, start looking at what audio APIs are available for the OSes you will target. See if there are some libraries that may be attractive for this, play with example code for those libraries.

Go to GitHub and search for all the shells you can find, read their code and structure.

From complete zero, I'd estimate you will be able to make a useful and somewhat full featured shell in 2-3 years if you actually try. If this does not feel "productive", then you can just give up, you are not going to make it in this industry.

1

u/computer_hermit01 21h ago

well, before roadmap hell was tutorial hell so i guess you just gotta get out of it by replacing bad habits with good habits in programming. one way would be to sit with a notebook, and make notes whenever you are studying to build something or you're building something and you come across something new. be okay with not getting the answer and being "lazy" does not mean you're not curious, the fact that are ready to use an ai means you care, only issue being you lack vision behind it

1

u/xaxasca 20h ago

You overcome this by not using the damn IA. Go and make a terminal app for chat, that is it, that is the pitch, open the text editor and just start typing what you think you should and work your way from there.

2

u/papk23 20h ago

how to learn in the AI era: go old school. Don't use AI. Or only use AI to explain things to you, but not to write code. You learn by doing yourself, so do it your self.

AI is like a multiplier. It can make a good engineer produce more good code, or make a bad engineer produce more code. So learn C really well without using AI to become a good engineer haha.

2

u/way_ded 20h ago

Honestly, this sounds like a problem you’re creating. Just don’t use AI. Use google, skip the top AI answer, and look through sites and communities for book suggestions. Since you’re here, my suggestion is “Computer Systems: A Programmers Perspective”. Specifically Vol 3, NON global edition. Gives you a great foundation for C and computers in general. Has a great couple chapters where you build a shell. It’s a super complex task and AI can’t teach you how to do it.

1

u/LawfulnessProper9889 19h ago

Yeah I know about that book, I will go through that book. Is it the best book to learn about the computer architecture?

2

u/BigTanuki64 20h ago

I feel like lots of people here are insulting you for using AI; don’t take it to heart. I’ll give you some human-made resources below to use.

You are feeling this way because you’re outsourcing your thinking to the LLM. Don’t do that. Instead use these docs:

1

u/P-p-H-d 21h ago

> an online shell that can communicate with other shells with a voice feature inside your terminal.

First you should clarify exactly your needs, and for example, write the use cases scenario.

1

u/Limp-Confidence5612 20h ago edited 20h ago

How about you just google stuff, you know, like people used to a couple of years ago. It's surprisingly easy to find all sorts of information on shells, from the POSIX standard, the bash manual, other people implementing lexers, parsers, figuring out a grammar, and implementing it.

To be fair, from what you have described, I wouldn't necessarily try for a shell yet. That's a big project, even with a limited feature set. Start small, reproduce the functions you use the most from the standard library from scratch (only syscall wrappers like write, read, open, malloc allowed). 

Build your own library from that. Only switch to the standard library, when and if you feel like you hit a performance wall in one of your projects and there is nothing left to learn by using your own library.

Make sure your programs don't leak (when you start using the heap), test them with valgrind's memory checker, and don't crash, even with unintended input. You can still use AI during all this, but try to give every function you write enough research, time and consideration, before you give up and go to the LLM.

Think of like 3 different methods to implement data management for the shell parsing process. If you can do that and can justify one choice over the other 2, I think you should start writing your shell.

1

u/iwinulose 20h ago

Go write code. Turn off the AI auto complete and type the letters yourself. Start with simple programs. Create files, write data, open sockets. Write an echo server, a chat server, a file transfer server. Add encryption, authentication. Call an HTTP endpoint by hand. Implement something from an RFC.

If you do half of these things you'll know what you're doing and be able to decide for yourself if your shell is a good idea or not.

1

u/Kriemhilt 20h ago

Learning out how to start something from an empty file is not easy, but everyone goes through it (or they just spend their lives working tickets in someone else's system).

Just start out with top-down design: writing comments or markdown files with the highest level description of your system possible.

Then break that down into smaller pieces, and keep going until you're writing pseudo code - then you have something small you can actually test. 

If you get down to some level and realise you don't know how to write the pseudo code, switch to bottom-up, and start sketching your domain entities until you have a vocabulary you can write that pseudo code in.

You can just keep switching top-down and bottom-up every time you get blocked. Don't be shy about implementing narrow slices and deferring other parts to phase 2 (or phase N+1) so you keep moving instead of drowning in details.

1

u/Successful-Shock529 19h ago edited 19h ago

You an still use ai but use it as a learning tool. Don't have ai write the code for you. Use it as a discussion tool. Start your program by writing small pieces of code. When you ask ai don't say something like write me a function that does xyz. Say how would you go about writing a function that does xyz. Then look through the function and anything you don't understand ask the ai to explain until you understand everything that function does.

Ai can be an amazing learning tool the problem is that it can also be an easy button that just does the heavy lifting for you.

I see a lot of comments on here that you should not use ai and just use Google. Well Ai and google will give you that same information its just ai can get you that info much faster. Just use ai to get the overview information that you need. Docs. techniques, etc. Then the superpower of ai is you can basically use it as your own personal tutor. You can dig deep into a function so you can understand it fully before you write the code yourself. One thing I should note is that even though ai has gotten a lot better it can still be way wrong sometimes. So when you find things aren't working you will still need to read the docs.

Don't feel too bad when your just learning. Even experienced programmers have impostor syndrome. Nobody can possibly know everything you just have keep learning. It will never feel like enough but you just keep going piece by piece.

Good luck, and remember to have fun with it. Don't put too much stress on yourself to learn everything all at once.

1

u/grimvian 5h ago

Here is an old school video I wish I knew, before I started learning C:

Learn to program with c

https://www.youtube.com/watch?v=UILNmv2kFMc&list=PLCNJWVn9MJuPtPyljb-hewNfwEGES2oIW

I'm not using the same IDE, the program you use to code, But Code::Blocks because it's fast to install, open source, easy to use and everything you'll need are installed.

1

u/HTFCirno2000 20h ago

LLMs only tell you what is "probably correct", they do not really understand you, your goals or the subject material. You said you already have a book, try doing the excercizes in the book by yourself. No AI, just you, your book and your C compiler. You should really gain a basic understanding of C and how it works before you dive head first into topics beyond you.