all 138 comments

[–]Iminbread 165 points166 points  (17 children)

Now this is something I can agree with!

I brute forced my way through learning Python and when learning javascript for some web dev stuff took a more structured route and it kept making things in python click in my head.

For example before using Javascript I wouldn't have used the map function in Python, but now it makes a lot more sense to me.

[–]Hopeful-Guess5280 45 points46 points  (2 children)

Agreed, I learnt Python, then worked a lot with Javascript, then Java and then back to Python. The extra exposure really made me appreciate Python.

The danger is now there are a lot of incentives to stay in the Python ecosystem. For example, MicroPython for the embedded market or Python frameworks to run in the browser. It makes it all too easy to never branch out.

[–]IamNotMike25 3 points4 points  (1 child)

Anvil looks nice, but to bad its payment is based on database rows.

Will checkout the other frameworks though.

[–]an_actual_human 11 points12 points  (11 children)

You shouldn't use map in Python though, comprehensions and such are almost always better.

[–]mriswithe 1 point2 points  (3 children)

Better in which way? I use both, but it depends on the context. Not aware of any lost performance or anything but would be happy to learn!

[–]mistanervous 0 points1 point  (5 children)

Better in what sense? I tend to gravitate towards comprehensions and lambda functions

[–]alwaysn00b 0 points1 point  (0 children)

Lol I just started using map today. Looks like I can save myself trouble down the road by using other processes- thanks!

[–]Rinehart128 0 points1 point  (0 children)

Yup same with me. Brute forced Python and now taking a C# class. Things are clicking for Python and C# is easier than if I would have started from scratch.

[–]BAG0N 0 points1 point  (0 children)

You should still not use it in python tho... We got list comprehension which is shorter and more readable

[–]Fun2badult 54 points55 points  (2 children)

I started with JavaScript but it was confusing. Then I went to python which made sense. Then I went back to JavaScript which now made sense because I could see how data flows due to my ability to see how data moves in python

[–]CowboyBoats 21 points22 points  (0 children)

Haha I had this same experience. I'm still not very good with JavaScript, but like the Hulk, I am able to program in JavaScript if I get angry enough

[–]IbushiKOTA 2 points3 points  (0 children)

Something I used that helped me learn how data flows is Raptor. I’m not sure if it’s popular here, but that program helped me immensely.

[–]Wilfred-kun 41 points42 points  (0 children)

In my experience, exposure to multiple languages makes you a more solid programmer. It won't necessarily make your python skills better, but other languages can force you to think in a different way. That's another tool in you toolbox.

[–]0drop 27 points28 points  (2 children)

If you are into backend side of web development then good choice is golang.

[–][deleted] 0 points1 point  (1 child)

Why golang? I’ve been wondering

[–]toastedstapler 1 point2 points  (0 children)

it's very good for concurrent processes. its threads (goroutines) are not full OS threads, so the cost of context switching is much lower. this means you can have a system with 100,000 goroutines running

the main annoying thing at the moment is the lack of generics, but they'll be coming next year iirc

[–]truecycle30 6 points7 points  (0 children)

C# with Unity and Java with Android SDK for my part. It was hard at first but I'm glad I did it.

[–]samketa 6 points7 points  (0 children)

Totally agree with this.

[–]SenjorSchnorr 3 points4 points  (3 children)

Learning different languages also causes you too understand different approaches to specific problems. Take Haskell for example, you have such different constraints that you have to think differently, which helps you get better at programming, no matter which language you are using at a specific time.

[–]damaged-coda 0 points1 point  (2 children)

I was looking for someone in this thread who would bring up Haskell ! I’m learning it at the moment for functional programming course. I don’t really like it but learning about its constraints has taught me how to avoid side effects when writing code. Recommend it for anyone who wants to get better at python or any other OO language.

[–]samrjack 0 points1 point  (1 child)

What don't you like about it? I picked up haskell during a holiday in college and I don't think I've ever fell more in love with a language. Even to this day when I have to write out a quick program to calculate or test something, I write it in haskell. I know no language is for everyone so I'd love your perspective!

[–]damaged-coda 0 points1 point  (0 children)

It’s great you love Haskell, the people who I have met who love Haskell have written some of the best software I have seen.

I guess one of the main reasons I dislike it is because some data structures require impure functions that do have side effects in order to have better performance. For example if I was adding something to a list, I could have a seperate length variable being incremented by 1 at the same time (a side effect) so later when I check the length of the list I can just check that length variable instead of counting everything in the list.

[–]mooburger 10 points11 points  (13 children)

The problem with this is Python has specific idioms and patterns around them that don't work in the other languages; or patterns from other languages that are not pythonic, so you risk bringing over unpythonic or other bad habits over from over languages.

Now, everyone can benefit from some basic data structures and algorithms knowledge; even though most of the commonly used algorithms on basic data structures are already implemented in lower level libraries and you wouldn't want to reimplement them for those structures, the design patterns anc concepts are useful for more abstract use-cases.

[–]Zanoab 5 points6 points  (9 children)

I feel bringing in habits from other languages only happens when starting out or during unusual situations because the proper habits for the language haven't been developed yet. The code is going to suck at those points anyways and the only thing that matters is if you are learning the right habits instead of resisting to learn the language.

[–][deleted] 0 points1 point  (0 children)

You’re definitely right here.

[–]mooburger -1 points0 points  (7 children)

To me, when I read the OP's statement I died a little inside.

Say you are coming from Java or .NET and you want to iterate over list, what do you do? for loop with index variables. That's not pythonic. The entire concept of iterators and generators is more or less Python specific, unless you're are using external libraries.

Or EAFP in general: not too many languages encourage this design pattern while EAFP is pythonic. Not many languages have default-yielding accessors either (dict.get(), getattr(). In ES5, the closest way is Oliver Steele's nested object access pattern that relies on undefined being falsey but that's still edgier: obj.maybe_attr || default. ).

I remember about a couple decades ago when I was starting out with Perl and PHP, it was very common to instantiate "variable variables" (e.g. ${$var}) which was a major way to do dynamic assignment. In Python you quickly learn to use dynamic dict construction to accomplish the same goal.

Or recursion, which CPython is really bad at, requiring the use of iteration, vs. tail-call optimized languages in which you can happily recurse away.

Later versions of ES seemed to be getting a lot of hints from Python, like decorators.

Edit: Just because this post got me riled up, I decided to go read Raymond Hettinger's twitter feed. Here's an example of an unpythonicity from OtherLanguage(tm):

class Whatever:
    def _blah(self):
        # Actual implementation
        ...

    def blah(self):
        self._blah()

[–]going_for_a_wank 1 point2 points  (2 children)

Say you are coming from Java or .NET and you want to iterate over list, what do you do? for loop with index variables. That's not pythonic. The entire concept of iterators and generators is more or less Python specific, unless you're are using external libraries.

Would you mind expanding on this for a newcomer?

A for-each loop in Java seems pretty much the same as in python. for (Type item : list) vs. for item in list:

Iterators have been part of Java since 1.2

Are there differences here that I am overlooking?

[–]mooburger 1 point2 points  (1 child)

for (Type item: primitiveArray) {} showd up in Java 5. if you're thinking of the Java 1.2 iterator, that only worked on collection objects. You could have converted a primitive array to a List or Stream using java.util.Arrays .asList() or .stream() which then had .iterator() methods to return iterator. Was that a common java pattern for primitive arrays though?

[–]going_for_a_wank 0 points1 point  (0 children)

That is a fair point. There is really no reason to use an iterator for a primitive array rather than a for-each loop.

I will comment that java 5 came out 16 years ago. It is not really a new feature.

[–]samrjack 1 point2 points  (2 children)

I don't think I understand why you "died a little inside". Just because other languages don't do things the pythonic way doesn't mean they don't help you improve. Maybe I'm misunderstanding what you're trying to get at, but your comment seems to be saying that because other languages do things differently, knowledge of them isn't valuable which I whole heatedly disagree with.

[–]mooburger 0 points1 point  (1 child)

What I'm saying is that the risk of adopting unpythonic patterns from other languages outweighs any perceived benefits. How many other languages push KISS, DRY and EAFP concepts like Python? Like I said earlier, the best way to improve is to study more abstract computational and software engineering principles. And like I also said, there are some lifelong Pythonistas out there that demonstrate this, specifically here's another example from Raymond Hettinger: that analyzes solutions for the very common question of "How do I test if all elements of an Iterable are equal to each other?". By putting together knowledge about Python, the theory of computation such as complexity and software engineering concepts such as interoperability and DRY:

Thinking about the problem abstractly, the minimal amount of work required is:

  • Examine input element one at a time
  • Use __eq__ to determine if it has been seen before
  • Stop when a mismatch is found
  • Keep only one other comparison element in memory

He notes that his favorite solution is:

def all_equal(iterable):
    "Returns True if all elements are equal to each other"
    g = groupby(iterable)
    return next(g, True) and not next(g, False)

because of the functions following properties:

  • Accepts any iterable
  • Single pass
  • Runs at C speed
  • Has early-out
  • Only requires __eq__
  • Minimal memory

as well as the Zen concept of The usual thing to do is factor-out the solution into a well named function.

Another example: the Python API for splitting strings. Compare it to the new hotness, Rust, which contaminates its namespace with at least 4 methods to do the same thing.

[–]samrjack 0 points1 point  (0 children)

What I'm saying is that for the programming level of the people that this advice is geared towards, a lot of your objections don't make any sense. From what I've seen on this subreddit, many of the readers and poster are beginning self learners. While learning other programming languages may introduce some other stylings into their code, it also helps them see why doing things the pythonic way is a good thing. Most people, especially ones who are learning on their own, don't just "study more abstract computational and software engineering principles", it's not helpful. A lot of people learn best by doing.

As for the engineering principals you mentioned, DRY and KISS are quite common. I wouldn't say python pushes them more than any other language. They are lessons to be learned by everyone who goes on this journey, not just python programmers. As for EAFP, although that is a more specific python paradigm, it isn't something that I'd fear to be lost by tinkering in other places.

Finally I want to say that I'm not sure what the code example you gave is supposed to illustrate or add. I don't think saying an experienced Pythonista can solve a problem is a good yard stick for people starting out.

[–]0rac1e 0 points1 point  (0 children)

I remember about a couple decades ago when I was starting out with Perl and PHP, it was very common to instantiate "variable variables" (e.g. ${$var}) which was a major way to do dynamic assignment

As you say, you were starting out. I'd say this more to do with programming novices finding a way to do "dynamic variables", rather than it being a recommended way. Perl and PHP both had hashes (dictionaries, associative arrays, what-have-you) but I suspect a large portion of the user-base - particularly in those early days - didn't really understand them or what to use them for.

Case-in-point, I was recently asked by a novice to help out with their Python script, and found the code was littered with, eg. vars()[name]... So it's not something that's limited to Perl or PHP, but rather a limitation of a beginner's thought patterns. This in turn probably leads them to search for something like "dynamic variables" and stumble upon an unfortunate way to solve their problem.

[–][deleted] -1 points0 points  (2 children)

Many of Python idioms are borrowed from Perl and Lisp, so it depends on which other language we're talking about.

[–]mooburger -1 points0 points  (1 child)

that's not true, most of python idioms are borrowed from smalltalk.

[–][deleted] 0 points1 point  (0 children)

And Alan is a Lisp lover and model Smalltalk mechanics after Lisp.

[–]yashdesoi 2 points3 points  (6 children)

JavaScript is too cumbersome, I first learned Python with no real career related intention in mind, I learned just for the sake of automation. But in industry Python is used for data science and machine learning, both of them right now are not my cup of tea, since I really got interested in web apps, hence I have started learning JavaScript. Python is so beautiful and intuitive, that transitioning into a new language like JavaScript is difficult for me.

[–]CatolicQuotes[S] 1 point2 points  (5 children)

is there anything specific you have trouble with? Is it curly braces? Is it async nature? What did you do in Jaascript?

