samurray7981
Posts: 15
Joined: Wed Mar 30, 2016 9:08 pm

Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 4:42 pm

Hey all!

I just recently bought a Raspberry Pi Zero and am trying to figure out the best programming language to get me started. I am new to most of these programming languages (Python, C, C++, etc..), so either way I will be starting from scratch and learning a new language.

I would like a language that is 1) relatively easy to learn 2) functional enough that I can do a lot of things with my Raspberry Pi Zero.

Also, if you could recommend not only a language, but all pieces of software that I would need in order to use this language.

Thanks!

Pithagoros
Posts: 580
Joined: Wed Nov 12, 2014 8:16 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 5:06 pm

This question will get you a variety of different answers and can be quite polarising. I won't recommend any particular language, but I do recommend that learners understand the difference between learning a programming language and learning to program. The latter can be language agnostic.

For the popular languages, I think Raspbian on the Pi comes with everything you need to get started.

fritsvanbeukering
Posts: 6
Joined: Wed May 06, 2015 10:58 am

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 5:16 pm

May I suggest learning the commandline?
Bash is a nice scripting language, which gives you an insight in several functions.
Like the if 0 > 1 echo false else echo True, while(this is true) do (this) and for i in $variable, execute command.
Those come back in almost every language like Perl, Python etc.

When you understand what is happening, switch to Perl of Python.
The advantage of python is that the Raspberry Pi foundation has a lot of info about Python scripts, and the forum is full of Python guru's!

darkbibble
Posts: 602
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 5:18 pm

the most popular language taught on the pi is python, the magpi magazines have tutorials and code in for things, as well as there is lots of books on python and agood few for python on the pi.
there is also different uses for python like controlling robots or even making games.
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

echmain
Posts: 214
Joined: Fri Mar 04, 2016 8:26 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 6:06 pm

I agree that Python would be a good starting point.

And if you ever get an add on thing for the Pi (like a Hat) there will almost certainly be some ready-made Python libraries to interact with it.

samurray7981
Posts: 15
Joined: Wed Mar 30, 2016 9:08 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 6:22 pm

Thanks for all of your input!

So I've decided to download Python 3.5.1 for my Windows machine.

After downloading this Python version, what program do you suggest that I use to actually compose the programs I am using as a new beginner?

I am just looking for a program I can use to write programs in Python 3.5.1 and transfer them to my Pi Zero.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 6:26 pm

samurray7981 wrote:I am just looking for a program I can use to write programs in Python 3.5.1 and transfer them to my Pi Zero.
Things might not work exactly the same on Windows as Linux, so I'd look at actually running things under Linux.

User avatar
rpdom
Posts: 14460
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 6:38 pm

All you need to write Python programs is a text editor. Notepad+ under Windows, or nano (command line) or Geany (desktop) under Linux.

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 6:46 pm

Notepad++ is a very nice editor that runs under Windows. On the RPi you can use gedit.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

MarkTF
Posts: 293
Joined: Tue Mar 03, 2015 4:59 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 7:09 pm

Do you have a keyboard, mouse, and monitor on your RPi Zero? If so I would do your work directly on the Pi which would mean using the Idle development environment which is pre-installed on Raspbian. You'll ultimately have to learn to navigate Linux anyway and Pi specific tutorials will assume this environment.

It's unfortunate that you have a Zero rather than one of the other models as having a native network connection makes copying down examples, updates, and applications a lot easier. While the Zero makes for interesting possibilities as an embedded platform, development isn't its strong suit.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 7:36 pm

MarkTF wrote:It's unfortunate that you have a Zero rather than one of the other models as having a native network connection
It does have usb, so theory would be he's got some sort of usb nic.

mathboy4life
Posts: 197
Joined: Fri Jan 08, 2016 7:29 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 7:38 pm

You bought the wrong PI. The Pi Zero is made for embedded systems. Buy a PI3 or PI2 if you want to learn a programming language.

darkbibble
Posts: 602
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 7:51 pm

I grabbed my pi zero when the mag came out, I was lucky enough to get one (wish I had bought more), and then got myself a pi3 when it came out.
I got my pi3 setup as a desktop, and im going to use my pi zero for projects (when I get it back from the service shop, it getting a header)
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 8:07 pm

On my Pi I open a terminal window and run > sudo idle3 & < then do a File, new file. Then start typing in my python code in the window that opens. Then save it. F5 I believe runs it. Doing it this way you will get error messages if you mess up.
have a look here, https://docs.python.org/3/tutorial/index.html

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 9:10 pm

alphanumeric wrote:On my Pi I open a terminal window and run > sudo idle3 & < then do a File, new file. Then start typing in my python code in the window that opens.
Why do I want to run it with sudo?

User avatar
croston
Posts: 700
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: Simplest Programming Language to Learn as a Beginner

Wed Apr 06, 2016 9:15 pm

alphanumeric wrote:On my Pi I open a terminal window and run > sudo idle3 &
You do not need to use sudo! Just

Code: Select all

idle3 &
is all you should need for the vast majority of things.

Edit: stderr beat me to it!

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Simplest Programming Language to Learn as a Beginner

Thu Apr 07, 2016 10:14 am

