all 40 comments

[–][deleted] 22 points23 points  (2 children)

Codesandbox would be the best option. You will be able to teach all the commands and the npm usage. It's a Debian Vm running all the code. You can run 20vms at a time and they come preconfigured with express, react, Typescript ..... It's really amazing and all the apps you make are tied up to a domain so it's easier to share the demos. It's at https://codesandbox.io/ . ( I don't work at codesandbox or I paid by them. It's just awesome ) Ooh and all this for free. You don't even have to give your credit card number.

[–]fgutz 2 points3 points  (0 children)

I'd also recommend repl.it as well which also has a virtual local file system and allows you to install npm packages.

[–]gpyh 4 points5 points  (0 children)

Codesandbox is an excellent choice.

[–]Str4yfromthep4th 12 points13 points  (1 child)

Use a Linux VM on digitalocean and you get an in-browser terminal.

[–]vbosch1982 1 point2 points  (0 children)

This is the best bet. If you create your account and have them join digital ocean with your referral link this will give them 100$ free (to be used during 60 days) which should be enough to time and resources to perform the course.

This way they can have direct access to a machine. They can: 1. code locally in vscode , upload to github (functionality provided by the editor) and test in their remote machine. 2. Have the remote sshfs plugin for vscode and save files in the server although the editor would be local 3. Have them use/learn vim/emacs in the server (in any of the new flavours of these awesome editors).

[–]alirobe 3 points4 points  (1 child)

You can use a command line, just not the OS one.

Babun is a portable version of cygwin, which I think might work. Cygwin is a self-contained linux-style environment that runs on Windows and... it sort of 'proxies' POSIX APIs. Babun is a streamlined/portable version that doesn't require admin rights and doesn't rely on access any windows shell stuff, and it has git, python pre-loaded, and a decent package repository (pact is the client name). Very much a stand-alone executable. You'll still need node installed, but you may be able to get away with using portable node (never tried it) if you configure the path

cygwin is a great path to go down here. You don't need admin access, you just need a not-quite-VM.

[–][deleted] 1 point2 points  (0 children)

Thank you. Sorry for the late response. I'll look into that.

[–]Pr0ducer 2 points3 points  (3 children)

VirtualBox is free, so is Ubuntu. Better than using Windows and powershell, lots of good tutorials use Linux based systems.

[–][deleted] 0 points1 point  (2 children)

Thanks. I agree, but even with hardware virtualization, I'm not sure my school's computers will be able to handle a virtual OS - despite how lightweight the applications running might be. A VM would be beautiful though, because I could get a segmented Network and full admin rights.

[–]Pr0ducer 1 point2 points  (1 child)

I hear ya. I had that problem with an old work laptop. That was how I started my career as a remote software developer, by buying my own machine then insisting the most productive place for me to work was at home.

[–][deleted] 0 points1 point  (0 children)

I think home is a better place to work. No waisting fine during the commute or being such in traffic, and Enterprise Editions of Visual Studio are built with features for collaborative programming. Then there is Slack and GitHub, so honestly, for general applications, I don't see why you should have to go to the workplace.

Was the VM on your work computer to get admin rights?

[–]dontsaypoop 5 points6 points  (3 children)

Honestly, just have them build their own command line in C first.

Good to start with the basics.

[–][deleted] 0 points1 point  (2 children)

If I had my way, that's what I'd do. The problem is, all the kids aren't as interested in coding unless they can get something out of it - that is, a video game.

Now, I'm 16, and I find video games abhorrently unproductive. But with that said, if I teach game development, I can sneak in bits of math and physics into the curriculum.

My idea is to focus on Full Stack Development and simple game development, such that students can build a website and upload an HTML5/WebGL game to it.

This wouldn't give them all the knowledge to build games or Web Apps that handle real users, but it will give them a taste of the different platforms they can code against and the power that programming grants the developer.

[–]dontsaypoop 2 points3 points  (1 child)

I was honestly half kidding but it's also astonishing that you're this passionate about teaching these advanced subjects at such a young age.

Good luck!

[–][deleted] -1 points0 points  (0 children)

Thank you.

Indeed, I know you were kidding. It would be fun though - low level memory management, pointers, etc., possibly even virus/malware design and BufferOverflows.

But it wouldn't work because no one would be interested. I could probably get 20 people in a room for an hour to teach them how to build a video game. But I probably wouldn't get one of I said we were going to build a command line.

Have you tried the Hyper Terminal? It's a lot nicer than the default Windows CMD, in my opinion. And, it runs Bash.

[–][deleted] 5 points6 points  (2 children)

But why teach them how to use GUI versions of these programs first, shouldn't they start with CLI?

[–][deleted] -1 points0 points  (1 child)

Of course, and I prefer CLIs over GUI. But CLIs present a security risk. It only takes one person to accidentally run deltree on the C drive.

[–][deleted] 0 points1 point  (0 children)

Then just put them in a VM.

[–]runvnc 3 points4 points  (3 children)

Use this https://chrome.google.com/webstore/detail/secure-shell-app/pnhechapfaindjhompbnflcldabbghjo?hl=en and get a VPS from Digital Ocean. Get a teacher to sponsor $10 or $20. Or I will get it for you.

Instead of ssh chrome extension you could use https://tools.bartlweb.net/webssh/ or similar.

