Can C be used for a raw beginner?

Programming, for all ages and all languages.
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: Can C be used for a raw beginner?

Post by Muazzam »

MessiahAndrw wrote: It is still a good skill. Even if you're not fluent in it, it's good to just have a basic idea of what it is and what's going on in it. If your emulator crashes and gives you a disassembled dump of what it was executing, you can figure out a general idea of what happened. You may one day work on a project (maybe video/audio/image processing or a physics or graphics engine) that has some of its most intensive stuff written in hand-optimized assembly.

Assembly itself is very simple. Each instruction does one thing. If you know how to parse strings, you can write a basic assembler in one day. It might be good for a hobby project.

Trying to wrap your head around doing high level tasks in assembly language is the hardest part. It's not because the language is hard (".<label>" and "<instruction> <operand1> <operand2>" is very simple to pick up on) but because you're controlling the CPU by hand - you need to learn about registers, stacks, calling conventions - things higher level languages hide from you.

Learning assembly is mostly about memorizing - calling conventions, bios interrupts (in real mode), CPU instructions, bit tricks and common algorithms.
You're right Andrw
embryo

Re: Can C be used for a raw beginner?

Post by embryo »

Kevin wrote:I did have a little contact with it in the form of inline assembly for doing some graphics on DOS, and I did write some Hello-World-level Linux userspace programs in assembly, but I would say that it was really the few assembly pieces of an OS that taught me most of it.
The good experience has a feature - it requires a bit more than "hello world" efforts. And simple understanding of a pattern "instruction operand1 operand2" is far from good experience.

But many people still live with "hello world" in visual basic and think they have most of it.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Can C be used for a raw beginner?

Post by Kevin »

The point is that a minimal bootloader won't give you any better experience than what you get anyway with the assembly parts of your OS.
Developer of tyndur - community OS of Lowlevel (German)
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Can C be used for a raw beginner?

Post by mac »

I really would like to learn a programing language to start with some user-space projects. What about Java? Should HTML and JS/Python/some client-side scripting language be essential to? I'm sure it will.
no92
Member
Member
Posts: 307
Joined: Wed Oct 30, 2013 1:57 pm
Libera.chat IRC: no92
Location: Germany
Contact:

Re: Can C be used for a raw beginner?

Post by no92 »

You should really know userspace-C extremely well before getting started with OSDev. For programming beginners I always recommend Ruby, as it's clean and easy-to-learn. Many go for JS/PHP or Python as their first language, but I personally consider Ruby being the best out of these three. Getting started with programming isn't about writing fancy games or GUI apps, but about getting the idea about how programming works and the correct mindset.
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: Can C be used for a raw beginner?

Post by FallenAvatar »

SeanMc wrote:I really would like to learn a programing language to start with some user-space projects. What about Java? Should HTML and JS/Python/some client-side scripting language be essential to? I'm sure it will.
If you are on windows, I would recommend C#. Very quick and easy to get up and running (Visual Studio Express which is free) is all you need. It is a c-style language so most of the ideas/syntaxt will carry over to other languages.

- Monk
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Can C be used for a raw beginner?

Post by Combuster »

I'd recommend Java. Same language, same tools, same practices on all platforms. Strictly typed and compiled ahead of time to teach you proper coding practices.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
embryo

Re: Can C be used for a raw beginner?

Post by embryo »

SeanMc wrote:I really would like to learn a programing language to start with some user-space projects.
Does it mean you still have no programing language behind? Absolutely raw beginner?
SeanMc wrote:What about Java?
If the target is osdeving then may be it is better to learn something hardware related. There was period in my experience when my programmable calculator has taught me about registers, stacks, jumps and so on. Next some simple processor is a good point, which currently can be explored with those many "system on chip" options available. The main advantage here is the small set of knowledge to learn. Just a few simple instructions and programmable calculator makes your math lessons much easier - very quick solution in very simple form, but with many important things involved.
SeanMc wrote:Should HTML and JS/Python/some client-side scripting language be essential to?
It can be essential only after you have a really good background. When it is with you - everything is possible and new languages can extend capabilities of your OS. But if you miss a viable background, then it is better to concentrate on building it first.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Can C be used for a raw beginner?

Post by mac »

Not quite a"raw beginner" but i have been making nothing more than simple code in Python, Java or commercial DarkBASIC game dev language. UnlessYour idea of beginning "raw" is different from mine.

OSdev still sounds like it would be cool to study though, just not yet. I know i need to truly master the computer inside out. Sounds cool.

Oh and my laptop is dead and I'm easily broke on money, soI'm soon getting a new one.
embryo

Re: Can C be used for a raw beginner?

Post by embryo »

SeanMc wrote:Not quite a"raw beginner" but i have been making nothing more than simple code in Python, Java or commercial DarkBASIC game dev language.
With the experience listed you are ready to play with 100% Java OS :)

I mean learning everything by yourself is just an option. The second option is to get some knowledge from existing project. I don't know OSes in Python or DarkBASIC, but there are some in Java and you can try to extend one of them or just to change in some manner that pleases you.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Can C be used for a raw beginner?

Post by mac »

Well Dark BASIC depends on Windows' DirectX so it'simpossible to write a whole OS there. Emulators and desktop UI, I guess. It's oriented for 2D and 3D game development. But other tools have been made with DB before.

Is there anything that says i can't do both Osdev and game development, not at the same time obviously.

(Sorry for my long winded rambling on Dark BASIC)
embryo

Re: Can C be used for a raw beginner?

Post by embryo »

SeanMc wrote:Is there anything that says i can't do both Osdev and game development, not at the same time obviously.
May be it is the lack of experience. But everything is limited by time only, so you can start osdeving without experience and finally (after a few years) you can get it.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Can C be used for a raw beginner?

Post by AndrewAPrice »

SeanMc wrote:Well Dark BASIC depends on Windows' DirectX so it'simpossible to write a whole OS there. Emulators and desktop UI, I guess. It's oriented for 2D and 3D game development. But other tools have been made with DB before.

Is there anything that says i can't do both Osdev and game development, not at the same time obviously.

(Sorry for my long winded rambling on Dark BASIC)
There's also FreeBASIC.

There's also Javascript. I like Javascript. jQuery solves most cross platform issues, allowing you to run it in virtually any web browser (with JS support) on all different types of devices (desktop, mobile, console). Node.js is a cross platform framework for writing server side (or desktop) Javascript.
My OS is Perception.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Can C be used for a raw beginner?

Post by mac »

I obtained a Javascript textbook, but that was back in 2006/7, and the publishing date says (I think) 2003. So it might not have use anymore?
embryo

Re: Can C be used for a raw beginner?

Post by embryo »

MessiahAndrw wrote:Node.js is a cross platform framework for writing server side (or desktop) Javascript.
May be you have thought about client side? To be able to support server side operations the Node.js must have server side software. But is there a platform that is used as a JavaScript server side engine? I have a quick look at the information about Node.js and found nothing about server side engine.
Post Reply