Programming (explanations for the non-programmers, mostly)

Discussion in 'General Chatter' started by seebs, May 3, 2015.

  1. seebs

    seebs Benevolent Dictator

    There's a whole lot of magic in there I don't remotely understand, honestly, and modern computers are very, very, magic. But you can mostly ignore that in practice.

    I once did a little demo thing of a sort of invented minimal tiny CPU just to illustrate how to make a small program from raw instructions, at the guidance of an older programmer. It was sorta fun.
     
    • Like x 1
  2. Lissiel

    Lissiel Dreaming dead

    Does anyone know how flash compares to real programming languages? Cause I muddled and copypasta'd my way through a flash paper doll once and that was just fricking baffling. Do it this way! No this way! No wait, if you classify your pictures as objects instead of items you have to do this completely different thing! Haha we only put semicolons there in version five, what version are YOU coding in? It was like trying to parse a general assembly of the UN with nothing but a french pocket phrasebook. :(

    Possible that coding is one skill that just wading in with a project tutorial isnt the best way of picking it up.
     
  3. seebs

    seebs Benevolent Dictator

    I am not totally sure, but I think Flash has a mishmash of things, one of which is JavaScript only they call it ActionScript or something? But I seem to recall getting the impression it was not exactly a well-regarded development environment.
     
  4. Starcrossedsky

    Starcrossedsky Burn and Refine

    Maybe when I've worked my way through the programming lessons ADM passed my way I'd be able to explain it; I've got a decent background in origami. As it is I can already see a similarity in how things have to not only be done correctly, but in the right order; origami instructions wouldn't make sense outside of the context of whatever model you're building because the folds build on each other, and my I-have-no-idea-but-I'm-trying intuition says that programming is similar.
     
  5. Vacuum Energy

    Vacuum Energy waterwheel on the stream of entropy

    Another method of learning programming is to come up to it sideways, starting from graphical programs like MIT's Scratch or the thing for Lego NXT where I forgot the name of it. That way is best for learning programming logic without being distracted by things like syntax errors.

    Doesn't help when you can't spot the syntax errors later but it's how I figured out I at least have a little bit of brain for programming.
     
  6. siveambrai

    siveambrai Negative Karma Engine nerd.professor.gamer

    **This is NKE** Yup! That was pretty much the idea of how we started off the class. That alongside discussions of direction giving (like the one Seebs mentioned) and asking or looking for help when it was needed. Or if you get stuck backing up and trying through again and sometimes just plain dealing with frustration. A lot of my students get frustrated early on and just shut down. The origami was meant to get them to try and fiddle with it because nothing is really lost if you mess up. You just get a new piece of paper and try again. It takes out some of the technical anxiety that new programming students face.

    Pretty much most of the class is taught through discussion of the ideas before we even touch the computer. In a 2.5 hours session we'll only get on the editor in the last hour or so. Before that is talking and drawing on the board and using stories so that they get the concepts divorced from a particular language or machine. Generally if you like the idea I would suggest checking out http://csunplugged.org/ They use a lot of similar concepts of playing with physical things to learn computer science.

    @Void If you are really struggling I would suggest checking out a platform like Inform7. It focuses really strongly on the story telling aspects and uses a more natural language programming style that works for a lot of people who want the interactivity but get overwhelmed by the jargon.

    As a third note, the single best metaphor for understanding object oriented design in terms of class structures, inheritance, method & properties is talking about Pokemon. If you can understand the hierarchy of pokemon>type>breed>critter in your pokeball you already understand objects.
     
    • Like x 2
  7. albedo

    albedo metasperg

    @seebs So, do you think Java's lack of explicit pointers makes it a bad teaching language? I learned in Java, and C/C++ still seriously confuse me; I can't keep the & and * straight in my head. But newer languages like C# seem to also be avoiding explicit pointers. :P I'm not sure how important it is at this point; I'm doing eighty percent of my coding in F# these days anyway.
     
  8. Codeless

    Codeless Cheshire Cat

    As someone who has sucessfully messed around with tumblr themes that included instructions for adjusting the code, how good an idea is HTML for learning to programm in?
     
  9. seebs

    seebs Benevolent Dictator

    A side note: I liked inform6, quirky though it is, I absolutely can't process inform7.

    @albedo: I don't think lack of explicit pointers is a bad thing at all! I think that there's plenty of advantages to simply never dealing with pointers if you aren't writing at a level where you need to, and most people haven't got a good reason to write that low-level, I think. If you want to learn pointers, do C. I can probably explain pointers usefully.

    @lmC: HTML isn't really a programming language in the usual sense; it's markup, but there's no flow control, so it's not really doing anything. JavaScript is... well, honestly, it's a sort of fucked-up language.

    Historical note: JavaScript is 100% totally and completely unrelated to Java. There's no connection between them at all. Wayyyy back when, Netscape Navigator introduced it, and Sun and Netscape made a deal where they'd call the language "JavaScript" to stress their assertion that the server side would be running Java and the client would run JavaScript and then people would buy their stuff. There is no technical relationship.
     
    • Like x 1
  10. pixels

    pixels hiatus / only back to vent

    Here's my issue: I completely understand the logic of programming. I know what if-then statements do, I know how you jump from one step to another in a logical process, I know how to cull from a list and such like that.

    What I don't understand is how to tell the computer how to do it.

    I've been doing a lot of work in Workflow for my iPad/iPhone to automate my simplest tasks and it's so wonderfully intuitive. I don't have to know any programming languages to tell the thing what I want it to do. And while I do want to learn programming language (CSS, which I mostly work with, is beautiful enough, I can't even imagine what native Ruby looks like) I'm past the point where my brain will be able to pick up another language, or so I feel. Neural pathways are set and all that. Plus I have absolutely no use for this skill at this point.

    That being said, if I learned how to program as a lawyer, do you fucking know how much money I would make as an electronic discovery expert? Imagine: code that sorts through relevant documents, culling who created the document and when, converting formats into universal so other computers can read them, flags them on a scale from most to least relevant, additional flags for protected information, teaching the program from a sample what's relevant and what's not. It's amazing. And I want to know how it works, not just that it works.
     
    • Like x 1
  11. albedo

    albedo metasperg

    @seebs That would be pretty cool; thank you!

    I'm happy to be working in high-level programming, but it's always bugged me that I just can't get pointers through my head. We had a lot of C programming in some of my university classes, so I know the absolute basics - that & is like the "address of a house", and * is "like the house itself", but anything more complicated baffles me. I always ended up just spamming "maybe it's *? **&*? &&*?" at random until the program compiled. I was not good at C.
     
  12. albedo

    albedo metasperg

    @pixels For what it's worth, programming languages are really not equivalent to natural language in that sense; it's totally normal to pick them up as an adult, because the required vocabulary is very small, and it's the logic that usually is the biggeest barrier to entry for people. It's more like math than language, in many ways.

    I'm looking at a full screen of code, and there's only five actual "vocabulary words" on this screen. And they're "static", "member", "true", "match", and "with", which are... not the scariest words, just from a "memorize this" perspective.
     
  13. seebs

    seebs Benevolent Dictator

    Pixels, I dunno how old you are, but I'm in my 40s and I learn new languages still. I wouldn't worry about it at all. How you tell the computer to do it is... highly variable. Lots of ways. I'm an old-school command-line person, so I make a file named something like do_the_thing.rb, then write "ruby do_the_thing.rb", for the most common cases.

    Lemme think a bit about pointers and explaining them.
     
    • Like x 1
  14. pixels

    pixels hiatus / only back to vent

    @seebs you're not in your 40s, you're immortal and ageless. :P I'm closer to 26 than 25. I've taught myself CSS/HTML through examples and Googling (w3schools is magic).

    @albedo here's the thing: I totally get logic. I specialized in logic in undergrad. I took a modal logic class that was labeled as a graduate (700-level) math course and I enjoyed the hell out of it. I like computers and the way they talk. I just can't talk like them yet. If I had a reference book next to me I'm sure I'd be able to do it, honestly, it's just getting up the gumption to learn a new thing when my brain is crying at law stuff still.
     
    • Like x 1
  15. seebs

    seebs Benevolent Dictator

    I would definitely wait until you've cooled down and stopped making the overheated-metal noise! Or just play around casually.

    My #1 strategy for learning to code: Pick an MMO with a good addon API (Rift, basically), and grab a lua reference, and a couple of dev tools within the game, and muck around with changing the game's behavior.

    And yeah, the w3schools page doesn't suck.
     
    • Like x 1
  16. seebs

    seebs Benevolent Dictator

  17. Mala

    Mala Well-Known Member

    So if I wanted to teach myself a language that's not Java, what should I pick? Python? And does anyone have good resources for this?
     
  18. seebs

    seebs Benevolent Dictator

    Okay, that's gonna get contentious. I personally do not get along with Python at all, and several people I know who've tried to learn it just couldn't get comfortable with it. Some people seem to really like it. Lua, Python, and Ruby are all reasonably respectable starting language choices. C might be okay if you wanna play around with low level stuff, but it will take longer and be harder to get things working. I would not recommend C++ or Java or Objective-C or C# or perl. I would absolutely not recommend PHP; it's "easy", but it's a kind of "easy" that fucks you up later. BASIC likewise.

    Lua has the attraction that many video games use Lua for some amount of logic, and may allow the use of Lua for writing mods or changing game behavior. Like, Legend of Grimrock used Lua, and I wrote a thing for it that let me alter some of the game rules. I maintained a bunch of mods for Rift (and probably would again if I heard of any problems with them).

    Lua is a very small, simple, language. It can't do much in and of itself, but is very good at having functionality added to it. The MOAI dev kit I use for mobile apps is Lua-based. Rift's addon API is Lua. So's WoW's, but the WoW API is garbage.
     
  19. siveambrai

    siveambrai Negative Karma Engine nerd.professor.gamer

    I really feel like that is true. In some instances I think that understanding concepts is a bit of a Kuhnian revolution. But for others its just so often really, really bad explanations. Like, I work with a lot of graphic designers in the graduate program and one chapter in the Javascript textbook on handling video puts all the bits about actually dealing with video at the very end of the chapter. It drives me batty because the rest of the chapter is explaining how to change the graphics when a user clicks on a button so that it looks pushed in. That seems like a total waste to me because it has nothing to do with the functionality of the code/chapter. But the designers love it because the focus works better with how they think.

    Lua is a good starting language. Python isn't bad to start with either but if you don't get basic programming concepts it tends to make some assumptions that don't always make sense (and my students have started threatening riots when they get a whitespace error). Although JavaScript is... messy it honestly is pretty good for the basics and gives lots of very explicit feedback. Do NOT start with jQuery though. Seeb's approach with mods is a good one. If you want to try making a game yourself you can check out Javascirpt or C# and Unity or PyGame (if you decide to start with Python).
     
  20. seebs

    seebs Benevolent Dictator

    I seem to recall there was a niceish toolkit named "gosu" for Ruby 2D games.

    Corona SDK costs money, and has support and such, and does Lua-based games. MOAI is harder to get started in, I think, but it's free and I overall like it a bit better.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice