Regarding learning assembly, I'm beginning to come to the view that it's in fact the best way to teach the first course in programming to kids. They don't come with any preconceived notions of what programming should look like and given an explicit, visual model of the computer, they quickly learn the small number of operations to write programs. More over, once they learn to do
LDA A
ADD TWO
STA A
DAT TWO 2 <-- initializing variable TWO
then, this line of code
A = A + 2
in C or a higher level language makes soooo much more sense. That awkward phase of internalizing that '=' is an assignment operator and is different from another operator meant to test equality gets a lot shorter for a beginner.
Btw, this is the best online CPU simulator I've found for that use http://peterhigginson.co.uk/LMC/ I'm shocked at how all the code academies and hour of code's haven't created a polished version of LMC (Little Man Computer... look it up).
I've talked about the x = x + 2 / x == 0 "problems" with a couple of people during university and it seems there's different levels of problems/irritations people have with the syntax. For me it was mostly a "shrug ok so that's that, don't see the problem" when it came to accidentally using "=" instead of "==". A couple of friends seemed to have mental blockades and often wrote code containing the typical bug of "=" instead of "==" (the hotfix of 1 == a instead of a == 1 helped some).
For me the irritating thing was x = x + 2 since it triggered my math brain which protested and simply said...well that can't be, error. So I guess I did have the exact reverse problem always seeing the assignment as an equality.
Thankfully this passes really quickly after you immerse yourself in it for a day.
Of course years later one of the first sentences from our Prolog 101 prof was "so you have been programming for a while now...let me write this down...i = i + 1...someone explain what this does...what would you suppose a (stereotyped) mathematician (that only knows math) would tell me"
Kind of made me smile.
/offtopic_anecdote
In my personal case I am not sure if it didnt end up 'bad' for me. The first language I've learned was 6502 ASM on C64 (and learned is a word of many degrees here, I can't say I've written anything serious in it, ever) and for some reason I've been struggling with many other languages for years to come after that - tried Perl, PHP, C, AmigaE, without being able to grasp any of those. Until I've met Python, that in few days took me from ground to the stratosphere (which today again looks like a ground, but that's a different subject). And even then, old habits of counting cycles and thinking about what the hell is the language doing made me to prematurely optimize my code (like doing 'while 1' instead of 'while True' because in 2.7 True is simply a variable, what means the interpreter will have to check its value first and that means lost CPU cycles, and lots of other things that made sense in 6502 ASM) instead of getting it to do shit ;) It took me a while to 'unlearn' those habits and to simply enjoy the language in its own form.
That looks like 6502 but it doesn't have ADD, only ADC. I prefer the Z80 though. :-)
I also think starting with Asm is a good idea, because it forces you to think about things like data representation (often glossed over in HLLs) and breaking down complex operations into a series of simple steps - something that you have to internalise effectively to become good at programming. If there is time for it, going one step lower to logic gates would be even better to dispel the "magic" and see that CPUs are actually very conceptually simple and logical machines.
Of course to become productive they should move to a HLL and learn the higher-level organisation (functions/procedures, objects, ...) but I agree that the basics are important to understand first.
This is a book I strongly recommend, it's definitely written at a level readable for kids and young adults:
> That awkward phase of internalizing that '=' is an assignment operator and is different from another operator meant to test equality gets a lot shorter for a beginner.
I'll probably have to thank one of my highschool math teachers for inadvertently helping me skip this phase altogether then :)
He always pestered us to use the "equivalence" operators ⇔ or ≡ (the latter mostly for geometry stuff), and only use the regular equal when you had unambiguous contexts like "Let f(x) = x + 2" or "if x = 5". At the same time I was learning programming (with C++ as my first language...), and I could easily see "=" as being for assignment, since in other contexts you either used something more fancy (like ⇔ or ≡ in math, and "==" in code) or you used explaining words like "let" or "if" to clarify meaning. Though I think it took me a while to get things like `while (x = getch()) { ... }` :)
> That awkward phase of internalizing that '=' is an assignment operator and is different from another operator meant to test equality gets a lot shorter for a beginner.
Pity language designers don't take the more obvious solution of making their maths-derived operators behave like the language they're drawn from.
Surely something like Logo has similar advantages (small set of simple instructions) without requiring students to learn about CPUs before they can start? Plus it means they get to draw pictures instead of relatively boring calculations.
And switching to assembly seems like a pretty overkill solution to the = vs == problem.
I'm very happy to see people are still doing this sort of thing!
I've always wanted to see something of a truly 'barebones' OS; but one that could at least get you 64-bit mode, OpenGL ES, audio output, USB polling and network connectivity with libc available. Yet not be as complex and large as Linux/BSD.
Being able to run a real-time application with no pre-emption, no virtual memory protections, no kernel transitions, etc could probably eke out an additional ~20-30% of performance on a CPU-bound application. Plus the near-instant boot would be great for media players, emulator arcade boxes, etc.
Probably just not possible, due to the driver situation. There was a bit of hope UEFI could lead to better drivers for hardware prior to boot, but efforts around things like GOP (graphics output protocol) haven't really gone anywhere that I've seen.
Sadly, there's a very small amount of modern things you can do with 32-bit mode, VESA and a keyboard. I've never even found a video card with a 1920x1080 VESA display mode; they're almost exclusively still 4:3 only.
Plus, no sound rules out gaming and media; no internet (let alone Wifi) rules out any connectivity; no strong filesystem rules out moving data around easily; no USB rules out loading things from external storage, gamepads, etc.
Only strong use case would be for embedded; but ARM platforms have this area beat substantially in cost, power, tooling, etc.
> Plus, no sound rules out gaming and media; no internet (let alone Wifi) rules out any connectivity; no strong filesystem rules out moving data around easily; no USB rules out loading things from external storage, gamepads, etc.
> Only strong use case would be for embedded; but ARM platforms have this area beat substantially in cost, power, tooling, etc.
This is anecdotal, but when I was his age and getting into the "real" tech world (and getting my work recognized), I really disliked my age being made a big deal. A big influence on my own view (and I think many others in this community) of being a "hacker" was Steven Levy's "Hacker Ethic", which specifically said:
"Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position"
While it is great that we recognize good work like this, bringing up his age in the title is focusing on a pretty irrelevant metric when we should focus on good work, no mater who makes it.
Maybe we should get rid of weight classes for boxing, women's leagues for sports, and anything that acknowledges accomplishments for anyone that is not 100% objectively the best on the planet.
> While it is great that we recognize good work like this, bringing up his age in the title is focusing on a pretty irrelevant
It's relevant because it's remarkable and it puts the author in a much smaller circle than he would be if he were older. Trying to pretend otherwise is silly.
Being able to read at age 18 is a lot less interesting than at age 4. Same goes for rare technical feats (and writing an OS is such a thing, most developers wouldn't be able to pull it off, so doing so at age 13 is certainly a lot more interesting than when you're older).
Sure, but it's impressive nonetheless. A 14 year old kid is building an operating system. What was I doing at 14? I was not building operating systems, thats for sure.
Regarding ExDOS (or your EyePC), would we be discussing it right now if it weren't for the creator's age? Not to discount this work, but if it had been the side project of a mid-career engineer, it would be a non-story. Not because the work is good or bad, but people simply wouldn't care.
The point being, you benefitted tremendously by your work being judged relative to your age, so it seems disingenuous for you to suggest Omar shouldn't get the same treatment.
I doubt ExDOS or EyePC will be remembered in the annals of history as engineering marvels, but that's irrelevant. They are indicators that the creator has the talent, intellect, and dedication to accomplish a lot in a very short amount of time, and they hint at great potential.
I just ran through the OSDev Bare Bones [1] tutorial this evening, even implementing newline support! I don't understand all of it yet and here's a kid half my age doing amazing things. Goes to show what you can acheive with time and perseverance. I really wish I learned Assembly at that age.
Good on him. Building an OS from the ground up is actually fun when you get into it. I found it to be a great learning experience (but did it years later than this dude).
I've lurked on the OSDev forums he credits on his website for a long time, and both Omar and Muazzam (mentioned as well on the website) are goddamn impressive for barely-teenagers. Someone hire those kids!
Thanks for mentioning me, by the way. Oh, and I don't need a job--it's against my ego to ever work for someone else for money (though, I'll definitely help you, if you need it).
I know how that feels, but it gets better, and you should definitely continue. Be proud of your work, and know that you are developing it to be the best piece of work you can develop... and not just what you can develop "for your age".
The only advice I would give for this sort of situation is while you should not emphasize your age (which you are not doing), definetely use it to your advantage when you can... Get sponsorships to conferences/events, meet cool/influential/important people, go audit university courses, and the many other things at your disposal. And just remember that there are very few real "hard" limits when it comes to age, and don't take "no" for an answer if someone tells you you can't do something because you are too young... the best way to prove them wrong is to do the best work you can, and to never stop trying to improve yourself.
If you would like any more advice, feel free to shoot me a message (my contact info is in my HN profile)
You can flesh out your profile by clicking on your name in the top right, suggest you add a link to your project there. Super neat to see your stuff, keep at it!
My name is Muazzam Ali Kazmi, a hobbyist programmer from Shahpur,
Layyah, Punjab, Pakistan. I am a student of grade-11 and I started
programming about 4 years ago. I am developing the OS since 7
September 2014. My interests include religion(s), philosophy,
operating systems, virtual machines, simulating a universe in the
computers, compilers, theoretical computer science, artificial
intelligence, mathematics, and science.
[+] [-] chaostheory|10 years ago|reply
[+] [-] e19293001|10 years ago|reply
[+] [-] chetanahuja|10 years ago|reply
Btw, this is the best online CPU simulator I've found for that use http://peterhigginson.co.uk/LMC/ I'm shocked at how all the code academies and hour of code's haven't created a polished version of LMC (Little Man Computer... look it up).
[+] [-] kriro|10 years ago|reply
For me the irritating thing was x = x + 2 since it triggered my math brain which protested and simply said...well that can't be, error. So I guess I did have the exact reverse problem always seeing the assignment as an equality. Thankfully this passes really quickly after you immerse yourself in it for a day.
Of course years later one of the first sentences from our Prolog 101 prof was "so you have been programming for a while now...let me write this down...i = i + 1...someone explain what this does...what would you suppose a (stereotyped) mathematician (that only knows math) would tell me" Kind of made me smile. /offtopic_anecdote
[+] [-] tachion|10 years ago|reply
[+] [-] userbinator|10 years ago|reply
I also think starting with Asm is a good idea, because it forces you to think about things like data representation (often glossed over in HLLs) and breaking down complex operations into a series of simple steps - something that you have to internalise effectively to become good at programming. If there is time for it, going one step lower to logic gates would be even better to dispel the "magic" and see that CPUs are actually very conceptually simple and logical machines.
Of course to become productive they should move to a HLL and learn the higher-level organisation (functions/procedures, objects, ...) but I agree that the basics are important to understand first.
This is a book I strongly recommend, it's definitely written at a level readable for kids and young adults:
https://en.wikipedia.org/wiki/Code:_The_Hidden_Language_of_C...
[+] [-] nnq|10 years ago|reply
I'll probably have to thank one of my highschool math teachers for inadvertently helping me skip this phase altogether then :)
He always pestered us to use the "equivalence" operators ⇔ or ≡ (the latter mostly for geometry stuff), and only use the regular equal when you had unambiguous contexts like "Let f(x) = x + 2" or "if x = 5". At the same time I was learning programming (with C++ as my first language...), and I could easily see "=" as being for assignment, since in other contexts you either used something more fancy (like ⇔ or ≡ in math, and "==" in code) or you used explaining words like "let" or "if" to clarify meaning. Though I think it took me a while to get things like `while (x = getch()) { ... }` :)
[+] [-] rodgerd|10 years ago|reply
Pity language designers don't take the more obvious solution of making their maths-derived operators behave like the language they're drawn from.
[+] [-] aninhumer|10 years ago|reply
And switching to assembly seems like a pretty overkill solution to the = vs == problem.
[+] [-] RodgerTheGreat|10 years ago|reply
[+] [-] byuu|10 years ago|reply
I've always wanted to see something of a truly 'barebones' OS; but one that could at least get you 64-bit mode, OpenGL ES, audio output, USB polling and network connectivity with libc available. Yet not be as complex and large as Linux/BSD.
Being able to run a real-time application with no pre-emption, no virtual memory protections, no kernel transitions, etc could probably eke out an additional ~20-30% of performance on a CPU-bound application. Plus the near-instant boot would be great for media players, emulator arcade boxes, etc.
Probably just not possible, due to the driver situation. There was a bit of hope UEFI could lead to better drivers for hardware prior to boot, but efforts around things like GOP (graphics output protocol) haven't really gone anywhere that I've seen.
Sadly, there's a very small amount of modern things you can do with 32-bit mode, VESA and a keyboard. I've never even found a video card with a 1920x1080 VESA display mode; they're almost exclusively still 4:3 only.
Plus, no sound rules out gaming and media; no internet (let alone Wifi) rules out any connectivity; no strong filesystem rules out moving data around easily; no USB rules out loading things from external storage, gamepads, etc.
Only strong use case would be for embedded; but ARM platforms have this area beat substantially in cost, power, tooling, etc.
[+] [-] jacquesm|10 years ago|reply
> Only strong use case would be for embedded; but ARM platforms have this area beat substantially in cost, power, tooling, etc.
http://docstore.mik.ua/orelly/linux/run/ch01_02.htm
Linux started out as something quite a bit less impressive than what you see today.
[+] [-] qznc|10 years ago|reply
http://electronicdesign.com/embedded/how-boot-linux-under-on...
http://www.makelinux.com/emb/fastboot/
[+] [-] trsohmers|10 years ago|reply
"Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position"
While it is great that we recognize good work like this, bringing up his age in the title is focusing on a pretty irrelevant metric when we should focus on good work, no mater who makes it.
[+] [-] JDDunn9|10 years ago|reply
[+] [-] ekianjo|10 years ago|reply
That should be valid for just any activity/profession, not just Hackers. I don't see the need for the specific segment here.
[+] [-] incepted|10 years ago|reply
It's relevant because it's remarkable and it puts the author in a much smaller circle than he would be if he were older. Trying to pretend otherwise is silly.
Being able to read at age 18 is a lot less interesting than at age 4. Same goes for rare technical feats (and writing an OS is such a thing, most developers wouldn't be able to pull it off, so doing so at age 13 is certainly a lot more interesting than when you're older).
[+] [-] elliotec|10 years ago|reply
[+] [-] frest|10 years ago|reply
The point being, you benefitted tremendously by your work being judged relative to your age, so it seems disingenuous for you to suggest Omar shouldn't get the same treatment.
I doubt ExDOS or EyePC will be remembered in the annals of history as engineering marvels, but that's irrelevant. They are indicators that the creator has the talent, intellect, and dedication to accomplish a lot in a very short amount of time, and they hint at great potential.
[+] [-] voltagex_|10 years ago|reply
I just ran through the OSDev Bare Bones [1] tutorial this evening, even implementing newline support! I don't understand all of it yet and here's a kid half my age doing amazing things. Goes to show what you can acheive with time and perseverance. I really wish I learned Assembly at that age.
[1]: http://wiki.osdev.org/Bare_Bones
[+] [-] jeswin|10 years ago|reply
[+] [-] ploxiln|10 years ago|reply
(still impressive)
[+] [-] vezzy-fnord|10 years ago|reply
[+] [-] dkarapetyan|10 years ago|reply
[+] [-] socceroos|10 years ago|reply
[+] [-] jakub_g|10 years ago|reply
https://web.archive.org/web/20150810162221/http://exdos.eu.p...
[+] [-] NickHaflinger|10 years ago|reply
[+] [-] omarrx024|10 years ago|reply
[+] [-] rsneekes|10 years ago|reply
[+] [-] lmitchell|10 years ago|reply
[+] [-] meddlepal|10 years ago|reply
[+] [-] muazzam|10 years ago|reply
[+] [-] omarrx024|10 years ago|reply
[+] [-] NickHaflinger|10 years ago|reply
[+] [-] S4M|10 years ago|reply
[+] [-] pknerd|10 years ago|reply
[+] [-] muazzam|10 years ago|reply
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] trsohmers|10 years ago|reply
The only advice I would give for this sort of situation is while you should not emphasize your age (which you are not doing), definetely use it to your advantage when you can... Get sponsorships to conferences/events, meet cool/influential/important people, go audit university courses, and the many other things at your disposal. And just remember that there are very few real "hard" limits when it comes to age, and don't take "no" for an answer if someone tells you you can't do something because you are too young... the best way to prove them wrong is to do the best work you can, and to never stop trying to improve yourself.
If you would like any more advice, feel free to shoot me a message (my contact info is in my HN profile)
[+] [-] jacquesm|10 years ago|reply
You can flesh out your profile by clicking on your name in the top right, suggest you add a link to your project there. Super neat to see your stuff, keep at it!
[+] [-] 101914|10 years ago|reply
"Q: Why did you choose Assembly?
A: It is easy, simple, and the language of real programmers."
Will he still believe this when he's older?
I hope so. Because it is the truth.
[+] [-] na85|10 years ago|reply
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] zaroth|10 years ago|reply
[+] [-] akclr|10 years ago|reply
[+] [-] unknown|10 years ago|reply
[deleted]