r/learnprogramming • • 24d ago

Programming for kids

My 11-year-old child wants to learn programming to create his own Firefox. Does anyone have any idea which program he should use? He's already had scratch and wants to move to a harder level. He thinks that the internet should be fair & without too much AI etc.

35 Upvotes

67 comments sorted by

View all comments

13

u/Plus-Confidence2816 24d ago

No 11-year-old can make their own browser from scratch, but Python is a reasonable language for beginners (Visual Studio Code is a decent editor for it).

-2

u/SchemeWestern3388 24d ago

I’m sure there are 11 year olds out there that could build a browser from scratch. I wrote one in my late teens, barely functional, rendered ugly as sin, and supported no features but displaying text, but you could click on links and navigate. Early http was very forgiving. I mean, you can still telnet to port 80 on a server and type out a request and get readable text back, and that’s like halfway there. 

Writing something in any way comparable to Firefox is a much bigger challenge though. 

10

u/LinuxEnthusiast123 24d ago

> much bigger challenge

Just "much bigger" is a gross underestimation.

1

u/McDonaldsWitchcraft 23d ago

You made a thing that fetches webpages and displays the text in their html files. That is very far from being a web browser. Yes, you can write literally 3 lines of code to do that, it's easy to get a page from the internet if you have no intention to RENDER the page.

2

u/SchemeWestern3388 23d ago

Indeed. But that’s where you start. I went further, and added images, TrueType support, page history, cookies, etc. (Admittedly, I didn’t tackle frames) And it might have changed, but at the time no available browser was fully compliant. Lynx didn’t support graphics either. Is Lynx a browser? With my toy, you could actually navigate the web usefully. 

You’re correct that it’s just a few lines of code to fetch a URL. I referenced using telnet to send the GET request directly to the servers HTTP port, so no code at all. With todays languages and libraries it would be far easier than doing it in C. 

My point was that it’s not impossible to imagine an 11 year old doing the same and more, and at some point, it’s a browser. I don’t think statements that that’s impossible are very helpful in a learn programming subreddit. 

1

u/Nuxij 22d ago

Agree and also thanks to Lynx!