Singletrack's forums are sponsored by...

Forum sponsored by Saracen

Teaching yourself h...
 

[Closed] Teaching yourself how to code

Free Member
Topic starter
 

I've got a lot of spare time on my hands at the moment and am wanting to learn something new. I fancy teaching myself how to code. What websites would people recommend for me to learn the basics and progress further?

Thanks in advance.

 
Posted : 15/01/2021 10:52 am
Free Member
 

Freecodecamp.org

 
Posted : 15/01/2021 10:53 am
Free Member
 

Can't recommend a website per se, but the best piece of advice I was given was:
"Don't just set out to learn how to code - find a problem that you need to solve by using code/software"

 
Posted : 15/01/2021 10:55 am
Full Member
 

^^^

i find the abstract example posed by most of the 'learn to code' sites far to dry and irelevant to stick with them.

my son got given a micro-bit for xmas and i've been helping him with that and I'm quite impressed. teaching him about loops and logic etc and having it in front of you makes it tangible and real.

 
Posted : 15/01/2021 11:00 am
Full Member
 

Dunno if they are any good, but this popped up on my google home page the other day.
RM.

 
Posted : 15/01/2021 11:05 am
Free Member
 

coding challenge

https://www.codewars.com/

 
Posted : 15/01/2021 11:05 am
 poly
Free Member
 

Can’t recommend a website per se, but the best piece of advice I was given was:
“Don’t just set out to learn how to code – find a problem that you need to solve by using code/software”

Thats the advice I always give people but it depends what your starting point is. If you want to build a mobile app that calculated the distance to the ISS at any point in time based on your location and its position and have never come across a variable before your are in for a herculean learning curve. If you've dabbled and want to get good then its going to be more doable.

Unless you have a specific reason not to - I'd encourage learning in Python. Its particularly friendly for learning, extremely readable and high level and actually useful/used in the real world. If you really want to do web stuff you might prefer Javascript, its now used off the web too - but is not quite as friendly as Python.

There's loads of online tutorials for learning python (and most languages) - I suggest codeacademy for total beginners because its interactive tutorials are rather nice. It also has interactive tutorials for things like git - which will make your version management so much easier - start doing that from the beginning and it makes a big difference.

 
Posted : 15/01/2021 11:07 am
Free Member
 

10 PRINT "BORIS IS A COCK"
20 GOTO 10

