|
I second this.
Python scripts are easy enough to write and quick enough to execute that we can iteratively automate stuff that would not otherwise be automated. Because Python libraries are available to do almost everything, we now have a series of Python-based solutions where previously we had C, C++, Java and even Pascal.
|
|
|
|
|
Python is popular because
- it is user-friendly: tab vs. space is matter of life and death, case sensitive, uses == as 'equal'
- it is finance-friendly: no fixed-point datatype
|
|
|
|
|
"finance-friendly" - thought for sure you were going to say "free."
honestly though, when I saw that tab/space meant different things, I just moved on. Kiddie language, but that's just me.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Funny enough, I find myself asking this EXACT same question this morning.
I checked in on a start-up project I'm part of, and noted an eMail from the "Cellular Modem" developer we have working out the AT commands required to talk to MS-Azure.
Over the course of the past 3 weeks, I personally have built and put in place a modem framework in our IoT application code base. I have provided EVERYTHING needed from turning certificates into byte arrays, and providing methods to load, unload them, I have provided a comprehensive framework that allows AT strings to be sent to and the answers received back from the modem easily.
I have EVEN compiled that code into a PC/X86 library and with the aid of a console mode program running under visual studio, it can be used to send and receive AT commands, work with certificates and everything else needed, using exactly the same API on a PC, with the modem connected via a USB to serial cable.
The "Modem Developer" has spent all day last Friday, making his OWN serial cable for the modem board, writing a Python library to drive that serial cable using his own Python based "development tools", and he has made a new python test suite that allows him to send string to the modem, get the answers back, and hit a button to make the python code generate new C code that interfaces with my API.
When asked why...
"Beacuse I find it easier", came his answer...
:-S
So it was easier for him to build an entirely new Python layer on top of the work I'd already done, instead of just typing in AT strings into a console mode app in V-Studio and hitting Ctrl+Alt+B to compile it, then F5 to run it???
I really, really, really just don't get it either.
If I was starting from scratch on a PC, and doing this testing then yes, maybe... but I'd still use the standard serial access libs, and an already provided USB to Serial cable (Which we provided to him in the box with the modem board), I wouldn't take an FT232H write my own user mode WinUSB driver for it, invent my own protocol, wire it up to a MAX232 so I could connect to a normal RS232 9PIN connector, then write my own framework around it, then write a code generator to generate C code on top of that!! That's just plain madness.
So yes, sigh.... I find myself asking the same question.
|
|
|
|
|
this is not a python problem. Where's the boss?
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
on holiday apparently.
(I've just been told in the last couple of hours)
|
|
|
|
|
I have realized that if Russia wanted to invade Europe, it would be in August.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
YEP!!!!
I'm also working on a project that includes a large number of French folks, and damn I've been sat twiddling my thumbs for most of the last 2 weeks, and probably the next 4 too.
😂😂😂😂😂😂
|
|
|
|
|
Story from long ago, I worked in a division in the US that was owned by Belgians. One Wednesday, there was a problem discovered and we worked 10 hour days and through the weekend, because it was described as a "high visibility emergency." We fixed the problem and called them on Monday. Turns out there was only one person there (to answer phones). The tech staff had all left for their August holiday, even the guy screaming the week before.
Hmm, guess who never got special service or sympathy from that point on?
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Python is a very simple language compared to C#, C++, Java, etc. Last I checked, C# had over 30 Generics. Really, you only need the three that Python has: Dictionary, List, Queue and the C# ones are specialized variation on those. There is a lot of that, maybe called language bloat. I like C#, but could live with Python easily enough.
|
|
|
|
|
C# also has [Hash]Sets, which are very useful. But you're right that a lot of the collection classes in the Net Framework are simply specialized (and hopefully optimized) variants of Dictionary, List, Queue, and Set.
|
|
|
|
|
|
So good protestants will stop using Python?
We face another iteration of the Holy Wars.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I use Python because it has a HUGE library of math, data plotting and other functions. Many of these libraries are in C/C++ or Fortran, so run fast, and have a long legacy or are actively maintained, so are reliable. I also use Python for machine learning where most of the work is data or method exploration and the immediate running of code cells (in Jupyter, for instance) allows fast iteration of the code.
On the other hand, I wouldn't use Python for a time-critical real-time system, although I have used it to interface with Arduino's and data acquisition boards. However, Python is not that much slower than compiled languages unless the run-time is very long. Even then, if the code is solving big matrices then most of the time is in Fortran anyway.
From my understanding, the reduction in speed in Python is mainly to do with it not being a typed language: the interpreter has to figure out the data type on the fly. I'm not sure why this has to be since best coding practice is to use type-hints, which can be statically checked, but are ignored by the interpreter. I don't see why type-hints, if present, can't be used by the interpreter to enforce typing.
As to the comments about using white-space for formatting, I was already indenting to make the code readable so ; and {} are redundant to me and now seem like clutter whenever I work in C/C++/Java/PHP.
|
|
|
|
|
Wordle 1,141 4/6*
🟨⬜⬜🟨🟩
🟩⬜🟩⬜🟩
🟩🟨🟩⬜🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 1,141 3/6
⬛🟨🟩⬛⬛
🟩⬛🟩⬛🟩
🟩🟩🟩🟩🟩
Jeremy Falcon
|
|
|
|
|
🟨⬜🟩⬜🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,141 4/6
🟨⬛⬛⬛🟩
⬛⬛🟩🟨🟩
🟩⬛🟩🟨🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,141 4/6*
🟨⬛⬛⬛🟩
🟩⬛🟩⬛🟩
🟩⬛🟩🟨🟩
🟩🟩🟩🟩🟩
I put it on the right thread this time!
|
|
|
|
|
Wordle 1,141 4/6
⬜⬜⬜⬜⬜
🟩⬜⬜⬜🟩
🟩🟨🟩⬜🟩
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 1,140 5/6*
🟨⬛⬛⬛🟩
⬛⬛🟩⬛🟩
⬛🟩🟩⬛🟩
🟩🟩🟩⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Pssst.... 1,140 is on the second page.
Jeremy Falcon
|
|
|
|
|
It was after midnight so I assumed it was today's. For some reason, if I leave the "add to your x day streak" page open, it will still give me yesterday's. 🤷♂️
|
|
|
|
|
Being an ignorant abut u-tube and other post styles...
Is is OK to ask and not getting flamed ??
Why are wast majority of u-tube preceded with advertisements ?
Is that u-tube "normal" ?
|
|
|
|
|
Because Alphabet is broke. /s
|
|
|
|
|