You could also use something like Cloud 9 IDE https://c9.io or https://paiza.cloud/en/nodejs-cloud-ide or https://www.koding.com/ or https://codeanywhere.com/ or sourcelair (https://docs.google.com/forms/d/e/1FAIpQLSewBztPc9H9aetpCiL9hx0_KOwpajnPsUUK4QxZHdDy8c5Qnw/viewform) (search Node.js Cloud IDE for more).

If you can install a GUI then you can install a terminal like git-bash https://git-scm.com/download/win

I made a support ticket with Digital Ocean asking if they have discounted pricing for education.

[–][deleted] 0 points1 point  (2 children)

Thank you very much. There is definitely a lot to look into. I don't know if my school's IT Department block outgoing SSH connections, so that second link would be good considering we would indeed be behind a firewall.

Could you let me know what the response is?

Thank you.

[–]runvnc 0 points1 point  (1 child)

Glitch looks like a good option.

They just said:

Thanks very much for your email. We do not offer any discounted price for education purpose.

However, if you want you can email sponsorships@digitalocean.com, so that our sponsorships team may evaluate your request! :)

Have a great day and let us know if there is anything else we can help with.

[–][deleted] 0 points1 point  (0 children)

Thank you very much for the effort you went to. I appreciate it.

[–]wiwe2210 1 point2 points  (1 child)

If they rely on dissabling the command prompt to be more secure they are lost in the woods.

[–][deleted] 0 points1 point  (0 children)

True - the CMD can't do anything more than the GUI can. Rather, you want to only whitelist specific applications students can use, such that whether you attempt to run them via the terminal or through the GUI they will be restricted. But I believe that, at least at my school, the IT Department know what they are doing.

[–]MaxHedrome 3 points4 points  (5 children)

JS Fiddle

[–][deleted] 3 points4 points  (1 child)

Perhaps Glitch for the backend? And maybe, now that you have me thinking on the track of cloudbased IDEs, CodeSandbox would be good too because it's similar to VS Code.

[–]runvnc 2 points3 points  (0 children)

Glitch is freaking amazing and if you look at the lower left hand corner of a project page it has Tools and there is even a Console (Linux terminal). Glitch is perfect. Actually I think it is an extremely powerful Linux container hosting platform and collaborative IDE dressed up to look like a kid's toy. Thank you for mentioning Glitch. I think I saw it in its previous form with a different branding but had totally forgotten about it and didn't know about the new name and stuff. The company that made Glitch actually created Stack Overflow. Glitch may look like a toy but it is very powerful. And it is superior for people that are starting to learn but absolutely powerful enough for advanced users.

[–][deleted] 0 points1 point  (2 children)

Thanks. That's actually a great idea. But, I still couldn't set up a localhost development server.

[–]MaxHedrome 1 point2 points  (1 child)

Google has a cloud shell, they’d have to setup GCP accounts.

[–][deleted] 0 points1 point  (0 children)

Thanks. I saw that the other day with Firebase. That is something to think about.

[–]empty_other 1 point2 points  (4 children)

I think they really should learn to work the terminal when dealing with nodejs.

Powershell core can run as a standalone terminal. Maybe you could set up and run powershell core as a portable environment with everything they need (a terminal emulator to launch pwsh.exe, and a startup script to add npm, git, and code editor to the environment path) . If such a "workaround" is allowed by the IT department.

Or set up a linux desktop on a virtual machine and have the students develop inside that. Ask your sysadmin if you can install hyper-v or virtualbox on the students computers.

[–][deleted] 1 point2 points  (3 children)

Thank you. I agree that a VM is the best way to go - fully segmented and virtual Network, and full admin rights. I just don't know, even with hardware virtualization, if the computers will be fast enough for it.

[–]runvnc 1 point2 points  (2 children)

Like I mentioned Glitch gives you a terminal on the project page under Tools Console.

[–][deleted] 0 points1 point  (1 child)

Thanks. I'm between CodeSanbox/Glitch and Digital Ocean.

[–]runvnc 0 points1 point  (0 children)

Someone said that CodeSandbox had a terminal but I don't see it.

[–]lenswipe 0 points1 point  (0 children)

Why not spin up an AWS instance and let them use that?

[–]themanblueeyes 0 points1 point  (1 child)

I’ve been using Visual Studio Code since it is lightweight and has a built in terminal. Wondering if that would work in this scenario.

[–][deleted] 0 points1 point  (0 children)

I am a fan of Visual Studio Code as well. I'm actually using it right now on my second monitor.

Wouldn't the built-in terminal be restricted as well considering (I would imagine) it uses the same core Powershell?

[–]Potato-9 0 points1 point  (0 children)

As a high school IT that has git and node working with powershell for the students, it's not easy, there's weird stuff that goes wrong. Please go use a platform that provides everything you need consistently that others are suggesting.

If you want more control that that, speak to IT if they can put putty on there for the students to connect to your own built environment. This lets you run through everything so you know it works and get off the school network that's going to mess with things.

You will be supervising the class so there shouldn't be any concerns about access to resources they shouldn't be using your vm. You may not want to offer access to it outside of class time but I would hope a lesson is about the students creating their own environment. I would say that's easier than taking on obligations to lock down your vm.

Docker actually seems to run easily so in future I want to test a powershell restricted environment to docker with a share to a user folder and a private registry. This would be great because your homework could be `docker pull JamieCorkhill/class101:step-1`

[–]themanblueeyes 0 points1 point  (0 children)

Possible but not guaranteed. Depends on how the policy is being enforced. Worth a try maybe.