Forum search & shortcuts

Teaching yourself h...
 

[Closed] Teaching yourself how to code

Posts: 0
Free Member
Topic starter
 
[#11683964]

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 11:52 am
Posts: 0
Free Member
 

Freecodecamp.org


 
Posted : 15/01/2021 11:53 am
Posts: 1668
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 11:55 am
Posts: 23341
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.

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 12:00 pm
Posts: 1145
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 12:05 pm
Posts: 4954
Free Member
 

coding challenge

https://www.codewars.com/


 
Posted : 15/01/2021 12:05 pm
 poly
Posts: 9160
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 12:07 pm
Posts: 11402
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 12:11 pm
Posts: 1409
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 12:23 pm
Posts: 12089
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 12:26 pm
Posts: 403
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 12:27 pm
Posts: 281
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 12:27 pm
Posts: 91173
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 12:38 pm
Posts: 6118
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 12:43 pm
Posts: 16383
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 12:47 pm
Posts: 0
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 12:49 pm
Posts: 939
Free Member
 

10 PRINT “BORIS IS A COCK”
20 GOTO 10

Didn't that need
30 run
to work?


 
Posted : 15/01/2021 12:54 pm
Posts: 0
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 12:58 pm
Posts: 621
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. ****ing horrible tbqh.


 
Posted : 15/01/2021 1:29 pm
Posts: 11402
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 1:34 pm
Posts: 6940
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 1:46 pm
Posts: 78645
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 1:50 pm
Posts: 78645
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 1:59 pm
Posts: 812
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 2:06 pm
Posts: 349
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 2:06 pm
 poly
Posts: 9160
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 2:38 pm
Posts: 16383
Free Member
 

Boris is a cock on an Arduino...

[img] [/img]


 
Posted : 15/01/2021 2:58 pm
Posts: 0
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 3:04 pm
Posts: 281
Free Member
 

@nickjb

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


 
Posted : 15/01/2021 3:11 pm
Posts: 23341
Free 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 3:15 pm
Posts: 0
Free Member
Posts: 1112
Free Member
 

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


 
Posted : 15/01/2021 3:24 pm
Posts: 91173
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 3:26 pm
Posts: 23341
Free 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 3:37 pm
Posts: 5865
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 3:40 pm
Posts: 0
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 3:55 pm
Posts: 0
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 4:03 pm
Posts: 91173
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 4:17 pm
Posts: 78645
Full Member
 

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


 
Posted : 15/01/2021 4:23 pm
Posts: 0
Free Member
Topic starter
 

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


 
Posted : 15/01/2021 4:33 pm
Posts: 78645
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 4:34 pm
 Nick
Posts: 3693
Full Member
 

This is brilliant, highly recommended

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


 
Posted : 15/01/2021 4:40 pm
Posts: 91173
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 4:48 pm
Posts: 78645
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 4:52 pm
Posts: 349
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 5:12 pm
Page 1 / 2