← Back to context

Comment by joexbayer

2 days ago

Thanks for the feedback! I think the biggest thing I’d do different is to have a plan. I just started out with the goal of doing the basic hello world OS, and that’s it. But then I kept adding new things, adding more and more working on multiple things at the same time. Which has lead to some technical debt I’m still trying to fix. I’d also try to be less UNIX dependent.

Regarding language, I love C for its basic syntax and “straight to the point” style. Maybe I’d consider some other languages for userspace applications.

A goal for me from the start was always that I wanted to write everything myself, no porting of any software, and for me that’s the entire point of the project. I mostly adhered to the rule of copy ideas not code.

I'm not sure it's a bad thing to not necessarily have a plan. Intuition is the hidden sister of logic, both children of reason, and we don't always see her because she's often behind the scenes doing all the work.

Technical debt is as sure as death and taxes. Good software grows over time, like a person growing up. Sometimes you have parts that are needed for a time but not permanently, like baby teeth. That's what technical debt is like.

Other times there are parts that are absolutely ideal long term, but it's a long time before they even make sense. And sometimes things only develop much later than we expect, like wisdom teeth. These are software features that won't make sense until you write the thing that you don't realize yet is only temporary.

I have the same goal of writing everything myself from scratch. It's a very important goal to me for a reason I don't fully understand yet.

Congrats on writing an entire OS, and getting it booting on real hardware! That must be such a rewarding feeling in its own right, even if no one understood how. And it looks so very cool.

You've given me more motivation to announce my project soon. Maybe next week. Thanks.

Have you played around with Zig yet? I hear that would be a good replacement for C here. Did you have any thoughts on porting your OS to that, or did you have any branches some Zig code made its way into?

  • I’d love to hear about you project! Seeing what other people make is a big inspiration. I have not tried Zig, for the kernel I don’t think anything will beat C for me personally. But for userspace applications I’d love to try it!

Regarding a plan, I often feel the same way about my own project. There are a number of systems I've rewritten multiple times, and I can't help but think much of that would have been unnecessary if I had been more tedious about diagramming out my needs and requirements beforehand. Other times I wonder if I would have gotten this far had I planned things out... It's the age old question of "would I have started this project if I had known how much time and effort it would have taken?"

Each approach has a clear set of pros and cons, as others have explored in this thread. In the end, I think what ultimately matters is whether we're satisfied (and proud) of a project after a significant amount of progress has been made.

I also took the "I want to write everything myself" approach with my project since I wanted it to be a demonstration of my abilities. I wanted to prove to myself and others I could create a project of significant size and scope. It seems like this often means working without libraries and having to reinvent the wheel over and over again. It's tedious, but it certainly adds to the satisfaction you get as you look over your work and think "this is truly mine; I did this."

And yes, copy ideas, not code, is one of those things I do my best to adhere to. Sometimes, at least with JS, you run into problems, look into solutions, and it turns out there's really only one sensible way to do something; what you end up writing feels like a boilerplate solution to the problem. I often find myself going back and forth through search results from places like Stack Overflow and trying to siphon out the best techniques and ideas from multiple examples to mesh together into some usable code in a style I prefer.

Finally, since I failed to say this eariler, congrats on your project! I'm gonna have to try it out as soon as I get some extra time.

I'd like to second the mention of plan vs. no plan.

Having no plan is often better when you're facing a deep pit of work, pick at it every now and again, whatever you feel like working on that day.

vs. having a clear Todo list that is longer than a DNA chain and just giving on it after item 5 because 6 is boring.

Oh, and congrats, looks great.

  • I find it very hard to maintain enthusiasm and momentum on side projects if there is a plan. It just feels like work.

    • I guess yeah, a full plan would perhaps make it like work. I guess I meant more like an idea of what the goal is. So I could better plan the features.

      2 replies →

Curious about the less UNIX dependent part - did you find the UNIX model (everything is a file - or more accurately everything is a serial connection) to be a poor abstraction for a hobby OS?

  • Oh, I really like UNIXes abstractions and use alot of them in my OS. What I meant was, because I use GCC for compiling, ld for linking, ar for archives etc, I noticed that I got really bound to the C way of UNIX. Or maybe POXIS would be more appropriate. It did “force” me into some design decisions which I did not like. Or even just the way I wrote C is so UNIX / Linux like. Wish I tried to branch out more, especially considering how different Windows C is.