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.
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"
^^^
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.
Dunno if they are any good, but this popped up on my google home page the other day.
RM.
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.
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)
Great free book, to teach you, search for "dive into python".
Great set of, nicely progressive, problems, search for "advent of code".
“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.
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:
It's a great career, and always a useful skill.
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
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.
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.
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.
“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".
10 PRINT “BORIS IS A COCK”
20 GOTO 10
Didn't that need
30 run
to work?
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.
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.
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
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 😉
Didn’t that need
30 run
to work?
You wouldn't put RUN
on a line, you'd just type it.
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.
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.
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
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.
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
thanks, that raised a titter, I'd be tempted to put it in the office window
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?
I've been working with Freecodecamp and the Mimo app.
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.
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....
@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.
@toby1 I was merely trying to redress the ratio of useful advice to elitism, this is STW after all.
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.
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.
Then what you'll need there is Java I think.
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.
This is brilliant, highly recommended
https://www.edx.org/course/cs50s-introduction-to-computer-science
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.
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.
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).
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
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.
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 🙂
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!
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:
I agree with Mr Semtex google codecombat and actually have some fun learning.