* Posts by Richard Plinston

2189 posts • joined 27 Apr 2009

Q. What's today's top language? A. Python... no, wait, Java... no, C

Richard Plinston
Silver badge

>> The code could then surely APPEAR to mean one thing, but in fact means something completely different.

> With C, the rule is that if the conditional has no braces, then the first line after the condition is in the block and nothing else.

Exactly. That is why my example in C was illustrating that "the code could then surely APPEAR to mean one thing [according to the indent], but in fact means something completely different."

0
0
Richard Plinston
Silver badge

> Trying to post some Python code somewhere that does not allow indenting ...

That is not the fault of the language, but of the site. This site recognises <code> and <pre> tags but fails to implement them in a useful way.

> What happens if somehow you end up with source that contains spaces and tabs?

You fire the programmer and/or get better tools and/or use how to configure them.

> The code could then surely APPEAR to mean one thing, but in fact means something completely different.

Like in C:

total=0;

j=0;

for (int i=0; i<10; i++)

....total+=i;

....j++;

0
3
Richard Plinston
Silver badge

Re: anything but python

> c and Perl have always made the most sense to me.

Python 3 does have differences from Python 2, but Perl has been through several rewrites, each of which were incompatible which previous version source code. If Perl makes "most sense" then you obviously never used Perl4 and haven't looked at Perl6 because these are quite different languages.

https://docs.perl6.org/language/5to6-nutshell

0
1
Richard Plinston
Silver badge

Re: anything but python

> Yes, but by & large they have backward compatibility.

Yes, but it is only "by and large". When moving from one version of C++ or Java to the next there will always be some issues which need resolving, except in trivial code.

Python3 is a new version of the language designed to be a significant improvement. Python2 is still developed and supported and has 'futures' and other tools to ease the transition to the new language. This has been done by numerous languages: extreme examples are: Pascal to Modula2; VisualBasic - numerous times;

Python3 vs. Python2 should be compared to Kotlin vs. Java. Kotlin is designed to make Java into a modern language and drop 22 years of baggage that it still carries. C++ has 36 years of baggage.

> "You can write K&R C in any language" (including C++ last time I checked)

Actually you can't. K&R C (edition 1) was replaced by ANSI C and few modern C/C++ compilers support the original K&R (though gcc may still do so). And that is hardly "any language".

And I don't know that anyone said that; what they did say was "You can write FORTRAN programs in any language", which is quite a different thing.

0
1
Richard Plinston
Silver badge

Re: Note that there were "popular" shitty languages in the past

> "I can write that in Python" when it SHOULD be done as a C utility, at least for efficiency.

Not all C programs are efficient. I wrote a text merge program in C. It was quite slow due to the str..() library, in particular strcat() having to scan along the strings to get the length. A rewrite in Python was 10 times faster.

0
1
Richard Plinston
Silver badge

Re: anything but python

> Plus there's no such thing as Python. There's Python 2, and then there's Python 3.

What's your point? There is Java [1], Java 2, Java 3, ..., Java 8; C++ 3, C++ 11, C++ 14, C++ 17.

0
1
Richard Plinston
Silver badge

> Any language where whitespace dictates what is inside a conditional and what isn't (eg Python) needs to die a slow and painful death IMHO.

No one cares if you don't use Python (unless your managers do). If you are forced to use it, then get better tools and learn how to use it better.

In what way is 'what is inside a conditional' not determined by the colon that terminates it. Perhaps you are thinking of some other language.

1
2
Richard Plinston
Silver badge

Re: anything but python

> But when you have to be ridiculously careful about making sure that things end up at the correct indent level it becomes a nightmare problem.

I don't have problems with that, but then I have chosen tools, and configurations of those, that would seem to be more appropriate than the ones that you are using.

> If you have ever had to debug a problem where a thread dies due to a syntax error in a little used code path, you will totally get my annoyance.

Syntax errors are discovered during the load/compile phase so you are probably referring to something different. There is usually an exception trace produced unless you deliberately ignore exceptions.

3
1
Richard Plinston
Silver badge

Re: anything but python

> I can only thank god that no-one has written a python ASP thing like PHP

http://www.4guysfromrolla.com/webtech/082201-1.shtml

0
1
Richard Plinston
Silver badge

Re: The way Basic worked in the old days

> In Basic - there is no labels.

BASIC is not _a_ language, it is a large group of approximately similar, or not so similar, languages. Some do allow labels, even named subroutines.

> Now, if you delete comments at line 20 and 30:

No, no, no, not for any variation of 'BASIC' that I am aware of. For the BASICs that only use line numbers there is _NO_ automatic line renumbering, that would be a complete fail. Deleting lines 20 and 30 would leave lines 40 and beyond with their original line numbers. The whole point of numbering by 10s is so that lines can be inserted, such as 51, 52, etc.

The problem described would arise if the original line 10 had GOTO 30 (which would work correctly) and then lines 20 and 30 were deleted because they were 'merely comments'.

8
0
Richard Plinston
Silver badge

Re: "You can spot a Java programmer even when they write in any other language."

> I'm one of the few people I know who can make JavaScript look like Perl.

In my experience, most people can make PERL look like chicken scratchings.

2
0
Richard Plinston
Silver badge

Re: Learn all of them, but NOT Java

> I understood it to mean that the code calculated a variable line number to GOTO ...

I suspect that it was much simpler. There were GOTOs to numbered lines that were comments. This would then drop down to the next executable line. When the commented lines were deleted there was then no target for the GOTO.

3
0
Richard Plinston
Silver badge

Re: I suspect there are quite a few Java devs out there

> Python's "why is 5 + 1 sometimes 6 or 51"

You are confused, that is a 'feature' of Javascript not Python.

2
0

SQL Server 2017's first rc lands and – yes! – it runs on Linux

Richard Plinston
Silver badge

Re: cut the crap, Linux is UNIX? @Richard

> They also got the job and mode of the money for selling licenses.

My understanding, based on following Groklaw and reading the APA, was that SCO would collect the annual licence fees, pass them to Novell and Novell would then return a 5% collection fee. Novell never received any of this, SCO kept it all. The court case ruled that Novell was entitled to these royalties.

https://en.wikipedia.org/wiki/SCO_Group,_Inc._v._Novell,_Inc.#Novell.27s_motion_for_summary_judgement

0
0
Richard Plinston
Silver badge

Re: Well they want to stay relevant

> It was not til the 486 that Intel had a proper MMU that could run a proper OS. At that time, there was no other established OS that could have been (a) ported to the 486, and (b) was widely used in Industry.

You may have a particular definition of 'proper OS', but I was running multiuser/multitasking MP/M on 8085 and Z80s with bank switching quite effectively in the very late 70s. Later I switched to DRI's Concurrent on 8088/8086 with EEMS (eg AST RAMPage) and derivatives, such as DR-Multiuser-DOS (386/486). These and DRI's other range FlexOS were quite widely used in industry.

0
0
Richard Plinston
Silver badge

Re: Well they want to stay relevant

> Two things happened at once: (a) there were fantastically cheap machines on the market which could do some of what the bigger ones could, and (b) the price drop meant there was a market 1,000 times bigger within a year.

What you have claimed to be 'at once' and 'within a year' were actually over a couple of decades.

Micro computers started to be available from the mid 70s. The initial IBM PC was just another micro that cost more than your car and was very limited compared to others already in the market (no hard drive, no networking, poor performance). It was only in the mid 80s that clones started making the pricing much cheaper and the market expanded.

> DEC could and should have aggressively sought to compete, rather than saying "This stuff is a pile of shite" and expecting the users to know the difference.

You obviously weren't around in the early 80s when DEC were selling their Rainbow PC systems.

0
0
Richard Plinston
Silver badge

Re: cut the crap, Linux is UNIX? @Flocke Kroes

> the SCO Group (which I will shorten to SCO, even though this is a bit of a misnomer)

The usual TLA is TSG.

> If anybody actually has any real idea about who owns the core Unix IP

It is unlikely that there are any protectable copyrights in Unix source code. The Novell-TSG case concluded that no IP had transferred from Novell to SCO. While they did phrase it as 'Novell owns the IP' there are many barriers to this actually being true: early Unix versions were not registered when it was a requirement; some versions were put into public domain; agreements between Unix Labs and the Regents of Berkley; many third party contributions that did not assign their copyrights.

For these reasons, and others, Novell did not attempt to collect together copyrights in order to sell them to SCO and instead simply stated in the Bill of Sale that they didn't get them.

0
0

This is why old Windows Phones won't run PC apps

Richard Plinston
Silver badge

Re: It would appear...

> Therefore, saying you support the "Win32" API doesn't imply that you don't support 64 bit applications.

The Qualcomm x86 support only supports 32bit x86 emulation and does not support AMDx86-64.

0
0

Distro watch for Ubuntu lovers: What's ahead in Linux land

Richard Plinston
Silver badge

Re: Now if just 1 major PC maker installed Linux by default...

> They can still sell retail licenses. Trouble is, the Microsoft tax becomes less transparent this way.

The OEM could still _buy_ licenses at retail prices.

FTFY

Trouble is, they would have to sell machines at $100 - $150 more than their competitors can, or make equivalent losses.

0
0

Hey, remember that monkey selfie copyright drama a few years ago? Get this – It's just hit the US appeals courts

Richard Plinston
Silver badge

> Sounds like they want to make money.

No, it is unlikely that they would, and certainly not enough to pay the lawyers.

What they want is to establish animal rights, such as the ability for an animal to own property.

0
0
Richard Plinston
Silver badge

Re: ownership

> then *clearly* the image should belong to the photographer. Anything else is just bonkers.

Copyright may belong to the 'photographer', or the employer, or the client, or to others depending on contracts, employment laws, or several other things, none of which are 'bonkers'.

0
0
Richard Plinston
Silver badge

Re: if cost == 0 then panic

> So in my considered opinion... the original photograph had no attributable copyright,

> and the work derived therefrom, having not had any significant work put into it in order to create it, would not have any copyright of its own and ipso facto the photograph is the intellectual property of no-one.

Your opinion, no matter how long you have considered it, is wrong.

First of all, the original photograph does have an automatic copyright no matter how much work was required to make the final image publishable. Secondly, this is irrelevant because it is unpublished and unavailable and the case is about the final work.

3
1
Richard Plinston
Silver badge

Re: if cost == 0 then panic

> Copyright is held by whomever made the arrangements (e.g. programmed, fed data) that gave rise to the images.

Or, more likely, their employer.

0
0
Richard Plinston
Silver badge

Re: if cost == 0 then panic

> That has already been covered lots of times, it is the photographer that setup the shot.

Or the photographer's employer. Do you think that several cameramen own the copyrights to movies?

1
0
Richard Plinston
Silver badge

Re: if cost == 0 then panic

> Imagine if the Patent Office got the same number of autopatents as ...

They'd be insane rich from the application fees and would do their usual autoapprove so that they kept the fees and the annual renewals. Any challenges would require fees to be paid for that. Business as usual then.

> Youtube get DMCA takedown requests

Now, if a fee was required to be paid for a takedown request ...

0
0
Richard Plinston
Silver badge

Re: Devil's Advocate

> No they don't, they exist to try to avoid the exploitation and/or abuse of people. Exploitation and abuse of animals is a separate issue.

In the past there were many peoples who were considered by europeans and americans to be animals and thus exploitation and abuse of them was a 'god given' right for white men. Which is why slavery existed.

2
0
Richard Plinston
Silver badge

Re: Devil's Advocate

> It isn't enough to simply be the owner of the camera,

The article asserts:

"According to US copyright law, the person who took the picture is the copyright owner –"

That is not true either. There are many situations where neither the owner of the camera, nor the person who took the picture, would own the copyright. For example one may hire a camera and employ a cameraman and still wind up owning the copyright, as is often done when making movies.

Usually, the employee will have a specific clause in the contract, but even without this it is 'work for hire' and the employer will own the copyright. As a general rule it is the owner of the film, or original storage media, that will own the copyright. This is true even in cases where an unpaid agent is used, such as in this case.

1
0

Ubuntu 'weaponised' to cure NHS of its addiction to Microsoft Windows

Richard Plinston
Silver badge

Re: Cost is the smaller concern

> What? PCs already come with a Windows license.

In a retail shop the PCs already have Windows installed and the cost included as part of the price. In enterprises an annual licence fee is paid for every machine regardless of whether they 'already come with a licence'. And then there is Office licences, CLIs and such.

18
1

Your roadmap to the Google vs Oracle Java wars

Richard Plinston
Silver badge

Re: To be perfectly CLEAR

> Google stole existing code for their implementation without granted permission or paying for it. All this lawyer double speak is bullshit .

Wrong. No _code_ was 'stolen', or even taken. A handful of code lines written by the same person that wrote them for Sun were found to be the same.

What is the same between Sun/Oracle Java and Dalvik is class names and method names and parameters. This is not 'code' it is interface API and is required to be the same for compatibility. It is a tiny fraction of the source code and is 'fair use' as well as arguably being unprotectable.

Permission was granted by Sun.

It is like one book author suing another because they used the same headings: 'Introduction', 'Contents', 'Preface', 'Chapter1', 'Chapter 2', ..., 'Appendix', ...

0
0

F-Secure's Mikko Hypponen on IoT: If it uses electricity, it will go online

Richard Plinston
Silver badge

Re: I'm not paying extra for that crap

> Unless they're the MOST reliable parts in the machine.

It doesn't matter that they are the most reliable. Every part has a failure rate. Having more parts brings in an extra point of failure. Thus, overall, the whole device is less reliable, no matter how slight. In particular, if it is transmitting and receiving then there may be many external reasons that it fails to do so (cf 'hold it wrong'). If this give rise to consumer complaints, or warranty claims, or adverse publicity then it costs the manufacturer via lost sales and extra costs.

> a "set-and-forget" setup that means you can't expect someone to come along to fix it if it goes wrong.

If it is only sending data then I don't care if it goes wrong, in fact I will make sure that it does go wrong. If 'going wrong' means that the machine stops working then I will have my money back, through the small claims court if necessary.

0
0
Richard Plinston
Silver badge

Re: I'm not paying extra for that crap

> Even if it melts down? What will you do then?

First you will have to explain how it will come about that _every_ maker will only make devices that have IoT and won't work without it. Then you will have to explain why some new startup won't come up with the idea of making a cheap low-tech device that does the same job.

Just because [most] mobile phones are now general purpose computers that send data home, this hasn't stopped cheap 'dumb phones' being made and sold.

0
0
Richard Plinston
Silver badge

Re: The vendors will drive IoT

> I can think of lots of reasons why this will happen. And that's just toasters.

Anyone can dream up simplistic and useless 'ideas', but that doesn't mean that there is a business case for implementing them.

> optimise energy usage

There are machines, such as washing machines, that delay operation until the electricity prices drop overnight. When I put bread in the toaster I want toast now, not at 3am. In any case there are machines with buttons for 2 slices or 4, settings for different brownness, what could it do to 'optimise' more than that?

0
0
Richard Plinston
Silver badge

Re: IoT vs Users

> They can buffer the data and send later. When the buffer is full, then the machine could stop working, or make you call an engineer to check why the vendor isn't getting "their" data.

They would take it back to the shop and demand replacement or their money back under the warranty.

0
0
Richard Plinston
Silver badge

Re: The vendors will drive IoT

> Consider a toaster with IoT connection. Now add an RFID reader and assume that bread vendors add RFIDs to each loaf.

Why would bread vendors add RFID? They may be cheap but they are a huge cost compared to a printed barcode on the packaging. In fact not all bread is in packaging at all.

> I know exactly how cheap to build my toaster so that it lasts just longer than the proscribed "warranty" period,

If devices failed so soon after the warranty expired then the consumer would buy a different brand next time.

> ie the length of time that most consumers keep their toasters for before replacing them,

