loading...
Cover image for Learning programming on a Chromebook?

Learning programming on a Chromebook?

jmfayard profile image Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ ・Updated on ・4 min read

Is anyone coding on a Chromebook here?

I want to do programming workshops and I'm wondering what laptops to provide to my students.

MacBook Pro are too expansive and I didn't use Windows since 10+ years.

I started to wonder: what about Chromebooks?

My results so far: not perfect but a lot of potential, Chromebooks can do more than you think.

You can do a lot in the browser

And what's better for teaching than a zero-setup environment?

Then you can install any Android app

You may have heard Apple saying that Chromebook are bad because you can do nothing offline.

This is completly wrong now that Chromebook can run any Android app published on Google Play.

For example I needed a chat app and a clipboard manager, I just had to install Telegram for Android and Clipper for Android

Read: Install Android apps on your Chromebook

Then you have Linux native app

As explained by the official documentation

Crostini is the umbrella term for making Linux application support easy to use and integrating well with Chrome OS. It largely focuses on getting you a Terminal with a container with easy access to install whatever developer-focused tools you might want.

Setup here => Set up Linux (Beta) on your Chromebook


I was able to install

Screenshot 2019-11-17 at 17 58 40

Update: I would not recommend doing Android programming on a Chromebook for now. You can install Android Studio yes. But to actually program on it, you will be asked to wipe your chromebook and install the insecure developer mode. Don't do it. Wait.

What's not so great

Slow builds?

It matter less when you are learning programming, you are not typically compiling huge projects.

But still Chromebook are not exactly powerful.

Buy the best Chromebook you can find if you intend to use them for development.

Speaking of which: the best Chromebooks seem to be US only. I had troubles finding them in Europe.

Or maybe we can delegate the build process to an external server with much more power?

Edit: that looks doable in fact.

GitHub logo buildfoundation / mainframer

Tool for remote builds. Sync project to remote machine, execute command, sync back.

Mainframer

A tool that executes a command on a remote machine while syncing files back and forth The process is known as remote execution (in general) and remote build (in particular cases).

Mainframer helps to move heavy operations (like compiling the source code) from a personal computer to a dedicated machine. This way you, as a developer can use your machine for changing the source code or browsing the documentation without constant freezes and hearing jet engine-like sounds caused by the build process The execution itself is not limited and can be applied to actions like encoding audio and video, batch processing and more.

It works via pushing files to the remote machine, executing the command there and pulling results to the local machine.

$ mainframer ./gradlew build
Sync local β†’ remote machine...
:build
BUILD SUCCESSFUL
Sync remote β†’ local machine...
$ java -jar build/libs/sample.jar
This program was built on
…

GitHub logo Adambl4 / mirakle

Gradle plugin to move build process to remote machine.

Mirakle

A Gradle plugin that allows you to move build process from a local machine to a remote one.

Compatible with Gradle 4.0+. Works seamlessly with IntelliJ IDEA and Android Studio.

Why

Remote machine supposed to be much performant than you working machine Also having a sufficient network bandwidth or small amount of data that your build produce, you gain build speed boost.

How it differs from Mainframer

Mirakle is designed specially for Gradle build system. It works as seamless as possible. Once plugin installed, you workflow will not be different at all.

(It's a good thing to prank your colleague. Imagine his surprise when one day he get several times faster build time.)

Setup

  • Put this into USER_HOME/.gradle/init.d/mirakle_init.gradle
initscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.instamotor:mirakle:1.3.4"
    }
}
apply plugin: Mirakle
rootProject {
    mirakle {
        host "your_remote_machine"
    }
}

Or just plain old ssh, git and rsync.

Documentation?

But most importantly, documentation sucks right now, if it's available at all. You have a weird variant of Debian installed, you don't really know what works, what doesn't. Not a lot of people are using a Chromebook for development either, so you feel a bit on your own.~

Update: I have found the kind of documentation and community I wish I had when I started.

Others

Linux apps look ugly right now

I wish there was a way to automatically setup a Chromebook for development purpose, like I'm doing on macOS with http://dotfiles.github.io/

Update:

