New editor is integrated with Python lessons:
When we think about Raspberry Pi, we normally picture single-board computers, but the Raspberry Pi Foundation was started to help kids learn about computers and it wants to help whether or not you own its hardware. The non-profit arm of Raspberry Pi this week released its new, browser-based code editor that's designed for young people (or any people) who are learning.
The Raspberry Pi Code Editor, which is considered to be in beta, is available to everyone for free right now at editor.raspberrypi.org. The editor is currently designed to work with Python only, but the organization says that support for other languages such as HTML, JavaScript and CSS is coming.
I tried out the Code Editor on my PC's browser and, in its current form, there's nothing particularly unique about it. However, I found the UI very user-friendly and was impressed with how it is integrated into someone online tutorials. The interface consists of three panes: a list of files in your project, a code editor and an output pane that runs the result of your code when you hit the Run button.
If you create a free account on raspberrypi.org, which I did, the system will save all of your projects in the cloud and you can reload them any time you want. You can also download all the files in a project as a .zip file.
Since the entire programming experience takes place online, there's no way (at least right now) to use Python to control local hardware on your PC or your Raspberry Pi. If you want to attach one of the best Raspberry Pi HATs or use the GPIO pins on your Pi to light up an LED light, you need a local editor like Thonny, which comes preinstalled on all Raspberry Pis and is a free download for Windows, Mac and Linux.
The Raspberry Pi Code editor isn't the only online Python editor around by any stretch of the imagination as you can also use a service such as Trinket.io, which will let you write Python code in one pane while previewing it in another. However, what's interesting about Raspberry Pi's tool is that the organization has a few Python tutorials that are designed to be used with it.
The Raspberry Pi Foundation already had a nice set of Python tutorials on its site, but it has adapted some of them to open sample code directly in the online editor. For example, when I tried the "Say hello" lesson, the first link on the page opens the working set of code in the editor in a new tab in my browser. When I revisited the page and clicked the link a few minutes later, it took me back to the same code I had edited before, because it saved the lesson as a project that was associated with my account.
(Score: 4, Informative) by takyon on Wednesday April 12, @07:31PM (2 children)
Wokwi – An Arduino, Raspberry Pi Pico, and ESP32 board simulator [cnx-software.com]
[SIG] 10/28/2017: Soylent Upgrade v14 [soylentnews.org]
(Score: 4, Informative) by RamiK on Wednesday April 12, @08:48PM
e.g. The typical Arduino blinking led on an esp32: https://wokwi.com/projects/305566932847821378 [wokwi.com]
For folks wondering what's the .ino file is, it's the arduino programming language which is just a C++ subset / C superset that is distinguished from the usual system c/c++ by different entry point (setup() and loop() instead of main()) and some differences in the various libraries due to targeting hardware without an mmu.
Anyhow, there's micropython and rust support too and there's esp32-c3 board (risc-v) in there as well.
compiling...
(Score: 3, Insightful) by Opportunist on Thursday April 13, @09:25AM
That would actually be nifty if I didn't have to cough up 70 bucks a year to actually get the useful features and save my projects where they ain't at the mercy of whoever runs this.
(Score: 3, Funny) by Snotnose on Wednesday April 12, @07:46PM (6 children)
Next they'll be using the editor to write Word docs.
Don't even get me started on Javascript. Yeah, I know it's been updated since I last swore at, err, used it. Pig, meet lipstick.
I just passed a drug test. My dealer has some explaining to do.
(Score: 3, Touché) by JoeMerchant on Wednesday April 12, @07:53PM (4 children)
I always swore Python was only good for "toy" applications.
Then I started making Pi Pico applications, in Python. And, yeah, it's pretty good on that toy.
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 2) by aafcac on Wednesday April 12, @09:57PM (3 children)
It is possible to write good code with Python, but it's just absolutely nuts that anybody thinks it's an acceptable language to start with.
(Score: 4, Interesting) by Snotnose on Wednesday April 12, @11:14PM (2 children)
I dunno, I wrote a voice mail system in Python a decade or two back. It was amazingly easy to pick up, and I was especially impressed I could build unit tests right into the file. Call the file, it runs the unit tests. Link the file into a larger app and it's part of the program (I'm not describing that very good...)
My only complaint was the whole spaces thing. It caused us problems, it seems extremely stupid, but I'm not going to even climb that hill, let alone die on it.
When people ask me what languages to use when learning to program I point them to Python and Java.
I just passed a drug test. My dealer has some explaining to do.
(Score: 2) by JoeMerchant on Wednesday April 12, @11:35PM
The problem I have seen is that writing anything over about 1000 LOC in Python in any kind of extensible maintainable fashion requires a level of discipline that I have only seen in precious few high profile FOSS projects, trac being one.
Anything big in Python I have encountered in real life has been a steaming pile of "please let us start over!"
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 2) by aafcac on Thursday April 13, @12:11PM
The language has a lot of really weird features that make little sense. Sure, they make it seem cute and friendly, but being forced to adhere to a style whether or not it makes sense isn't helpful. Neither are the error messages that give basically no information about what happened or the dynamic typing which is pretty much the worst of both worlds in terms of static typing versus not bothering with typing at all.
It is a step up from hellish languages like Basic, but Basic is much older and I was shocked that Python has been around as long as it has been and is still such a nightmare to use. Especially for anybody with vision impairment, so much of the code isn't even written out, it's that damned semantic white space. Which is only slightly less hellish than Basic's line numbering system.
(Score: 2) by Tork on Wednesday April 12, @08:45PM
I mean you're nitpicking a template for an IDE... but okay, we bow to your superior lexicon.
Slashdolt Logic: "25 year old jokes about sharks and lasers are +5, Funny." 💩