What language to teach my girlfriend's daughter

She turned 13 last year and immediately wanted to learn about programming, specifically so she could cheat at homework (won't hear me say anything bad about that plan). I set her off on Code Academy but she's looking for something "more useful" as she puts it. (She wants to work without the over-head of Firefox.) I've trained a number of engineers in everything from functional to OOP, from assembly to JOVIAL to Ada to Java, but find myself too close to the problem of "what language to teach her?" to answer. So I'm humbling myself to the opinions of the BSD fossils and fledglings: What language would/will/did you start your step/child on?
 
I would suggest the "preferred" programming language for the platform (OS) she wants to use her programs on, and I would alongside the tool-chain, also install for her the most commonly used IDE for that platform, so she would have an easy going in the coding-testing/debugging cycle -- how about:
  • Visual Studio Express and C++ for Windows,
  • Xcode and Objective-C for Mac OS X,
  • CodeLite and C for FreeBSD, Linux, etc.
 
Well that would be C# for Windows. Environments are nothing thanks to Cygwin, her laptop has Vista on it. If anything, just a text editor and command line for now so if she decides to branch off (to FreeBSD ;) ), she's not tied to a "coding environment" as I've personally seen that mindset kill more people's productivity than YouTube. I'm personally torn between C and Python(3) as I've got some rather negative opinions of C++ and Java in production (though I do find Java to be the perfect OOP teaching language but pointless outside of academics and Android). Again, really too close to the problem. I'm kind of hoping others out in forum land have had their turn and could share their experiences.
 
Between C and Python the choice should be Python. C is a poor language for teaching the fundamentals of programming.
 
Javascript (or whatever they're calling it today) wouldn't be a bad idea, there are a number of tutorials available which will run in a browser with examples, etc.

e.g. http://www.codecademy.com/

Diving straight into C++, Objective-C, etc. initially will a bit of a big step, limit her to a single platform and be of limited use unless she's planning to go into proper application development.
 
kpa said:
C is a poor language for teaching the fundamentals of programming.

I'd appreciate if you could shed more light on this please? (I'm an occasional C programmer and device driver programming newbie with no experience in Python whatsoever, thus I'm interested in listening. If this veers OT, we can skip this anytime.)

Regards.
 
C has some serious pitfalls with for example string handling that you have to teach in addition to teaching the programming itself if C is used as the first programming language. It's much more beneficial to use a higher level language that provides better abstractions to those same primitives that are safer to use by inexperienced programmers.
 
The thing is with C, you avoid the abstractions and actually teach the fundamentals of things like memory allocation and storage in something as basic as the idea of "string" which is definitely a point in it's favor. Python handles most of the mess while allowing you to teach higher level concepts minus the boilerplate which is a point in it's favor.

At this stage, it's mostly going to be writing up quick applications to do her math homework for her while echoing the stages of the problem solving and piecing things together for her science homework, again mostly calculation based. I was also tempting Lisp for that as well (math, Lisp, kind of go together and all :P).

Unfortunately her school district doesn't have a programming course until the 11th grade so even their choice might change by the time she gets to it (I believe they are using the most current version of Visual Basic Express).
 
Difficult question.

Personally I'd look beyond the question of language and instead focus myself on "how could I teach her to program?", or the basics of programming.

Sure, she'll be looking for quick results; but you could use that to some advantage by providing her with some tools which can have much longer lasting results. Heck, she might even discover a field within IT which she actually could enjoy.

And with that in mind I'd personally focus a bit on Java since it's relatively easy, can be used on several platforms (and to some extend even mobile platforms), the developer tools (such as my personal favourite NetBeans) can be used free of charge, and it's still pretty widely used (not too arcane or limited so to speak).

Most of all it should be able to provide a quick solution to a problem.


Still, whatever you do I'd strongly suggest not to try and steer things too forcefully. If you start trying to actually push her into a direction which you think is best then you seriously risk putting her off and she might lose interest in this field altogether.

SO even despite what everyone (including me) says do make sure that whatever you decide to suggest also fits her interests.

For example; if she's also looking forward to building stuff which her friends can also use (and let's assume they all use Windows) then Java might not be the best pick due to the requirement of an JRE. In that case I'd focus more on C# (or maybe even VB) because both will operate within the .NET framework.

Alas, my 2 cents on the matter.
 
I'd have second the choice of Python.

I used C# and Python almost daily. When I want to write a program and not have to fight with the language, I use Python. This sounds to me like what she wants.

Then later, if she is really into programming, you can start teaching her the "basics". Do they even teach memory allocation, hexadecimal/binary conversion and such anymore in undergraduate and high schools? In my introduction to programming in high school we learned to program in machine and assembler.
 
Octave could help for her numerical math and science homework.

An introduction to low-level programming sounds more fun on a microcontroller evaluation board because it shows close relationships with hardware and real world (GPIO connected typically to LEDs, keypad, text LCD, speaker, serial port, stepper motor) without too much to learn about an operating system and drivers.
 
You could give her a short introduction to several languages. Then let her pick the one that she is most interested in.

PHP is not my favourite language, but you could add it to the list ;)
 