on a more serious side, do you use any apps that have an associated scripting language can be a good place to start (there's always a forum some where dedicated to it too)

 
Posted : 15/01/2021 11:11 am

Free Member
 

Great free book, to teach you, search for "dive into python".

Great set of, nicely progressive, problems, search for "advent of code".

 
Posted : 15/01/2021 11:23 am
Full Member
 

“Don’t just set out to learn how to code – find a problem that you need to solve by using code/software”

I'm going to have to disagree with that, at least partially. It's a great piece of advice if you already know how to code, in fact it's how I generally try to learn a new language. Pick a project and implement it.

But if you're just starting out it's a terrible piece of advice as you won't learn the basics, and while you might be able to hack together a working piece of software by Googling you're unlikely to put together a decent piece of software.

When it comes to learning Python is probably the easiest. Javascript isn't too bad, and there are a lot of resources out there, but the fact a lot of the examples are in the browser, and others in Node will be confusing at first. Ruby would be good, but there aren't that many resources out there compared to Python and Javascript. Most of the other languages I can think of (Java, C#, C, C++, Clojure and a long etc) are either harder or require complicated setups just to get going. So reluctantly (as I don't really like it) I'd recommend Python. When I learned it I used "Learn Python the Hard Way", which was a decent and comprehensive introduction to the language.

 
Posted : 15/01/2021 11:26 am
Free Member
 

Start with something you know - (like a spreadsheet or a database or .. anything) and set an an aim that might be useful to you - I want to sum the 3rd column of the 4th table, and start there. It really depends on where your starting point is.

Do you have an editor, and IDE etc, on a mac or windows.

Lots of coding sites like codewars or codeacademy. Start reading/learning what are reddit forums like this:

https://www.reddit.com/r/learnprogramming/comments/6fto5j/how_to_start_learning_to_code_when_you_dont_know/

It's a great career, and always a useful skill.

 
Posted : 15/01/2021 11:27 am
Free Member
 

Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> while True:
print('Boris is a Cock')

Boris is a Cock

I would start with Python

 
Posted : 15/01/2021 11:27 am
Free Member
 

i find the abstract example posed by most of the ‘learn to code’ sites far to dry and irelevant to stick with them.

I would also disagree with this. If you are a flat out beginner there are things you need to learn in an academic sense. Once you have the basics and you are ready to move onto an app, then yes a real world example is better. Particularly if it's YOUR real world requirement.

 
Posted : 15/01/2021 11:38 am
Full Member
 

I have tried on and off for ages and in the past have found www.codecademy.com as good as any. It is something I keep meaning to knuckle down to along with a myriad of other hobbies 🙂

Also look for a couple of games - Human Resource Machine and 7 Billion Humans. Can be found on Steam as well as iOS and HRM is on Android too. Simplistic but actually really good at teaching the very basics of code structure and how basic loops etc hang together.

 
Posted : 15/01/2021 11:43 am
Free Member
 

Do you just want something software based? Personally I like making things so do quite a bit with Arduino. The coding is pretty simple as coding goes and you can actually end with a thing that does something (motors, lights, sensors, wifi, etc). There's loads of options in this direction, eg arduino, ESP8266, Pi depending on how complicated and and what you want to achieve.

 
Posted : 15/01/2021 11:47 am
Free Member
 

“Don’t just set out to learn how to code – find a problem that you need to solve by using code/software"

This x1000 times. All the programming I know is because there was a particular analysis of data I wanted to know, and writing a script was the quickest way to get results. First you'd probably want to get the basics down, but after that, if there is no problem to solve the process will be more painful IMHO.

Once you get stuck you can always type in google "How do I do X in language X".

 
Posted : 15/01/2021 11:49 am

Free Member
 

10 PRINT “BORIS IS A COCK”
20 GOTO 10

Didn't that need
30 run
to work?

 
Posted : 15/01/2021 11:54 am
Free Member
 

Software engineers are not made, they are born 🙂

A joke but I do think there is some truth in it. After being an embedded software engineer for 25 years.

 
Posted : 15/01/2021 11:58 am
Free Member
 

It’s a great career, and always a useful skill.

I'm 12 years in, I kinda don't think it is a great career to be honest. You're right, it's dead useful, I'm always knocking up scripts and bits and pieces for my own purposes.

It's just as a job. **** me. Programming itself is usually quite good. Difficult at times, but generally good and satisfying.

But then there's all the other crap which takes up most of my days: reading specs, writing tests & documentation, the tedium of repairing the constant churn of libraries being deprecated and broken, debugging etc.

As an example, right now (well I'm on lunch but...) I'm having to debug an extremely difficult problem in 169MB of legacy code without being able to reproduce the issue, under pressure because it's preventing a customer's production environment from working. **** horrible tbqh.

 
Posted : 15/01/2021 12:29 pm
Free Member
 

Didn’t that need
30 run
to work?

no, it's still printing "Boris is a cock" over on http://www.quitebasic.com/ as I type

 
Posted : 15/01/2021 12:34 pm
Full Member
 

Tons of kids doing simple coding tasks for remote learning at the mo (some of whom are lazy or don't like coding). Learn what they're doing then start charging to do their homework for them 😉

 
Posted : 15/01/2021 12:46 pm
Full Member
 

Didn’t that need
30 run
to work?

You wouldn't put RUN on a line, you'd just type it.

 
Posted : 15/01/2021 12:50 pm
Full Member
 

As others have danced around,

What's your end goal here? Are you thinking of writing a phone app, or making some LEDs flash, or automating tasks on your laptop, or something else? Or is "I want to learn something new" the beginning and end of your thought process so far?

What's your development environment platform? Windows / Mac / Linux?

If I were coming to this absolutely cold tomorrow I'd invest in a Raspberry Pi. Cheap, isolated from your day-to-day machines if you do something reckless, is the native home of many languages including Python, has Scratch which is a tool aimed at teaching kids to program but would be a great starting point for any ages who don't know the difference between a While loop and a For loop, and has GPIO pins which opens up a whole host of cool stuff once you've got the basis down.

Good luck.

 
Posted : 15/01/2021 12:59 pm
Free Member
 

Wot Cougar sed.

sed. geddit? oh never mind.

If not a Pi, look at setting up a virtual machine on your current machine. Sounds a bit scary but it's worth it - means you tinker and trash an expendable, "not real" computer rather than the one the wife needs to complete her assignment.

As an example.

 
Posted : 15/01/2021 1:06 pm

Free Member
 

I think that the info in haloric's post is good, this all really does depend on how you learn best and how you enjoy learning, as well as what you want to get out of it.

Also always remember, if in doubt: stackoverflow.com

 
Posted : 15/01/2021 1:06 pm
 poly
Free Member
 

If not a Pi, look at setting up a virtual machine on your current machine. Sounds a bit scary but it’s worth it – means you tinker and trash an expendable, “not real” computer rather than the one the wife needs to complete her assignment.

Jesus what are you people doing to trash computers whilst learning to code? I’ve perhaps screwed up my build environment but I’ve never broken anything which would be everyday family computing whilst coding.

I’m a big fan of RaspPi but I think they add an extra complication - connecting to it, (and it to the web to copy and paste the stack overflow solution), which nobody needs on day 1. When used in schools invariably the teacher has done the initial install etc.

That’s for week 2. Once he knows what variables, loops, and maybe classes are.

 
Posted : 15/01/2021 1:38 pm
Free Member
 

Boris is a cock on an Arduino...

[img] [/img]

 
Posted : 15/01/2021 1:58 pm
Free Member
 

Don’t just set out to learn how to code – find a problem that you need to solve by using code/software

This is the approach that works for me, but it probably also depends what your goal is. I just wanted to be able to tinker a bit more in python in my job. I enjoy advent of code for puzzles

 
Posted : 15/01/2021 2:04 pm
Free Member
 

@nickjb

thanks, that raised a titter, I'd be tempted to put it in the office window

 
Posted : 15/01/2021 2:11 pm
Full Member
 

That’s for week 2. Once he knows what variables, loops, and maybe classes are.

after that its all just copy-paste from stackoverflow isnt it?

 
Posted : 15/01/2021 2:15 pm
Free Member
Free Member
 

I've been working with Freecodecamp and the Mimo app.

 
Posted : 15/01/2021 2:24 pm

Free Member
 

Jesus what are you people doing to trash computers whilst learning to code?

You aren't going to trash your PC learning to code. Or your Mac.

 
Posted : 15/01/2021 2:26 pm
Full Member
 

i dunno, I fubared a linux build with a misplaced chmod statement. meant to change permissions in a folder, did it on the whole OS....

 
Posted : 15/01/2021 2:37 pm
Full Member
 

@impatientbull I didn't see the OP ask about monitor stands, but desk setup is important and conducive to being able to code in comfort.

 
Posted : 15/01/2021 2:40 pm
Free Member
 

@toby1 I was merely trying to redress the ratio of useful advice to elitism, this is STW after all.

 
Posted : 15/01/2021 2:55 pm
Free Member
Topic starter
 

Thanks to everybody who responded. Didn't quite expect this amount of responses, what a nice community we have.

I am looking to learn coding so I can start building a mobile app. I was diagnosed with Aspergers six months ago (late diagnosis at 35) and throughout my life I have found dating very hard. All the current dating apps are focused towards neurotypicals and nothing towards autistic people. So there is a large gap in the market for this type of dating apps.

I realise it'll take me a while to learn to code but I'm pretty determined to do so, so I can help myself as well as others within the Autism community. I bought a Raspberry Pi a few days ago so that should arrive soon and i'll look into Python.

 
Posted : 15/01/2021 3:03 pm
Free Member
 

If it's a mobile app you are looking at, then I'd start with Java and then get a mobile development kit soon after.

 
Posted : 15/01/2021 3:17 pm
Full Member
 

Then what you'll need there is Java I think.

 
Posted : 15/01/2021 3:23 pm
Free Member
Topic starter
 

Thanks @cougar and @molgrips. I'll take a look at Java.

 
Posted : 15/01/2021 3:33 pm

Full Member
 

i dunno, I fubared a linux build with a misplaced chmod statement. meant to change permissions in a folder, did it on the whole OS….

Years ago on a DOS machine,

cd temp
del *.*

... except I typoed the directory name. Fired both commands back-to-back without looking at the screen and wiped the root directory.

Realistically yes, the risk of "trashing" a machine is low. But even so you might have app crashes, lockups, have to reboot or buttoning the device even... Using your daily driver as a development environment isn't generally considered best practice.

look at setting up a virtual machine on your current machine.

If it were me I'd look at setting up Linux Subsystem for Windows. But that's a longer conversation and moot anyway now that the OP has a Pi in the post.

 
Posted : 15/01/2021 3:34 pm
 Nick
Full Member
 

This is brilliant, highly recommended

https://www.edx.org/course/cs50s-introduction-to-computer-science

 
Posted : 15/01/2021 3:40 pm
Free Member
 

I fubared a linux build with a misplaced chmod statement. meant to change permissions in a folder, did it on the whole OS

Years ago on a DOS machine,

Those aren't coding problems, they're administrative blunders that could happen any time you're using the command line for any job. If you're using Eclipse or Visual Studio or whatever then that's a non-issue. As I do most of the time.

 
Posted : 15/01/2021 3:48 pm
Full Member
 

It's still code, would've made no difference if I'd typoed it in a batch file or shell script instead of the C:\>_ prompt.

 
Posted : 15/01/2021 3:52 pm
Free Member
 

I was once (a long time ago) responsible for effectively formatting (rm -rf /) a contractors macbook with a poorly written bash script, that was a fun day. Only time I've really trashed a machine through code though.

Personally for Java dev I'd just stick with whatever OS and env you have already and just grab a decent IDE, for me I'd go intellij (community edition is free).

 
Posted : 15/01/2021 4:12 pm
Free Member
 

Design Tech and Computer Science Teacher here.

Try these:

Year 7 Stuff... scratch.mit.edu

Year 8 Stuff... Microbit.org

Year 9 Stuff... smallbasic.com

Fun Stuff... https://hourofcode.com/uk

Good luck

 
Posted : 15/01/2021 4:13 pm
Full Member
 

I wouldnt bother with Java for mobile apps. Kotlin is much nicer if you want to be Android specific - or even better try Flutter / Dart for cross-platform.

 
Posted : 15/01/2021 4:25 pm
Free Member
 

Agree with most of Halorics post but for Gods sake don't learn R as a first language, written by non-programmers for non-programmers, and 99% of the libraries and code out there are appallingly bad. Learn something that will at least give you a clue about what decent programming involves first. Oh and be careful about saying you do 'data science', there's a lot of guys doing that right now as it adds 20%+ to your salary, but there are a lot of bad developers (mostly statisticians with no real world dev experience) doing it and HR departments the world over are bound to catch on soon 🙂

 
Posted : 15/01/2021 4:55 pm

Free Member
 

I love this forum..... LOL!

Pretty much every thread that starts of with "I'm kinda slightly interested in learning about..... I've never done it before and I'm not very confident..... what would you recommend" ends up with 5 members of the "old-guard" recommending dropping a gazillion £'s on some designer "watchamacallit" they saw on Top Gear or The Gadget Show.

According to this forum.....

Beginners motorbike = Ducati 1098
Beginners guitar = Gibson 58 Les Paul
Beginners Toaster = Hatco Toast King conveyor
Beginners MTB = Specialized S-Works Turbo Levo SL Carbon

Christ! Keep it simple!!!! The poor bloke is just dipping his toe in the water.

Try some block-coding (Scratch) until he gets the hang of sequence, selection and iteration and then move onto Text based languages eg (Small Basic) where he will learn a bit about syntax.

Microbits are cool. Python is cool. Raspberry Pi's are cool BUT

Walk BEFORE YOU CAN run!

 
Posted : 15/01/2021 4:59 pm
Full Member
 

I wouldnt bother with Java for mobile apps. Kotlin is much nicer if you want to be Android specific – or even better try Flutter / Dart for cross-platform.

This. Java is no longer the main language for Android development. AFAIK if you want to develop an app for the iPhone you need both an iPhone and a Mac; for Android you need an Android phone and any home computer (Mac/PC/linux). (Yeah, I'm sure in both cases you can emulate your phone/tablet, but there's nothing like having the phone in your hand running your app to make you feel good 🙂 )

There's a Kotlin for Beginners course on Udemy - it's not free, but they have cut-price offers on a regular basis, particularly if it's the first course you've done with them. (I'm currently doing a Javascript course with them, and it's well put together and cheap). Looking at the course content it seems pretty good as a starter course:

https://www.udemy.com/course/kotlin-course/

 
Posted : 15/01/2021 7:01 pm
Free Member
 

I agree with Mr Semtex google codecombat and actually have some fun learning.

 
Posted : 15/01/2021 7:05 pm
Page 1 / 2

Secret Diary Of Benjamin Haworth Age 47 3/4

Last Minute Tuscany

Digital Detox

singletrack issue 159 cover image

Issue 159