I didn't know you don't need sudo for that? The original guide or example I followed listed the command that way? I just assumed its the way you do it. It was one of the examples for the sense hat I followed when I first got it. I don't remember what site it was now though. It doesn't hurt anything doing it that way though does it?

User avatar
topguy
Posts: 5569
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Simplest Programming Language to Learn as a Beginner

Thu Apr 07, 2016 10:19 am

The files you create will end up being owned by "root" user and that can be confusing later when you try to remove/move them as normal user.

Using "sudo" should only be done when you know why its being done. My guess is that in the example it was related to needing superuser access to GPIO pins. Without that need, no need to use sudo.

alphanumeric
Posts: 1837
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Simplest Programming Language to Learn as a Beginner

Thu Apr 07, 2016 10:32 am

topguy wrote:The files you create will end up being owned by "root" user and that can be confusing later when you try to remove/move them as normal user.

Using "sudo" should only be done when you know why its being done. My guess is that in the example it was related to needing superuser access to GPIO pins. Without that need, no need to use sudo.
Ok, makes sense. I have one PY file, that I created via that method, and have modified many times. I haven't had any problems copying it to a thumb drive and back. Not yet anyway, knock on wood. I've opened it in python on my PC and edited it to.

MarkTF
Posts: 293
Joined: Tue Mar 03, 2015 4:59 pm

Re: Simplest Programming Language to Learn as a Beginner

Thu Apr 07, 2016 12:55 pm

stderr wrote:
MarkTF wrote:It's unfortunate that you have a Zero rather than one of the other models as having a native network connection
It does have usb, so theory would be he's got some sort of usb nic.
Sure, it's possible to set up a Zero with network interconnect via USB, but it's another hurdle that he presumably wouldn't have with a different model Pi.

The pre-installed image on BeagleBone Black comes with a web-based IDE and network over USB so that one can simply plug it into a PC (Linux without mods or Windows with some PC side configuration to enable network over USB) and directly get to the (Java Script) development environment and write a program to blink LEDs and such a few minutes after taking it out of the box. That's an idea worth copying. Not sure what the legal ramifications are for incorporating it in the standard (or a Zero specific) Raspbian image, but AdaFruit has a RPi web IDE that could be used.

User avatar
DougieLawson
Posts: 35373
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Simplest Programming Language to Learn as a Beginner

Fri Apr 08, 2016 6:14 pm

mathboy4life wrote:You bought the wrong PI. The Pi Zero is made for embedded systems. Buy a PI3 or PI2 if you want to learn a programming language.
What a complete load of nonsense. A zero is as good as any other RPi to get started with python running in IDLE3 on the GUI. It's not just for embedded systems. The only hard part with the zero is soldering in the GPIO header pins when you want to get started with hardware projects.

The bonus with the zero is that you only lose £5 when you let the magic smoke out. Do that to a 2B or 3B and you're down by up to £30 more.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Oldbitcollector
Posts: 93
Joined: Sun Sep 22, 2013 9:02 pm
Location: Orrville, OH
Contact: Website

Re: Simplest Programming Language to Learn as a Beginner

Fri Apr 08, 2016 6:30 pm

This wasn't a simple setup, but I like it for the Simplest Programming Language.

Pi Zero with light version of Raspbian.
Next I installed a light window manager, followed by xtightvnc, then finally fuze-basic.

The end result is a 4GB card (using about half of it) that can run a headless VNC xsession with fuse-basic.
My Ongoing Raspberry Pi Reference: http://www.ledgerlabs.us/raspberrypi

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Simplest Programming Language to Learn as a Beginner

Fri Apr 08, 2016 6:51 pm

DougieLawson wrote:
mathboy4life wrote:You bought the wrong PI. The Pi Zero is made for embedded systems. Buy a PI3 or PI2 if you want to learn a programming language.
What a complete load of nonsense. A zero is as good as any other RPi to get started with python
Oh, mathboy, you're three-for-three. As playful hackers, we often are not so much interested in what something was intended to do, rather what something can be employed to do... or what we can sometimes 'force' something to do (which was never intended). For instance (back in 1983) when everyone else was buying their first $5000 IBM PC XT (not me) I bought a PCjr ($700) and customized it myself to BE an IBM XT (still have that machine, someplace) for a lot less money. So, people are picking up a Zero for about $5 bucks and making a programmable vnc server out of it (whoohoo) what a deal--!

That's the name of the game baby... hacking I mean...

:ugeek:


PS... less than three years later IBM discontinued the PCjr so that people couldn't hack in into an XT !!

(it was fun while it lasted)
marcus
:ugeek:

ejolson
Posts: 3071
Joined: Tue Mar 18, 2014 11:47 am

Re: Simplest Programming Language to Learn as a Beginner

Sun Apr 10, 2016 4:55 pm

MarkHaysHarris777 wrote::PS... less than three years later IBM discontinued the PCjr so that people couldn't hack in into an XT !!

(it was fun while it lasted)
Given the PC junior's lack of success from a well known successful company, maybe it is a valuable museum piece now! Especially if the hacking didn't damage the case.

Fuze-basic is definitely an interesting recommendation as a first programming language.

Return to “General discussion”