8 ms·
Seems like the most difficult programming is no longer cache invalidation and naming things. Its now about strings, and to duplicate arrays ... The stats are sk
by z3t4 8y ago
Seems like the most difficult programming is no longer cache invalidation and naming things. Its now about strings, and to duplicate arrays ... The stats are skewed because hordes of beginners. Mainly driven by what schools teaches and what languages has the most hype. That said Python is huge
. Damn you significant white space.
- sametmax 8y agoI often say that Python is the best at nothing, but pretty good at most things. And hence it became huge by the sheer appeal of being versatile. Life is short and most people needing to program are not programmers. Also many programmers didn't start as such, and were simply looking for an easy way to solve a task.
- blunte 8y agoBingo. When you just need to get something done, Python is great. Some quick googling to find the right libraries for the task, and then some caveperson programming, and the deal is done. Outside of lisps, I find Python to be one of the simplest syntaxes, so the only effort is the logic to solve the problem.
- AtHeartEngineer 8y agoI've been programming since I was a teenager, and for a long time I found myself struggling with my syntax and edge cases. Once I started using python, about 10 years ago, programming quickly turned into "what's the best way to solve this problem", instead of "wtf do you mean null pointer".
- petre 8y agoThe feeling is quite the same when switching from C to D. You don't have to use the advanced features of the language, but they're there if you want them.
- crdoconnor 8y agoGood C bindings and a willingness to accept that it wasn't ever going to be good at doing low level fast code are an underrated facet of how python grew so popular. Golang, by contrast, is really quite schizophrenic sometimes about whether it wants to be a high or low level language.
- roenxi 8y agoThere is a bit more insight to be found by reversing that - Python is simpler than other programming languages and achieves that by sacrificing a little power. Compare it to C, which it has displaced as an introductory language. Python and C are superficially interchangeable to a beginner, but to learn C you have to invest time into pointers and memory management. Python sacrifices the efficiency of direct memory management to avoid the complication of pointers. Arguably, this is a significant benefit because it also cuts down on ways to introduce bugs. Compare it to a Lisp - Python has a pretty inferior set of basic capabilities (can't even use a dict as a dict key, drives me mad), but that just means there is only one easy way to do things that everyone uses. Less room to think up clever ways of doing things, less complexity reading other's code. Being the 'best' language for a task has a huge cost - incidental complexity created by including specialist constructs. Python's success suggests maybe programmers prefer this complexity to be encapsulated in a library rather than the language core.
- np_tedious 8y ago> can't even use a dict as a dict key Curious, is this actually something you want to do often? While there is no hashable+immutable frozendict ala frozenset, you could throw one together or even define a hash function on a subclass and "swim at your own risk" not to mutate it later. I've encountered this enough with lists and the obvious solution is to cast them to tuples. Can't say I've found the same with dicts tho. As for the comparison with lisp - in most lisps this is a non issue because nearly all structures are immutable
- iainmerrick 8y agoNot often, but when you do want to do it, it’s frustrating (and unusual for Python) that the natural and obvious way doesn’t work.
- jotaf 8y agoWhen I read this my first thought was "you should use a FrozenDict", but looking into it, it seems that it doesn't exist; I assumed so because of FrozenSets (hashable sets). You can still create a hashable key from a dict with FrozenSet(mydict.items()).
- judge2020 8y agoJack of all trades, master of none but often better than master of one
- jononor 8y agoDefinitely a lot of beginners, many learning it in school, and many learning programming not as their main thing, but as a tool to use in whatever field they are in. More like MATLAB than Java or C#. But I believe that a fair bit of them will continue to use Python in the future (and get over the beginner problems), as they get jobs, startup ideas, side-projects. Curious to see what effect that has over time.
- caprese 8y agoprotip: you can also increase your StackOverflow clout by merely asking or answering the most generic basic questions. You'll look like a community expert and thought leader in no time. Helps the resume inhalers that weigh these arbitrary things. More complex questions about specific frameworks or how that might work with your ORM and memory cache just don't get the attention.
- war1025 8y agoDo people really use StackOverflow for answering job-related programming questions? The only time I found the questions on there useful was when I was a first year student learning programming. Maybe I am just bad at searching / asking.
- caprese 8y agoI did, you just abstract the problem out. Some programming language and frameworks have more active communities on StackOverflow than others. So in my sprints, I would typically have 3 tasks in progress at once: 1 I would work on myself, 1 would go on Stackoverflow waiting for the answer, and 1 would be something that required progress from a different team in the company (like a new API endpoint so I could do something on a frontend, or different service) It was pretty efficient for me. In some communities, the real thought leaders and framework developers are on stack overflow, watching the hashtag like a hawk. You can also use github issues on the actual package you have issue with pretty well too, alongside it. So you're really crowdsourcing a lot, and evaluating if that solution is correct enough for your implementation. But so many times, especially with frameworks, the answer is a good copy and paste job. your mileage and use case may vary.
- ubadair 8y agoI graduated 5 years ago and I still use it daily.
- deleted 8y ago[deleted]
- macspoofing 8y agoStackOverflow/Python version of Eternal September.
- chapium 8y agoAny Q&A board is going to run into this problem. It takes a lot more work to become an intermediate or advanced user. Given enough time and popularity a topic will be overwhelmed with beginner q&a.
- Spivak 8y agoI'm sure there's lots of beginners to programming but most of the time when I find myself asking basic questions like "how to duplicate array Python" isn't because I couldn't spend 2 minutes writing a function to do it but because there already exists a generally accepted best way to perform this operation that leverages the standard library and there is seemingly no other way to discover what that is. Like for this specific example: https://stackoverflow.com/questions/2612802/how-to-clone-or-copy-a-list https://stackoverflow.com/questions/2612802/how-to-clone-or-... Knowing the right thing to do requires you be informed about the history of Python language design. Like you could just read the documentation and see that lists have a copy method but it doesn't give you a good grasp of what the alternatives are and why you might choose them. And prior to Python 3.3 you're expected to know that the best practice way to do this is to leverage an edge case in the slicing syntax or the list function. Doesn't matter if you're the best computer scientist in the world, sifting through the massive corpous of documentation and historical knowledge required to write good Python is nigh impossible unless you're willing to dedicate yourself Python. This is something that languages need to tackle because the gap between doing a thing and doing that same thing in a way that follows language conventions and best practices is too damn high.
- tempguy9999 8y ago> and there is seemingly no other way to discover what that is Yes there is, it's called reading a goddamn book. > Knowing the right thing to do requires you be informed about the history of Python language design Bullshit, it requires you knowing the language. Perhaps by reading a book. Knowing the history is of little value. > sifting through the massive corpous of documentation and historical knowledge required to write good Python is nigh impossible unless you're willing to dedicate yourself Python Total crap, just read a decent book. About 3 years ago I learnt python from 'Learning Python' by Mark lutz (5th ed) for a new job. I spent 3 weeks going through ~1000 pages and reading stuff on the web. I amazed a guy there when he found out I'd just learnt python, ie. wasn't a veteran at it. He'd used it for years. Difficult, right, putting in all that work? Well that's called doing your job as a programmer. Happens I'm about to return there so I'm brushing up on it by going through it again. I would have some sympathy with your position if you hadn't made it out to be such a terrible task. It's not. It's called doing your due diligence as a programmer. And I have real sympathy with the guy who posed the question you gave from StackOverflow, but the key is once you've learnt about object references, say in delphi, you carry across that understanding to scala/java/python/everything else. 90% of stuff will carry between programming languages. Once you learn OO, functional, procedural, logical langs you recognise and underlying commonality. And most of all, programming is not about a specific language but problem solving and general principles, so getting hung up on a particular lang is missing the point. My first year out at university I worked at an engineering company and got the best advice ever: first thing to do is pick up the docs and start reading. It's stood me well ever since. If there are too many options (ie. your comment on slicing vs other stuff), yes, I see but the answer's simple: pick one way and stick to it; either slicing syntax or list methods. You're there to deliver results correctly to the business, not deliver idiomatically perfect code. There's NO shame in not crawling into the furthest, darkest corners of a language. Excuse the rant. It'll come with experience, just trust yourself and ask questions to any experts you can find.
- mikekchar 8y agoI actually use Stack Overflow to look for idiomatic ways to do things in languages that I don't have a lot of experience with. So I literally search for things like how to duplicate arrays, even though I'm quite capable of achieving the required output myself. In fact, I use SO almost exclusively for "Is this a bug with a common workaround" and "Is there a more idiomatic way to do this" questions.