That's dispiriting ...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] That's dispiriting - learning a new skill.

38 Posts
25 Users
0 Reactions
74 Views
Posts: 11884
Full Member
Topic starter
 

I decided to learn some coding, I have a bit of a project in mind, based on a Raspberry Pi and I think it may be one of those skills that could be useful at work, occupy me in the evening when there's nothing much else doing, that sort of thing. I've mentioned it on other threads.

So I'm working my way through the Codecademy Learn Python course, and two thirds of the way along there's a section of 15 exercises to practice what you've learned. Now I'm not expecting to be Alan Turing or anything, but I managed two of them. Two of the easiest ones too. I'm a bit gutted really, and feel less enthusiastic about the whole thing now. Anyone recommend a good lesson plan or book that might help?

I do have a bit of history with starting a new hobby around this time of year*, and giving up when the weather cheers up and I get outside more, I was really hoping this wouldn't be one of those.

*Playing the Ukulele, Airfix modelling x2, learning more about WWII as I didn't do history a school. There may be others I've forgotten.


 
Posted : 27/02/2018 9:39 pm
Posts: 17
Free Member
 

Which bit are  you struggling with? The code or the logic?


 
Posted : 27/02/2018 9:43 pm
Posts: 0
Free Member
 

At least you gave up the ukulele. That’s good. You can build on that.


 
Posted : 27/02/2018 9:45 pm
Posts: 11884
Full Member
Topic starter
 

Which bit are  you struggling with? The code or the logic?

Difficult to say, so I'll go with 'both'. When I was as school, I was crap at foreign languages, I'm wondering if it's some genuine mental block thing I have.

At least you gave up the ukulele. That’s good. You can build on that.

Ah ha! That cheered me up, ta.


 
Posted : 27/02/2018 10:00 pm
Posts: 17
Free Member
 

Best I can suggest is probably going through some of the questions and solutions and seeing if you can reverse engineer the reasons for the method


 
Posted : 27/02/2018 10:04 pm
Posts: 2139
Full Member
 

If you want to work on the pi I can heartily recommend the CamPiJam edukits- they take you through some basic python in conjunction with some basic hardware (leds, buzzer, breadboard and assorted sensors). I found it a much more useful way of learning it as you can immediately see what does what in a 'physical' sense.