If you are part of G Suite. (for Education if associated with a school) there is a way to push programs to Chromebooks. From Google's support site on this:
As a Chrome Enterprise admin, you canuse your Admin console to set policies for a specific Chrome app, extension, or supported Android app. For example, you might force-install an app and pin it to users' Chrome taskbar.
See support.google.com/chrome/a/answer...

Discussion

pic
Editor guide
Collapse
realsaddy profile image
Jack

I use my chromebook for development on the go, it works great. Apps feel fast to me, Jetbrain products work like any other distro. For more demanding tasks, I wait till I get to my main desktop or use paperspace.io

Collapse
perigk profile image
Periklis Gkolias

What are the minimum specs of a chromebook to do some serious server side dev ? Is it still SSD and >=8GB RAM like in most laptops or there are native apps that can save you some RAM?

I find high-end Chromebooks a bit expensive.

Collapse
realsaddy profile image
Jack

I would need you to elaborate on "serious server side", but I have a HP Chromebook x360 14-14" FHD Touch - Core i3-8130u - 8GB - 64GB eMMC - White and Blue and use it for IntelliJ and GoLand

Thread Thread
perigk profile image
Periklis Gkolias

Serious server side example: Writing an API by leveraging well known tools and frameworks (jetbrains, vscode maybe django or spring), having a db server hosted locally and potentially leverage docker builds. All those running locally, not on a cloud environment

Are jetbrains products working without performance issues? Do they provide a lighter version or is it the pure linux one?

I suppose everything under 8GB Ram cannot be considered as a good choice for local dev, right? (As with "normal" laptops)

Thread Thread
realsaddy profile image
Jack

I haven't tested it, but docker builds will probably be slow

Thread Thread
realsaddy profile image
Jack

Jetbrains apps have a slower startup time, but they are fast after that. Normal Linux distro

Collapse
seanmclem profile image
Seanmclem

I have an HP X2, and I do try and code on it. Using crostini to run a terminal and VS Code works OK. It's a little slow and sometimes crashes. However I've done a decent amount of coding on it. When I serve a website via node/npm - it launches properly in Chrome and works well. GUI git clients are hit or miss - so I've had to get better at using the terminal for it. It's definitely not my primary machine. I code primarily on a windows laptop and it's significantly easier. But it's a plausible novelty

Collapse
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ Author

I agree with the "it's definitely not my primary machine part".

This is why I framed my post about the potential for a classroom of students learning programming. Education is an area where the Chromebook are established already, and the parameters are quite different here:

  • Budget constraints matter more, they are not professional developers yet with an employer willing to pay a 3.400€ MacBook Pro 16"
  • Homogeneity matter more. It's fine to have the perfect Linux laptop carefully chosen by you and well configured. It's something else entirely to have 20 students that all have different problems with their random Linux laptops with random configuration issues.
  • Performance matters less. Projects that you use for learning don't typically require lots of horsepower.
Collapse
awwsmm profile image
Andrew (he/him)

Would Raspberry Pi fit your use case? Without peripherals (keyboard, mouse, monitor), each one is less than €100. And you can set up one of them, then copy the SD card to have exactly the same setup on each Pi, really easily.

Thread Thread
jmfayard profile image
Collapse
joelzehring profile image
joelzehring

I'm splitting time between a Chromebook and a Windows laptop, but I prefer my Chromebook. I highly recommend Archetype for native, offline coding: chrome.google.com/webstore/detail/...

Collapse
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ Author

I tried another text editor called Caret,
but the lack of git support rebuked me.
I feel it's super important on a Chromebook.
This is what motivated me to switch to Visual Studio Code.

How are you doing it?

Collapse
joelzehring profile image
joelzehring

Caret keeps improving and updating. For git, I'm learning the command line interface. Slowly.

Thread Thread
tino926 profile image
tino

hi, can you share the tools you used for git? I installed "nacl development environment" and can use git inside it. But I can't use Caret to access files in "nacl development environment"

Thread Thread
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ Author

I gave up on Caret and use visual studio code instead. it has git included

Collapse
rockykev profile image
Rocky Kev

I do web development on a Chromebook. It's a fantastic lightweight tool. I don't have any hiccups with standard web dev.

Where I have to switch to a more beefy system is when I'm working with react native or building stuff with laravel/sql servers that I want to stay local. The workaround is just to use my other laptop, which isn't a big deal.

For most use cases, my Chromebook is fantastic.

