Hacker News new | more | comments | ask | show | jobs | submit login
Show HN: The operating system I built as my high school project (2016) (github.com)
220 points by aswinmohanme 19 days ago | hide | past | web | favorite | 75 comments



For my high school senior theology project, we were instructed to select a modern news event, categorize it into one (or more) of the seven deadly sins, and then give a class presentation. I miraculously convinced my group to choose the Microsoft antitrust case since I had just read the Wired cover story on it. Throughout the year, I sat in the back of the room and had a fake bible cover over my Flash 5 Bible and was reading about actionscript instead of paying attention to a topic I had no interest in. For the project, I made a fully interactive Windows 2000 desktop and functioning start menu that would launch “programs” that were the visual components of the presentation. We had the teacher move class to the computer lab where I loaded the flash executable onto each computer so the students could play with it while we gave the oral presentation. It was pretty awesome and we ended up with the only A in the entire grade!


... and this is the reason we can’t have nice things. Source: In 8th grade our class had to do a book report ‘project’. I selected an ebook on intro to processing (it’s an environment build on Java that lets you create graphics applications easily). I wrote an application that drove a (self built) 6-wheel drive robot wirelessly around our school for the project.

Needless to say, there’s was little literary analysis done, but the class enjoyed the wireless video stream.

Future me came to get annoyed by overachievers that raised the bar for ‘A’ grades.


Overachievers should not be able to raise the bar. If they can, then the system is broken. Grades should be relative to the course content, not the abilities of the students.

When I started university, it was clear that I had much more experience programming than the other students, but I had to do certain introductory classes anyway because there was no way to receive credit for half a decade of self learning. On one assignment my lecturer went looking for things to mark me down on that were outside the scope of the assignment because "it would look suspicious if you got a perfect grade".

Some people are just capable of more than is expected of that class for whatever reason, not because they intend to demoralise everyone else and break the system.


Similar story when I was at college (UK meaning) (late 90s).

Final project was an inventory system for a company.

Mine was a RDBMS backed system that implemented proper stock control with parent/child SKU handling etc (I went to the library and checked out books on inventory control) and was fully documented (180 pages of documentation) and a full user manual with a FAQ.

I thought that was what professional programmers did...man was I in for a shock when I hit industry.


I started at a junior college and then transferred to a four-year University. There was a time when I was going to University where I was still backfilling some course credits to complete my Associates degree from my work at the junior college.

The respective school catalogs deemed some courses at one school to be equivalent to courses at the other school without really having them reexamined on a regular basis. As a result, one of the courses (Statistics?) that I needed to complete my Associate's degree requirements translated to a much simpler course equivalent at the University.

After the first day of class, the teacher came up to me and asked me, "what the heck are you doing here?" because he could tell from my interactions in class that I was already beyond the material of the course. I explained to him the situation, and he offered to come up with some sort of a challenge exam for which he would just give me full credit for the course. instead, I served as a kind of a de facto T.A. for about half time for the rest of the course.


I did intro to programming as part of a degree as a mature-aged student and the only way to get a good mark was to do an "extra project" that the professor would sign off on. I wanted to make a GUI RSS reader with the ability to email links from things to people, that wasn't interesting/challenging enough in a class where we were learning about functions and loops. I gave up and took the not-perfect mark, quit the degree because their entire system was ridiculous, and haven't missed it.


To be fair, I needed an A on that project in order to get a B in the class for the year because my grades on tests/quizzes weren’t great due to my focus on computers.


which sin was it?? greed would be the obvious, but one could make a case for pride and sloth as well.


Primarily greed but I think one of my group members also mentioned pride and gluttony. This was 18 years ago so details are fuzzy. I probably have the project on an old hard drive or CD-R somewhere...


CD-R: there's a word I hadn't heard for a long time. It's amazing how technology marches forward and you only notice it when you look back.


There’s a chance it’s also on a Zip disk somewhere in my basement!


Oh wow, Zip disks! I entirely forgot those existed. Which is now bringing back memories of just how many different disk drives those late 90s computers would have. The desktops in my middle school would have floppy, zip, sometimes another floppy, and an optical/cd drive. Towers are now almost flat in front, with even optical CD/DVD drives disappearing in many corners, but back in the day there were disk bays everywhere.

I can still feel the satisfying click as a floppy was seated home and hear the buzz as the drive spun up. There was something wonderfully concrete about those storage media. You just don't get the same satisfaction at all from plugging in a USB stick. And the hours spent pulling back the metal cover and letting it go while bored in class...

Although I do think they stuck around a little longer than many remember. I was still using 3.5s to bring papers to home and back around 1998-2000.


I'll add MO discs. They were supposedly more durable, longer-lasting, and (at one point) GB than CD's and DVD's. I discovered them playing Resident Evil.

https://en.wikipedia.org/wiki/Magneto-optical_drive

I also had a drive for 100MB, Zip disks. Only ever owned one since I couldn't justify the expense. Hardly anyone else had them. What's point of a tech for moving data if you can't use it to share the data with friends and local businesses? ;)