The question was what language we used to start the relatives. You could also say 'startle', as it was FORTRAN (long scary story). In order to really learn how to write programs, I would suggest to use one of the languages meant for educational use. That would be Pascal or derivates. And yes, I learned a lot from trying to tell an M2 compiler that I knew what I did. Back then, I did not.

After all, you want to teach programming and not how to herd cats in a tuna factory. That is what you would need to do if you set out to teach C, which exposes a lot of the legwork to the user. It's not that the user needs to touch these parts, but we all know that she will try what happens, or do something by mistake and end up frustrated.
 
roddierod said:
Do they even teach memory allocation, hexadecimal/binary conversion and such anymore in undergraduate and high schools?

No and I feel this is quite a large issue if free software (which typically relies on low level code) is to carry on progressing rather than having the majority of this generations *would-be* free-software developers being locked into Android Java app stores or Microsoft's C# RT stuff purely due to lack of skills.

This is why she should break the trend and learn C! ;)
 
I actually did give her a brief on a few languages which is how I got here. Even a number of colleges seem to be torn between Python, Java and whatever .Net package MS is pushing. How does this sound: Python to start, PySide for GUI and Ctypes to bring in the low level details in after she gets a handle on things?
 
Crivens said:
After all, you want to teach programming and not how to herd cats in a tuna factory.

Love that quote :)

Though I do disagree about using a "teaching" language as there really isn't such a thing in my experiences: The teacher is the important bit, not the language. Though I also feel that 'features' such as available libraries and language extension options do become something of a necessity once the pupil figures out what those pesky "variable" things are ;)
 
I suppose the biggest question is what she really wants: does she actually care about programming, or is it for the sole purpose of helping with (math) homework? No judgement intended, it's just that it makes a difference.

My own progression was BASIC - Pascal - C++ - C - many others.

I wouldn't recommend C as a first language. It's my primary go-to language, but it requires intimate knowledge of how computers, operating systems and programming languages in general work. In my opinion it's a more advanced language than its size suggests. C++ and Java are good first languages for university freshmen, but I'm not sure either are the right choice for a 13-year-old. Python might be more up her alley, or maybe even Visual BASIC. We may laugh at BASIC and it has its limitations, but it's pretty easy to pick up and it's also reasonably easy to make progress and get as much out of it as the language allows (at which point she could move on to something else if she's interested).

If she's specifically interested in doing math homework, you might want to consider some of the more math-specific languages. Some people already suggested Octane, perhaps MATLAB would fit the bill. Or you could go with a programmable application such as math/maxima (assuming you don't want to shell out big bucks for Maple or Mathematica).

Again, it all depends on what she really wants.
 
I started with C but I wouldn't recommend a younger person to for a first language to learn. I had a lot of frustration trying to teach myself C out of K&R at the tender age of 14. I'm glad I learned it first, no doubt, because it was pretty much downhill from there. But for someone just starting out, I too would suggest Python, or possibly Perl. I never liked VB much, it was a little *too* simple and I think VB ill equips you for when you have to do serious programming in C++ and the like. Python would be my first choice for a beginner.

As an analogy, starting a person with no programming experience out with C is like starting a 100% Windows user out with something like Slackware, or even FreeBSD. They would just get so frustrated (like I did). No, a better solution is a higher level language, Python is my suggestion.
 
I always found that universities didn't give the students enough credit in their learning abilities.

