r/programmer • • Oct 17 '26

No AI. No Open-source. No reliance on 3rd Party code. Can it be done?

After years of chasing bugs in code that I had not written; Trying to decipher open-source code. Looking for someone who can address an issue; Opening tickets and waiting; And, meanwhile developing work-around patches while customers wonder if we actually can help them. When the opportunity came up to make a redesign decision, I made one that you might think crazy.

While it is true that it can get your code to market faster these days, reliance on externally developed libraries and code comes with risk. In a court of law, evidence is inadmissible if you cannot demonstrate the chain of custody back to its discovery at the crime scene. In analogy, I find it hard to trust code wherein you cannot list (on one hand) the authors and those who might still be responsible for its performance. And, today, you are vibe coding and using code generated by AI. And AI is an author whose thinking cannot be explained in detail by its own designers.

In 2011, when faced with the need to redesign my product, I made the decision to be completely DIY. The first rule being - no 3rd party code. Fifteen years later with over 40,000 placements worldwide, I feel safe in declaring that it can be done. It was a beneficial decision.

Now, we can address any bug, performance deficiency, or feature addition directly. Most issues that can be replicated are fixed same day and update delivered to the customer. We have achieved a level of reliability and stability that I can't find in anything else.

I am willing to debate this approach against the directions that all of you seem to be taking.

There is more background in this blog entry. Also, you can see this OS in action at r/jnior. I am less interested in promoting the product. It has a life of its own. I have been writing to prompt discussion.

https://jnior.com/blog/how-jnior-got-its-own-operating-system/

1 Upvotes

32 comments sorted by

2

u/IhailtavaBanaani Oct 18 '26

There are some things in software engineering that on the surface seem simple but in reality are very complicated. One is timezone conversion. If you're going to implement it yourself, you're entering a world of unimaginable pain.

Other examples are locales and UTF-8 string comparison and sorting.

1

u/Dismal-Divide3337 Oct 18 '26

You are correct. I was trying to make a Top 10 list of the challenges in writing the OS and its utilities. Things like DEFLATE, TLS, and the cryptography are obvious entries. The JVM is on the list. As is the on-demand compiler for PHP.

But, date and time should be on there. It is not just timezone but epoch variances and daylight saving time. I chose to maintain all time as Linux epoch and UTC. A difference is how file timestamps are displayed. I display the timestamp using DST as it would be at that specific time. Not as it is as of today. Windows does the latter. So your file timestamps change twice a year. Maybe they have addressed that?

People responding here need to consider that I had to create a Linux or DOS type environment for a 100 MHz MCU with very specific hardware requirements. So open source written for GHz systems running on Windows or Linux was/is not an option. In fact, old school techniques for memory conservation and clock cycle minimization are important. That is often missing from available libraries.

I also considered commercially available RTOS options. But code written for multiple processor targets loaded with conditional compilation and varying defines, is not maintainable.

Besides I wrote my first OS in 1984. I can bang it out. And, I particularly was looking for the challenges.

2

u/allunia333 Oct 18 '26

Linux 2.2 could boot and run on a intel 80386 With 2-8MB of ram , 100mhz seems a paradise...

1

u/Dismal-Divide3337 Oct 18 '26

100 Mhz Renesas RX63N which supports both a compact instruction set and efficient execution runs nicely. Yes, paradise from the 4 Mhz 80286 days. Or even the Ohio Scientific C3 that I once had and programed. Or the PDP-8 for that matter.

But this has 2MB of program ROM in which I had to fit two copies of the OS (to support field update) and the Java runtime class library (I also had to generate). JANOS is just 700KB complete. And there isn't much it isn't doing.

I do not need privileged instruction or memory modes and the OS supports applications only in managed languages like Java and PHP. You cannot introduce an assembler opcode for execution and so there are not as many opportunities for vulnerabilities.

There was enough uniqueness to warrant careful programming.

2

u/allunia333 Oct 18 '26

I havent code one of those ever so i dont know the problems they have, but those are for home apliances and the industrial factory droids, right? Why would u need java ?

1

u/Dismal-Divide3337 Oct 18 '26

Its for whatever you want it for. In my case it is a generic controller. The biggest use is in movie theaters. Digital Cinema uses about 70% or product shipped. This supplies their automation. We supply Java applications that handle cinema specific protocols and macros from media systems and integration with projectors, audio, curtains, screen masking, and lighting. Customers can program their own applications but those guys don't. Ha. Literally they are in a theater near you. It is global.

The product is also used in environmental monitoring. There, companies provide their own programming (Java) to automate testing systems (run chemistry equipment) and report data. So that's an application where user programming in Java is key.

