|
Yeah that's the big thing. If I ever interviewed at a place that dinged me for syntax on a whiteboard I'd laugh at them and walk out backwards firing two guns ....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯\ ........('(...´...´.... ¯~/'...') .........\.................'...../ ..........''...\.......... _.·´ ............\..............( ..............\.............\...
|
# ? Dec 8, 2014 14:11 |
|
|
# ? Jun 7, 2024 08:47 |
|
you could call this a "binding", or a "value". i don't like "variable" because it doesn't, literally, vary
|
# ? Dec 8, 2014 16:01 |
|
Somewhere in there is a significant misunderstanding of what programming actually is.
|
# ? Dec 8, 2014 17:19 |
|
Gul Banana posted:you could call this a "binding", or a "value". i don't like "variable" because it doesn't, literally, vary But it's different in every class I use it in Seriously guys can you stop arguing over an extremely common misuse of a word please?
|
# ? Dec 8, 2014 17:59 |
|
Munkeymon posted:Seriously guys can you stop arguing over an extremely common misuse of a word please? We could talk about "engineer" instead?
|
# ? Dec 8, 2014 18:34 |
|
JawnV6 posted:We could talk about "engineer" instead? quote:I am an Engineer.
|
# ? Dec 8, 2014 18:41 |
|
This is my IDE. There are many like it, but this one is mine. My IDE is my best friend. It is my life. I must master it as I must master my life. My IDE, without me, is useless. Without my IDE, I am useless. I must use my IDE true. I must code faster than my enemy who is trying to beat me. I must release code before he releases his. I will... My IDE and I know that what counts in code is not the number of lines, the libraries used, nor the tests we write. We know that it is the features that count. We will succeed... My IDE is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its parts, its accessories, its keybindings and its macros. I will keep my IDE clean and ready, even as I am clean and ready. We will become part of each other. We will... Before God, I swear this creed. My IDE and I are the defenders of my company. We are the masters of our enemy. We are the saviors of my life. So be it, until victory is ours and there is no enemy, but AI!
|
# ? Dec 8, 2014 18:54 |
|
|
# ? Dec 8, 2014 19:09 |
|
Now you know why they call them coding bootcamps.
|
# ? Dec 8, 2014 20:14 |
|
Munkeymon posted:But it's different in every class I use it in It's not a mis-use. The name identifies a variable quantity rather than a constant quantity. This use in mathematics predates computer science and mutable memory by two hundred years. You don't get to wish away the historical context of words just because it makes things a little less tidy and unambiguous in the present day.
|
# ? Dec 8, 2014 21:04 |
|
Here's some homework I submitted a couple of months ago. In my defense, this was for an intro class and I hadn't learned that lists were a thing yet. Also, I just noticed that I was apparently still weak on while loops. code:
Coin fucked around with this message at 22:20 on Dec 8, 2014 |
# ? Dec 8, 2014 22:16 |
|
seiken posted:It's an inconsistent, backwards mess of a language that doesn't align in any way with its stated goals. quote:What Python is good at is being a slightly less terrible bash, for couple-hundred line scripts. WRT to teaching python being hard. I've taught ~forty classes to a few thousand students on every continent save antarctica in the last two years. Some of them started with "print x" and some of them ended with the descriptor protocol and metaclasses. It's not hard to teach lexical self, nor is it hard to teach python's scoping rules (which, BTW, are "different" which is distinct from "wrong"). It's really not any harder to understand an ordered sequence of scopes than it is to understand a nested hierarchy of scopes.
|
# ? Dec 8, 2014 23:34 |
|
I understand lexical self. If I can understand lexical self, anyone can understand lexical self.
|
# ? Dec 9, 2014 05:13 |
|
Fuuuuuck coders who can't give functions sensible names.code:
Sitting here wondering how the gently caress this code was meant to do anything since it only recursively called itself and never performed an update, so I decided to check out what the check_bar function did. code:
Real loving obvious naming guys, thanks.
|
# ? Dec 9, 2014 05:48 |
|
Ephphatha posted:Fuuuuuck coders who can't give functions sensible names. You haven't lived until you've dealt with code with methods named x, y, xx, xy, etc. With equally inscrutable variable names within the method body. The culprit: An intern who spoke English well, but had very poor written English skills. Her poo poo got caught and fixed during code review, but it was rough.
|
# ? Dec 9, 2014 05:53 |
|
BigRedDot posted:You cherry picking a few cases where something might not meet some stated goals, is not the same as that thing not meeting any stated goals. That's how logic works. (This is not to imply I agree with all of your assessments, either; I don't, though some have some merit) I think you're confusing me with InternetJanitor, I didn't post any examples of Python missing goals. I might write a long blog post one day, but it's kind of obvious anyway BigRedDot posted:Or, you know, doing productive work (witness: NumPy, SciPy, IPython, Scikit-Learn, the entire constellation of scientific packages), or building ten billion dollar companies, which surely must get your goat! no, it doesn't get my goat. It's not personal. I work for such a many-billion-dollar company that uses Python extensively, and I write a lot of Python for my job. The fact that it is possible to do useful work in Python does not preclude it from being a haphazard, inconsistently-designed minefield with unnecessary flaws just about everywhere you look. If you consider random anecdotes about companies convincing, perhaps consider that the one you mentioned is rewriting their code in Go, along with Google and everyone else that realised how completely unmaintainable large Python codebases are seiken fucked around with this message at 13:34 on Dec 9, 2014 |
# ? Dec 9, 2014 13:30 |
|
BigRedDot posted:Or, you know, doing productive work (witness: NumPy, SciPy, IPython, Scikit-Learn, the entire constellation of scientific packages), or building ten billion dollar companies, which surely must get your goat! By that logic PHP must be even better as Facebook has a higher valuation!
|
# ? Dec 9, 2014 15:12 |
|
I wish I could find that internet security course excerpt again, where they showed you how you could encrypt credit card numbers with base64_encode(x) in php. Does anyone have it? e: Aaaaahahahahaargh here it is! Turns out it was just an ehow idiocy dump and not a proper internet security course, which makes it a little better. Still hilarious though Karate Bastard fucked around with this message at 15:59 on Dec 9, 2014 |
# ? Dec 9, 2014 15:26 |
|
Hosting horror, my VPS provider decided to go from KVM to OpenVZ, terminating all KVM services in January (including a server I run). I've been working on new fab scripts to move the system to AWS, then overnight the provider I currently have shut down my server. I contacted their support and they replied, verbatim:quote:I am sorry. We did not hear back from you on any of our emails with respect to your desire to continue. A full refund has been given and your server will remain online for an additional 24 hours. A month and a half notice cut down to 24 hours. The cost of the server is a drop in the bucket compared to the labor it takes to fab a new server and migrate users / services. After insisting there was nothing to be done the support staff simply stopped responding to email. This is why you vet your hosting providers carefully, folks.
|
# ? Dec 9, 2014 17:40 |
|
seiken posted:no, it doesn't get my goat. It's not personal. I work for such a many-billion-dollar company that uses Python extensively, and I write a lot of Python for my job. The fact that it is possible to do useful work in Python does not preclude it from being a haphazard, inconsistently-designed minefield with unnecessary flaws just about everywhere you look. Coming to Python from perl renders me unable to understand this sentiment.
|
# ? Dec 9, 2014 17:51 |
|
Perl strikes me as probably worse, but I haven't really used it so I won't pretend to know. Bash is definitely worse. I was only really railing against Python for large projects, anyway. For a couple-hundred line script (at most...), I don't know what you'd use that's more convenient.
|
# ? Dec 9, 2014 18:08 |
|
Python is your basic dynamically typed language. Are there any real flaws, other than that and whitespace sensitivity, that isn't just really petty spergation? Like, flaws that really affect work?
|
# ? Dec 9, 2014 18:13 |
|
There's a pretty big gap between the couple of hundred lines upper limit you're claiming as an absolute maximum, and the dropbox example you're using as evidence of its drawbacks.
|
# ? Dec 9, 2014 18:19 |
|
I mentioned dropbox only to dismiss a ridiculous post implying that the existence of dropbox proves Python is a good language, so uh?
|
# ? Dec 9, 2014 18:23 |
|
Dropbox's initial implementation was almost certainly pgfi and probably would have been unmaintainable garbage in any language given that it began life as a startup's mvp and grew piecemeal from there at a mile a minute.
|
# ? Dec 9, 2014 18:26 |
|
What's "pgfi"? Oh, and if you want to, it's fairly easy to embed Python in a C (or C++) program. You just include python.h, link against the library and make sure the dll (or .so) is handy. But unless you build python yourself, you won't have the debug versions of the libraries. This means you probably want to #undef _DEBUG before you incldue python.h, or it will try to load python27_d.dll instead of python27.dll. Then you can call Py_Initialize() to load the interpreter, call a lot of functions or even just execute .py files directly, it's pretty easy. Just look out for reference counting (no big deal) and remember that threading is a bit complicated due to the GIL (but not insurmountable). When you're done, you can call Py_Finalize() to clean up everything. The Python documentation suggests this: Pythons posted:This function is provided for a number of reasons. An embedding application might want to restart Python without having to restart the application itself. An application that has loaded the Python interpreter from a dynamically loadable library (or DLL) might want to free all memory allocated by Python before unloading the DLL. During a hunt for memory leaks in an application a developer might want to free all memory allocated by Python before exiting from the application. quote:The destruction of modules and objects in modules is done in random order; this may cause destructors (__del__() methods) to fail when they depend on other objects (even functions) or modules. Dynamically loaded extension modules loaded by Python are not unloaded. Small amounts of memory allocated by the Python interpreter may not be freed (if you find a leak, please report it). Memory tied up in circular references between objects is not freed. Some memory allocated by extension modules may not be freed. Some extensions may not work properly if their initialization routine is called more than once; this can happen if an application calls Py_Initialize() and Py_Finalize() more than once.
|
# ? Dec 9, 2014 18:47 |
|
sarehu posted:Python is your basic dynamically typed language. Are there any real flaws, other than that and whitespace sensitivity, that isn't just really petty spergation? Like, flaws that really affect work? I'd point you to the rules for import resolution, but I don't think anyone actually understands them well enough to write them down in one place. Also, setuptools / pip / virtualenv. I don't know if those are actually python problems though.
|
# ? Dec 9, 2014 18:53 |
|
sarehu posted:Python is your basic dynamically typed language. Are there any real flaws, other than that and whitespace sensitivity, that isn't just really petty spergation? Like, flaws that really affect work? Plenty, and I don't think the worst of it has come up yet in the thread. To really do it justice I'd like to make an effort post sometime. But the worst and most systemic stuff is probably the level of dynamism, which goes well beyond mere dynamic typing, to the point where it's not really feasible to enforce any constraints whatsoever on anything any code is doing anywhere, and you inevitably end up with spaghetti you can't reason about And all the convenient features which seem reasonable and elegant at first glance, but are really just the tip of the iceberg and there's a huge mass of sacrifices and hacks hiding under the surface to make them work And the community which gleefully abuses all this and throws around terrible advice and meaningless terms like "Pythonic" everywhere Or "Ask forgiveness, not permission". Hahaha Edit: the worst bit is if you have a 1,000 line Perl or Bash program everybody knows that's awful, but somehow in Python people just chug along with this shitheap vvv this discussion did actually prompt me today to start collecting the general opinions, rants, bug reports and so on I've had seen the past few years into a google doc, but yeah I don't know if I'll actually get round to it. Sorry for being inflammatory. I don't think it's any less honest than the similarly-unsubstantiated "obviously Python is good and you're probably wrong", but yeah I shouldn't be all like that. seiken fucked around with this message at 19:12 on Dec 9, 2014 |
# ? Dec 9, 2014 18:57 |
|
Stop saying probably wrong things that many people are obviously going to disagree with you on and then going "but I'm not going to explain them except in some amazing magnum opus that I'm not actually going to write". That's bullshit inflammatory arguing.
|
# ? Dec 9, 2014 19:01 |
|
Thermopyle posted:Stop saying probably wrong things that many people are obviously going to disagree with you on and then going "but I'm not going to explain them except in some amazing magnum opus that I'm not actually going to write". Actually please carry on doing all that, but in yospos
|
# ? Dec 9, 2014 20:05 |
|
seiken posted:it's not really feasible to enforce any constraints whatsoever on anything any code is doing anywhere, and you inevitably end up with spaghetti you can't reason about Sounds like a social problem with your team. If you could, you know, toss out any language which actually meets your criteria it might be nice. I'm guessing it's C++?
|
# ? Dec 9, 2014 22:32 |
|
Why would you guess C++?
|
# ? Dec 9, 2014 22:35 |
|
It's the funniest language
|
# ? Dec 9, 2014 22:53 |
|
Golang is bad and it makes me sad because they had so much potential. They forgot to add either variants (aka tagged unions) or generics. You're just supposed to use nullables everywhere instead. Joy.
|
# ? Dec 10, 2014 00:45 |
|
seiken posted:But the worst and most systemic stuff is probably the level of dynamism, which goes well beyond mere dynamic typing, to the point where it's not really feasible to enforce any constraints whatsoever on anything any code is doing anywhere, and you inevitably end up with spaghetti you can't reason about quote:Edit: the worst bit is if you have a 1,000 line Perl or Bash program everybody knows that's awful, but somehow in Python people just chug along with this shitheap 1000 lines of well-written python is not alot, or unreasonable, or difficult just because you say so.
|
# ? Dec 10, 2014 01:05 |
|
BigRedDot posted:So is the issue just that you, in particular, work with some lovely team that insists on writing descriptors and metaclasses just for the hell of it, and insists on monkey patching everything in sight? Because not everyone, or even most of everyone, or even a small fraction of everyone, does that. It's pretty specious to claim that it is not possible to reason about all python code because of the most dynamic features that almost no python code uses. It's not just Python though, Perl and Ruby are no better in that regard, and probably considerably worse.
|
# ? Dec 10, 2014 02:08 |
|
BigRedDot posted:So is the issue just that you, in particular, work with some lovely team that insists on writing descriptors and metaclasses just for the hell of it, and insists on monkey patching everything in sight? Because not everyone, or even most of everyone, or even a small fraction of everyone, does that. It's pretty specious to claim that it is not possible to reason about all python code because of the most dynamic features that almost no python code uses. I use python for django, but not for anything else. Coming from a Java/C++ background, I just can't stand duck-typing and assignment-as-declaration. Also, the requirement to have a compiler and complete development environment on your production system to do anything worthwhile (interface with native libraries) is awful. You can get around that if you lockstep a deployment VM with the exact same pointlevel of everything as your production, then copy the vituralenv over as-is, but that's a hell of a lot of work compared to version-matching some libraries and copying a binary over. Edit: global becomes undefined local if you assign to it later in a function has nailed me before, it's really unexpected. Would requiring a local (or global) keyword have really been as bad as that? Harik fucked around with this message at 02:21 on Dec 10, 2014 |
# ? Dec 10, 2014 02:15 |
|
I need to find some actual coding horrors for this thread.
BigRedDot fucked around with this message at 04:59 on Dec 10, 2014 |
# ? Dec 10, 2014 04:52 |
|
Eh NM off topic
BigRedDot fucked around with this message at 04:58 on Dec 10, 2014 |
# ? Dec 10, 2014 04:54 |
|
|
# ? Jun 7, 2024 08:47 |
|
seiken posted:But the worst and most systemic stuff is probably the level of dynamism, which goes well beyond mere dynamic typing, to the point where it's not really feasible to enforce any constraints whatsoever on anything any code is doing anywhere, and you inevitably end up with spaghetti you can't reason about Could you at least conjure an example of whatever problem you're trying to describe here? Your complaint is so vague that it's effectively meaningless I mean there are a multitude of fine reasons to dislike Python, right tool for the right job and all of that. But if you're going to complain about something, at least be specific and explain why you dislike feature X of a language QuarkJets fucked around with this message at 05:26 on Dec 11, 2014 |
# ? Dec 10, 2014 05:15 |