You are suggesting that consumers replace devices merely because the warranty expired, or coincidentally on the same period. I very much doubt that is the case and is merely speculation on your part.

0
0
Richard Plinston
Silver badge

Re: I'm not paying extra for that crap

> No, they'll say the warranty is null and void because of user tampering

There will always be a number of devices that fail without 'user tampering'. The more parts it has, the more functions, the more failures will occur and the warranty must cover that. The more warranty claims the more cost.

> And since the government will be in on it, they'll be on the manufacturers' side.

The government of my country isn't "in on it" in any way. If the government of your country is then you probably deserve your fate. If that is the USA then I will only be sympathetic if you voted against the orange buffoon.

1
0
Richard Plinston
Silver badge

> The automotive market appears to disagree with your optimism.

I am not sure what you are thinking of. I can buy new cars that do not have 'connectivity', do not 'call home', do not have GPS even. I don't know of any car that limits what petrol it can use, nor where it is allowed to go.

John Deere did produce tractors which could only be serviced by their agents, but there is a lot of push back on that, through the courts even.

0
0
Richard Plinston
Silver badge

Re: IoT vs Users

> if they get the money back by monetizing their data for use as potential shopping habits

Complete nonsense. It may be possible to collect such data if there is a built in 'shopping list' that is used by the household, but a toaster can't tell what it is used for without having barcodes on the slices of bread. It can't tell what is spread on the toast. The fridges don't know what is inside it, or, more importantly, what is not inside it but should be - not unless the user enters that voluntarily on, say, a shopping list.

I am sure that some companies would like to build a toaster that is selective about what brands of bread it can toast (cf printers) and then charge the bread companies to be put on the list, but how do you identify the brand of bread ?

What about washing machines that are selective about what brand of clothes they wash? Ovens that will only cook food bought from specific supermarkets? I am sure that you and other conspirisists (is that a word?) will dream up much other stuff, but only fools would buy them.

2
0
Richard Plinston
Silver badge

Re: IoT vs Users

> As a comic book journalist once touted, "Paranoids are just people with all the facts."

I am not sure that 'comic book' counts as 'journalism'. But then conspiracy theorists will believe anything.

> Just because you're paranoid doesn't mean the world really IS out to get you.

Settle down, take a breath, and reread your messages. The actual quote is approximately:

"Just because you're paranoid doesn't mean the world really ISN'T out to get you."

It comes from Catch 22 by J Heller.

1
0
Richard Plinston
Silver badge

Re: I'm not paying extra for that crap

> It won't be cheaper because the cost to add the tat will be practically nil.

Just calm down, the ranting is obviously giving you a red mist you are starting to actually make sense: No, you are right, "it won't be cheaper". It will be more expensive because any added component will give rise to more warranty claims. If blocking the communication bricks the device then there will be class actions. The data collection will cost money which the buyer will have to pay for.

1
1
Richard Plinston
Silver badge

Re: I'm not paying extra for that crap

> I'll buy the cheaper, non-IoT equipment, thanks.

I won't even have to do that. My toaster is around 2 decades old and is not on the 'replace' list. If only IoT ones are available in the shops for some stupid reason then it will never be replaced.

0
0
Richard Plinston
Silver badge

> And if ALL the manufacturers are doing it, ...

... then some business will start making stuff without it specifically for the market segment that wants low-tech.

2
2
Richard Plinston
Silver badge

Re: "We can't avoid the IoT revolution by refusing to play part."

> So what happens when the inevitable happens and you need a new fridge and ALL of them are IoT-FORCED that brick if you disable or cage them?

I'll buy a different brand.

2
1
Richard Plinston
Silver badge

Re: "We can't avoid the IoT revolution by refusing to play part."

> with plenty of network technologies covered by patents (and they're genuine hardware-based patents),

Patents are intended to _stop_ other companies from competing. If one company holds a patent then no other company can use that mechanism without buying a licence and paying a royalty. You cannot force a company to use a patented mechanism.

> good luck trying to roll your own network chips from scratch to get around them.

If there is a market for devices that do not use those patented mechanisms then someone will build them, or import them from India.

2
0

Software dev bombshell: Programmers who use spaces earn MORE than those who use tabs

Richard Plinston
Silver badge

Re: A question @John Brown

> If you are old enough to remember card punches, you may remember that you could have a format card

Most of the card punches that I used didn't have a format card, nor a keyboard, and didn't even plug in*. The punch room staff were most upset if we used their machines. The ones that I could use were portable 'hand punches'. They had a block of 12 keys plus space and tab which were pressed in various combinations to get the required characters, and stepped the card along a track. There was a square bar on the rear where tags could set the physical tab stops. I could probably still keep up a reasonable speed for alpha-numeric, special characters would slow me down.

I also still have an ICL interpreting hand punch. This had a drum that was turned to the required character then pressing a bar would punch the card and also print the character using a tiny ink ribbon. This too had mechanical tab stops.

* actually some of the IBM hand punches were powered, they had relays that assisted the key presses.

0
0
Richard Plinston
Silver badge

Re: Left handed touch-typist

> why they think that the tab is <just wrong and stupid>.

Please qualify whether you are referring to the 'tab key' or the 'tab character', or is it the general concept of 'tabulating'.

0
0
Richard Plinston
Silver badge

> coding is boring enough without having to press a button 6 times over 1

If you believe that is ever necessary then get better tools or learn how to configure the ones that you have.

0
0
Richard Plinston
Silver badge

Re: Code-aware editor and diffs would be nice

> I do use 'diff -w'

I find that diffuse can be useful for identifying important changes while catering for ignoring irrelevant.

0
0
Richard Plinston
Silver badge

Re: My code won't run but the spaces are great

> you claim in this thread to have developed it along with wordstar.

To any competent reader it would be obvious that "(CP/M, Wordstar and others)" was an attribute or qualifier of "machines". In English, and other languages, placement within the sentence is significant.

0
0
Richard Plinston
Silver badge

Re: My code won't run but the spaces are great

> I never said that Space was rubbish meerly that redundant spaces are

The spaces that I use perform a particular function that I find superior to alternatives and are thus not 'redundant'. If you wish to operate in what I consider an inferior way then do that.

> "what about transmittion costs for capped data services"

There are tools that do compression and/or encoding for me when required. I don't try and second guess it.

> using blockreads to justify your added bloat when compression would for any large set would destroy your arguement is living in the past and not in a good way.

It was an argument that there may be other considerations to take into account rather than just following some dogma that you adopted on a BBC some decades ago, as you related. I constantly re-evaluate what gives me the best results. With databases I let them decide how to optimise.

> clearly you disagree with my opinion that creating bloat is a bad thing even though you also said the opposite.

It is called flexibility instead of having a fixed mindset that one solution fits all needs. The different 'solutions' were applied for different reasons with different tools.

> I am getting used to your duality of thinking, clearly you missed your vocation in the religion of your choice.

Religion is identified by having a particular unchanging dogma irrespective of any evidence, that seems to be you. 'Duality' is actually flexibility based on different or changing needs. You also are evangelising, another characteristics of a religion.

> I presume that this is you saying that you are aware that you are adding bloat but "it is the way things are done" so it is okay not to bother seeking improvement via innovation or thought.

It seems that it is you who have admitted to not seeking improvement since the 80s. You decided then that 'removing bloat' should be the top priority and it seems you haven't bothered to re-evaluate since. OTOH I have already given examples where 'bloat' gave an advantage and better tools avoided your objections.

0
0

US voter info stored on wide-open cloud box, thanks to bungling Republican contractor

Richard Plinston
Silver badge

Re: Data mining?

> match the names and DOBs to try to locate people registered in more than one state.

Apparently, there are 3 million registered in more than one state mainly because people move and even if they tell the old state they have gone the cleanup of the rolls is not done. This was the basis that Trump claimed, without any evidence at all, that all 3million voted democrat twice.

Among that 3 million were Tiffany Trump and Steve Bannon.

0
0

Forums

Biting the hand that feeds IT © 1998–2017