I has the dumb. Help me program.
July 4, 2010 11:38 AM   Subscribe

I'm taking a software dev class at the local community college and need help picking which language I should learn. I also have dyscalculia, which makes learning certain things sort of.... difficult.

I guess my question is sort of the opposite of this. Essentially, things that are too mathlike and abstract get all caught up in my brain and then never make it out again. I can UNDERSTAND it in concept but cannot APPLY it. I have no problem with logic, understanding sequences or many of the basic structures of math. My problem is translating numbers and math-type symbols into actual results. I understand factors in trig, I just cannot explain to anyone how it works. Polynomial equations are the devil. I have difficulty reading a regular watch but have no problem understanding fractions. Apparently I have no natural number sense. I have teh math dumb.

I was looking at learning c#, VB .NET, Perl, Java, Ruby, whathave you and realized that some languages would present more of a challenge for me than others. Most languages were designed with certain types of purpose in mind, by certain types of people or are maybe "old fashioned" and I should just ignore them. Given that too many math-like symbols and constructs are likely to drive me over the edge, what sort of language should I learn?

My main desire is to get a good handle on whatever language I pick so that I can move up the tech chain into something better. Having no programming language except a year or so writing SQL queries isn't really getting me there.

As an example, this VBA script makes total sense to me (as it should since it's pretty basic):
if (condition) then
result = "met"
else
Result = "not met"
end if


This Perl script is way past my ability to get it:
if ($expression) {
do_something;
};

# postfix conditional
do_something if $expression;

if ($expression) {
do_something;
} else {
do_fallback;
};

if ($expression1) {
do_something;
} elsif ($expression2) {
do_something_different;
} else {
do_fallback;
};

As I understand it, they're both supposed to do the same thing. If not, then it's a bad example but I don't know enough of any language to know if my concern is nonsense. If so, let me know.
posted by fiercekitten to Computers & Internet (17 answers total) 4 users marked this as a favorite
 
Best answer: The perl version is showing 4 different things, none of which are a direct equivalent to the VBA, but the 3rd one (copied below) is pretty close...does that make it make more sense?

if ($expression) {
do_something;
} else {
do_fallback;
};

'do_something' and 'do_fallback' are placeholders for whatever code you'd want to execute in the different conditions... this could quite easily be the assignment of 'Met' or 'Not Met' to a variable, as in the VBA example.
posted by gregjones at 11:54 AM on July 4, 2010 [1 favorite]


Have you looked at python? It is the least symbol-y and most English like language I know of and quite popular. Your first example would read like this:

if condition:
result = "met"
else:
result = "not met"
posted by cj_ at 12:00 PM on July 4, 2010 [1 favorite]


The perl program you have there does much more than the VB one. An equivalent perl program would be
if ($condition)  {
    $result = "met"
} 
else {
    $result = "not met"
}
Regardless of that, why are you learning programming? Is it for a particular application or field? That could drive your choice of language. Besides that, what classes are available? I doubt there is a class for beginning programmers in Ruby.

Personally, I think that Python is a pretty easy first programming language, but depending on your field, maybe C# would be what you would be really using. And all popular computer languages are fairly similar except for syntax details, at least for learning purposes.
posted by demiurge at 12:02 PM on July 4, 2010


Best answer: For what it's worth, I have dyscalculia also and your two examples are crystal clear to me in terms of yes, the VBA script being easy to follow and the perl script being a pile of meaningless rubbish.

I found ASP easy to learn back in the day and frankly, I think the whole MS/VB/.NET codebase is easier to learn if you have this particular disability. (How easy or hard it is to learn if you don't have it doesn't make any difference.)

Any language that requires me to use \n or $ things is made of fail in my brain. Statements like "if Not" and concepts like "dim" however, are very easy to understand and to work with fluently. I find SQL in .NET easy to work with as well.

If you do not want to go down that road, and there are many fine reasons not to, then yes, look at Python.

Syntax is everything. If you are like me, the bane of your existence even in .NET will be escaping with single and double quote marks. I would suggest that the key to getting to grips with this is a good, solid, colour-coded editor. Playing around and finding one you are comfortable with makes a huge difference.
posted by DarlingBri at 12:06 PM on July 4, 2010


Echoing the others, python is probably your best bet.

BUT, if your end goal is to write a text adventure, and you have no ambition beyond writing text adventures, then you should really look into Inform7. It has an almost-natural-language syntax. Sure, you have to use the RIGHT natural language, but it's really like picking up a few key phrases and then getting an idea of how to string them together in ways that the parser won't choke on.

Example Code:

The Upper Cave is above the Rock Pool. The Ledge is east of the Pool. The stream is a backdrop.

When play begins:
move the stream backdrop to all wet rooms.

A lever is in the Cave. The lever is fixed in place.

Instead of pulling the lever when the Cave is dry:
now the Cave is wet;
now the lever is in the Rock Pool;
now the lever is portable;
update backdrop positions;
say "The old rusty lever pulls away, and the thin cave wall goes with it, so that a stream bursts into the cave, falling to the pool below."

posted by kaibutsu at 12:41 PM on July 4, 2010 [3 favorites]


Just to reiterate what gregjones said above, the perl example is actually four variations on how you could write conditional statements, if that helps clear up the code for you.

The choice of language really does depend on what you hope to do with it. Of the languages you listed, perl is probably the "worst" in terms of allowing people to use thoroughly impenetrable and arcane syntax.
posted by Blue Jello Elf at 1:12 PM on July 4, 2010


Python is the best first language IMHO.
posted by i_am_a_Jedi at 1:15 PM on July 4, 2010


Perl intentionally carries considerable syntactic baggage going back decades, nothing mathy, just excessive traditionalism. Java and Ruby are pushing religions that you might never grok. Imho, Python is the single best overall language for running the gamete from teaching beginners through making life convenient for experts.

VB and PHP are otoh designed explicitly for very low level coders writing web backends. And they're used precisely when cheap inexpensive talent will do. So I'd advise learning either VB or PHP depending upon whether your employer used Microsoft or Linux based servers. Facebook for example is all PHP, SQL, Javascript and HTML. Ain't rocket science, but get's the job done.
posted by jeffburdges at 1:24 PM on July 4, 2010


(Running the Gamete: A Sperm's Tale)

Python is okay. I think Scheme is better for learning who programming is about, but it is less immediately useful. In your case I don't know if Scheme would be easier because the syntax is so regular, or even more impenetrable because it's less natural looking to the untrained eye.
posted by fleacircus at 2:32 PM on July 4, 2010 [2 favorites]


Ruby is another language that feels very much like natural language.

Instead of this perl expression:

$i=0
while($i<5>   print "Hello";
}


You can use something like this in Ruby:

5.times do
  print "Hello"
end

As others have mentioned, Python is also a good choice.
posted by chrisamiller at 3:15 PM on July 4, 2010


The above perl got mangled by the parser:

$i=0;
while($i<5){
  print "Hello";
  $i++;
}

posted by chrisamiller at 3:16 PM on July 4, 2010


fleacircus: "I don't know if Scheme would be easier because the syntax is so regular"

Yes, this. Scheme, and other lisps, are extremely simple to read once learned (easier than any other language I have programmed with), and scheme very expressive and high level despite having such a dirt-simple syntax. The only languages with a more bullheadedly simplistic syntax are bit twiddling languages like forth, brainfuck and assembler macros (none of which I would not recommend at all for a beginner, mind you).
posted by idiopath at 3:24 PM on July 4, 2010


That's a really unfair comparison. If you wanted to avoid sigils in perl you could write:

print "Hello" x 5;

or

print "Hello" for (1 .. 5);

But the larger point that perl typically has lots of sigils is still true.
posted by Rhomboid at 4:48 PM on July 4, 2010


Best answer: I will hazard to say that if you learn the VB now, it may make easier when learning the other languages later.
Be aware of the limitations and advantages of each language you learn before you use it for a task.
posted by Drasher at 4:48 PM on July 4, 2010


Response by poster: At this point I'm figuring on learning at least one other language, since a single language programmer is pretty worthless. But I'm trying to figure out, for my first, which is more useful in the jobs market and will also not get all hung up on my mathlessness. I speak more than one natural language, so finding something that's both *more* natural and not worthless would be ideal, I guess.
posted by fiercekitten at 5:23 PM on July 4, 2010


I had trouble with math too, until I got into programming. Suddenly I was able to make some sense of it, if I translated it into a programming language I was familiar with. I really enjoyed Python, but professionally, I haven't found it that useful for me (I'm not really good enough at it anyway).
posted by wobh at 9:52 AM on July 5, 2010


Nthing Python. It's quick to learn, but has surprising depth and extensibility.
posted by johnvaljohn at 8:07 PM on July 5, 2010


« Older Fireworks in Echo Park?   |   Can I write notes on my smartphone that will show... Newer »
This thread is closed to new comments.