Collapse
perigk profile image
Periklis Gkolias

Which Chromebook do you own and which tools? I am interested to do some backend dev on a cheap laptop and this sounds interesting

Collapse
jmfayard profile image
Collapse
rockykev profile image
Rocky Kev

Nah, same ugly fonts. :-)
I even have my taskbar in the same spot!

Collapse
codejym profile image
Code-Jym

I got a chrome book for my 12th birthday, and nobody expected me to get into coding, (least of all me) so my thoughts on linux for chromeOS might be biased. I used to have chromeOS (I replaced it with galliumOS). I got one with Intel celeron, 4 gigs RAM and 16 gigs storage (the average chromebook specs because high end chromosome are rare and expensive, not worth it). It was awful, apps would not run, or they would run incredibly slowly. The storage was awful (although I think that that was just the computer itself), and like you said, the linux distro is a weird debian thing. Lastly and most frustratingly, it was incomplete. You had a working mic and a camera that is not working, the locate feature, standard on most linux distros, (to my knowledge) was missing. I just had to switch to a full linux distro.

However, I did like the fact that it you messed up, you could just press a few buttons and wait a few minutes to get a fresh new terminal, that encouraged me to explore the terminal. However, the cons far outweigh the pros.

Collapse
ksumwalt profile image
KSumwalt

If you are part of G Suite. (for Education if associated with a school) there is a way to push programs to Chromebooks. From Google's support site on this:
As a Chrome Enterprise admin, you canuse your Admin console to set policies for a specific Chrome app, extension, or supported Android app. For example, you might force-install an app and pin it to users' Chrome taskbar.
See support.google.com/chrome/a/answer...

Collapse
jmfayard profile image
Collapse
joannefraser profile image
JoanneFraser

Well, as i know the chromebook is a great deal. I mean it is totaly worthy the money you paying for it. However i have never used one. I got a friend that uses a chromebook, he is still a student, however he is a programming lover. He told me that it works perfectly for him. However he told me that in his opinion, in case he will advance as a programmer he will be needing a more powerful laptop. I guess as a beginner, the chromebook will do the job. After that, you might be needing the services of that gadget guide india that friend of mine used when he got the chromebook. They will surely find the best option for all of your requirments.

Collapse
galoiswannabe profile image
galoisWannaBe

So far, the Jetbrains IDEs have basically been Godsends, minus a weird DNS issue (which I've fixed) and some weird memory issues that I've been having (which I may have fixed), and the fact that the Linux environment runs Wayland, so sudo is weird! IntelliJ Idea and Android Studio have been amazing for Java/Kotlin/Andoid development!

Collapse
bradtaniguchi profile image
Brad

I run a Pixelbook i7 as my on-the-go machine and it's been working so far. Some tasks are horrible slow when compared to my other machines, but for straight programming and running some low-end tests here and there my Pixelbook can handle it while providing my usual VSCode setup.

I started out using Cloud9 (when it was free) with a 200$ Chromebook, and feel like I should re-check out some of the alternatives you provided above. I never got rid of the feeling that Chromebooks have the potential of being the new age version of dumb terminals, which provides excellent accessibility and security by leveraging the web.

Collapse
alexpmil profile image
Alex P. Miller

Hi Jean-Michel, great post! Please also check out a post of mine on how to set up a data science programming environment on a Chromebook: alex.miller.im/posts/data-science-...

Collapse
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ Author

Update: I have found that it's too early for doing Android development on a Chromebook.

Yes you can install Android Studio.
But to do more, they ask you to wipe your Chromebook and make it insecure by enabling the developer mode.

Don't do it.

Collapse
lucasprag profile image
Lucas Arantes

That's really nice! I was thinking about switching to a chromebook as well next time I buy a new computer and run my apps locally and/or a digital ocean droplet.

Collapse
devdrake0 profile image
Si

Thanks for your submisson, but it does not meet the help tag requirements. Please review the sidebar for more information.

Collapse
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄ Author

Oh you are right thanks. My post was initially asking a lot for help, then I have found a lot of information myself.

Collapse
devdrake0 profile image
Si

Thanks for the reply. The #help tag is more for specific development-related questions, rather than broad questions such as this which fit in #discuss.

Let me know if you have any questions :)