DIYbanter

DIYbanter (https://www.diybanter.com/)
-   UK diy (https://www.diybanter.com/uk-diy/)
-   -   OT - Programming Languages (https://www.diybanter.com/uk-diy/379798-ot-programming-languages.html)

Gordon Henderson January 29th 15 01:47 PM

OT - Programming Languages
 
In article ,
Chris French wrote:

Minecraft is written in Java.

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

http://minecraft.gamepedia.com/Pi_Edition

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.


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

whisky-dave[_2_] January 29th 15 02:04 PM

OT - Programming Languages
 
On Thursday, 29 January 2015 10:06:29 UTC, Peter Parry wrote:
On Wed, 28 Jan 2015 21:48:49 -0000, "Ferretygubbins"
wrote:


Boy1 (13) is interested in learning how to write code and so I would like to
set him up with a toolkit for his PC (Windows)


Forget Windows and get a Raspberry Pi. Cheap, much more interesting
and vast amount of support material. You also get the ability to
easily make things happen outside the computer - like controlling
lights, motors, sensing things etc.


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.
http://arduino.cc/






Mike Barnes[_2_] January 29th 15 02:05 PM

OT - Programming Languages
 
Dave Liquorice wrote:
Starting with HTML/CSS and moving on to PHP might be good place as
you get results straight away.


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

--
Mike Barnes
Cheshire, England

Fredxxx January 29th 15 02:14 PM

OT - Programming Languages
 
On 29/01/2015 14:01, Huge wrote:
On 2015-01-28, Fredxxx wrote:
On 28/01/2015 22:02, Dennis@home wrote:
On 28/01/2015 21:48, Ferretygubbins wrote:
I know this is OT but I rather suspect that some of you will be able to
help.

Boy1 (13) is interested in learning how to write code and so I would
like to set him up with a toolkit for his PC (Windows) unfortunately my
programming days are somewhat in the past and restricted to MUMPS which
was archaic even back then. Has anyone any suggestions for a suitable
platform? As ever the cheaper the better.

Cheers

Mark


http://www.visualstudio.com/en-us/do...ress-windows-8


OK - yes it is very good, but what's he going to do with it?


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


If you wanted to be a professional programmer I would agree with
Dennis's approach, and indeed tackle C# as being a very employable
programming language.

The problem here is that the OP's son will want quick results, and while
VS Express is very powerful and do everything ever needed, I would be
worried about the lad getting bored with getting slow results.

Hence why I thought it best for others in the know to come up with
alternatives. The Raspberry Pi might be a good idea for the lad. It
depends on what he wants to achieve and something like Scratch might be
more appropriate.

I suggested webpages, because it's visual, and if interested can move
onto server or client side scripts.

Tim Watts[_3_] January 29th 15 02:24 PM

OT - Programming Languages
 
On 29/01/15 11:50, Mike Barnes wrote:

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

http://en.wikipedia.org/wiki/Whitesp...ng_language%29


OMG It is like Brain**** but with less retina damage.

Tim Watts[_3_] January 29th 15 02:25 PM

OT - Programming Languages
 
On 29/01/15 13:44, Tim Streater wrote:
In article , Tim Watts
wrote:

On 29/01/15 11:20, Tim Streater wrote:

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


So don't use them.

use English;

and use nicely named variables.

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


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.


I agree - and I write very C like perl, exactly for reasons of clarity :)

Tim Watts[_3_] January 29th 15 02:31 PM

OT - Programming Languages
 
On 29/01/15 14:05, Huge wrote:
On 2015-01-29, Tim Watts wrote:

Perl.


The learning curve for Perl is a vertical cliff. I wouldn't recommend
it for anyone as a first language (and I speak as a Perl programmer
and huge fan of the language.)

After all, anything that allows you to write this ... :o)

while ()
{
s/[aeiouAEIOU]//g;
s/\b(\w)/uc($1)/eg;
s/ +//g;
print;
}



I respectfully disagree.

You *can* use forks to poke yourself in the eye, but it isn't recommended.


use strict;
use warnings; # Just beacuse, mmmkay...

my $counter = 1;

while ($counter = 10)
{
print "Number $counter\n";
$counter = $counter + 1;
}


Now - noone, including me, would write a normal program quite like that
(we'd use a for loop and bury the "my" declaration in it), but I think
perl is a very capable teaching language.

There are 2 "just because" lines of overhead just to help the student
catch errors and I challenge anyone to claim the rest is not as readable
and as simple to understand and learn as Sinclair BASIC :)


And it is also practically C. Or Java. Or PHP - so much value has been
imparted in one session.

GB January 29th 15 02:43 PM

OT - Programming Languages
 
On 29/01/2015 13:23, Gordon Henderson wrote:

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 ;-)