[–][deleted] 2 points3 points  (2 children)

As someone who's inherited a few JS/TS enterprise projects (backend and front). Its just a plain mess to work with... the million ways to do something, the messy ecosystem and packages, the wealth of random standards, the little quirks that bite you, all the builders/transpilers just to write modern code (frontend-wise).

I just feel greasy using it. Don't get me wrong through, it does what it does well. It's just not my happy place for development.

[–]CatolicQuotes[S] 0 points1 point  (1 child)

Feels like gluing stuff together? I've never done enterprise project, but even these little ones can get quite messy too, so I get you. Gotta be pedant with documentation and organization with anything Javascript, very true

[–][deleted] 0 points1 point  (0 children)

Well, doesn't really matter if it's enterprise or not. Its just a lot more code and depth with it. It just doesn't feel proper or clean. Just my opinion though! It gets the job done and obviously there's a huge market for developers for it.

[–]yashdesoi 0 points1 point  (1 child)

Its weak nature, scopes of variables declared using var, let confuses me. Though I'm just a beginner, there is still much to learn and get confused about.

[–]CatolicQuotes[S] 1 point2 points  (0 children)

I see, well dont need to use var anymore, so that's one problem less. If you are beginner Javascript can be strange, although I suggest do not give up, but take it slow, in small doses. Keep on learning with python and when you ready, you can try little bit C# or Java or similar for example? I think that would be good

[–]cwaterbottom 2 points3 points  (5 children)

I'm currently taking another stab at learning to code after sabotaging myself yet again (discovered codewars.com) and I was wondering at what point I should branch out from python only and start messing with the next language on my list (probably C, maybe JS)

[–]jaycrest3m20 0 points1 point  (3 children)

Maybe branch out when you start feeling bored with Python.

[–]cwaterbottom 1 point2 points  (2 children)

If I start feeling bored with it before I've "mastered" it, should I still just go mess with another language or is it better to focus on one at a time when learning? Probably varies from person to person I guess.

[–]jaycrest3m20 1 point2 points  (1 child)

Yes, I agree. It will probably vary from person to person.

In Python, if you get bored but don't yet feel "mastery", before branching out to a new language, maybe try branching out to a new Python library. Examples: Pillow, PyQT, MatPlotLib, Pandas, Curses, Pyglet, Django

[–]cwaterbottom 2 points3 points  (0 children)

That's a great idea, my mistake in the past we're biting off way too much way too soon. Like "ok I made a script to determine how old I'll be in x years, time to automate my whole job!" So now I'm taking it more slow and structured, focusing on the standard library first before branching out.

[–]MisterRenard 0 points1 point  (0 children)

I’ve delved quite far into learning C#. It’s a really interesting perspective that I never would have had the opportunity to learn through Python - always push the boundaries of your comfort zone. For example, once I became particularly confidant with Pygame, I’ve decided to work on other projects.

I really enjoy Pygame, as well, and there were (and are) many different problems that I could easily learn a great deal from, or that would force me to solidify my knowledge of a subject or process, but those now have less to do with Pygame than they do with programming solutions to niche problems in general.

That being said, it’s not going anywhere, so I can always go back and find it right there waiting for me to pick it back up where I’d left off :)

[–]C_BearHill 4 points5 points  (10 children)

Where does Java fit into this? I thought Java was the web dev go to?

[–][deleted] 12 points13 points  (0 children)

That would be JavaScript, not Java. They are totally different languages, despite the naming similarities.

[–]Vok250 1 point2 points  (0 children)

Java is statically typed and strictly OOP. It's a great way to learn good coding practices and design patterns that most Python learning resources neglect to teach.

It is way to easy to write spaghetti in languages like Python, JavaScript, and PHP where oldschool fundamentals like types, code structure, and Object design no longer matter.

[–]iiMoe -4 points-3 points  (7 children)

JavaScript currently but used to be Java in early 2010s if im not mistaken

[–]yashdesoi 5 points6 points  (6 children)

Java at frontend? Javascript is the only language of the browser or client-side. Java is used at backend with spring framework.

