Does not follow...

If it doesnt fit anywhere else but you still want to share, this is the place
Post Reply
User avatar
Weetabix
Posts: 6106
Joined: Fri Aug 15, 2008 11:04 pm

Re: Does not follow...

Post by Weetabix »

Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
Note to self: start reading sig lines. They're actually quite amusing. :D
User avatar
Netpackrat
Posts: 13983
Joined: Fri Aug 15, 2008 11:04 pm

Re: Does not follow...

Post by Netpackrat »

Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
I don't think he expected the Spanish Inquisition, Weet.
Cognosce teipsum et disce pati

"People come and go in our lives, especially the online ones. Some leave a fond memory, and some a bad taste." -Aesop
User avatar
Weetabix
Posts: 6106
Joined: Fri Aug 15, 2008 11:04 pm

Re: Does not follow...

Post by Weetabix »

Nobody expects the Spanish Inquisition.
Note to self: start reading sig lines. They're actually quite amusing. :D
Greg
Posts: 8486
Joined: Tue Aug 19, 2008 2:15 pm

Re: Does not follow...

Post by Greg »

Weetabix wrote:Nobody expects the Spanish Inquisition.
I did, however, just recently buy a comfy chair.
Maybe we're just jaded, but your villainy is not particularly impressive. -Ennesby

If you know what you're doing, you're not learning anything. -Unknown
Sanity is the process by which you continually adjust your beliefs so they are predictively sound. -esr
Greg
Posts: 8486
Joined: Tue Aug 19, 2008 2:15 pm

Re: Does not follow...

Post by Greg »

Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
C is a much lower level language, what you control with C is much closer to what the computer is actually doing.

So what you can do with 1 or 2 lines of Python code, you might need hundreds of lines of C code to do. The upside, for C, is that those hundreds of lines of C code are almost certainly going to be faster (possibly MUCH faster) than the 1 or 2 lines of Python.

That's the short version.

When computers were less powerful, everything was written in lower level languages, like C. Or even lower, like assembler, for when you REALLY need speed and efficiency.

Now that computers are so much more powerful, higher level languages like Python are more desirable. They make it much easier to get any particular thing coded and done, and they run fast enough. Mostly. This is very desirable for folks like sysadmins, who want to automate various things.

Operating system kernels and such, device drivers, things that work with hardware and need to be *fast* still tend to all be written in things like C. Or just programs intended to run on very small, weak, slow computers.

A systems programmer (someone working on the OS or its utilities, network infrastructure, etc) will still need C, or relatives.

A sysadmin or regular person can get by with a scripting language, of which Python is the leading candidate these days. (Used to be Perl, and before that shell. Those are still used. I can get by in either of those.)

As a sysadmin, evolving to keep up with the world as it currently is, knowing Python is *very* helpful. Many scripts you'll run into are written in it, many of the newer cooler tools use it, or at least integrate with it.

Oh I should add, around 1991 (or 2? 3? I forget exactly) or so when it was clear that engineering wasn't happening, a friend gave me a copy of THE book on C (K&R) and said, 'need a job, learn this'. I did in fact work through the entire book and learn a bit of C, but found it exquisitely painful. So painful in fact, I got a job selling books (many of them copies of K&R) instead of coding C, for 1/4 the money of a coding job. Then my inherent geeky problem solving skills set me on the path to accidental sysadminhood.

Anyway, short version of *that* is, unless you know you need to know C, I recommend learning Python instead.
Maybe we're just jaded, but your villainy is not particularly impressive. -Ennesby

If you know what you're doing, you're not learning anything. -Unknown
Sanity is the process by which you continually adjust your beliefs so they are predictively sound. -esr
User avatar
Steamforger
Posts: 2785
Joined: Mon Aug 18, 2008 5:41 pm

Re: Does not follow...

Post by Steamforger »

We watched this happen yesterday afternoon standing outside the office. Sky Dick

I hope the pilot isn't punished too badly :lol:
Rich Jordan
Posts: 1840
Joined: Tue Aug 19, 2008 5:04 am

Re: Does not follow...

Post by Rich Jordan »

Greg wrote:
Weetabix wrote:
Greg wrote:As time goes by, I more and more strongly feel I ought to learn Python.
I recently decided to try C because that's what the "experiments" that came with my Raspberry Pi starter kit have code for. Of course, they also have the Python code.

Why is Python better than C or C better than Python?

ETA: putting on my seldom used "take an interest in others" hat, Gee, Greg. Tell us about what has motivated this desire? :geek:
ETA2: That sounds sarcastic, but the sarcasm is directed at me, not you.
C is a much lower level language, what you control with C is much closer to what the computer is actually doing.

So what you can do with 1 or 2 lines of Python code, you might need hundreds of lines of C code to do. The upside, for C, is that those hundreds of lines of C code are almost certainly going to be faster (possibly MUCH faster) than the 1 or 2 lines of Python.

That's the short version.
.....
.....
Anyway, short version of *that* is, unless you know you need to know C, I recommend learning Python instead.
To add just a little, with Python you both get (depending on platform) and can easily add a huge number of library packages that make it relatively easy to do a lot of things that might have to be written for C. Want to output PDF files? Excel spreadsheets? Control IO ports on the RPi? Run fancy-pants LED lighting? Connect a weather monitor? Do motion detection on the video feed from webcams? Thousands of different things that folks have pre-written libraries for; you include them, you can call the functions in the library, and they do the low level bit twiddling for you. Its possible there is support for some of these in C but it will be a small fraction of the support in Python
User avatar
Netpackrat
Posts: 13983
Joined: Fri Aug 15, 2008 11:04 pm

Re: Does not follow...

Post by Netpackrat »

https://www.nytimes.com/2017/11/18/opin ... ml?src=twr
There is a common liberal argument that our present polarization is the result of constant partisan escalations on the right — the rise of Newt Gingrich, the steady Hannitization of right-wing media.

Some of this is true. But returning to the impeachment imbroglio made me think that in that case the most important escalators were the Democrats. They had an opportunity, with Al Gore waiting in the wings, to show a predator the door and establish some moral common ground for a polarizing country.

And what they did instead — turning their party into an accessory to Clinton’s appetites, shamelessly abandoning feminist principle, smearing victims and blithely ignoring his most credible accuser, all because Republicans funded the investigations and they’re prudes and it’s all just Sexual McCarthyism — feels in the cold clarity of hindsight like a great act of partisan deformation.

For which, it’s safe to say, we have all been amply punished since.
Frank Zappa wrote:Do you love it? Do you hate it? There it is. The way you made it.
Cognosce teipsum et disce pati

"People come and go in our lives, especially the online ones. Some leave a fond memory, and some a bad taste." -Aesop
Greg
Posts: 8486
Joined: Tue Aug 19, 2008 2:15 pm

Re: Does not follow...

Post by Greg »

Netpackrat wrote:https://www.nytimes.com/2017/11/18/opin ... ml?src=twr
There is a common liberal argument that our present polarization is the result of constant partisan escalations on the right — the rise of Newt Gingrich, the steady Hannitization of right-wing media.

Some of this is true. But returning to the impeachment imbroglio made me think that in that case the most important escalators were the Democrats. They had an opportunity, with Al Gore waiting in the wings, to show a predator the door and establish some moral common ground for a polarizing country.

And what they did instead — turning their party into an accessory to Clinton’s appetites, shamelessly abandoning feminist principle, smearing victims and blithely ignoring his most credible accuser, all because Republicans funded the investigations and they’re prudes and it’s all just Sexual McCarthyism — feels in the cold clarity of hindsight like a great act of partisan deformation.

For which, it’s safe to say, we have all been amply punished since.
Frank Zappa wrote:Do you love it? Do you hate it? There it is. The way you made it.
OMG.

If that hit print in the New York Times, the jig is up. The purge is coming.
Maybe we're just jaded, but your villainy is not particularly impressive. -Ennesby

If you know what you're doing, you're not learning anything. -Unknown
Sanity is the process by which you continually adjust your beliefs so they are predictively sound. -esr
User avatar
Rich
Posts: 2592
Joined: Mon Aug 18, 2008 8:11 pm

Re: Does not follow...

Post by Rich »

Clinton at his worst was worth at least ten of AlGore.

Please, please be careful what you wish for.
A weak government usually remains a servant of citizens, while a strong government usually becomes the master of its subjects.
- paraphrased from several sources

A choice, not an echo. - Goldwater campaign, 1964
Post Reply