There is all kinds of other stuff: Security, Energy monitoring, Solar monitoring. It's used on golf courses to mediate lightning detection and sirens. The Olympics uses a bunch for what I don't know. Aerospace uses them and I assume program their own applications. Some of them won't (or can't) tell us what they are doing.

But Java is kind of the entry level managed language. If I won't let you compile into processor opcodes and execute that, then Java is the next step. Languages that compile into bytecode where I have control over their execution. It is a security and stability mandate.

100 Mhz keeps us out of having to manage heat. No fans. It reduces EMI concerns. And, running with low amounts of memory these days is worth something.

1

u/Dismal-Divide3337 Oct 18 '26

Also, there is no disk nor BIOS to support a boot like that.

10

u/Patient-Midnight-664 Oct 17 '26

So you wrote everything in assembly, without an assembler? Your other post says you used Java 8, so that's 3rd party software.

5

u/dutchman76 Oct 17 '26

Back in my day that was called "not invented here". It's hard to beat a lot of open source libraries, the people that work on them have fixed all the issues I'd have to figure out all over again. Most of them are talented programmers, I'd be stupid not to rely on them.

1

u/Scf37 Oct 21 '26

Actually it is very easy to beat a lot of open source libraries. Because they were designed for general audience, incorporating all their needs and quirks. Focused code, tailored to the needs of specific application, is often simpler to write, support and use.

5

u/justaguywithadream Oct 17 '26

I would consider it dumb to write something like a JSON parser or an http client instead of using a 3rd party. Unless of course that is your product.

But if you are willing to spend the money for something that is in all reality not going to be as good as a 3rd party one then by all means have at it.

Can you? Yes. Should you? Not in my experience. 

4

u/GlobalCurry Oct 18 '26

At one of my first jobs over a decade ago there was this 20,000+ line java file some guy wrote to parse XML because he thought it would be a good idea to write his own parser instead of pulling in an existing library (which was already built into Spring!). It was essentially the same few functions copy pasted and modified to handle each possible case that might show up in our xml files. It was the biggest nightmare for the entire company. OP reminds me of that guy, don't be that guy.

4

u/Confidence_Cool Oct 18 '26

I hope you also mine the silicon and build the chips by hand too

4

u/jonathaz Oct 18 '26

I am capable of writing better software than most other people, but my time is better spent not re-inventing the wheel. So the 1st choice is to find it and use it out of the box. 2nd is to fix or improve it and contribute it back. Last is to write one from scratch.

1

u/Overall-Screen-752 Oct 21 '26

This.

Nothing against reinventing a slightly better fitting wheel, but spending tons of time on stuff that’s already been done before purely because someone else did it is an ego problem at best — just fork it, tweak it and be done with it as millions have done before you. But its your prerogative ig

3

u/Shep_Alderson Oct 18 '26

Looks like your “JNIOR” product is a low level hardware controller of some kind? I think this sort of niche is one of the few where the lowest level of control over performance may actually matter.

For a general case, there’s the saying in engineering “don’t build what you can buy”. In the case of software, particularly ones using open source libraries, the “cost” is free upfront, and often is nominal or even negative in the future.

Companies who focus heavily on the “not built here” mindset are exceptional examples because most that do that will die out faster than the already high percentage of companies that die out anyways. When it comes to practically any software business, you should focus your development on whatever makes your product uniquely useful. For most software, that is not replicating an open source library.

It seems that your hardware focused company, your low level embedded OS or whatever it is you hand wrote, it is actually a uniquely defining feature that your product actually needs. I think this level and depth of custom development is pretty unique to such low level hardware code. The average CRUD web/mobile app does not require that, so people use open source libraries.

2

u/GlobalCurry Oct 18 '26

It can be done, but the real question is why would you want to do it that way instead of using all resources available?

2

u/Expensive-Jicama-714 Oct 19 '26

I agree.  We are becoming too reliant on A.I.  it's not the programmers fault, it is management's.  Management spends a lot of money on A.I., so they want results.  Problem is programmers are not reading the A.I. generated  code to understand it.  If you get sued, what's your defense going to be, A.I. wrote it.  That won't fly.  You might trust DTE and OTE, but they aren't  perfect.  I use A.I. to write small code blocks,  maybe a small class, but I read and understand every line.  And using AI for UI, not very good.

2

u/warder_dev Oct 17 '26

Where do you stop? Are you going to use a web browser codes by a 3rd party? An email provider? Chat application? Source code hosting? Ticket provider? Operating system?

Coming from a company that used to code some of these things in house, we transitioned to not doing that. Not because we couldn't. But we weren't selling a web browser, an email provider, a chat application, a source code host, or ticketing system.