While on the (off-) topic of magneto-optical drives, do you remember how every cyberpunk film of the 1990s seemed to feature (MO) MiniDiscs as ‘future’ storage? I remember them appearing in some form or another in Strange Days, Johnny Mnemonic, and The Matrix (amongst others). Lawnmower Man featured CD drives in external caddies, a type of drive system that virtually disappeared with the advent of ‘2x” CD-ROM drives starting sometime in 1992 or 1993.

My first USB ‘thumbrive’ was a 16MB IBM-branded unit I received as an amazing gift in December 2001, when the world was still in shock over the 9/11 attacks.

God, the memories...


It didn't hurt that MO drives were big and colourful, which translates well to the screen :)


Anyone for Jaz drives? Oh man, I remember my mom having 100MB Zip drives and 1GB Jaz drives for a while in the 90s. Always wanted an excuse to play around with them but didn't have much useful data to put on them at that point.


I had an internal 2GB Jaz SCSI unit in my April of 1999 dual-PIII-450 “God Box” I was given for my 18th birthday.


Oh man no kidding! Dual P3s... those things were absolute beasts at the time. What video card did you have? I remember the ol 266 celeron to 400 overclock that became popular around then. Researching that was what got me originally into overclocking.


And now even hard drives and their associated bays are disappearing (good riddance) as flash storage becomes increasingly prevalent in the form of SSD M.2 slots. Most functionality that was on expansion cards is now either redundant (sound cards, disk controllers) or integrated somehow onto the motherboard/chipset/processor (networking, integrated graphics, video in/out capabilities built into USB and HDMI ports)...


Very true. And to be clear, I much prefer the advent of solid-state based storage; I will be truly happy to never again have a HDD show up DOA. Or to hear an ominous crunch while working on something, and then realize the drive's just decided now is a good time to go bye-bye. I completely welcome the loss of moving parts.

But like I said, there was just something to the experience of working with diskettes. It felt more analog somehow.

I wonder if there was any such nostalgia for the days of tape/cassette storage.


> Or to hear an ominous crunch while working on something, and then realize the drive's just decided now is a good time to go bye-bye. I completely welcome the loss of moving parts.

"Why I'm usually unnerved when modern SSDs die on us"

https://news.ycombinator.com/item?id=18653728

You don't need moving parts for the drive to go bye-bye without warning.


Somewhere, in some box, I may yet have a disc with my first BASIC programs from high school.

On floppy disc.

On eight inch floppy disc. (DEC PDP 11/04)

I didn't keep the mark sense cards. I think.


Vic 20’s crappy cassette tapes are probably why I became a network admin instead of a programmer: 9 times out of 10 the cassettes never actaully saved my hours long programming sessions.


Using GOTOs.


What a coincidense, for my high school senior project in 2017 I built an operating system as well [1] (which I still work on to this day). For anyone who is put off by the difficult of building an operating system I highly recommend just going in and getting your hands dirty. osdev.org is a fantastic resource and theres plenty of reading to do on the web, and getting more intimately familair with your hardware is an incredibly gratifying and enlightening experience. Even if you never end up with something useful, the learning experience of working in such a liberated and constrained (theres no rules, but no supports! anything goes within the constraints of the hardware) environment is second to none. And once you build your operating system, you can always go back and do something new with it. Mine has become something of a zen garden where I can just play with new ideas and algorithms, without having to worrying about reaching some sort of goal.

[1] https://github.com/block8437/brackos


Those who say this is more about bravery than raw skill or intellect have momentarily forgotten that OS's have to not only be coded, but debugged.



Not really true for a small toy OS in my experience.


Doing something at all is half the battle.


'Ultron is designed with OOP in mind and has not failed to live up to the promise at all possible places.'

Would that more professional programmers had this humility. :)


I can't tell if that's saying that it didn't completely fail, or that it completely succeeded.


I read that sentence as saying that OOP was successful.


I read that too, and also read OP as being sarcastic


Ultron! This is the browser that Google uses, right?


is there any projects that influenced this project? Just curious as googling some of your code turns up in other projects.


I did this too! Was a great learning experience.


Jesus, at my high school it's an accomplishment to know how to read


In my experience, writing "scary" software like a compiler, an OS, a kernel driver, etc is more about bravery/daring than raw skill or intellect. There are quite a few people that know C and C++ in high school, so it seems reasonable that at least some of them would have someone (IRL or online) nudge them in the direction of an OS and tell them "it's not as hard as you think, if you dare to try."

I don't say this to diminish the accomplishment here, but to encourage others to try it too.


Much of the willingness to attempt to write “scary” software when you are young is being ignorant of the complexity involved. That is probably why younger people are so disruptive in tech as well. Older you get the more reasons why not to do something appears.


“They did not know it was impossible so they did it”

-- Mark Twain


I learned programming faster when I had no clue how awful I was doing it. I just kept going and bumping into things a lot.

Now learning a new language is hard because I'm trapped in thus mindset of, "surely this isn't the most time efficient way to learn this..."

Only recently have I made some progress by not looking back and coding myself into a wall even if I think I can see the wall coming.