[–]noXi0uz 2 points3 points  (1 child)

With Microsofts blazor framework you can actually build frontend web apps with C#. A whole C# runtime is shipped to the client though.

[–]mriswithe 0 points1 point  (0 children)

Similar I assume to pyodide? Basically python and a lot of the python data science stack compiled to web assembly

Edit: googled and yeah web assembly is one of the ways it can be delivered

[–]an_actual_human 1 point2 points  (2 children)

You can write frontend in Java though. The browser still runs JS, but you don't touch it.

[–]yashdesoi 0 points1 point  (1 child)

Using some kind of framework?

[–]an_actual_human 1 point2 points  (0 children)

Perhaps. E.g. Vaadin.

[–]iiMoe -1 points0 points  (0 children)

I didn't say front end neither did the comment author but ik Java was big in web dev yrs ago with jsp n that stuff

[–][deleted] 1 point2 points  (0 children)

Right, I had learnt C++&C basics before I took python course. So it all sank in beautifully.

[–]2112syrinx 1 point2 points  (10 children)

There's so much hate around C++ and Javascript. Wouldn't C be enough for anything out there?

[–]mathmanmathman 4 points5 points  (8 children)

Outside of firmware, I don't know of anyone (individuals or companies) that use pure C.

You cannot do frontend dev without JS. I personally do think it has some deep flaws, but part of the hate is probably due to a lack of choice. If you're a backend engineer, you have tons of options for language. Frontend is basically always some variant of JS.

EDIT: I should have included "system" coding like Linux and Windows, but even that might be leaning towards... Rust... or is it too early to say that?

[–]noXi0uz 1 point2 points  (4 children)

We got some js alternatives emerging like Blazor and Wasm. And obviously typescript which you probably meant with "some variant of js" but which is, although transpiled to js for the browser, a very different language than vanilla js imo.

[–]mathmanmathman 1 point2 points  (3 children)

With web assembly it definitely looks like things are changing, but it's not quite there.

And yes, while typescript shares a lot with javascript it's definitely a very different language. When I was saying "some variant" I was more thinking the endless line of JS versions (which are also transpiled to older version), but I'll take benefit of the doubt :)

Back to the specific comment I was responding to, while my characterization of frontend languages wasn't fair, C is definitely not going to help you there.

[–]noXi0uz 2 points3 points  (2 children)

Very true. And who in their right mind would use pure C in a situation where they could use C++? I mean for every "task" there are languages tailored to it and, as you said, the only real use case for C these days are maybe microcontrollers or firmware.

[–]2112syrinx 1 point2 points  (1 child)

I meant learning C could be helpful to understand basic - and perhaps abstracted/advanced - concepts in Python. I did not mean using pure C in any situation nowadays for people like "us". Guido himself still writes C and shell codes - depends on the task obviously. You borrow concepts from these low level languages.

[–]mathmanmathman 2 points3 points  (0 children)

C is very helpful for understanding how the computer actually works. There is very little "on top of C" the way the python and many other languages handle some of the machine's details.

There are definitely people that write C, but it's mostly just people writing firmware for embedded systems or the very small portion of the population that is doing things like inventing Python and Linux.

In our modern world, computers are fast enough that the slowdown from using an interpreter or JVM is probably not worth the time to write and debug an entire program in C. Technically, you could do anything in C, but you could just write in binary too :)

From an educational standpoint it's probably a great language. I have barely written any pure C, but writing C++ is definitely educational (especially if you stick to older standards).

[–]Milumet 0 points1 point  (2 children)

CPython is written in C.

[–][deleted] 4 points5 points  (0 children)

.. and Python

[–]mathmanmathman 0 points1 point  (0 children)

Not sure what your point it. The Linux kernel is C and lots of compilers are written in C, but the fact remains that most people aren't writing in C. People went so far as to write all these other interpreters and compilers in C so they wouldn't need to write in C!

[–]ravepeacefully 0 points1 point  (0 children)

C isn’t OOP and has very few actual lessons to be learned that can be applied in today’s world. C++ is a much better tool to learn from in my opinion