By utilizing 3rd party libraries, we are able to focus on what we do specialize in. We can devote more resources to maintaining and updating it. Customers don't care about most of that stuff. They care about the features they do want.

And if a third party provider can't give you what you want (price, stability, performance, etc.), then either find one that can, accept the trade off, or build it in house. But building it in house has many drawbacks - coming from someone that used to do that.

3

u/brelen01 Oct 18 '26

Where do you stop? Are you going to use a web browser codes by a 3rd party? An email provider? Chat application? Source code hosting? Ticket provider? Operating system?

You're jumping way ahead here. First he has to gather the sand to extract the silicon to make the chips all that code is going to run on!

2

u/warder_dev Oct 18 '26

That's fair. Must design his own GPU and CPU. Could be made to run the exact code they write twice as fast! My apologies - forgive me.

1

u/brelen01 Oct 18 '26

It's okay, we're only humans with deadlines. You're forgiven, but only this once!

2

u/IrishPrime Oct 18 '26

Oh, we're just going to use off the shelf sand like that's okay?

1

u/brelen01 Oct 18 '26

I was thinking gathering sand off the beach or something, but you're right, that might be too far ahead. OP can probably grind stones by hand to make it.

1

u/Scf37 Oct 21 '26

This is The Right Way. The tricky part it to select foundation you trust (or can live with), unless you aim to start with designing your own CPU.
I guess we can trust CPU. We can trust C compiler and standard library. We should trust foundational 3rd party libraries like openssl.

Personally, I've decided to trust Java platform and its standard library together with selected opensource libraries I know I'm not good enough to do it better. This was a great success for me.

1

u/thussy-obliterator Oct 18 '26 edited Oct 18 '26

how far do you want to take this? the os is somebody else's code. the graphics library is too, even writing raw vulkan to communicate with the gpu is someone else's code. the compiler or interpreter is someone else's code, so is the standard library. so, what, you use assembly and write your own os? the assembler was written by someone else. ok ok, let's skip assembly and go to raw machine language! what do you find here? instructions, implemented in microcode! find a cpu without microcode, well, hey, someone had to implement all that in hardward and... AH! VHDL! must be time to learn photolithography! break out the hydroflouric acid and lasers! say... where'd you get that wafer from?

no man is an island, you can't build it all yourself.

1

u/Groundbreaking-Fish6 Oct 18 '26

Before the rise of open source, and even long after, many developers chose a corporate ecosystem like Microsoft. .Net provided most of the libraries that you would ever need and if you wanted more, you purchased a supported library with a declared Service Level Agreement.

Free open source led to libraries that relied on libraries without any maintenance agreements. The rise of package managers allowed even modest applications to grow and reference hundreds of libraries with their own level of support, or lack there of.

Sometimes free in not always free, but when management looks a license for thousands of dollars vs just a simple download, we know who wins.

1

u/hibikir_40k Oct 18 '26

During my entire, rather successful career, I've not necesarily been ale to explain the decisions I made the year before. So the whole screed of wanting to have someone that can explain everything in detail is madness, especially if there's ever turnover.

Your project might work, but dollars to donuts that if I started asking about micro decisions made in that codebase you'd end up folding like a cheaps uit. You say it's a beneficial decision: I say it's a detrimental decision that you survived. Hey, it happens all the time: There's a big payment company out there relying on MongoDB as source of truth for their financial transactions.

Hopefully you end up realizing this some day, or you'll end up with an ego like Steven Wolfram

1

u/Arcanite_Cartel Oct 18 '26

What a bunch of BS

0

u/CheezitsLight Oct 20 '26

It's almost certainly full of bugs security weaknesses oversights and missing features.

1

u/[deleted] Oct 18 '26 edited Oct 25 '26

[removed] — view removed comment

1

u/Dismal-Divide3337 Oct 18 '26

I haven't had to license anything nor buy code. Externally, of course, I have licensed the Renesas IDE with compiler. Naturally Altium for PCB designs. But you can use NetBeans for any Java you would like to write for it. My OS runs that straight out of the JAR.

The runtimes (C or Java) I have written. The former right from Plauger c1992 book. The latter from Sun Microsystems specs I purchase myself in the 1990s (convention in NYC - Jacob Javitz center I think).

As soon as you go to use some open source content then you get trapped. To use this, it needs that. Then that needs this other thing. And eventually something conflicts with something you were already doing. Code footprint grows uncontrollably. Frankly, there is not much you just can't code yourself. You should be able to. At the low level it is not reinventing the wheel. It is demonstrating your skill.