Halfway through Python, should I move to JS or stick with Python?

Halfway through Python, should I move to JS or stick with Python?
0

#1

Hello. Last week I finished my first course. It was a Udacity Nanodegree (introduction to programming) It was very good.

I learnt some python, functions and some (mostly theorical) OOP.
After that there was a bit of front end teaser, so we learnt a bit of JS, jQuery, the usual.

Now. I want to extend my knowledge in computer science and study through the OSS Computer Science curriculum BUT I also want to keep things real and work my way through the FCC.

Should I finish learning Python?
I am reading the Eloquent Javascript book and I feel confortable with it but sometimes I wish I had finished python, because it might be helpful in computer science and data analisys stuff.

On the other hand i preffer Javascript because it is more accessible I can imagine projects straight away to work on. And that is a HUGE motivation boost. A little game in python requires pygame and it is going to look fugly and dificult to run, in JS it is there in your browser!!!


#2

I think the question you should be asking yourself now is “what do I want to build now?” I definitely won’t say if either is better than the other, because they’re apples and oranges. The only thing about js is that you can always learn more, and do more with it. If you were building/working on a Django web server in python, you may only need js on the frontend. If you were to stick with learning ,ore js, you’d see that you can also use js on both frontend and backend via node.js and other frontend frameworks. That being said, completion is always more desirable. If you’re halfway through python but only 1/8 through JavaScript, my inclination is work on the python. But it depends on what you want, only you can decide that. Also, if you plan on finding a job as a developer, do a search online for junior level developer jobs in JavaScript and python. See what kinds of skills they’re looking for and measure that with what you have or want to learn next. More importantly, develop a plan for what you’ll be learning. Perhaps you can learn both? These are two programming languages that aren’t going away any time soon and continuously need more expert developers.

Also, congrats on finishing eloquent JavaScript . Being a developer means we will never stop learning. Have you picked up a book in python? To recap though, skills are important, don’t get me wrong… but you don’t have to be an expert to build websites and applications. So try building something you think would be fun or would fill a need or both, and then see what else you need to work on. And last but not least, I have been in your shoes, and continuously ask what is next. Ultimately, my journey is my own though, so I have to make those decisions myself. Perhaps this leads into another topic, of seeking out or establishing a mentor who is familiar with you, your progress, and what growth opportunities you might be suited for next… I hope I’ve been somewhat helpful… good luck!


#3

Your suggestion is also useful to me.
I am currently learning javascript and python simultaneously.My javascript’s learning is almost based on Free Code Camp’s project.I am now learning python and move on to django through a website called ‘Code Entrepreneur’ and the official documents.Hope it can help op .Also,I am hoping that the way could be the right way.Eventually,My dreaming is to be a Full-stack developer.

And due to the school’s work,I am learning C language. I think thought it’s very similar to javascript, but it’s more low level language.


#4

Oh I have not finished eloquent Javascript, but I will because I love the way it is written.

What I like of Python is that everything is really clear. Classes are straight forward, there is not funky variable conversion. Things like that. I can understand why it is becoming the top language in universities.

I feel comfortable with JS. I am not one of those moaners that hate JS after learning Python.

I just have a feeling that Python is more classical and it might be helpful to have it as a reference language.

But maybe I should ditch Python and go straight to the FCC challenges and Eloquent Javascript and get things done. That is the more practical approach.


#5

@josepagan

Agree with above: depends. Depends how far you would like to go in the next months. If you have no experience programming, I suggest python. However if your plan is to get into front-end developer projects, learn JS.

A Caution Note: I had some python experience before starting JS, with not much experience in web development. However I struggled a lot with the functional/async nature of some of the common problems found in web development. The callback problem is nightmare and VERY HARD to debug. You can get frustrated a lot quicker with JS than with python. Ask people doing django how hard they have found it.

Another Caution Note: functional programming and reactive programming are becoming the most popular paradigms nowadays. Many important languages are making use of it: Scala, F#, .Net are few examples. Currently the python documentation out there doesn’t emphasise it more than JS does. You could learn quickly to program in python for sure, but if you want to get into the new paradigms of programming you might have to go through a wall having to learn a totally new way of coding. Having the base of programming will help a lot but you will have still to find your way and it could take some painful time (in my personal experience). If you want to go into the new paradigms, I personally I don’t like JS much but it could be the best option of those two.


#6

I wonder if It would be a good idea to complete the Python course I started. That way I understand the language and I can use it as a reference language and then dive all the way into JS.
I just dont want to feel stuck too early in Front End land.

By the way I have been refreshing my Python knowledge in the last hours and it feels good. I wonder if learning 2 languages at the same time is actually not that bad. I somewhat can understand the differences better.


#8

Thanks a lot for the heads up!!!. That was the first mooc I tried but I found It too harsh. I was not so focused and oriented back then and I was tripping over basic programing issues so the difficulty curve stood up like a wall when dealing with computer science concepts

I will be happy to try it again, now in a 3.5 fashion! :D.
I wish it was a “do at your own pace” MOOC though.


