Learning to code. Page 4

  • Page

    of 7 First / Last

  • kosigan 27 Mar 2012 11:55:22 469 posts
    Seen 2 days ago
    Registered 5 years ago
    @Mr-Brett - what exactly is it that's not working? One thing that strikes me is that your loop condition is i<20, not i<=20, so you won't get a "Buzz" for 20. Is that it?
  • Phattso Moderator 27 Mar 2012 11:55:48 13,351 posts
    Seen 1 hour ago
    Registered 10 years ago
    As an aside, although not strictly necessary here, I'm a complete nazi about brackets in complex expressions. It makes it infinitely more readable (especially for other people) and easier to debug too - it makes it obvious the order in which expressions are evaluated. Just a code style thing though, food for thought.
  • AcidSnake 27 Mar 2012 11:56:10 7,282 posts
    Seen 53 minutes ago
    Registered 8 years ago
    Yep, the ampersand...

    AcidSnake - He can't see your sig, avatar, images or vids and talks about himself in the third person because he's proper old-skool...UID 24017

  • Mr-Brett 27 Mar 2012 12:03:14 12,805 posts
    Seen 2 hours ago
    Registered 8 years ago
    OK so it was both of those, cheers Phattso and kosigan. I can't believe I re-read that so many times looking for the mistake and they were so basic and obvious :/

    Level 37 Social Justice Warrior

  • disusedgenius 27 Mar 2012 12:07:27 5,359 posts
    Seen 5 minutes ago
    Registered 7 years ago
    Tis always the way.

    My thing at the moment is that, for some reason, I return my booleans the wrong way round. Then I spend ages checking my entirely correct logic to see why things aren't working the way I expect. :(
  • RedSparrows 28 Mar 2012 12:13:30 22,899 posts
    Seen 38 minutes ago
    Registered 7 years ago
    Yeah, I misspelt a function the other day and spent about 20 minutes looking for it.

    I am about to delve back into this. Want to to that Blackjack challenge thing.
  • Tonka 28 Mar 2012 12:39:41 20,568 posts
    Seen 35 minutes ago
    Registered 11 years ago
    I just banged my head bloody against the screen over a php code that didn't do anything.
    Turns out I was looking at the latest release to the work server rather than my local code. Fuck me that was a dull way to spend 20 minutes.

    If you can read this you really need to fiddle with your forum settings.

  • mal 28 Mar 2012 13:19:11 22,605 posts
    Seen 15 hours ago
    Registered 13 years ago
    Ah, easily done. No matter how many times you tell yourself that next time you'll check the code you're testing is the same revision as the one you're editing, it's something you'll keep doing if you're anything like me.

    The surefire way to get around it if you are absolutely stuck is to ask a colleague over to look at the problem with you. This exploits an aspect of sod's law, and relies on the fact that if you can arrange the situation to make yourself look like more of an idiot when the solution becomes apparent, the solution will probably become apparent then.

    Cubby didn't know how to turn off sigs!

  • Mr-Brett 1 May 2012 15:43:50 12,805 posts
    Seen 2 hours ago
    Registered 8 years ago
    I'm back doing some codecademy lessons. Multi-dimensional arrays and nested for loops?!

    /brainsplosion

    Level 37 Social Justice Warrior

  • RedSparrows 1 May 2012 15:57:49 22,899 posts
    Seen 38 minutes ago
    Registered 7 years ago
    Haha, I think it's probably best to backtrack a bit upon return!
  • warlockuk 1 May 2012 16:09:23 19,180 posts
    Seen 17 hours ago
    Registered 10 years ago
    Tonka wrote:
    I just banged my head bloody against the screen over a php code that didn't do anything.
    Turns out I was looking at the latest release to the work server rather than my local code. Fuck me that was a dull way to spend 20 minutes.
    If I had a quid for every time I did this today, I'd have three quid. Mainly 'cos I have three workspaces running the same project while I decide how I'm going to develop it - not counting the one the source control is pointing to.

    I'm a grumpy bastard.

  • gammonbanter 2 May 2012 22:19:14 1,503 posts
    Seen 2 hours ago
    Registered 7 years ago
    Grump wrote:
    www.codeacademy.com
    This site is awesome! I was looking at the reddit programing boards today, some nice stuff.

    We tried drinking a beer from every world cup nation http://worldcup2014beers.wordpress.com/

  • Carlo 2 May 2012 22:27:59 18,071 posts
    Seen 8 hours ago
    Registered 9 years ago
    http://www.ebay.co.uk/itm/AN-INTRODUCTION-TO-BASIC-FOR-COMMODORE-VIC-20-/200752383532?pt=UK_Computing_Software_Software_SR&hash=item2ebdc6462c#ht_500wt_922

    This is the actual book I read aged 6 that taught me to program... Well this and the 'part 2' as well.

    Didn't need anything else until secondary school.

    PSN ID: Djini

  • Mr-Brett 2 May 2012 22:36:13 12,805 posts
    Seen 2 hours ago
    Registered 8 years ago
    You were taught code at school? or you yourself moved on to something else when you went to secondary? I got about 4 lessons on excel formula in Sixth Form, that's it.

    Level 37 Social Justice Warrior

  • Carlo 2 May 2012 22:51:12 18,071 posts
    Seen 8 hours ago
    Registered 9 years ago
    Secondary? I was taught programming (although we mostly taught ourselves) in junior school.

    Up until college, it was basic at home on commodores, and basic on BBC in junior and secondary ( to GCSE 'Computer Studies') but we done a bit of assembly. Outside of school I also self-taught AMOS and STOS on 16bit computers.

    College was pascal, and OO pascal and assembly AND microcode. We also done COBOL but everyone hated it.

    University was as above, but also a bit of VB, and a fair bit of AI programming using prologue. unix (vax) was mostly just scripting.

    I learnt VB too, but I have no idea when... How weird is that?! But yeah, programming was taught at school, not like these days!


    That's why RasperryPI was born. England's kids don't know how to program any more!

    PSN ID: Djini

  • Carlo 2 May 2012 22:54:42 18,071 posts
    Seen 8 hours ago
    Registered 9 years ago
    Children should be taught BASIC in my opinion.

    Christ, give them a C64 on a Tiny PC like RasperryPI and Tell them to go through this: http://www.lemon64.com/manual/

    PSN ID: Djini

  • heyyo 2 May 2012 23:00:17 14,373 posts
    Seen 1 day ago
    Registered 9 years ago
    I did GNVQ ICT at school, then A level ICT - never saw a single bit of code until uni were I learned FORTRAN, was such a struggle having not having a clue what a loop, subroutine, module etc was...

    A waste of time in the end, but interesting.
  • neilka 2 May 2012 23:01:10 16,103 posts
    Seen 55 seconds ago
    Registered 9 years ago
    Forget about kids, we need to get to the point where robots can build and program new robots superior to themselves. I can't see any potential downside to that.

    Lastly, I am gay, disabled, and a liberal.

  • skuzzbag 2 May 2012 23:06:19 5,648 posts
    Seen 3 hours ago
    Registered 10 years ago
    I was doing 6502 assembler at home and getting refused to be allowed to take the computing class at school because my maths wasn't good enough.

    80's education system = CRAP!

    Currently working with PowerShell at work, I think I enjoy scripting more than actual programming and PS is like scripting * 10,000.

    Edited by skuzzbag at 23:06:41 02-05-2012
  • spindizzy 2 May 2012 23:07:08 6,533 posts
    Seen 39 minutes ago
    Registered 10 years ago
    mal wrote:
    God, I hate ternary operators. Too terse, too hard to remember unless you use them a lot (I should probably learn a mnemonic for condition?if_true:if_false). But on the other hand I love list comprehension and lambda functions, so maybe I've no leg to stand on.
    ternary operators are GREAT, especially when nested 4 deep! ;-)

    You a python coder then?
    /shuns
  • Mr-Brett 2 May 2012 23:36:29 12,805 posts
    Seen 2 hours ago
    Registered 8 years ago
    Hold on, I told a lie, I used logo a couple of times in primary school too!

    I totally agree with you Carlo kids should be taught some technical other than the education system being fucked I'm not sure why they aren't.

    Raspberry Pi looks awesome, I'll probably get one just to tinker with.

    Level 37 Social Justice Warrior

  • mal 2 May 2012 23:37:39 22,605 posts
    Seen 15 hours ago
    Registered 13 years ago
    @spindizzy

    I am, for my sins, currently engaged in a Python job. But I have done Haskell in the past, and used lambda functions a fair bit in Perl. And inner functions in Java.

    Carlo wrote:
    University was as above, but also a bit of VB, and a fair bit of AI programming using prologue. unix (vax) was mostly just scripting.
    Clearly didn't teach you that much. The language takes the American spelling: Prolog, and there's a fair amount of difference between a VAX and a Unix box (in fact I'm pretty sure I couldn't even log on to a VAX box).

    I don't think we should teach kids BASIC - it's a horrible, limiting language. I may have a bit of a bee in my bonnet about it, but the Python tutorial seems a great way in to me. But hell, anything's better than BASIC, even Java. Just don't teach them Perl!

    Edited by mal at 23:38:54 02-05-2012

    Cubby didn't know how to turn off sigs!

  • Bremenacht 3 May 2012 00:01:29 18,459 posts
    Seen 4 hours ago
    Registered 8 years ago
    Maybe he meant the DEC Alpha? I remember some people kept calling them vaxes. Ran Tru64 unix. Really cool machine, at the time.
  • mal 3 May 2012 00:16:39 22,605 posts
    Seen 15 hours ago
    Registered 13 years ago
    Ah, cool. Never knew that.

    I'm sure VAX machines made sense, but everytime I sat next to someone connected to one, the console looked like gibberish.

    Cubby didn't know how to turn off sigs!

  • SpaceDave3000 3 May 2012 00:22:31 78,266 posts
    Seen 2 hours ago
    Registered 12 years ago
    I used VAX in college where I also learned Cobol and Pascal.

    I miss the shit out of the green screens and keyboards you could club a whale to death with there. Can't remember a thing about any of it now.

    Edited by Dirtbox at 00:24:47 03-05-2012

    +1 / Like / Tweet this post

  • Bremenacht 3 May 2012 00:34:30 18,459 posts
    Seen 4 hours ago
    Registered 8 years ago
    VMS. Or OpenVMS. It's was still running, in some government places, not so long ago. HP probably still supports it.

    I remember wondering how Microsoft, with their shitty new server O/S', could ever hope to steal customers away from such a solid set of machines. Or from Tandem. Or from SUN.

    Ha ha ha. :/
  • mal 3 May 2012 01:31:08 22,605 posts
    Seen 15 hours ago
    Registered 13 years ago
    They tried to by hiring most of the VMS engineers to work on Window NT. That's one of the 'joke' etymologies of why it was called NT : take the letters 'VMS' then for each letter select the next letter in the aplhabet: 'WNT'.

    Cubby didn't know how to turn off sigs!

  • DaM 3 May 2012 13:08:59 13,271 posts
    Seen 2 hours ago
    Registered 13 years ago
    Dirtbox wrote:
    I used VAX in college where I also learned Cobol and Pascal.

    I miss the shit out of the green screens and keyboards you could club a whale to death with there. Can't remember a thing about any of it now.
    I remember that, we used to use the labs during the night, because it used to take ages to compile stuff. That was only 1989, but it seems like a different age now. I suppose it was 23 years ago...
  • skuzzbag 3 May 2012 13:13:13 5,648 posts
    Seen 3 hours ago
    Registered 10 years ago
    LOL yes - A Cobol mainframe on a 5 min timeshare basis is what we had to put up with in 89.
  • coastal 3 May 2012 14:04:34 5,383 posts
    Seen 19 hours ago
    Registered 8 years ago
    Lucky you.

    My GCSE maths teacher had to send her code via the postman up to Cambridge. She'd get the results a week later.

    syntax error line 10.

    bf3: sergeant_shaftoe

  • Page

    of 7 First / Last

Log in or register to reply