Regardless I really don't see the complaint here.
To complain that an OS which has officially reached its End of Life isn't support by a language and furthermore the open source community driving it, is quite ridiculous to say the least.
Linux does not stand a chance, especially not since the Lennart started to get his code in distributions.
But but but... Linux, and especially systemd, is free. Therefore, by your argument, systemd must be better.
You troll!
No, Price / Quality relationship is a quite non-linear equation. That is about as much as we can say.
Anyway, I just took a peek at some Python code (desperately trying to get back to topic.), this time for Home Assistant to check the ARP table in a router. My observations:
- Yes, the code is readable, but that is because all things that do something are strings for the interactive HMI (Human-Machine-Interface, the command line used to configure and troubleshoot the router) sent via a SSH connection emulation library. Basically a screen-scraper, the most fragile way of interprocess communication short of rumours.
- The approach chosen when fetching information is very simply put "monkey see, monkey do"; the code emulates what I'd do to go look manually. It is a cute but immature first step.
- The approach to adaptation to the network setup further is a very QnD one, no provision is made for anything beyond the most simple out-of-the-box, click-next-next-next-OK-reboot setup of a network. This is no fault of Python, it is the usual case of assumptions made to give impressions of Magic. Most common in IOT and media servers, but not unheard of in other auto-configuring software systems.
- The proper way to get the ARP table out of a network element when machine is talking to machine is either the classic SNMP or the more modern NetConf/YANG model.
- There are Python libs for this too, but they're not used. Probably too much understanding of problem required.
Fast and wrong, Internet of Shit style. Not impressed.
Simply because it is easy to write does not mean it is easy to get right.
I'm not really sure why you think this has anything to do with Python. Taking the 'wrong' high-level approach to the problem is a language-agnostic issue, and if anyone is to 'blame' for it, it's the software developer not the language developer.
Specifically though, Home Assistant as far as I know doesn't provide anything native to 'check the ARP table in a router', and I'm not quite sure what the use case for this would be in that application in the first place. So you're talking about some random dude's third-party addon to a piece of software that happens to be written in Python but is not associated with the Python team. It's also in the name - Home Assistant is for use in homes, and most home networking equipment doesn't implement SNMP, let alone netconf. Finally, HA does in fact include an SNMP poller in core.
I don't think this is a fair assessment.
the language du jour attracts morons.
OTOH, Python shows up a bit more often than others in those situations. I think we need to test this observation against time; for it is always so that the language du jour attracts morons.
On a side note; if there's a SNMP poller in HA, why oh why did they not use it?
the language du jour attracts morons.True, because most human beings are morons in the first place. (In the olden days 'moron' had a specific meaning, which only applied to about 2% of the population. I define the term as "unable, unwilling, or reluctant to apply logical or rational thinking in ordinary everyday situations, and relying on repetition, habit, instincts, or emotions instead".)
Which leads to a genuine question: should we even consider the moron-written code when comparing practical uses of programming languages?
On a side note; if there's a SNMP poller in HA, why oh why did they not use it?Presumably the target device did not implement SNMP or they wanted to use an alternative method for some reason (more functionality? a device-specific alternative to the universal SNMP?). Assuming you want to do presence detection, it's built-in, just point it at the ARP OID: https://www.home-assistant.io/integrations/snmp/#precense-detection . I do find with HA that finding the best integration for a given task is not always trivial...
the language du jour attracts morons.True, because most human beings are morons in the first place. (In the olden days 'moron' had a specific meaning, which only applied to about 2% of the population. I define the term as "unable, unwilling, or reluctant to apply logical or rational thinking in ordinary everyday situations, and relying on repetition, habit, instincts, or emotions instead".)
Which leads to a genuine question: should we even consider the moron-written code when comparing practical uses of programming languages?I don't think so. I've seen poor programming in every language I have come across.
I wonder if a programming language based upon repetition, habit, instincts and emotions can be devised so to enable morons to do fruitful work.
the language du jour attracts morons.True, because most human beings are morons in the first place. (In the olden days 'moron' had a specific meaning, which only applied to about 2% of the population. I define the term as "unable, unwilling, or reluctant to apply logical or rational thinking in ordinary everyday situations, and relying on repetition, habit, instincts, or emotions instead".)
Which leads to a genuine question: should we even consider the moron-written code when comparing practical uses of programming languages?I don't think so. I've seen poor programming in every language I have come across.
Consider, for example, human traffic behaviour. While it is very difficult to predict what a single driver might do at any point in time, we can model traffic (be it automobiles, or even pedestrians) very accurately, with high predictive power, with rather simple models. This means that rather than hiring morons as traffic directors, we are better off using sensible algorithms in traffic lights instead.
Consider, for example, human traffic behaviour. While it is very difficult to predict what a single driver might do at any point in time, we can model traffic (be it automobiles, or even pedestrians) very accurately, with high predictive power, with rather simple models. This means that rather than hiring morons as traffic directors, we are better off using sensible algorithms in traffic lights instead.
I my experience, instead, they hire morons to write cretinous algorithms..
from what I have been experiencing is that Python library / component developers are not making their software backwards compatible with 'older' OS versions. They assume you always upgrade to the latest & greatest which just isn't going to work in an engineering environment. Updating a system with a bunch of software packages installed can easily take a full-time week of work for preparation & execution and still runs the risk of breaking functionality.
While it is very difficult to predict what a single driver might do at any point in time, we can model traffic (be it automobiles, or even pedestrians) very accurately, with high predictive power, with rather simple models.
QuoteWhile it is very difficult to predict what a single driver might do at any point in time, we can model traffic (be it automobiles, or even pedestrians) very accurately, with high predictive power, with rather simple models.Kind of. There have been instances where traffic flow has improved when lights at a junction are out of commission, and one place in London (I think) improved 'traffic calming' measures by removing all lights and road markings. It would be interesting to know if those situations were modelled or if no-one thought they might achieve anything so were never examined. If they were modelled then either someone has an axe to grind or the models were crap
This is why I wrote can be modelled, and not are modelled.
Then, you also see things like multi-lane junctions converted to roundabouts. (Love or hate modern roundabouts, they are proven to increase traffic flow in the same footprint
Then, you also see things like multi-lane junctions converted to roundabouts. (Love or hate modern roundabouts, they are proven to increase traffic flow in the same footprint
Love roundabouts. They are everywhere here in New Zealand, from ones barely bigger than a dinner plate in suburbs (SO MUCH better than #$%^ 4-way stop signs) to one big enough to put an international-quality cricket ground in the middle of it.
Roundabouts give very low latency when traffic is light, but scale to pretty high traffic levels too.
The French are very creative; you can find a fair amount of roundabouts that are shaped like the Audi logo in France.
The biggest problem I have with roundabouts is that a fair share of drivers has what I call 'roundabout anxiety' and those drivers severly hamper traffic flow.
Then, you also see things like multi-lane junctions converted to roundabouts. (Love or hate modern roundabouts, they are proven to increase traffic flow in the same footprint
Love roundabouts. They are everywhere here in New Zealand, from ones barely bigger than a dinner plate in suburbs (SO MUCH better than #$%^ 4-way stop signs) to one big enough to put an international-quality cricket ground in the middle of it.
Roundabouts give very low latency when traffic is light, but scale to pretty high traffic levels too.The biggest problem I have with roundabouts is that a fair share of drivers has what I call 'roundabout anxiety' and those drivers severly hamper traffic flow.