ITT "I fell for the Python Meme " (tl;dr to follow)

ITT "I fell for the Python Meme " (tl;dr to follow)

I've been a "professional programmer" ( Python babby ) for about three years now. I originally learned the language because Eric S. Raymond recommended it in his "so you want to be a hacker" article which I read as a teenager about 10 years ago. It would probably be fair to say I've spent 5000+ hours either writing or reading Python.

Today I've realized what a massive mistake I've made. I stuck with it for so long because Python is pretty readable and occupies a local maximum of efficacy in the space of languages optimized for solving trivial problems at a premium performance and memory cost. But as soon as you try to do anything non-trivial, that vaunted "readable" quality of Python evaporates in a magic puff of smoke. Because you lack proper facilities for functional programming ( e.g. non broken lambdas, usable builtin support for AST transformation, quote-unquote mechanisms for macros ); trying to mould python into a shape that fits a non-trivial problem feels quite a lot like trying to sculpt an attractive bust out of play-doh. A tallented artist can pull it off but it is frustrating as fuck. Guido had a retarded vendetta against functional programming paradigms, so if you're trying to force your Python code to use them you end up having to resort to some untransparant fudge ike MacroPy or RedBaron.

Your only option, really, is to use classes, and even then to make sure your classes are individually retarded so that their interactions can be predictable. This leads to a simple idea often producing 10 or more classes to support it, and a linear increase in problem complexity or functionality implies either an exponential increase in source lines, or an expontential increase in the time investment per line.

A programmer who wants to express a complex idea will be fighting against Python's paint-by-numbers way of doing things every single step of the way. [1/2]

Attached: yuanti.jpg (540x720, 117K)

Other urls found in this thread:

esr.ibiblio.org/?p=8161
automatetheboringstuff.com/
twitter.com/NSFWRedditImage

So my advice to any of you younger guys learning Python or other trendy interpreted languages is to STRONGLY consider how much your programming language is asking you to take for granted.
The more of that there is, the more of the "easy" work it does for you, the more you can rest assured that for difficult tasks you're sent sailing up shit creek with no paddle.

Python and other languages like it that care more about cute syntactic constructions that make code more readable in the scope of a dozen or so lines, but do nothing fo you beyond that, induce literal brain-damage. I am not kidding. You will adapt your thoughts and the scope of the projects you're willing to confront according to what "feels" reasonable and doable, and this "feeling" is in the case of Python usually accompanied by nausea.

tl;dr I climbed the hill of Python only to discover the himalayas infront of me. Fuck Python!

gonna fap to this

Any Python program over 100 lines should be rewritten in Bash, because that way you won't fool yourself into thinking it's production quality

This is precisely the reason I want to learn python. I am training to be a network admin so I pretty much am never going to try to write out my own big programs from scratch, but automation of scriptable tasks is perfect for me and python can do it well without me having to get balls deep in a program language. After python and bash I dont know that I will spend any more time learning programming languages simply because my time would be better spent mastering the network side. But thats just my hot take and I could be totally misguided.

>ESR
>recommanding python
Holy fuck, now that's retardation. Well, he was a big Perl hacker back in the day, so that may explain it.
But really, from the start, I wanted to do nothing but low-level programming, that is, working my way from C to C++ (despite hating Sepples, but in big teams, that's how you manage idiocy it seems, even though I don't agree, but I digress). When you finally get to work in the embedded systems field, you see how much damage Python can make. There is a big meme in the industry that forces Python as the language for quick prototyping. The code produced is so low quality and so slow that you'll have to rewrite it wholly for production. Why not take shortcuts and prototype in C already? You won't lose weeks making that code production-quality that way.
It's incredible how Python teaches non-programmers how not to program. I'm almost inclined to say that this is exactly what makes Python so attractive to them.

?

Try C# targeting dotnet core. It's comfy and reasonably high level, but it has everything you need to drop into performance hackery when you need it, it's truly multi-paradigm, and the tooling/support is phenomenal.

Scalies in general are sexy. I prefer the top half to be non-human as well though.

>C(++)
>low level
think about this realistically. Do you want to be a computer engineer? Then sure, C(++) is the way to go. Embedded? It depends (just make sure you know VHDL or other hardware descritpive langs). Do you want to write bytecode? Shit outta luck my dude, i hope you know fucking hexadecimal. Assembly is for the rare instance where you need to make something in C faster, but by no means can you call C "low level" when its compiled and not assembled.

> Scalies in general are sexy. I prefer the top half to be non-human as well though.
go back

ESR doesn't even recommend Python anymore.
esr.ibiblio.org/?p=8161

Low-level, that is, at the OS level. No abstraction between your program and the system. I did a bootloader in x86 assembly for shits and giggles, so I can read a disassembled program. That's as low-level as I can get, I didn't take the right curriculum to be more in contact with HDLs.

> It's incredible how Python teaches non-programmers how not to program

I like the way you phrased it. I would even concede that non-programmers should be provide with tools to create programs, but it should not involve pretending that they're programmers because they're writing executable text files.

One thing that was quite addictive in Python is finding ways around the implicit semantics and making it do things it wasn't meant to ( e.g. using decorators to implement AST transforms and the like ). But it's actually quite retarded; something that would take a single well-thought macro in LISP becomes an epic multi-week adventure in Python as you hack together your own inbred incomplete solution to vaguely approximate something which LISP is capable of doing. And then it feels like you've "won" and achieved something until the next time you need to do something similar but not exactly the same, and discover actually you need to make some substantial changes to your original hack or even apply a global transform to the way the code is organized. So you do that and feel like you've got a big brain and proudly wear your self-supplied participation medal.

Maybe spend less time talking like a faggot and more time developing your skills.

if not Python then what other scripting language?

oh you're on the right path then.
best of luck.

Forgot to say, I did microcontroller programming in C, with a big CS background. When I read C code from people that have more of a EE background, I can get panic attacks. There is a sweet spot in embedded when you can get quite low level in terms of control without being an electrical engineer. You got to have some basic understanding of electrics and circuitry, that's for sure, but it's a shame that you are often barred of such programming jobs in embedded because you don't have experience in EE.

Good advice. Which is why I'm returning to lisp, or possibly attempting Haskell. Not sure which yet.

It's always a tradeoff.
Everything in computing is a tradeoff.

Trade-off is not the same as "trade away". In Python you trade away compositionality and abstraction power for maximum possible clarity of short snippets.

I never realized how bad Python's documentation was until I tried out other languages, I used to even think it was good, but look at this. This function can raise so many different errors and there's only one tiny mention of one of the many potential errors, even so it shouldn't be in the middle of a big paragraph.

There's probably a list of all the potential errors in urllib, but it's so unproductive for me having to go look for them. I should be able to tell what every function returns at a glance. This makes it almost impossible to write stable software in Python.

Attached: 2019-05-22_20:09:13.png (598x948, 102K)

Yep. I use the requests module for everything because when you can't figure out how things connect in a reasonable time your only choice is to trust someone else blindly to understand it for you.
Python fosters this kind of helplessness in an extreme form, hence the proliferation of tools like virtualenv and pip and conda and so on to help you outsoure as much of the problem to some internet rando.

same here. I think the only requirement for network people in terms of languages would be shell and/or Python.

if I wanted to write software, I'd be using the most suitable tools and techniques for the job, instead of thinking "I already know Python so I'll save myself the hassle of learning another language"

and just to clarify my point, doing system/network scripting and making an "app" can both be done with Python, but it doesn't mean that by knowing how to do one you're somehow magically aware of how to do the other just because you're using the same language.

No joke. Python docs are "at least it's not nothing" compared to JS documentation.

Being your own assembler and writing direct bytecode isn't hard, it's just extremely tedious. In an evening with a spec manual and a 6800 or 8080 dev board, a competent developer should be able to do something simple like toggle an LED using interrupts while taking input for blink frequency off a bank of digital inputs. Plenty of schools have such a task as a lab assignment in a required digital electronics course for second year students. Touching the hardware like this gives some good perspective.

I already hang out there, and there is no need to be salty.

I once heard someone say "Visual Basic is toxic to the minds of students". It's true, it teaches you very bad habits which are difficult to kick once set. Other toxic learning languages: PHP, JavaScript, Ruby, Python. All are good languages within their intended use case, which is scripting. An already good developer won't suffer brain damage using them for some quick hackery. But for the love of God, they are not good languages to learn fundamental "brick laying" skills on. Python is the best of them for this, but still a student should unironically start with C.

The most infuriating shit about using almost every JavaScript library (that isn't enormous, like React, Vue, underscore, etc.) is you just have to figure it out for yourself. If there's any documentation, it's three major versions out of date and it wasn't even good when it was current. Fuck JavaScript.

not being salty, just saying to keep that shit in your containment board.

He made one post that belongs in /trash/ and you've made two to complain about it. And now I'm making a third to complain about you. Let's relax and talk about programming.

to the text, i hope

If I wanted to learn python for the purposes of scripting and automation, what would be a good resource?

Attached: Da_3m2ZU0AA76ds.jpg (940x1200, 225K)

automatetheboringstuff.com/

Enjoy your tasty turd.

Thanks OP.
Sorry the language doesn't suit your needs, but hopefully it will serve mine!