(I had a similar aim- any coding in the last few years, certainly.since uni, has been picked up to do specific tasks and then forgotten again. So I can remember that I used to be able to do things in MATLAB and VBA but can't anymore. Python seemed a useful 'general purpose' thing to have available- perhaps never going to be the best tool for any particular job but should be a useable tool for most jobs)


 
Posted : 27/02/2018 10:13 pm
Posts: 7076
Full Member
 

These days, programming has turned into this:

1. Succinctly describe the problem

2. Type the problem description into stackoverflow

3. Cut-n-paste the first answer you find into your code

4. Compile/build/run

5. If it doesn't work, GOTO 1.

6. You're done. Award yourself some beer for being awesome.


 
Posted : 27/02/2018 10:14 pm
Posts: 17
Free Member
 

Yeah the hardest bit some days is step one, as you say once you know what you are trying to do you can find solutions , next trick is to understand why the solution works.

I just spent half of the afternoon chasing down the function names to do stuff in the new tool I'm using


 
Posted : 27/02/2018 10:22 pm
 beej
Posts: 4120
Full Member
 

These days, programming has turned into this:...

I'd like to say "it's not like the old days" but my coding career from the mid-90s consisted of a very similar method, apart from "2" was "look through the code to find something similar to what I wanted".

That code was still connecting people to a mobile network until about 4 years ago too.


 
Posted : 27/02/2018 10:25 pm
Posts: 4313
Full Member
 

When you say you only did 2 of them, do you mean that you could only attempt 2 or that you tried them all and only got 2 correct?

If the former, go back and redo the relevant modules and try again. If the latter, don't worry about it, you learn far more from screwing up. Quick revision and bang 'em out again.

Coding (at least to start with) is a matter of practice. It's really hard to pick up by reading or watching someone else do it without doing it yourself.

Professional coders average around 10 lines of code a day...


 
Posted : 27/02/2018 10:27 pm
Posts: 31206
Full Member
 

Perhaps surprisingly I’m not going to offer coding advice (yet) but in terms of being dispirited when learning a new skill, try watching this guy, Mike Boyd:

http://www.youtube.com/user/microboyd

He constantly challenges himself to learn a new skill, often incredibly pointless ones like throwing cards, doing manuals or playing the ukulele.

His key is mental attitude. He never gives up, even when it is incredibly frustrating.

Quite inspring to watch.


 
Posted : 27/02/2018 10:27 pm
 poly
Posts: 8699
Free Member
 

Sadly oldnpastit is not far wrong BUT you want to actually learn something, and whilst swanny’s advice is probably a useful next step after the codeacademy stuff you’ll be stuck in the perpetual problem oldnpastit describes unless you understand the fundamentals.

Why not share the problem you are stuck with here and people will explain the issue in different language.  Often coding education is in language that makes sense to people who think like coders.


 
Posted : 27/02/2018 10:28 pm
 poly
Posts: 8699
Free Member
 

Professional coders average around 10 lines of code a day…

Although if they don’t visit STW they can do much more!


 
Posted : 27/02/2018 10:32 pm
Posts: 7656
Full Member
 

Although if they don’t visit STW they can do much more!

Please dont swear.

Plus the register and various other sites also eat up the time if STW is down.


 
Posted : 27/02/2018 10:34 pm
Posts: 2139
Full Member
 

For what it's worth I did the code academy tutorials. They were good straightforward instruction but not particularly inspiring- I got on much better with the 'learn by doing' approach of the edukits, then going over in detail bits I was struggling with- it gave me the purpose to the part I was trying to understand.

The suggestions above asking if it's the logic or the language are important I suspect.


 
Posted : 27/02/2018 10:42 pm
Posts: 16346
Free Member
 

Maybe you need to find the right tool for you. I've been coding on and off for years at a hobby level and doing little bits for work occasionally. I've done a couple of pi projects and while they mostly worked it wasn't very satisfying and I'm not sure I learnt that much. There was a lot of cut n pasting of code I didn't really understand. I much prefer using an Arduino where the coding makes much more sense to me. I'm sure I'll have another go with the pi as it does lots of things the Arduino cannot and maybe one day it'll click but it hasn't come that easily for me.


 
Posted : 28/02/2018 7:30 am
Posts: 8613
Full Member
 

I never really 'got' programming either. Did a Pascal course for a few weeks (evening course at local college, this is going back 20+ years :p ), thought I understood it fine as it was being taught but really struggled with doing tests, as soon as the context changed I drew a blank (so I guess didn't actually understand it as well as I thought I did). Ended up as a 4GL programmer for 3 years after that, much more wordy/simple to understand although I still was never really comfortable in the role - ended up switching to IT infrastructure. Only now things like Powershell and DevOps are becoming much more commonplace so it's all coming back to haunt me 🙁


 
Posted : 28/02/2018 7:36 am
Posts: 20675
 

A wise man once said...


 
Posted : 28/02/2018 9:20 am
Posts: 281
Free Member
 

You are just having problems applying a new skill. To repeat a previous question; is it the logic or the application of python to the logic? I think you just need some pointers - post one of the problems up, sure there are enough brains on here to help. Once you have done a few it will start to make sense.


 
Posted : 28/02/2018 9:58 am
Posts: 91000
Free Member
 

It might just be the course you are following.  People struggle to explain coding, so one course/book might be great for one person and awful for another.  Try different material.  In fact it's a good idea anyway because a second author might just explain that one thing in the way that you understand and you will get it.


 
Posted : 28/02/2018 10:07 am
Posts: 2598
Full Member
 

After recently binge watching all 4 series of Silicon Valley in preparation for the 5th coming out next month (does anyone else watch the show?), I too have a desire to learn to code , but I'd much rather pick up a book to get me started, can anyone recommend me one? I was looking at the idiots guide to coding book, anything else I should consider?


 
Posted : 28/02/2018 10:35 am
Posts: 31206
Full Member
 

I too have a desire to learn to code

You're gay for my code. 😉


 
Posted : 28/02/2018 10:52 am
Posts: 7656
Full Member
 

I was looking at the idiots guide to coding book, anything else I should consider?

automate the boring stuff with python is not bad.Bit more practical than most teach yourself coding books.


 
Posted : 28/02/2018 11:13 am
Posts: 0
Free Member
 

much as it pains me I have to agree with molgrips 🙁

Go for learning python first, then using it on the Pi.

Look through amazon (.co.uk) for reviews on Python books - don't assume oreilly are consistently good as they are not.

Or search the net for reviews of good learning resources.


 
Posted : 28/02/2018 12:59 pm
Posts: 0
Free Member
 

[i]nickjb wrote:[/i]

Maybe you need to find the right tool for you. I’ve been coding on and off for years at a hobby level and doing little bits for work occasionally. I’ve done a couple of pi projects and while they mostly worked it wasn’t very satisfying and I’m not sure I learnt that much. There was a lot of cut n pasting of code I didn’t really understand. I much prefer using an Arduino where the coding makes much more sense to me. I’m sure I’ll have another go with the pi as it does lots of things the Arduino cannot and maybe one day it’ll click but it hasn’t come that easily for me.

It's an interesting point, because code for an Arduino is mostly simpler. To some extent that's because you're doing simpler things, but then as you point out even doing simple things on a RPi isn't quite so simple. Sure you can do a lot more with a RPi - ultimately it's a proper computer with hardware IO capabilities - but it's a good suggestion to start with an Arduino instead whilst learning the basics of coding.

Though something nobody else seems to have suggested is to look at how schools teach coding. I've got kids in primary school and Python is I think the 3rd level of coding they learn - before that they start with very simple online graphical coding, but the second stage is Scratch which is probably a good place to start. It's also graphics based coding but with a proper structured language - the difference being that you can see the structure graphically rather than it just being text. Scratch is widely available - as a download for a PC, or if you already have a RPi it comes pre-installed on that. As a beginner programmer you probably just want to start with the standard tutorial stuff and make things move around the screen, but it's worth noting that the RPi version now has hardware support - ie you can use it to control the IO port or to be controlled from a switch on the IO port. I've used this feature to interface to an electronics kit so my kids can control their electronics using Scratch and make "real world" things happen through coding (embedded software being my speciality I reckon that's where all the exciting stuff is), but you can probably do the majority of hardware stuff people do with an RPi using Scratch.


 
Posted : 28/02/2018 1:06 pm
Posts: 5139
Full Member
 

if you learn how to weld as an abstract skill you'll end up with a load of rusty old bits of crap lying round the house

if you want to build a bike frame you'll have to learn how to weld

What problem are you trying to solve that needs code ??


 
Posted : 28/02/2018 1:37 pm
Posts: 8613
Full Member
 

After recently binge watching all 4 series of Silicon Valley in preparation for the 5th coming out next month (does anyone else watch the show?)

Yes, one of the best things on TV IMO (although you probably have to be a bit nerdy to fully appreciate it...)


 
Posted : 28/02/2018 1:55 pm
Posts: 7656
Full Member
 

On the books side of things HumbleBundle sometimes does some not bad computing book bundles.

Looks like the one they have at the moment is gaming which may or may not be useful.

Signing up for Microsoft dev esssentials gives some ok goodies as well. Think three month pluralsight subscription and also Vs2017 community edition etc.


 
Posted : 28/02/2018 2:56 pm
Posts: 0
Free Member
 

[i]GrahamS wrote:[/i]

Perhaps surprisingly I’m not going to offer coding advice (yet) but in terms of being dispirited when learning a new skill, try watching this guy, Mike Boyd:

http://www.youtube.com/user/microboyd

He constantly challenges himself to learn a new skill, often incredibly pointless ones like throwing cards, doing manuals or playing the ukulele.

His key is mental attitude. He never gives up, even when it is incredibly frustrating.

Quite inspring to watch.

A like minded soul! I'd actually seen his manual video before (I guess it was linked on here) but hadn't realised he did a whole load of other stuff too. Of course with your comment about mental attitude the obvious thing was to check whether he'd learned to ride a unicycle - that mental attitude is pretty much essential for that. He has of course - it seems that was one of his first videos - though I'm feeling smug to find I can do 2 out of his favourites.

Just wondering whether he ever takes any of these things further once he's learned them.


 
Posted : 28/02/2018 2:56 pm
Posts: 0
Free Member
 

how about some lessons with an online tutor? a real one who can explain things..

background: in my mid to late teens i had tried to learn BASIC and did self-teach bits of Pascal, but I never got anywhere until I enrolled on a course where i learned c++ at college in the early 90s...started at current job in mid 90s.. (ok things change with acquisitions n all that). and i'm still coding c++ daily

same with guitar, i bought an acoustic guitar a week after bbc2 aired the (awesome) dylan documentary 'no direction home' in 2005. several years later i knew a few chords and would pick it up once in a while then backtrack to reacquaint myself with them. roll on to 2007  - once i'd met me other half (a secondary school teacher) she suggested lessons. so i had a couple years worth of weekly lessons. still playing. (not awesome mind you, but i know stuff). as soon as my littleun is old enough, he'll have lessons if he wants.

So I learned to program with a lecturer, I learned guitar with tutor.

Once you're off your training wheels though, with either of them the skills you need are self-analysis and problem solving 🙂 (and how to google/stack overflow :D)


 
Posted : 28/02/2018 2:58 pm
Posts: 10315
Full Member
 

I would recommend some books as well.  I don't know which part you are stuck at so don't know how far along you are but I used 'Hello World' with my daughter for Python and it is ok.   Books often seem to be better structured than online stuff.  Online stuff seems to look cleverer but in reality more time seems to have been spent on the look than the content.  Most of the more heavyweight learning I do is from big honking books

but... even the book isn't great.  Sometimes you need two just to approach the same piece of learning from a different direction.  Once you are over the initial hurdle it will get better


 
Posted : 28/02/2018 3:02 pm
Posts: 31206
Full Member
 

Though something nobody else seems to have suggested is to look at how schools teach coding.

Very badly? 😉 But yeah I know what you mean, we send both our kids (4 and 7) along to a local coding club at weekends where they control little robots through mazes, write basic games etc.

Amazing resources out there compared to tinkering away with a manual and my ZX81 back in the day.

You don't even need to download Scratch, it runs in browser now:  https://scratch.mit.edu

Also check out other tablet apps like Tynker, HopScotch and Mimo.


 
Posted : 28/02/2018 4:50 pm
Posts: 13601
Free Member
 

You are using a part of your brain that hasn't been used for ages. It's exactly like a muscle, it's gonna take a while to get it working again. Keep at it, and you'll be surprised at how far you'll get! 🙂


 
Posted : 28/02/2018 7:58 pm
Posts: 349
Free Member
 

I would recommend some books as well.  I don’t know which part you are stuck at so don’t know how far along you are but I used ‘Hello World’ with my daughter for Python and it is ok.

It's worth trying a few avenues to see what works for you, books don't work for me. I tend to learn a new programming language or framework etc... best by reading websites and looking at code - real world uses and examples but that's possibly not as useful to you. I've also found Udemy to be useful.


 
Posted : 28/02/2018 8:17 pm
Posts: 17
Free Member
 

and looking at code – real world uses and examples

True nothing like a deadline to sharpen the learning skills...

A lot has been learned this week for me here


 
Posted : 28/02/2018 8:20 pm
Posts: 13916
Free Member
 

I went with oldnpastit's system.

Get a book on learning python, then Google "how do I [insert your project] using python" and look at the code that appears.

Read it, figure out what it's doing and then modify it for your exact requirements.

I'm not sure there's much point in learning stuff that you have no requirement for, and this way you'll learn how the bits you're interested in work while also getting your project working quickly.

I've used this system to create a load of monitoring systems that are still being used 24x7 since 2014.


 
Posted : 28/02/2018 8:43 pm
Posts: 349
Free Member
 

I also think that it's important to view the exercises not as challenges but as revision sessions. As suggested, if you can't work something out then look at the answer and try to work out why that's the answer and look back through the course to review relevant bits and solidify that knowledge. As someone already said, it takes practise as with any skill. The more you do of it the better you'll be able to understand what's going on and know how to apply that knowledge, as with anything really.

Also, do they have a user forum for the course? When I've used Udemy courses each course has its own forum so users can help each other out and occasionally the tutor will chime in too.


 
Posted : 01/03/2018 7:53 am
Posts: 0
Free Member
 

Depending what you want to achieve and how you get inspired and learn is going to make a big difference.

If it was me I'd be more inspired to do something more advanced ... perhaps beyond my skill but to get there I'd copy/paste what more experienced people had done for something similar and then hack that.

Doing this will force you to understand their logic and code and although it may not be well written or beautiful the end result can drive you.

This is probably not the best way to REALLY learn it but is it a way that will let you achieve your goal?


 
Posted : 01/03/2018 8:16 am
Posts: 11884
Full Member
Topic starter
 

Thanks all. Sorry I've not been back for a couple of days, had a job interview to prep for, (not as a coder, and didn't get it anyway).

I think FuzzyWuzzy described my problem quite precisely yesterday, it's just before the Simpsons clip.

I am going to get with some electronics kit, as my idea is to make a roller racing set up so I'll need to learn the GPIO for that and also I quite like the idea of a book based course, (automate the boring stuff is one I've already spotted) as it's easier to go back and reference when you are a bit stuck. I've looked for an evening class too, but there's nothing I can find very local.

Funnily enough, one of the prompts for starting this was a big old VBA controlled spread sheet I implemented at work, and I pinched/modified most of the code off stack overflow for that! So I can read and understand it, including the practice exercises when I look at the answer. Including at least one I thought, 'that won't work!'

Appreciated.


 
Posted : 01/03/2018 12:41 pm

6 DAYS LEFT
We are currently at 95% of our target!