Syntax error with your brackets, I see. With a compiled language that
will be picked up straight away, but with an interpreted language such
as plain old English, as used on UK newsgroups, it can get missed until
that line of code gets executed.



Gordon



RobertL January 29th 15 02:59 PM

OT - Programming Languages
 
On Thursday, January 29, 2015 at 1:30:11 PM UTC, Chris French wrote:


Minecraft is written in Java.



I stand corrected. However, you can manipulate it using Python scripts.


http://www.raspberrypi-spy.co.uk/201...-raspberry-pi/


Robert




Adam Funk[_3_] January 29th 15 03:17 PM

OT - Programming Languages
 
On 2015-01-28, Syd Rumpo wrote:

On 28/01/2015 22:19, Huge wrote:

snip

I'd go for Python. Starting here;


( Forth I go for would.)


Strong in this one, the Forth is, hmm.


Adam Funk[_3_] January 29th 15 03:17 PM

OT - Programming Languages
 
On 2015-01-28, Huge wrote:

I'd go for Python. Starting here;

https://www.python.org/about/gettingstarted/


I agree. The _Python for Kids_ book is pretty good.

Adam Funk[_3_] January 29th 15 03:20 PM

OT - Programming Languages
 
On 2015-01-29, Tim Streater wrote:

In article , Andrew Mawson
wrote:


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 :)


Ha, look, I can write FORTRAN in any language, OK :-)


Excerpts from "The Programmers' Guide to Programmers" by Verity Stob:

BASIC programmers are paranoid because any 16 year old could do
their job, if asked. To try to secure their positions, they
deliberately write code using the double-spaghetti method, never
using a FOR...NEXT loop where four or five IF...THEN...ELSE
constructs might do. Since they taught themselves programming on a
ZX81 rigged up to the family telly, they have quixotic gaps in
their computing knowledge. BASIC programmers ring up technical
support centres to ask questions like "What are all those funny
numbers with letters in them?"

FORTRAN programmers learned their craft at college in 1935. They
are convinced that theirs is the language of the future, pointing
out that in 1966 it was selected as the ANSI standard for writing
Snoopy calendar programs. FORTRAN programmers are not altogether
at ease with modern peripherals such as VDUs (which they
revealingly refer to as "glass teletypes"). They are the only
people in the programming community to use flow-charts, which they
draw with loving care using the special WH Smith's stencils. These
diagrams are then filed away with the source code, ignored for the
life of the program, then finally thrown away unread; because even
FORTRAN is easier to read than a flow-chart.


Gordon Henderson January 29th 15 03:21 PM

OT - Programming Languages
 
In article ,
Tim Watts wrote:
On 29/01/15 14:05, Huge wrote:
On 2015-01-29, Tim Watts wrote:

Perl.


The learning curve for Perl is a vertical cliff. I wouldn't recommend
it for anyone as a first language (and I speak as a Perl programmer
and huge fan of the language.)

After all, anything that allows you to write this ... :o)

while ()
{
s/[aeiouAEIOU]//g;
s/\b(\w)/uc($1)/eg;
s/ +//g;
print;
}



I respectfully disagree.

You *can* use forks to poke yourself in the eye, but it isn't recommended.


use strict;
use warnings; # Just beacuse, mmmkay...

my $counter = 1;

while ($counter = 10)
{
print "Number $counter\n";
$counter = $counter + 1;
}


Now - noone, including me, would write a normal program quite like that
(we'd use a for loop and bury the "my" declaration in it), but I think
perl is a very capable teaching language.

There are 2 "just because" lines of overhead just to help the student
catch errors and I challenge anyone to claim the rest is not as readable
and as simple to understand and learn as Sinclair BASIC :)


Original Sinclair BASIC doesn't have while... But in RTB: (my
interpretation of BASIC)

counter = 1
while counter = 10 cycle
print "Number "; counter
counter = counter + 1
repeat

And it is also practically C. Or Java. Or PHP - so much value has been
imparted in one session.


The question in my head now is - would it look better if I used until
rather than while .. e.g.

until counter 10 cycle
...

Maybe having too much choice is a bad thing ...

Gordon

Gordon Henderson January 29th 15 03:25 PM

OT - Programming Languages
 
In article , GB wrote:
On 29/01/2015 13:23, Gordon Henderson wrote:

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 ;-)


Syntax error with your brackets, I see.


Well, no. The ) in ;-) is a perfectly acceptible closing ) IMO.

Unless your graphical usenet client does fancy interpretations
of-course....

Gordon

Adam Funk[_3_] January 29th 15 03:26 PM

OT - Programming Languages
 
On 2015-01-28, John Rumm wrote:

Or for even easier, look at "scratch"


The neat thing about Scratch is that it makes multithreaded,
event-driven GUI stuff work so easily (e.g., make the little
characters dance around the screen & react when they bump into each
other). I guess the problem is that you get used to that, then try to
do the same in some other language, like Java.

Gordon Henderson January 29th 15 03:26 PM

OT - Programming Languages
 
In article ,
RobertL wrote:
On Thursday, January 29, 2015 at 1:30:11 PM UTC, Chris French wrote:


Minecraft is written in Java.


I stand corrected. However, you can manipulate it using Python scripts.

http://www.raspberrypi-spy.co.uk/201...-raspberry-pi/


And BASIC:

http://unicorn.drogon.net/minecraft1.png

Gordon

Mike Barnes[_2_] January 29th 15 03:36 PM

OT - Programming Languages
 
GB wrote:
On 29/01/2015 13:23, Gordon Henderson wrote:

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 ;-)


Syntax error with your brackets, I see.


Opinions vary on that one...

--
Mike Barnes
Cheshire, England

Adam Funk[_3_] January 29th 15 03:38 PM

OT - Programming Languages
 
On 2015-01-29, Tim Watts wrote:

On 29/01/15 14:05, Huge wrote:
On 2015-01-29, Tim Watts wrote:

Perl.


The learning curve for Perl is a vertical cliff. I wouldn't recommend
it for anyone as a first language (and I speak as a Perl programmer
and huge fan of the language.)

After all, anything that allows you to write this ... :o)

while ()
{
s/[aeiouAEIOU]//g;
s/\b(\w)/uc($1)/eg;
s/ +//g;
print;
}



I respectfully disagree.

You *can* use forks to poke yourself in the eye, but it isn't recommended.


Yabbut when I pick up a fork, I know just what it is & how it works.

I used to use Perl quite enthusiastically but gave up a couple of
years ago when I tried to recycle an XML-transformation program that
I'd written about 1 or 2 years earlier. Even with comments, I messed
with it for a while & decided it would be easier to write a new one in
Python than to decipher & modify the old one.

bert[_3_] January 29th 15 03:59 PM

OT - Programming Languages
 
In message , David
writes
On Thu, 29 Jan 2015 10:41:51 +0000, Tim Watts wrote:

On 28/01/15 23:59, Jeremy Nicoll - news posts wrote:
Huge wrote:

I'd go for Python. Starting here;

https://www.python.org/about/gettingstarted/

The big drawback I found when I tried to get into Python was that
everything non-trivial needed one to find the right class to add to the
basic language.
On the one hand, it was nice to have classes already written to do more
complex things, on the other hand it's not easy for a beginner in a
particular language to judge which one of (perhaps) a multitude of
extension packages best suits a job.

I think I'd start with some simpler less extensible language where
there's a better chance of getting to grips with a much smaller range
of possible features.


Perl.

Looks like C, low overhead, do a lot without any modules and the basic
core of it's syntax is very similar to C, PHP and Java so, like Latin it
is both not quite dead, and a very useful thing to learn as it makes
learning other languages easier.


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

I did hear mention somewhere recently that someone is considering
resurrecting the Spectrum
--
bert

bert[_3_] January 29th 15 04:02 PM

OT - Programming Languages
 
In message , Adam Funk
writes
On 2015-01-29, Tim Streater wrote:

In article , Andrew Mawson
wrote:


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 :)


Ha, look, I can write FORTRAN in any language, OK :-)


Excerpts from "The Programmers' Guide to Programmers" by Verity Stob:

BASIC programmers are paranoid because any 16 year old could do
their job, if asked. To try to secure their positions, they
deliberately write code using the double-spaghetti method, never
using a FOR...NEXT loop where four or five IF...THEN...ELSE
constructs might do. Since they taught themselves programming on a
ZX81 rigged up to the family telly, they have quixotic gaps in
their computing knowledge. BASIC programmers ring up technical
support centres to ask questions like "What are all those funny
numbers with letters in them?"

FORTRAN programmers learned their craft at college in 1935. They
are convinced that theirs is the language of the future, pointing
out that in 1966 it was selected as the ANSI standard for writing
Snoopy calendar programs. FORTRAN programmers are not altogether
at ease with modern peripherals such as VDUs (which they
revealingly refer to as "glass teletypes"). They are the only
people in the programming community to use flow-charts, which they
draw with loving care using the special WH Smith's stencils. These
diagrams are then filed away with the source code, ignored for the
life of the program, then finally thrown away unread; because even
FORTRAN is easier to read than a flow-chart.

LOL
--
bert

Fredxxx January 29th 15 04:34 PM

OT - Programming Languages
 
On 29/01/2015 15:59, bert wrote:
In message , David
writes
On Thu, 29 Jan 2015 10:41:51 +0000, Tim Watts wrote:

On 28/01/15 23:59, Jeremy Nicoll - news posts wrote:
Huge wrote:

I'd go for Python. Starting here;

https://www.python.org/about/gettingstarted/

The big drawback I found when I tried to get into Python was that
everything non-trivial needed one to find the right class to add to the
basic language.
On the one hand, it was nice to have classes already written to do more
complex things, on the other hand it's not easy for a beginner in a
particular language to judge which one of (perhaps) a multitude of
extension packages best suits a job.

I think I'd start with some simpler less extensible language where
there's a better chance of getting to grips with a much smaller range
of possible features.


Perl.

Looks like C, low overhead, do a lot without any modules and the basic
core of it's syntax is very similar to C, PHP and Java so, like Latin it
is both not quite dead, and a very useful thing to learn as it makes
learning other languages easier.


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

I did hear mention somewhere recently that someone is considering
resurrecting the Spectrum


Are they resurrecting the 2k of RAM as well?

I'm sure there are emulators if anyone is that desperate!

Mike Barnes[_2_] January 29th 15 05:04 PM

OT - Programming Languages
 
Huge wrote:
On 2015-01-29, Tim Streater wrote:
In article , Huge
wrote:

On 2015-01-29, Tim Watts wrote:

Perl.

The learning curve for Perl is a vertical cliff. I wouldn't recommend
it for anyone as a first language (and I speak as a Perl programmer
and huge fan of the language.)

After all, anything that allows you to write this ... :o)

while ()
{
s/[aeiouAEIOU]//g;
s/\b(\w)/uc($1)/eg;
s/ +//g;
print;
}


I rest my case.


Not really. This is a PHP program;

?=${[${[${[${[${[${[${[${[${${![]}.=[]}.=${![]}{!![]}]}.=${!![${[${[
${[${[${[${[${[]}++]}++]}++]}++]}++]}++]}++]}{![]+![]+![]}]}.=${[${[$
{[${[${[]}++]}++]}++]}++]}{![]}]}.=${[${[${[${[${[${[${[${[]}++]}++]}
++]}++]}++]}++]}++]}{![]+![]}.${[]}{![]+![]}]}.=${![]}^${!![${[${[${[
]}++]}++]}++]}{![]+![]+![]}]}.=${[]}{!![]}]}.=${[${[${[${[${[${[${[${
[${[${[${[${[${[${[${[${[]}++]}++]}++]}++]}++]}++]}++]}++]}++]}++]}++
]}++]}++]}++]}++]}{![]+![]+![]+![]}.${[]}{![]+![]+![]+![]}]}.=${[${[$
{[${[]}++]}++]}++]}{![]+![]}.${![]}{![]+![]+![]}]}.=${[${![]}=${![]}{
!![]}]}{!![${!![${!![${![]}++]}++]}++]}^${!![${[${[${[]}++]}++]}++]};


Yes, but doesn't seem to *do* anything. Some mistake somewhere, I think.

--
Mike Barnes
Cheshire, England

Mike Barnes[_2_] January 29th 15 06:05 PM

OT - Programming Languages
 
Huge wrote:
I consider PHP to be a festering pile of doo-doo


So you've said before. But it works for me.

AAMOI what do you dislike so much?

--
Mike Barnes
Cheshire, England

Theo Markettos January 29th 15 07:13 PM

OT - Programming Languages
 
Tim Watts wrote:
So don't use them.

use English;

and use nicely named variables.

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


That's fine if you're writing code. It's not good if you're trying to learn
by reading somebody else's code, and that code doesn't do it like that.

Theo

mick[_5_] January 29th 15 07:30 PM

OT - Programming Languages
 
On Wed, 28 Jan 2015 21:48:49 +0000, Ferretygubbins wrote:

I know this is OT but I rather suspect that some of you will be able to
help.

Boy1 (13) is interested in learning how to write code and so I would
like to set him up with a toolkit for his PC (Windows) unfortunately my
programming days are somewhat in the past and restricted to MUMPS which
was archaic even back then. Has anyone any suggestions for a suitable
platform? As ever the cheaper the better.

Cheers

Mark



If he wants his code to make the computer do things in hardware then fix
the lad up with a raspberry pi. Cheap, cheerful and the cost includes all
the free programming languages he could wish for (probably!). Runs linux,
of course.

If he wants to program stuff on the PC (or linux) then I'd suggest the
XBASIC compiler (free) which includes a full IDE as part of the package.
You can also compile from the same source to make programs for both
windows and linux.

Python (free) is another useful language for him to play with, especially
with the pygames library, which handles a lot of clever stuff for writing
fairly simple games. Available for both PC and linux again. It's rather
strict syntax, but IMHO teaches good programming practices.

Theo Markettos January 29th 15 07:44 PM

OT - Programming Languages
 
Mike Barnes wrote:
GB wrote:
On 29/01/2015 13:23, Gordon Henderson wrote:

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 ;-)


Syntax error with your brackets, I see.


Opinions vary on that one...


http://xkcd.com/541/

Theo

Andrew Gabriel January 29th 15 08:26 PM

OT - Programming Languages
 
In article ,
Tim Streater writes:
In article , Huge
wrote:
Not really. This is a PHP program;

?=${[${[${[${[${[${[${[${[${${![]}.=[]}.=${![]}{!![]}]}.=${!![${[${[
${[${[${[${[${[]}++]}++]}++]}++]}++]}++]}++]}{![]+![]+![]}]}.=${[${[$
{[${[${[]}++]}++]}++]}++]}{![]}]}.=${[${[${[${[${[${[${[${[]}++]}++]}
++]}++]}++]}++]}++]}{![]+![]}.${[]}{![]+![]}]}.=${![]}^${!![${[${[${[
]}++]}++]}++]}{![]+![]+![]}]}.=${[]}{!![]}]}.=${[${[${[${[${[${[${[${
[${[${[${[${[${[${[${[${[]}++]}++]}++]}++]}++]}++]}++]}++]}++]}++]}++
]}++]}++]}++]}++]}{![]+![]+![]+![]}.${[]}{![]+![]+![]+![]}]}.=${[${[$
{[${[]}++]}++]}++]}{![]+![]}.${![]}{![]+![]+![]}]}.=${[${![]}=${![]}{
!![]}]}{!![${!![${!![${![]}++]}++]}++]}^${!![${[${[${[]}++]}++]}++]};


** SMACK **

Putting this into an editor so I can remove the line-ends and then
doing php -a in Terminal so I can paste it in. Hmmm.

I get Hello World! but it seems to leave some junk somewhere which also
gets echoed. I also had to replace the first = with echo.


It's an old one now (pre-ANSI C), but I always liked this C program...

#include stdio.h
main(t,_,a)
char *a;
{
return!0t?t3?main(-79,-13,a+main(-87,1-_,main(-86,0,a+1)+a)):
1,t_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_13?
main(2,_+1,"%s %d %d\n"):9:16:t0?t-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#\
}'+}##(!!/")
:t-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
:0t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);
}


--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

Tim Watts[_3_] January 29th 15 09:11 PM

OT - Programming Languages
 
On 29/01/15 18:05, Mike Barnes wrote:
Huge wrote:
I consider PHP to be a festering pile of doo-doo


So you've said before. But it works for me.

AAMOI what do you dislike so much?


http://eev.ee/blog/2012/04/09/php-a-...of-bad-design/

where do we start?

Mike Barnes[_2_] January 29th 15 09:12 PM

OT - Programming Languages
 
Theo Markettos wrote:
Mike Barnes wrote:
GB wrote:
On 29/01/2015 13:23, Gordon Henderson wrote:

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 ;-)

Syntax error with your brackets, I see.


Opinions vary on that one...


http://xkcd.com/541/


:-)

And I'm looking at the last frame's hover message...

The IAU ban came after the 'redefinition of 'planet' to include
the IAU president's mom' incident.

....and wondering whether there was a technical problem with including
single and double quotes. Because I see a clear syntax error. A few
(visible) backslashes would have fixed that (and made it funnier :-)).

--
Mike Barnes
Cheshire, England

Dennis@home January 29th 15 09:25 PM

OT - Programming Languages
 
On 29/01/2015 10:06, Peter Parry wrote:
On Wed, 28 Jan 2015 21:48:49 -0000, "Ferretygubbins"
wrote:


Boy1 (13) is interested in learning how to write code and so I would like to
set him up with a toolkit for his PC (Windows)


Forget Windows and get a Raspberry Pi. Cheap, much more interesting
and vast amount of support material. You also get the ability to
easily make things happen outside the computer - like controlling
lights, motors, sensing things etc.



If he already has a PC then buying a Pi isn't necessary.
You can get windows and/or linux versions of most things for free.
It may be better to buy a usb robot arm or similar.

Bob Eager[_4_] January 29th 15 09:55 PM

OT - Programming Languages
 
On Thu, 29 Jan 2015 05:10:45 -0800, Martin Bonner wrote:

Never did me much harm. I really started on BCPL (with some FORTRAN,
Algol68C, and BASIC thrown in too.)


I wrote a hell of a lot in BCPL. And made some nice spare time money
doing it. It financed some very expensive PCs and apparently helped ICL
get a very lucrative contract with BT!

--
My posts are my copyright and if @diy_forums or Home Owners' Hub
wish to copy them they can pay me £30a message.
Use the BIG mirror service in the UK: http://www.mirrorservice.org
*lightning surge protection* - a w_tom conductor

Gordon Henderson January 29th 15 10:11 PM

OT - Programming Languages
 
In article ,
Bob Eager wrote:
On Thu, 29 Jan 2015 05:10:45 -0800, Martin Bonner wrote:

Never did me much harm. I really started on BCPL (with some FORTRAN,
Algol68C, and BASIC thrown in too.)


I wrote a hell of a lot in BCPL. And made some nice spare time money
doing it. It financed some very expensive PCs and apparently helped ICL
get a very lucrative contract with BT!


My BCPL was all on a network of BBC Micros - I used it to create a network
for overall factory automation in a flexible manufacturing plant...

Fun days...

I see you can get all that BCPL for the Raspberry Pi now, but somehow I
just don't have the enthusiasm for it anymore...

Gordon

Mike Barnes[_2_] January 29th 15 10:11 PM

OT - Programming Languages
 
Huge wrote:
On 2015-01-29, Mike Barnes wrote:
Huge wrote:
I consider PHP to be a festering pile of doo-doo


So you've said before. But it works for me.

AAMOI what do you dislike so much?


My initial dislike was because it mixes code with presentation - HTML
with code mixed in - gag, spit.


I felt the same. How could this work?, I thought. But it does work, and
some of my PHP not only writes the HTML, it writes the CSS and
JavaScript/jQuery as well. It helps that I had early experience of
code-writing programs in the 1970s.

And then I read this;

http://eev.ee/blog/2012/04/09/php-a-...of-bad-design/


I didn't read that, I just started using PHP. It's important not to get
hung on preconceptions about what a tool should be like, based on tools
you've used before. The author is clearly well up on the theoretical
aspects of language design and implementation, and from that point of
view of course PHP sucks. But it's popular for good reason.

--
Mike Barnes
Cheshire, England

[email protected] January 29th 15 11:37 PM

OT - Programming Languages
 
On Wednesday, 28 January 2015 21:48:48 UTC, Ferretygubbins wrote:

Boy1 (13) is interested in learning how to write code and so I would like to
set him up with a toolkit for his PC (Windows) unfortunately my programming
days are somewhat in the past and restricted to MUMPS which was archaic even
back then. Has anyone any suggestions for a suitable platform? As ever the
cheaper the better.


JavaScript is free on any normal Web browser. It can, if one knows how, read local files, but not write, so it is safe. Output can be copied to clipboard to an editor to disc, or sent to printer. The language is a bit like C.

Usenet news:comp.lang.javascript is still in use.

JavaScript can do animated diagrams.

JavaScript in Windows Script Host can do a lot, including harm ...

--
SL



Bob Eager[_4_] January 29th 15 11:59 PM

OT - Programming Languages
 
On Thu, 29 Jan 2015 22:11:02 +0000, Gordon Henderson wrote:

In article ,
Bob Eager wrote:
On Thu, 29 Jan 2015 05:10:45 -0800, Martin Bonner wrote:

Never did me much harm. I really started on BCPL (with some FORTRAN,
Algol68C, and BASIC thrown in too.)


I wrote a hell of a lot in BCPL. And made some nice spare time money
doing it. It financed some very expensive PCs and apparently helped ICL
get a very lucrative contract with BT!


My BCPL was all on a network of BBC Micros - I used it to create a
network for overall factory automation in a flexible manufacturing
plant...

Fun days...


Mine was a compiler and run time system for a product called Millennium
(for Dun and Bradstreet).

I used the BBC ROM at times, but not a lot. I wrote a lot of different
coe generators (including a heavily optimising one for the Z80 for an
embedded system).

I see you can get all that BCPL for the Raspberry Pi now, but somehow I
just don't have the enthusiasm for it anymore...


True. I do have an INTCODE verion on the PC somewhere...


--
My posts are my copyright and if @diy_forums or Home Owners' Hub
wish to copy them they can pay me £30a message.
Use the BIG mirror service in the UK: http://www.mirrorservice.org
*lightning surge protection* - a w_tom conductor

Jeremy Nicoll - news posts[_2_] January 30th 15 12:36 AM

OT - Programming Languages
 
Martin Brown wrote:

On 28/01/2015 22:37, John Rumm wrote:
On 28/01/2015 21:48, Ferretygubbins wrote:
I know this is OT but I rather suspect that some of you will be able to
help.

Boy1 (13) is interested in learning how to write code and so I would
like to set him up with a toolkit for his PC (Windows) unfortunately my
programming days are somewhat in the past and restricted to MUMPS which
was archaic even back then. Has anyone any suggestions for a suitable
platform? As ever the cheaper the better.


How good is the lad at maths? That strongly colours the best answer...


Why?

I did several years of maths at university before abandoning it (so as never
to have to see another differential equation) and changed to Comp Sci
instead. I don't think any program I've ever written since then needed much
more than basic arithmetic.

The only advantage a maths background has, to my way of thinking, is that
anyone who's battled through the sorts of maths proofs that run for page
after page may have a better grasp of the importance of doing things in the
right order, and/or building on what you already know (or in programming
having a well-designed set of primitives & data structures).

--
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to replacing "aaa" by "284".

OG January 30th 15 01:54 AM

OT - Programming Languages
 
On 28/01/2015 21:48, Ferretygubbins wrote:
I know this is OT but I rather suspect that some of you will be able to
help.

Boy1 (13) is interested in learning how to write code and so I would
like to set him up with a toolkit for his PC (Windows) unfortunately my
programming days are somewhat in the past and restricted to MUMPS which
was archaic even back then. Has anyone any suggestions for a suitable
platform? As ever the cheaper the better.


Personally I'd say that the main thing is encouraging him to identify
'things to code'; so what's he interested in?

My daughter coded herself an IRQ client in java (which I suspect was
fairly significant in her getting a well paid programming job) but that
was 'her' interest.

My son did some graphics programming ('cos he liked Minecraft and wanted
to do some 3D visualisation work), also he's used VBA in Excel to create
his own port of 'Game of Life'*, and those were his interests.

I worked for 15 years coding in COBOL and Visual Basic for several
insurance products and did F-all home coding.

The truth is that coding is a time consuming activity, so if your son is
going to get anything out of it, he's going to have to find something
WORTH getting out of it.

If he's a 'hands on' kid, it may be worth getting an arduino kit**, then
he can then work on computer control stuff


* Google "Game of Life" in Chrome and you get a free simulation

** about £80 for a starter kit with components, and it may be worth
getting a cheap radio controlled car that he can strip down and hack.
Have a look on youtube for "Arduino RC cars"


Tim Watts[_3_] January 30th 15 07:52 AM

OT - Programming Languages
 
On 29/01/15 22:11, Mike Barnes wrote:

I didn't read that, I just started using PHP. It's important not to get
hung on preconceptions about what a tool should be like, based on tools
you've used before. The author is clearly well up on the theoretical
aspects of language design and implementation, and from that point of
view of course PHP sucks. But it's popular for good reason.


The fact that error handling is completely broken and logging sucks is
not a theoretical problem. It's a very real problem when some broken
arsed PHP stops working on my servers and *I* have to try to debug it.

The random string casting is an abomination too - even perl does that
better, despite having the same design goal of "trying to be helpful".

The error logging aspect has always annoyed me even before I had any
other reasons to be prejudiced as it makes my life hell trying to debug
other peoples code.

It did also strike me when I actually had to write some that the naming
of stuff was totally inconsistent too.

I have not personally been bitten by half the stuff in that article but
it has shown me two things:

1) Never ever use it when there is any choice;

2) Explains to some degree why it's usually some PHP monstrosity that
gets my servers hacked (eg PHPBB, Wordpress). It's a buggy language
which seems to have been designed by woolly headed people and attracts
woolly headed people in droves to write buggy code with their buggy
language.

That does not mean you can, as the author said, write good stuff in PHP
- so don't think I'm levelling insults at the competent who can write
good code and be on guard WRT to the language bugs, but the hours I've
spent dragging hacked servers back to life entitles me to a bit of a rant.

And people have the check to criticise perl!

Stuart Noble January 30th 15 08:29 AM

OT - Programming Languages
 
On 29/01/2015 21:25, Dennis@home wrote:
On 29/01/2015 10:06, Peter Parry wrote:
On Wed, 28 Jan 2015 21:48:49 -0000, "Ferretygubbins"
wrote:


Boy1 (13) is interested in learning how to write code and so I would
like to
set him up with a toolkit for his PC (Windows)


Forget Windows and get a Raspberry Pi. Cheap, much more interesting
and vast amount of support material. You also get the ability to
easily make things happen outside the computer - like controlling
lights, motors, sensing things etc.



If he already has a PC then buying a Pi isn't necessary.
You can get windows and/or linux versions of most things for free.
It may be better to buy a usb robot arm or similar.


That's next Xmas sorted then

Stuart Noble January 30th 15 09:02 AM

OT - Programming Languages
 
On 30/01/2015 01:54, OG wrote:
On 28/01/2015 21:48, Ferretygubbins wrote:
I know this is OT but I rather suspect that some of you will be able to
help.

Boy1 (13) is interested in learning how to write code and so I would
like to set him up with a toolkit for his PC (Windows) unfortunately my
programming days are somewhat in the past and restricted to MUMPS which
was archaic even back then. Has anyone any suggestions for a suitable
platform? As ever the cheaper the better.


Personally I'd say that the main thing is encouraging him to identify
'things to code'; so what's he interested in?

My daughter coded herself an IRQ client in java (which I suspect was
fairly significant in her getting a well paid programming job) but that
was 'her' interest.

My son did some graphics programming ('cos he liked Minecraft and wanted
to do some 3D visualisation work), also he's used VBA in Excel to create
his own port of 'Game of Life'*, and those were his interests.

I worked for 15 years coding in COBOL and Visual Basic for several
insurance products and did F-all home coding.

The truth is that coding is a time consuming activity, so if your son is
going to get anything out of it, he's going to have to find something
WORTH getting out of it.

If he's a 'hands on' kid, it may be worth getting an arduino kit**, then
he can then work on computer control stuff


* Google "Game of Life" in Chrome and you get a free simulation

** about £80 for a starter kit with components, and it may be worth
getting a cheap radio controlled car that he can strip down and hack.
Have a look on youtube for "Arduino RC cars"


Nice to know there's life after Minecraft. The grandson doesn't think so
ATM!



All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter