OT - Programming Languages

I agree - was ranting about this at work the other day. Managed to offend all my colleagues when I said, after learning some python to hack on an existing script:

Nice langauge, shame about the syntactically significant indenting crap.

... and something about muppets.

After having wasted 2x 30 minutes finding a logic error (not a syntax error) due to a line having slipped over.

Oh, and python changes it's damn syntax randomly.

except IOError, e: or except IOError as e:

c'mon on - make up your minds....

This is the singularly most annoying thing for me as a sysadmin - having multiple versions of python installed because someone needs some new stuff and some old stuff won't run under the new version. I'm talking sub versions in the 2.x series here - not even 3.x

Perl on the other hand is extremely well behaved with a very long term deprecation policy.

Reply to
Tim Watts
Loading thread data ...

You could get him a copy of SCRATCH for his PC

formatting link
. It 's free and it's very good. SCRATCH is visual, you 'plug together' the sta tements and they only fit in syntactically correct ways. My daughter (9) wr ites little games in SCRATCH.

Or, you could buy him a Raspberry Pi computer (costs £100 with keyboard m ouse etc but needs a TV with HDMI input). With that he gets the programming language SCRATCH and PYTHON.

Then buy him Minecraft on the Pi (costs very little or maybe free). It is simpler than the PC version, but you can access the code (Python I think) t hat it is written in and modify it. There is whole world of Minecraft Mods .

Robert

Reply to
RobertL

Another vote for Perl. Also a pointer to the Perl Monks for lots of resources.

I notice that nobody has mentioned Basic, designed as an entry level programming language and much used on the BBC Micro. Bad memories of Microsoft's take on Basic, then VB? Or a preference for more modern structured languages?

Cheers

Dave R

Reply to
David

Maybe - I guess it depends what he wants to do. If you know what problem you want to solve then you can choose the right tool.

Old SciAm mathematical games columns provide some challenging tasks for toy and not so toy implementations of gaming algorithms.

Programming Conways game of life is a moderately tricky problem to do well or solutions for placing N queens on an NxN chessboard.

And a free evaluation copy is available online. The OP might even be able to remember how to use it from his school days.

formatting link

The suggestion of a RaspPi made elsewhere is a good one if there is any hint of an interest in making hardware and controlling things.

Reply to
Martin Brown

Too many "special things" like $_ which make reading perl a constant WTF? experience.

Reply to
Tim Streater

To me it all hinges on the lad's interests and what he actually wants to create with his new-found programming skills. A project is absolutely essential.

And to answer your question, I can't immediately think of any project where Basic would be the right language. :-)

Reply to
Mike Barnes

So, not much chance of hiding a Whitespace program between the visible code elements then?

formatting link

Reply to
Mike Barnes

So don't use them.

use English;

and use nicely named variables.

And don't use $_ at all...

Reply to
Tim Watts

as everyone keeps saying, depends what he plans to write the code for,

i've recently been fannying about trying to learn how to code, my initial reason was to write programs for the arduino boards i use in my simulator interfaces, (to get a bus dashboard working as if it were still in a real bus... so warning lights coming on as appropriate, gauges following the in game gauge needles etc) This also required a plug in written in delphi to determine what data is grabbed, but thankfully that part was already done, delphi is ass backwards compared to C i think.

But even the delphi stuff was easier to play with once i had learnt a little bit of C from playing with arduino's.

Then i started messing about getting the data out of a train simulator, again with the idea to run a real train's control desk with data from a sim, again arduino's will be used, so it's C to write the actual program that runs on the arduino's to move the needles and operate the lights, but the train simulator doesnt have a native data output program like the bus simulator does, so i've had to figure out LUA just to get the raw data out of the simulator,

it seems LUA is getting more and more popular nowadays, and i see loads of references to something about world of warcraft and LUA modding, so if the kid plays WOW, this might be the thing to get results that he will be interested in straight away,

For me, i downloaded microsoft visual studio express, and played with a few of the tutorials, then played about with LUA code, still learning and i know very little, but got conjunctivitis right now, so i keep loosing sharpness in my vision, loose sight of the mouse cursor, and am distracted too much to think properly.

Reply to
Gazz

+1 - we used to call it 'self documenting code' - give meaningful names to variables and subroutines, and if program flow isn't obvious add comments as required

Over the years I've coded in Fortran, COBOL, ADA, Coral66, LISP, and many assembler level processors along with variants of basic and C and you soon appreciate the ability to revisit something that you coded years ago and understand what you did even if you can't remember doing it :)

Andrew

Reply to
Andrew Mawson

Stuff I can't remember doing a.k.a what I coded yesterday.

Reply to
Nick

Python and scratch are "big" on the pi. There is also a version of Lazerus for it.

(plus all the "normal" unix tools like gcc etc but C++ might not be the best intro to programming!)

Reply to
John Rumm

Part of the attraction of BASIC in the '70 on etc was the immediate availability of it. Turn the machine on, and there it was ready to go with no booting, loading, getting started or anything else. Even when you put it on a modern machine, you lose some of that since it becomes just another layer on top.

Reply to
John Rumm

Assuming that you don't have such things around already, it certainly doesn't need to cost that much though.

Minecraft is written in Java.

It's now included in Raspbian by default it seems.

It is free, but it is limited. However I don't think the mods will run on it. It's based on the Pocket Edition, used on Phones and tablets which doesn't run mods AIUI.

However, that would be another 'what do he want to do route' 10yo daughter is a minecraft addict and has been muttering about wanting to learn how to write mods, so learning a bit of Java might be on the horizon here

Reply to
Chris French

BASIC.

There, I said it.

I did write my own BASIC though, so may appear somewhat biased, but if you have a Raspberry Pi then head over here:

formatting link

My experience has been that it's not the language that encourages sloppy coding style - it's the way it's taught - or not )-:

So things like Python at least force a coding style and a structured approach, but BASIC, FORTRAN, COBOL, etc. of old didn't force it, so it was up to the programmer to adopt that way of thinking. Or not.

I did BASIC, then assembler, IMP77, Pascal, C, FORTRAN, COBOL, BCPL in more or less that order waaaay back... I mostly program in C these days (and BASIC, of-course ;-)

Gordon

Reply to
Gordon Henderson

Indeed. And I don't. The trouble is that others do, and the perl "documentation" (at least the Nutshell book) seems always to be written by smart-alecs who like to show off. Their aim (and I found this attitude in the perl ng too) is always to code using the least number of keystrokes - clarity and concern for the maintenance guys following on wasn't there.

Reply to
Tim Streater

The idea is that you write your "mods" in Python, BASIC, C or Java for it - ie. it's a vehicle to help learn programming.

Gordon

Reply to
Gordon Henderson

Since dennis recommended it, I wouldn't touch it with a shitty stick.

Reply to
Huge

don't forget Arduino's and the like such as all the IoT internet of things. Much easier to control hardware to start with, you can get displays motors and build robots quite quickly and it relatively cheap, cheaper than a Pi.

There's interesting kits you can buy too, and plenty of support. To start with I'd stay away from 'computer' programming as all you can do is get things to flash on screen, much more fun getting a LED to flash.

formatting link

Reply to
whisky-dave

Agreed. And it would give him some insight into how the web pages he looks at every day actually work.

Reply to
Mike Barnes

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.