When I was shit at programming I started a lot more ambitious projects and I ended up finishing none of them. Now I know what to expect and I end up with something finished and useful most of the time. I suppose sometimes beginners attempt things that experts think are too hard but it ends up that you can make a workable solution even if it is structured horrible.


I also learned C and C++ back in the late 80's during high school, as part of the domain area we get to chose on the last three years (10 - 12).

We also got introduction to UNIX via Xenix on our OS classes, got to do a Pascal syntax highlighter and a couple of other cool things.

Fully agree with you, the accomplishment here is great and anyone else wondering about if they should attempt something like this, just give it a go.

Don't worry about writing perfect code, rather make it work somehow, perfection will come later.


"Don't worry about writing perfect code, rather make it work somehow, perfection will come later."

I think your advice is true, esp for education and Worse is Better effect. I think the follow-up is wrong for two reasons:

1. Useful code tends to stick around long time getting extended more than refactored for quality.

2. Due to the methods involved, the highest, quality designs usually need to be designed for that upfront. Certain decisions will favor reaching the goal.

So, my advice for high-quality outcome is to design for it with simple constructs, straight-forward composition, and plenty of docs made on the way. Gives someone a better start if they want to try to perfect it years down the line.


I agree wholeheartedly, having written a kernel myself first year in high school (and I don’t consider myself very intelligent). Mine was even more involved — it had user space, protected memory, multitasking, file systems, etc. So much fun! What it came down to was persistence and reading the manuals.


I've did this myself back in 2000/01 — there were fewer resources on the web back in the day (and dial-up was harder), so it was about hunting down freely available papers, books, source code and similar (a student in Serbia can't really walk into a library and get their hands on some real literature).

I actually did have a round-robin scheduler with prioritised processes and first-fit memory allocator in there as well.

During the presentation, as I pulled out a 3.5" floppy disk to boot up my OS, the teachers looked at me in disbelief: you've actually got something working?

If you are curious and willing to spend some quality time with your computer, this is a great way to learn about computers. Today though, I'd recommend people do it with ARM just for the kicks.


I don't know C but I am interested in learning.

What would be a good place to learn the steps of making an OS?

I just want a bird's eye view right now, just to understand the moving parts. This will also help me in the future as a manager.


I followed this http://www.osdever.net/bkerndev/Docs/intro.htm with some pointers from osdev wiki


Nice! I remember following this site back in the day. My tiny "OS" got till paged memory management and didn't really go any further. I used to use "Bochs" CPU emulator for testing.


Right, I used bochs too: it was a full emulator, none of this "let's just let the CPU really run these" things. :)


In Rust rather than C, but a good walk through the basics of getting an OS booted:

https://os.phil-opp.com/



In addition to the resources other have mentioned, I've found this http://pages.cs.wisc.edu/~remzi/OSTEP/ valuable.


Totally agree, it was all about persistence way more than actual coding. And if you know where to look it's way easier than it sounds.


I think you can make a similar statement about coding in general. For me, I got into coding because it was fun and I worked on projects (games) when I was in high school because I wanted to create something. The code I wrote was terrible but I kept at it because I really wanted that end result (a game of my own creation). If someone had told me it was hard, I probably would have laughed because it was mostly about persistence.


I had some CSS on my MySpace page...


showoff


I finished high school in 2003 at a large rural school that offered both Info Tech and Software Development for senior students. I took both and even our teachers were seriously lacking, in addition to the students. I would have killed to go to the city for schooling at a school where those topics were treated seriously.


Don't get me wrong, but no high-school teaches operating system development.

I did go to a kind-of-special school (Mathematical Grammar School in Belgrade) that did have advanced (for high-schools) IT subjects like assembly language development, database courses and similar, but as I said, even my teachers were surprised I actually had something to show off after presenting my work on an OS.


How does it compare to TempleOS? :)


This is a good question. Very few people have the means and motive to write an OS in a bubble and I wonder if it leads to the same tradeoffs.


TempleOS is real mode. What do we do all day?


TempleOS does not run in real mode, it runs in long mode (64 bit)


The author had some... memorable quotes. It was a reference to his most infamous post. I assumed the OP knew about the author's past and wasn't asking for a genuine comparison. Tho looking back I'm not so sure.

For the brave of heart (NSFW): https://www.youtube.com/watch?v=UCgoxQCf5Jg&t=3295

Won't make much sense out of context. The video does a pretty good job of explaining the whole story if you have time.


I heard that guy made his own compiler


Which school did you go to?


Kendriya Vidyalaya Adoor, Kerala, India


KV-ഇൽ OS development ഒക്കെ പഠിപ്പിച്ചു തുടങ്ങിയോ?


Kannada? I'm not indian but I remember these symbols from a twitter crawling project.


Idu malayalam aanu mone


Malayalam


Ahh annathe sir poli aarunnu, katta encouragement aayond oru kai nokiyatha ;)


Was this your plus two project ?


Nannayi varatte :)


You went to a great school!

Congrats for your accomplishment




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: