UK diy (uk.d-i-y) For the discussion of all topics related to diy (do-it-yourself) in the UK. All levels of experience and proficency are welcome to join in to ask questions or offer solutions.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #81   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Tim Watts wrote:
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.


I sympathise, and I'd be the last person to deny anyone a good rant. The
person who wrote the "fractal" critique was obviously enjoying himself
immensely.

While mulling over the topic last night I came to the conclusion that
PHP places a lot more responsibility on the programmer than most
language environments, which is what you seem to be saying to some
extent. As an experienced (started in 1962) coder I find it refreshingly
trusting.

Somewhat paradoxically I think PHP might be a good language for a
beginner because it usually does *something* even if it's not what you
thought you'd told it to do. Its anarchic nature means an absence of
off-putting bureaucracy such as you find in VB. When the beginner gets a
bit more experience he's more likely to be more tolerant of an
environment in which a program refuses to do *anything* unless you've
dotted all the "i"s and crossed all the "t"s.

And people have the check to criticise perl!


No language is above criticism. I like perl but have totally converted
to PHP for new projects, and I translate old perl to PHP from time to
time. For your peace of mind I should add that these are all personal
projects and it's a quarter-century since I wrote anything that I
expected anyone else to maintain (or even look at).

--
Mike Barnes
Cheshire, England
  #83   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 10:05, Mike Barnes wrote:

While mulling over the topic last night I came to the conclusion that
PHP places a lot more responsibility on the programmer than most
language environments, which is what you seem to be saying to some
extent. As an experienced (started in 1962) coder I find it refreshingly
trusting.

Somewhat paradoxically I think PHP might be a good language for a
beginner because it usually does *something* even if it's not what you
thought you'd told it to do. Its anarchic nature means an absence of
off-putting bureaucracy such as you find in VB. When the beginner gets a
bit more experience he's more likely to be more tolerant of an
environment in which a program refuses to do *anything* unless you've
dotted all the "i"s and crossed all the "t"s.


This is I think the nub of the whole problem.

PHP is very accessible - which makes it attractive to "web hackers" as
opposed to full time coders who know their craft (not trying to put you
or anyone here in any particular box!)

Unfortunately this makes it the last language that should place any
responsibility on the hacker to do the right thing The two concepts
are very much at odds.

I approve of an accessible web language, but it needs to be robust and
make the hacker do the right thing (or blow up, but in a helpful way).
Otherwise you get half arsed hackers writing full blown web apps that
are full of security holes.

I'm not saying the language should raise the bar and exclude web hackers
- they have given us many useful things that hard core coders might not
have been bothered ever to do - but the language really needs to coerce
them to write solid code.

You can't stop a total n00b from writing crap, but you can hand out the
rope in short enough sections so they can't hang themselves


And people have the check to criticise perl!


No language is above criticism. I like perl but have totally converted
to PHP for new projects, and I translate old perl to PHP from time to
time. For your peace of mind I should add that these are all personal
projects and it's a quarter-century since I wrote anything that I
expected anyone else to maintain (or even look at).


I still write useful 1 page CGIs in perl. But if I had to, I would use
python for more complex web stuff as do all my colleagues. In fact I am
learning python and some django (web app thingy based on python). I've
only ranted against pythons stupid indenting ********, but in every
other respect it looks like a very clean and fine language.
  #84   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 10:27, Huge wrote:


Windows geeks, who seem to lack basic skills


Why do I find resonance with that statement?

  #85   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 10:34, Tim Streater wrote:
In article , Tim Watts
wrote:

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.


That's true of any language. I've not had a problem with the error
handling and I do my own logging anyway.

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


Never had a problem with this. Give some examples.


Both cases are better highlighted in the link I gave a couple of posts back.

Noone is saying *you* can't write good PHP code - if it suits you, good
luck and be happy.

I'm saying it's low bar attracts woolly heading web hackers and then
both gives them plenty of rope to hang themselves AND sets traps to boot.

I would not care, except it's my kind who have to clean up their stinky
mess!

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.


That just means you're dealing with code from people who haven't
considered the failure modes of their code and what to do when these
failures occur.


See above.

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


The naming of a number of library functions is poor, not that I care
too much. More important is that PHP can interface to pretty much
anything you need, databases, the file system, sockets, ...

It's a buggy language ...


Examples please. Development continues and there's an active mailing
list.


All in the link. Inconsistent exception handling is certainly a major
flaw. Things returning NULL as a failure case when they can legitimately
return NULL as a success case on certain input.

And people have the cheek to criticise perl!


As I said in another post, the perl folk are too smart-alec for me. By
contrast I find the docs on the PHP website to be written in a
straightforward and professional manner.


Our language was written by someone who knew languages.


  #86   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 25,191
Default OT - Programming Languages

On 29/01/2015 15:26, Adam Funk wrote:
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.


It can give the wrong idea about some aspects, but the event driven
model integrates quite nicely with modern GUI style programming.


--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/
  #87   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 10:52, Huge wrote:
On 2015-01-30, Tim Watts wrote:

I approve of an accessible web language, but it needs to be robust and
make the hacker do the right thing (or blow up, but in a helpful way).
Otherwise you get half arsed hackers writing full blown web apps that
are full of security holes.


And I give you ... Mt. Gox!

Written (in PHP) by a half-arsed hacker, lost $484M.


http://www.reddit.com/r/PHP/comments...leaked_source/

Hmm. IBM sell CICS to companies that need to do super industrial
strength transaction processing. I am reliably told by an ex student who
did a stint with IBM that CICS, whilst old at it's core is so utterly
debugged and solid and well designed that it's still a very popular
product. IBM solved the "old" by layering new technologies around the
core so integrators don't need to know about "the old".

I would trust my $100million banking operation to CICS.


And in the other corner, we have some crud written in PHP.
That is so going to become my new email signature once I working Mt Gox
and PHP into a catchy one liner.
  #88   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Huge wrote:
On 2015-01-30, Mike Barnes wrote:

While mulling over the topic last night I came to the conclusion that
PHP places a lot more responsibility on the programmer than most
language environments,


Another reason it sucks, then. )

If you want to write in such an environment, how about doing it in assembler?


I want to write in such an environment because I'm productive, and I can
bring my ideas to fruition with the minimum of distraction. Assembler
has just the opposite qualities.

When the beginner gets a
bit more experience he's more likely to be more tolerant of an
environment in which a program refuses to do *anything* unless you've
dotted all the "i"s and crossed all the "t"s.


And you think this is a *good* thing?


Unfortunately that's the environment that many programmers find
themselves in.

(All said with good humour, BTW. I'm not getting at anyone. My professional
programming days are about over. I'm semi-retired and although I still work
in IT, I haven't written anything other than quick & filthy hacks (in Perl,
to help the Windows geeks, who seem to lack basic skills) for years.)


I retired nearly twenty years ago but I still keep my hand in with home
projects. I also do some work for charities in MS Access, and it's hard
to get viler than that.

--
Mike Barnes
Cheshire, England
  #89   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 107
Default OT - Programming Languages

On 28/01/15 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



There appears to be many programmers round these parts.

My suggestion would be to start with JavaScript, then (once interest is
established) move to Java.

Start with JavaScript because you can quickly show something in a
browser, do a lot of pretty stuff. Low time investment, lots of training
online, e.g. http://www.w3schools.com/js/default.asp)

However the Dev environment (code management, debugging etc.) is imo a
bit crazy, so once the lad has demonstrated interest/ability moving to
Linux + Eclipse + Java would be a good next step and could lead to
developing Android apps, or even contributing to some open-source projects.

All the above software is free and, of course, JavaScript is not related
to Java.

Hope that helps.

Bob


  #91   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Huge wrote:
On 2015-01-29, Mike Barnes wrote:
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,


All kinds of things "work", but are vile. MS Windows, for example.


Leaving aside the subjective judgements, how does it compare with the
alternatives? For usefulness, I mean. It's important to accept that the
world is far from ideal.

--
Mike Barnes
Cheshire, England
  #92   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,591
Default OT - Programming Languages

On 2015-01-30, John Rumm wrote:

On 29/01/2015 15:26, Adam Funk wrote:
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.


It can give the wrong idea about some aspects, but the event driven
model integrates quite nicely with modern GUI style programming.


Yabbut my point was that it's *so easy* in Scratch. Kids will bang
their heads on the wall when they move to other languages.
  #93   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Huge wrote:
On 2015-01-30, Mike Barnes wrote:
Huge wrote:
On 2015-01-30, Mike Barnes wrote:

While mulling over the topic last night I came to the conclusion that
PHP places a lot more responsibility on the programmer than most
language environments,

Another reason it sucks, then. )

If you want to write in such an environment, how about doing it in assembler?


I want to write in such an environment because I'm productive, and I can
bring my ideas to fruition with the minimum of distraction.


Sounds like PHP is pretty dire, then. All academic anyway, because I have
no intention of learning it.


You don't seem to recognise that PHP might be "pretty dire" in some
circumstances and "pretty good" in others. Context is everything and
broad-brushed generalisations are often unhelpful.

You suggested assembler, which would be useless for what I want to do,
but that doesn't make it "pretty dire" to me, far from it. It seems to
me that PHP is "pretty dire" for your purposes, whatever they might be,
but not for all purposes.

--
Mike Barnes
Cheshire, England
  #94   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 16:40, Huge wrote:
On 2015-01-30, Tim Watts wrote:
On 30/01/15 10:52, Huge wrote:
On 2015-01-30, Tim Watts wrote:

I approve of an accessible web language, but it needs to be robust and
make the hacker do the right thing (or blow up, but in a helpful way).
Otherwise you get half arsed hackers writing full blown web apps that
are full of security holes.

And I give you ... Mt. Gox!

Written (in PHP) by a half-arsed hacker, lost $484M.


http://www.reddit.com/r/PHP/comments...leaked_source/



Talking of which, I wonder how many russian mafia and other gangsters
those dudes have on their tail. Surprised they are still alive.
  #95   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 459
Default OT - Programming Languages

In article ,
Huge wrote:

Sounds like PHP is pretty dire, then. All academic anyway, because I have
no intention of learning it.


PHP is OK. It's not brilliant and it's certinaly not the best programming
language I've used either. Nor is it the worst. I have written many
1000's of lines of PHP and I'll probably write a lot more, and yes, I
have read the various online documents about the design of the language
- and if you look hard enough you'll find the same documents about most
programming languages.

It filled an interesting gap for web applications early on - easier
than C and not as terse as perl, so it caught on. I learned PHP after
I learned C - a long time after I learned C. I treat PHP as a sloppy
interpreted C. (I don't use their OOP stuff at all). I think I get on OK
with it because I've have experience of C and other programming languages.

Where it falls over is that it's just too easy - so you get people
learning it from the start then writing huge applications with it without
having a real understanding of what goes on "under the hood". I've made
good money fixing other peoples PHP code - after I reeled back in horror
at some of the things I've seen. (and doubled my fees)

PHP gets a bad reputation because of the apparent ease of hacking into
sites written in it - the reality is that almost allways it's simply bad
code (yes there have been vulnerabilities in the interpreter itself,
but compared to the sheer quantity of sloppy code, there are almost
insignificant) Your average modern programmer under 30 doesn't seem to
appreciate exctly "how stuff works" - however maybe that's just my
view as I get older!

I've actually started to use my own BASIC to write some simple scripting
stuff in now. Somewhat worryingly I can call it as a CGI to a web
server... Whether that's a good thing or bad remains to be seen!!!

Gordon


  #96   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Huge wrote:
On 2015-01-30, Mike Barnes wrote:
Huge wrote:
On 2015-01-29, Mike Barnes wrote:
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,

All kinds of things "work", but are vile. MS Windows, for example.


Leaving aside the subjective judgements, how does it compare with the
alternatives? For usefulness, I mean.


Difficult to avoid subjectivity.


Some people find it easier to avoid than others.

I'm one of the few people who came to Windows late in life (both professionally
& personally). The first GUI I used was the Xerox Star (the great-granddaddy
of them all), then various Unix ones (Motif, SunView, NeWS, OpenWindows).
I finally got exposed to Windows at the very beginning of NT. I was
appalled. It was obviously a mountain of hacks, side-effects, inconsistent
UI widgets (how many kinds of 'file open' windows are there? 12? 13?). Some
things were an icon, some things weren't. Even though it was all called
"Windows" it was obvious that it was different pieces gaffer taped together
(some of that is still visible today. Try the difference between the way
Word and Excel close multiple files when you try to exit from them. Word
does it right, Excel doesn't. (BTW, Word is a distant descendant of the
Xerox Document Editor from the Star, whereas Excel was bought in.) Things
have got steadily better over the years, but I still think Windows gets in
the way too often, causing to me snort derisively when people talk about
"inutitive" and Windows in the same breath - what they mean is "familiar".


I don't see any comparison with the alternatives, but if all you want's
a rant, keep going by all means. Just don't expect me to respond for
much longer.

And GUI designers (all of them!), please note that if an icon needs a label
to tell you what kind of thing it is ("Wastebasket") then it's a ****
icon.


Yes there are **** icons around but even the best icon in the world
warrants a label because some people respond better to text than graphics.

--
Mike Barnes
Cheshire, England
  #97   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 810
Default OT - Programming Languages

On Fri, 30 Jan 2015 17:36:57 +0000, Gordon Henderson wrote:

I've actually started to use my own BASIC to write some simple scripting
stuff in now. Somewhat worryingly I can call it as a CGI to a web
server... Whether that's a good thing or bad remains to be seen!!!


I use REXX!

--
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
  #98   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 810
Default OT - Programming Languages

On Fri, 30 Jan 2015 18:49:59 +0000, Tim Streater wrote:

In article , Bob Eager
wrote:

On Fri, 30 Jan 2015 17:36:57 +0000, Gordon Henderson wrote:

I've actually started to use my own BASIC to write some simple
scripting stuff in now. Somewhat worryingly I can call it as a CGI to
a web server... Whether that's a good thing or bad remains to be
seen!!!


I use REXX!


Whatever for? Haven't seen that since I stopped using VM/CMS.


Cos I like it...very productive. Great for certain kinds of scripting.
Available on all common platforms...

--
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
  #99   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 5,168
Default OT - Programming Languages

On 30/01/2015 17:01, Huge wrote:


And GUI designers (all of them!), please note that if an icon needs a label
to tell you what kind of thing it is ("Wastebasket") then it's a ****
icon.


Icons aren't much use for screen readers.
I don't suppose you consider anyone else.
  #100   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 5,168
Default OT - Programming Languages

On 30/01/2015 10:53, John Rumm wrote:
On 29/01/2015 15:26, Adam Funk wrote:
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.


It can give the wrong idea about some aspects, but the event driven
model integrates quite nicely with modern GUI style programming.



If its event driven stuff that's wanted then lego mindstorms is pretty good.
You can also program in other languages if you want.


  #101   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,591
Default OT - Programming Languages

On 2015-01-30, Huge wrote:

On 2015-01-30, Tim Streater wrote:

BTW, I've been meaning to say for ages how much I like your .sig;


I love the way that Microsoft follows standards.
In much the same manner as fish follow migrating caribou."
- Paul Tomblin, ASR


"Me too"
  #102   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,591
Default OT - Programming Languages

On 2015-01-30, Tim Streater wrote:

In article , Adam Funk
wrote:

On 2015-01-30, John Rumm wrote:

On 29/01/2015 15:26, Adam Funk wrote:
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.

It can give the wrong idea about some aspects, but the event driven
model integrates quite nicely with modern GUI style programming.


Yabbut my point was that it's *so easy* in Scratch. Kids will bang
their heads on the wall when they move to other languages.


You mean when they enter the real world and need to do something other
than "make the little characters dance around the screen & react when
they bump into each other"?


Ha, I asked for that. I'm not normally a GUI programmer but I have
(under duress, sort of) had to do some Java GUI work, which I found
slightly painful. I've seen kids using Scratch & immediately thought
"wow, the GUI threading is transparent, & the event handling is so
easy!"
  #103   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,591
Default OT - Programming Languages

On 2015-01-30, Dennis@home wrote:

On 30/01/2015 10:53, John Rumm wrote:
On 29/01/2015 15:26, Adam Funk wrote:
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.


It can give the wrong idea about some aspects, but the event driven
model integrates quite nicely with modern GUI style programming.



If its event driven stuff that's wanted then lego mindstorms is pretty good.
You can also program in other languages if you want.


The Lego NXT 2 "standard" IDE doesn't do what looks to me like
event-driven programming; you have to put in a lot of explicit loops
like "repeat ... until touchSensor1.isPressed()", rather than sticking
an event-handler off to one side of the rest of the code.
  #104   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 5,168
Default OT - Programming Languages

On 30/01/2015 21:01, Adam Funk wrote:

The Lego NXT 2 "standard" IDE doesn't do what looks to me like
event-driven programming; you have to put in a lot of explicit loops
like "repeat ... until touchSensor1.isPressed()", rather than sticking
an event-handler off to one side of the rest of the code.


The one I bought my daughter was event driven but allowed loops.
Maybe they changed it on the nw one, I can't justify buying one for myself.
  #105   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 465
Default OT - Programming Languages

On 30 Jan 2015 17:01:16 GMT Huge wrote :
I finally got exposed to Windows at the very beginning of NT. I was
appalled. It was obviously a mountain of hacks, side-effects,
inconsistent UI widgets ...


In fairness to MS part of that is down to having to try and maintain
compatibility with all sorts of software and hardware that may go back
a decade or two. I think it's quite a remarkable achievement that
Vista will run 1990 SuperBeam 1 and Windows 8, 1998 SuperBeam 4.0.

Raymond Chen's book 'The Old New Thing' is a wonderful insight into
some of these challenges

http://blogs.msdn.com/b/oldnewthing/.../tags/history/

--
Tony Bryer, Greentram: 'Software to build on',
Melbourne, Australia www.greentram.com



  #106   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 25,191
Default OT - Programming Languages

On 29/01/2015 16:34, Fredxxx wrote:
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


http://www.theregister.co.uk/2014/12..._ as_rubbish/

as a games console with preloaded software...

Are they resurrecting the 2k of RAM as well?


?

or was that a typo for 32K?

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


Indeed, plenty, but sometimes the charm of the old systems comes from
the simplicity of interacting with the hardware.


--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/
  #107   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 25,191
Default OT - Programming Languages

On 29/01/2015 11:52, 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...


Its funny how many languages tend to acquire a range of awkward looking
and non intuitive constructs that crop up all over the place. The only
justification for them often seems to be "because you can". The problem
becomes self replicating because people learn from seeing examples that
contain them and then use them since they are "normal".



--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/
  #108   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 25,191
Default OT - Programming Languages

On 29/01/2015 14:25, Tim Watts wrote:
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


I remember how much I hated learning (K&R style) C back in the '80s for
similar reasons...

Yes its very concise to make an assignment in the body of an "if"
statement, but really, it should be blindingly obvious its just an error
waiting to happen!

(bit like that dodgy perl construct when people rely on the short
circuit boolean evaluation to turn "something || function call" into a
conditional call or exit. Just how difficult is it to type the word "if"
and make it obvious what you are doing....?)


--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/
  #109   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 25,191
Default OT - Programming Languages

On 29/01/2015 14:31, 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 ... )

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


Well the whole inclusion of the variable within what appears to be a
string literal is somewhat less obvious than the basic equivalent of

print "Number "; counter

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




--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/
  #110   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 31/01/15 04:22, John Rumm wrote:
On 29/01/2015 11:52, 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...


Its funny how many languages tend to acquire a range of awkward looking
and non intuitive constructs that crop up all over the place. The only
justification for them often seems to be "because you can". The problem
becomes self replicating because people learn from seeing examples that
contain them and then use them since they are "normal".




With perl, I guess it is handy for in-line commands like:

perl -n -e 'print "Match: $_\n" if m/wibble/' somefile

But I'd never use that shorthand in actual code.

The best thing for perl on a command line is:

perl -p -i -e 's/ReplaceThis/WithThis/g' aFile

in place editing. I never got on with tr,sed etc - I find perl easier.


  #111   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 31/01/15 04:38, John Rumm wrote:

print "Number "; counter


print "Number " . $counter . "\n";



  #112   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Tim Watts wrote:
On 31/01/15 04:38, John Rumm wrote:

print "Number "; counter


print "Number " . $counter . "\n";


Can anyone join in?

echo "Number $counter", PHP_EOL;

(has the advantage of an environment-dependent EOL character)

--
Mike Barnes
Cheshire, England
  #113   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 966
Default OT - Programming Languages

Tim Streater wrote:
In article , Mike Barnes
wrote:

Tim Watts wrote:
On 31/01/15 04:38, John Rumm wrote:

print "Number "; counter

print "Number " . $counter . "\n";


Can anyone join in?

echo "Number $counter", PHP_EOL;

(has the advantage of an environment-dependent EOL character)


echo 'Number ' . $counter ...

Keeping variables out of strings (and using a single-quoted string) is
better as PHP doesn't have to ferret through the string looking for
special characters. Not that it matters in the example above.


Quite. But for ultimate efficiency some would stress the superiority of

echo 'Number ', $counter

so that the concatenation takes place in the print buffer rather than
during expression evaluation.

But I really like the readability of interpolated variables, and I'll
carry on doing it even if it does make the computer work a tiny tiny bit
harder.

BTW I really hate "echo" when "print" would be more meaningful. It's
true that PHP has a print function, but you can't chain expressions as
in the last example above.

--
Mike Barnes
Cheshire, England
  #114   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 1,626
Default OT - Programming Languages

In message , Tony Bryer
writes
On 30 Jan 2015 17:01:16 GMT Huge wrote :
I finally got exposed to Windows at the very beginning of NT. I was
appalled. It was obviously a mountain of hacks, side-effects,
inconsistent UI widgets ...


In fairness to MS part of that is down to having to try and maintain
compatibility with all sorts of software and hardware that may go back
a decade or two. I think it's quite a remarkable achievement that
Vista will run 1990 SuperBeam 1 and Windows 8, 1998 SuperBeam 4.0.

In "fairness" to MS, DOS only survived because of the anti-competitive
tricks that Gates got up to which stifled the alternatives and lumbered
us with his largely pirated ****e forever more. At the time there was a
better application than everything that MS could put out there.
Raymond Chen's book 'The Old New Thing' is a wonderful insight into
some of these challenges

http://blogs.msdn.com/b/oldnewthing/.../tags/history/


--
bert
  #115   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 40,893
Default OT - Programming Languages



"bert" ] wrote in message
...
In message , Tony Bryer
writes
On 30 Jan 2015 17:01:16 GMT Huge wrote :
I finally got exposed to Windows at the very beginning of NT. I was
appalled. It was obviously a mountain of hacks, side-effects,
inconsistent UI widgets ...


In fairness to MS part of that is down to having to try and maintain
compatibility with all sorts of software and hardware that may go back
a decade or two. I think it's quite a remarkable achievement that
Vista will run 1990 SuperBeam 1 and Windows 8, 1998 SuperBeam 4.0.


In "fairness" to MS, DOS only survived because of the anti-competitive
tricks that Gates got up to which stifled the alternatives and lumbered us
with his largely pirated ****e forever more.


It wasn't pirated, he paid for what he bought.

At the time there was a better application than everything that MS could
put out there.


The market didn't agree.

Raymond Chen's book 'The Old New Thing' is a wonderful insight into
some of these challenges

http://blogs.msdn.com/b/oldnewthing/.../tags/history/


--
bert




  #116   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 13
Default OT - Programming Languages

Martin Bonner wrote:
Hum, personally I'm not keen on Python, it relies on correct and non
mixed (tab/space) indentation to run


Just set your editor to insert spaces when you press the tab key. Tab
characters in source files are the spawn of satan.

and when it doesn't it doesn't,
in my experience, tell you that it's upset about the indentation, it
just weird things (cause code is being run in an unexpected order) or
falls over with an error "that can't happen", except when the code is
running in an unexpected order.


I find Python easy to read and write, and (more to the point) my son
found it fairly easy to pick up at 16.

[...]

I also dislike python, although it has its uses (and a wide variety of
special purpose libraries). However, in case you consider it a useful
piece of information, note that the Physics dept at Imperial College
teaches python in first year physics.

#Paul

  #117   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 810
Default OT - Programming Languages

On Mon, 02 Feb 2015 10:21:29 +0000, Tim Streater wrote:

In article ,
wrote:

Martin Bonner wrote:
Hum, personally I'm not keen on Python, it relies on correct and non
mixed (tab/space) indentation to run

Just set your editor to insert spaces when you press the tab key. Tab
characters in source files are the spawn of satan.

and when it doesn't it doesn't,
in my experience, tell you that it's upset about the indentation, it
just weird things (cause code is being run in an unexpected order) or
falls over with an error "that can't happen", except when the code is
running in an unexpected order.

I find Python easy to read and write, and (more to the point) my son
found it fairly easy to pick up at 16.

[...]

I also dislike python, although it has its uses (and a wide variety of
special purpose libraries). However, in case you consider it a useful
piece of information, note that the Physics dept at Imperial College
teaches python in first year physics.


It was FORTRAN in my day. Back then, all the big physics analysis
programs were in FORTRAN. AIUI, that's no longer the case.


Some of the physics guys at work still use it. I wonder what Tim Watts'
experience is?



--
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
  #118   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 02/02/15 15:01, Bob Eager wrote:

Some of the physics guys at work still use it. I wonder what Tim Watts'
experience is?


Fortran 77 when I was at uni doing physics. But many (inc academics)
were dumping it for C.

C++ mostly these days for High Energy Physics for use cases that might
have been previously done in FORTRAN and seems to still be the main
language for "proper programming" as opposed to ad hoc data mining and
analysis.

However, python, Matlab and lots of other languages and tools are used.

  #119   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 5,168
Default OT - Programming Languages

On 02/02/2015 15:01, Bob Eager wrote:
On Mon, 02 Feb 2015 10:21:29 +0000, Tim Streater wrote:

In article ,
wrote:

Martin Bonner wrote:
Hum, personally I'm not keen on Python, it relies on correct and non
mixed (tab/space) indentation to run

Just set your editor to insert spaces when you press the tab key. Tab
characters in source files are the spawn of satan.

and when it doesn't it doesn't,
in my experience, tell you that it's upset about the indentation, it
just weird things (cause code is being run in an unexpected order) or
falls over with an error "that can't happen", except when the code is
running in an unexpected order.

I find Python easy to read and write, and (more to the point) my son
found it fairly easy to pick up at 16.

[...]

I also dislike python, although it has its uses (and a wide variety of
special purpose libraries). However, in case you consider it a useful
piece of information, note that the Physics dept at Imperial College
teaches python in first year physics.


It was FORTRAN in my day. Back then, all the big physics analysis
programs were in FORTRAN. AIUI, that's no longer the case.


Some of the physics guys at work still use it. I wonder what Tim Watts'
experience is?




FORTRAN is Ok, I learnt it while at primary school aged 9.
We had to hand punch cards and send them to IC to run the programs.

I don't like C or C++ even though I have had to use them.

I quite liked pl/m 86 (and RMX 86) when I used them.

ASM86 was OK.

Embedded SQL was so boring as is all database stuff that I worked on.
  #120   Report Post  
Posted to uk.d-i-y
external usenet poster
 
Posts: 2
Default OT - Programming Languages

On Wednesday, January 28, 2015 at 10:20:02 PM UTC, Huge wrote:
On 2015-01-28, 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


Blimey. The first person I've ever "met" who knows what MUMPS is. I was
a MUMPS programmer for several years in the late 70s.


which was archaic even
back then. Has anyone any suggestions for a suitable platform? As ever the
cheaper the better.


Massachusetts Utility Medical Programming System

The London Hospital Whitechapel had a very good pharmacy system written in Mumps back in the late 70's to mid 80's. They also had a blunderbus Univac 418-II with 96 VDU terminals around the hospital and that was all written in RTOS assembler, using punched cards !!.

AFAIK MUMPS allowed a file to be regarded as an enormous table of records, with no need for the programmer to be concerned about disk handling. The Redifon Keycheck and Seecheck systems of a similar era had vaguely similar features.

I'd go for Python. Starting here;

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


--
Today is Pungenday, the 28th day of Chaos in the YOLD 3181
I don't have an attitude problem. If you have a problem with my attitude,
that's your problem.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Languages, and dialects Stormin Mormon[_7_] Metalworking 3 February 22nd 12 01:01 PM
NC Programming Rich Grise[_3_] Metalworking 5 February 14th 11 07:14 PM
TUTORIALS ON PROGRAMMING LANGUAGES Santhosh1992 Woodworking 0 March 26th 08 06:49 AM
Machinery's Handbook in other languages The Hurdy Gurdy Man Metalworking 1 September 25th 07 11:29 PM
So who knows about PIC Programming loedown Electronics 3 October 3rd 04 03:52 PM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"