As an example, around 7 years ago students were taught Java at my university because C and C++ were "too hard" and yet when iOS became trendy and brought along Objective-C with it, my fellow students jumped on board pretty much immediately despite Objective-C being just as low level as C++, along with picking up RAII (reference counting), manual memory management and cross compiling to a completely different ARM architecture!

The amount of arguments we had at university (because I am particularly fond of C++ and RAII) that a garbage collector is not a necessity for modern languages and then they just ditch it once Apple deprecated it within Objective-C. Ooh where were those "Told ya so" stickers again?
 
Initially, she wants to learn programming using her homework as an example to build up her understanding and skills. Ultimately, she wants a job like mine: Telling other people how to fix programs, doing my own thing otherwise, occasionally getting off my can to go to this mysterious building called 'work' and getting a decent-ish paycheck for my efforts. (And of course, she also wants to make a video game in her 'spare time' just so she can say she did.)

I personally did the route of C, C++, Pascal, QBasic, Assembly (X86), ActionScript, Assembly (PPC), Java and I lose my place after thatbe cause I started that 'college' thing.
 
Crivens said:
The question was what language we used to start the relatives. You could also say 'startle', as it was FORTRAN (long scary story). In order to really learn how to write programs, I would suggest to use one of the languages meant for educational use. That would be Pascal or derivates. And yes, I learned a lot from trying to tell an M2 compiler that I knew what I did. Back then, I did not.

After all, you want to teach programming and not how to herd cats in a tuna factory. That is what you would need to do if you set out to teach C, which exposes a lot of the legwork to the user. It's not that the user needs to touch these parts, but we all know that she will try what happens, or do something by mistake and end up frustrated.

Yeah, I'm surprised more people didn't mention Pascal. I almost did.

What swayed me towards suggesting Javascript was: Practical application, nothing to install and various tutorials on the internet.

My personal progression was BASIC (home), Logo (as a kid at school), Pascal (and inline assembly) then C and now learning Objective-C and Cocoa.

Pascal is probably better to teach with than Javascript, but knowing Javascript is probably more useful.
 
The important question is what is to be tought. Programming or a language? It's the same here with academica, they switched to Bc./Ms. some time ago and they get people fluent in a language and some other skills out of that. Someone who can say "show me the problem and the tools available, I'll take over from there" is harder to forge. But then again, as a friend pointed out, this means job security for us old fossils ;)

@newbie32: Feel free to borrow that quote. And now imagine teaching a room full of non-CS students how to write code in C. That's when you need to herd terriers in a tuna factory full of cats :D Because, you see, they try to help each other...

@throAU: in teaching, I prefer a system/language that tells you that you do something possibly stupid or outright insane. Taking this from a computer is easier to digest than being told for the nth time by someone that you are making mistake over mistake. And the compiler usually tells you more, and is much more helpful, than your standard core dump. Core dumps come later.
 
Last edited by a moderator:
Crivens said:
...imagine teaching a room full of non-CS students how to write code in C...
I've done this before: A bunch of pure hardware kids who's knowledge of C included A) "it's a letter" and B) "didn't they use that on servers back in the day?" as well as C) "the third item in a sub-list." I nearly strangled me an intern that day.

As for "programming" vs "language", teaching programming to someone new almost always teaches the language's way of doing things and can be kinda hard to beat later on (how many enjoy Lua's 1-based indexing? ;)). Likewise, some languages don't have the same concerns: managed memory, classes, pointers, and so on, so some consideration on a language that exposes a fair number of concepts directly through the language is good but so is one that allows a fairly easy emulation of those concepts.

Truth be told, I've spent pretty much an equal amount of time teaching C, C++, Ada, Python, Perl and Java, with some mix-ins of various others. I, individually, kinda lost the ability to discern one from the next some time ago except in the case of "these use curly braces and semi-colons" and "these don't."
 
Crivens said:
@throAU: in teaching, I prefer a system/language that tells you that you do something possibly stupid or outright insane. Taking this from a computer is easier to digest than being told for the nth time by someone that you are making mistake over mistake. And the compiler usually tells you more, and is much more helpful, than your standard core dump. Core dumps come later.

Pascal is probably the go then (there's a reason it's a teaching language :)). Strongly typed, pointer notation is a lot clearer (IMHO) than C and creating data structures is fairly straightforward.

Maybe try Chef.

(joke) :D
 
Last edited by a moderator:
Back
Top