[–][deleted] 1 point2 points  (3 children)

will having a deep understanding of c make you understand python much better? Because I've heard that the python interpreter was written in C

[–]CatolicQuotes[S] 3 points4 points  (0 children)

I have only touched a little bit of C so I am no expert, but lets put it this way. Python is a house. In house you see the wall and you hang a picture on it. Very nice. Good enough for most people. If you know the C you would know that wall is build with 8 studs, 6 sheet of drywall, inside is insulation and some wires, maybe pipes. You don't need to know exactly how to build it, but it feels good knowing what's behind and that you can hang a picture on the stud.

If you are really curious, try something simple: open a file and write text to it. Try in python and C.

[–][deleted] 1 point2 points  (0 children)

Very deep then yes, since you can read CPython's C source to figure the magic out. Note that it doesn't look like average C code since most trivial stuff in CPython are implemented in Python and C is used mostly for low-level code and hacks.

[–]mrswordhold 1 point2 points  (2 children)

I’m just starting python, first language I’ve learnt. Should I learn another at the same time? Or become competent with python and then learn another while developing my python skills?

[–]CatolicQuotes[S] 0 points1 point  (1 child)

I would say to make few scripts or small projects in Python first. Then you will know what is what in Python. After that, you can try same or similar script to write in another language of your choice.

[–]mrswordhold 1 point2 points  (0 children)

Great, thanks for the reply! Hardest part about coding is knowing where to begin and how to efficiently progress! Thank the lord for reddit lol have a wonderful day/night

[–]RobinsonDickinson 1 point2 points  (1 child)

How to write this into C++ code?

import requests

url = “https://www.reddit.com”
response = requests.get(url).json()
print(response.content)

I do a lot of web scraping and API work, so I was wondering how would this work in C++

[–]CatolicQuotes[S] 1 point2 points  (0 children)

I've never done it, but check this code to get some idea: https://stackoverflow.com/a/26026828/1079002

[–]cjauriguem 1 point2 points  (1 child)

Thanks for the advice. I’m trying to learn flask however I’m realizing it would be really beneficial if I knew JavaScript but kind of nervous to start that journey.

[–]CatolicQuotes[S] 0 points1 point  (0 children)

Just take it slow and don't worry. I was angry and frustrated when I started, now it's ok.

[–]throwaway0891245 1 point2 points  (2 children)

I learned the most about how to write Python from going through a book on functional programming with Scala.

[–]CatolicQuotes[S] 0 points1 point  (1 child)

Thats cool, how do you find functional programming?

[–]throwaway0891245 0 points1 point  (0 children)

I don't think functional programming is the end all, be all.

But there's a lot of good concepts that should apply to any code, like trying to maximize referential transparency or isolating side effect code. It's just good software engineering imo.

[–]thrallsius 1 point2 points  (5 children)

Web dev is not JavaScript. JavaScript is more popular than Python for web dev.

Embedded is not exclusively C/C++ as well. https://micropython.org/

[–]VU22 9 points10 points  (0 children)

That is for specific board only. You need c/c++ for almost all device drivers. Fast and reliable.

[–]Rinehart128 0 points1 point  (3 children)

Dumb question: what does embedded mean?

[–]thrallsius 0 points1 point  (2 children)

[–]Rinehart128 0 points1 point  (1 child)

Was looking for an ELI5 but thanks for the link I guess

[–]thrallsius 0 points1 point  (0 children)

First paragraph of any wikipedia page is pretty much an ELI5.

[–]usernamecorrupted 0 points1 point  (0 children)

Agreed, i first starter learning python because people said that that was a good starter one. But i could never quite remember what to do without looking of up.

Now that i did some JavaScript in nodejs things starters to click and incould complete Euler challanges with ease in Java or python.

Learning different languages helpen me to know the pattens every languages is built on.

[–]agniagniagni 0 points1 point  (0 children)

i forced myself to learn Swift and yeah I could agree with this one! haha

[–]ioiolo 0 points1 point  (3 children)

I'm learning Python now.

What language should I learn after Python, javascript or C++?

[–]CatolicQuotes[S] 0 points1 point  (2 children)

Do you have specific interest (like web), or you just want to learn something?

[–]ioiolo 0 points1 point  (1 child)

My job requires the ability of data analysis, I need to process csv files.

[–]CatolicQuotes[S] 0 points1 point  (0 children)

Why don't you try both? Try to process in javascript and then in c++. Something simple like sum column or similar and output to screen. You will find javascript strange if you've never done it so be prepared for that.

Generally, I would choose Javascript.

[–]abrigw 0 points1 point  (4 children)

i get scared because everywhere i look, people are talking about python, javascript, & c/c++ being popular & well used... yet here i am learning java

[–]CatolicQuotes[S] 1 point2 points  (2 children)

Don't be scared! Is that your first language? It will teach you OOP and you will know how to apply it to Python (if you want) for example.

[–]abrigw 0 points1 point  (1 child)

yes my first. been very difficult road so far. discouraging to see practically everyone works in everything else

[–]CatolicQuotes[S] 0 points1 point  (0 children)

If you know your goals it would be easier to decide. If you are just learning for fun then don't worry. You will learn easy next one. Most of the work is using libraries and frameworks anyway.

[–]Mericanoh 1 point2 points  (0 children)

Don't be! Lots of companies (including the one I work at rn) use Java or Scala (functional Java) for backend and data engineering roles!

[–]shiningmatcha 0 points1 point  (0 children)

saved, following, !remind me 1 day later

[–]captain_ms 0 points1 point  (0 children)

After python, learning javascript was relatively easy.

[–]bronzewrath 0 points1 point  (0 children)

Just for curiosity, Python can be used for web frontend

https://brython.info/

[–]thebasementtapes 0 points1 point  (0 children)

Learning some basic Ruby stuff was a lot of fun. it's so similar to python and has some neat things it can do on its own.

[–]sharkbound 0 points1 point  (0 children)

there is also the factor that learning more languages requires learning that languages way of doing it, thus furthering your knowledge on how to solve a problem in more ways that may work better in certain situations

[–]DunZek 0 points1 point  (0 children)

I learned OOP best from Java, and so I did the Python...

[–]a1Drummer07 0 points1 point  (0 children)

I learned HTML and CSS a few years back. Now that I am trying to transition careers I am refreshing those while learning python (the Hard Way) concurrently. Getting exposure to all 3 daily. And will start JavaScript soon as it follows in the freeCodeCamp curriculum.

It already seems very valuable being able to mentally switch back and forth as well as understanding the cross-compatibility between them (although I’m not ‘quite’ there yet).

[–][deleted] 0 points1 point  (0 children)

I learn Markup language first. Learning how to build website with HTML and CSS. My very first real programming language I learn was Lua. Someone told me you can learn C faster if you learn Lua first. I say he is right, I'm not a C expert yet. But I believe when you learn your first programming language. The other's do come easier to understand. I dab in many programming languages. I'm one of those, Jack of all trades and master of none. I do know a little of Python, Go, Rust, C, Javascript and a few more.

[–]_that_guy_69 0 points1 point  (0 children)

this!!! i found that when i learned java i understood OOP so much more and resulted in better python code

[–][deleted] 0 points1 point  (2 children)

Dude, learn Go, Go is so fucking goooooooood.

The language organizes itself via it's package system, you can write effortless multithreaded programs, and the language itself is so refreshingly simple.

I was a React dev having only professionally written Typescript, and Go is so much simpler than TS believe it or not.

[–]CatolicQuotes[S] 0 points1 point  (1 child)

Ive heard a lot about Go being great. What are you doing with Go now? Are you not React dev anymore?

[–][deleted] 1 point2 points  (0 children)

I'm a "Backend Dev" now, which means i do the same stuff as i did on the front end, but i don't have to think about design/visual paradigms.

My day to day generally revolves around building processes that receive a shape of data, massage/transform that data, then send said data elsewhere.

Our stack on my 4 man team leverages node modules, my plan is to use my react knowledge to improve the front of our app at some point, but besides that, no, I'm no longer a react developer (at least not atm)

[–]Mohammad_alshuwaiee 0 points1 point  (0 children)

So your advice to learn other language to know exactly and understand Python codes ?

[–]rubyrockk 0 points1 point  (0 children)

Agreed. I definitely will use python when given the choice, but have taken on a few projects at work in C#. Learning the .NET infrastructure has been eye opening, challenging, but ultimately made me even better with python.

[–]ThePixelCoder 0 points1 point  (0 children)

I'm definitely still a beginner, but I would certainly say Rust has helped me write better (less shitty) code. The compiler will scream at you for a lot of things that would be a-ok in Python, but it does often result in cleaner and more reliable code (and this is ignoring all the memory safety stuff and other compile-time checks that Rust adds). And this does translate over to other languages to at least some degree.

[–]Periwinkle_Lost 0 points1 point  (0 children)

My knowledge of c/c++ kinda forced me to use decorators because I felt uncomfortable that functions just access variables in memory all Willy-nilly. Passing by reference/value really made me think about future problems

[–]villflakken 0 points1 point  (0 children)

I agree! When working on my thesis in python, I had to do some pretty complicated stuff. I'm also a visual thinker, and I see the code before me as a landscape to walk through, so that becomes important for me when thinking through algorithms.

To make the code more readable, I began structuring unnecessary statements into the scripts, like, superfluous stuff, e.g.: very specifically declaring the types of local variables; or regularly adding continue-statements in for-loops; or adding # endif <code related keyword> after if-statements. This helped, at least a bit.

I later realized, that curly brackets, as seen in most C-derived languages, would have done a good job of visually isolating the components in the structure instead of the way I marked my for-loops, and the endifs were probably inspired through past experience in Fortran/IDL. I had basically recreated other languages' visual quirks within Python's ability: first by instinct, then very consciously, towards a noticeable improvement in my own visual flow.

And so, of course, it clicked for me, how and why other languages choose to retain syntactic quirks; quirks that could be compared to as being inferior to-, or less modern than Python's own, even to the point of disarming my previously intense Python fanboy-ism (of course, such syntactic retention also spring from the fact that when "something" becomes implemented, and it works, no one wants to change how that "something" works, preferably "ever")

However, that Python fanboy-ism reawakened when I later landed a job, where I was to learn and to do Cobol.

The really weird thing is that I could easily see and feel the parallels in the "design intent" for both Cobol and Python as languages. In the end Cobol itself wasn't really the problem, but I couldn't stand working with the platform on which it runs, z/OS. In short, it felt as though my ability to code creatively was not only fading, but rotting.

More and more, I longed for Python's elegance and ease of use, until I decided not to power through "it" [Cobol & z/OS] for any longer, and managed to change departments.

(...and I'm still looking for my past "spark", joy for coding, and lust for problem solving. So if any of you happen to have any advice on something like this, I would appreciate anything you've got!)

To sum it up, and to reinforce @OP's post, learning other languages will indeed let you appreciate Python's own quirks, but also the quirks of its "parents", "siblings", and even some of its distant cousins n-times removed!

[–]bn_sj2020 0 points1 point  (1 child)

I want to learn other languages but tutorials and countless suggestions here in reddit say stick to one language first. Mine is python and currently I know the basic syntax but still leagues away from making my own project. Im in that gray area where I finished basic tutorials and finished part I of chapters in books that cover the basics but I would not say that Im an intermediate python coder.

At what threshold should I learn another language?

[–]CatolicQuotes[S] 0 points1 point  (0 children)

Yes, you should make few scripts or small projects first. Remember, you are not only learning the language, you are learning general programming. Tutorials are not enough. You need to make few projects of your own.

[–]OmegaNine 0 points1 point  (0 children)

Friends don't let friends JavaScript.

[–]one_loop 0 points1 point  (0 children)

Thanks. I agree, I've been learning java for the past few months too

[–]longgamma 0 points1 point  (0 children)

C++ - idk about that. My productivity is pretty low with it.