#10

Like everyone has stated, learning Python would depend on your specific development needs. However, regardless of back-end programming languages of JavaScript, Python, Ruby, Java or C#; you will still need the foundations of Front-End skills of HTML, CSS and JavaScript. That is the first thing I tell anyone. Learn the Front-End first, then move to the back-end. You will go further in development.


#11

At the moment I am still at the very beginning of the FCC, learning basics concepts of HTML. So as I carry on with that I am just revising and expanding my Python knowledge, by the way using this Udemy course which is really good.
What I am doing is taking notes, mental and not so mental of the difference. This morning I was revising scope in Python and of course I noticed that things are different in JS. This morning also I learned of lambda functions in Python and then I found out about arrow functions.
I already know about Python classes vs JS prototypes, inheritance vs delegation.
I am wondering if learning two languages at once it is that bad at all. Because it forces me to dig into programming concepts.


#12

@josepagan

Not sure about whether it is good idea to learn two different languages at the same time. I haven’t tried but I have heard from other people that it could be hard.

JS and python are very different, syntactically and semantically. However they also share many things. The problem is: the switch between languages is made even harder because they sometimes name similar things with different names. The opposite is also possible. So it can be very confusing trying to learn both at the same time.

I think it would be better to have a first good idea about programming concepts using python before going into JS. If you choose to learn first python and then JS I would suggest:

  • Try to use the lambda function and the available functional programming capabilities of python for your solutions. You could use python to have a first view of the general concepts. Be aware that functional programming and specially callbacks through anonymous functions is not the pythonic way, but fortunately python has still some functional capabilities that could be enough for you to start with JS later on.
  • One thing you can REALLY start learning with python is data types and operators. Both python and JS works with standard data types and have a very similar - although not identical - approach to mutability - VERY important. Learning that in python will get you ready for the JS way.
  • Some new implementations in JS ES6 are inspired in languages like python. One of them is generators. Other is classes. Some Object Oriented (OO) programming could also be useful.

Assuming you already tried the basics of programming with python and then came for JS, keep in mind the following:

  • The use of null values is loose in JS compared to python.
  • Although learning the basis of OO with python could give you some idea, it won’t help you at once to understand the ES5 heritage chain in JS and other pseudo-OO implementations in ES5. I found the OO in python more mature. Again, ES6 seems to bring a different approach that it is closer to python and other other languages.
  • You will make typically use of closures in JS. They are not so required in python and when required the pythonic way is using classes, no functions - although you can use functions too.
  • JS has a better use of async commands, and use a lot of callbacks and closures to handle them (that, if you go the traditional route: currently promises and even Rx are being used to handle that kind of events). Nothing similar in plain python, perhaps Tornado (I don’t advise you to try that way…).
  • In my opinion, debugging in JS is still a very serious problem.
  • IMO JS is more effective than python for event-driven programming, although again less explicit. No point to waste your time learning that in python, imo.
  • Things like variable declaration as well as property/method binding could have some differences between python and JS. In ES5 the “this” (“self” in python) could be a bit tricky, not sure if also ES6 as I haven’t used it a lot recently.
  • Eventually you will notice that OO plays still a relevant role in intermediate/advanced JS programming. Design Patterns are an important thing to learn: constructors, singletons, etc. A very common one in many JS code, and specially nodejs, is the module pattern. Wait to start JS to learn them: they will be affected by JS functional programming style and they will look very different to similar structures in python.

Hope this helps


#13

It really depends on your goals. js is what you want if you wanna do apps and facebook stuff, for sure, which are both in high demand. React js will get you some money if you know it.


#14

Hi all,

I’m new to web programming, so would you say it’s better for me to learn Node.Js instead of Python, since I’ll be using Javascript in the front-end anyway ?


#15

I think, if you have time - learn Python first. It’s very ‘clean’ language with clear structure, really good for beginners. JS has some concepts which are harder to understand - closures, prototypes, this meaning, async and so on.
If you need/want to start making websites asap, it’s probably good to go with JS since you will need it anyways, at last for front end.


#16

Hi all,

If you’re halfway through Python and you like it then I’d say stick with it and do FCC in the meantime because it’s used in front-end anyway. I love Python, and recently I decided to learn web-development by creating web-app in Flask - great framework btw but I also work through FCC. I think it’s good to know JS and Python :slight_smile:


#17

This was quite an impressive post. Thanks a lot.
I think I will focus on JS now for a few of reasons:

  • The most important, the FCC focus on that, and that is what I am following now.

  • JS gives me tools to create nice stuff straight away. In its core there is event and graphic handling. I can make little games and project which will give me a bit of a motivation boost. Yes, I would get same boost making console stuff with python but at least my family will not think I am crazy.

  • Not all CS courses are in python, many are in other languages like Scheme. And I dont think that easy or even moderate CS courses uses languages features very extensively. I could just port the exercises to JS if I wanted.

  • I have already bought the books “Eloquent JavaScript” and “The Principles of Object-Oriented Javascript”.