5
$\begingroup$

Does anyone have any suggestions on a small program or application to write that would help a Python beginner work with JavaScript? For example, when one is learning JavaScript, building a small to-do list application is often practiced.

Is there something that meshes well with Python and JavaScript? Looking to gain some experience in writing a real-world application rather than watching video courses.

$\endgroup$
  • $\begingroup$ Are they both your first languages, or do you know one of them well? $\endgroup$ – ctrl-alt-delor Oct 18 '17 at 13:09
  • $\begingroup$ both first languages $\endgroup$ – redshift Oct 18 '17 at 13:17
  • 6
    $\begingroup$ This sounds like a good way to totally confuse yourself. You might look here for some general advice: cseducators.stackexchange.com/a/1111/1293. Python and JavaScript have different underlying structure. It might be best to build a foundation in one or the other first. $\endgroup$ – Buffy Oct 18 '17 at 13:31
  • 1
    $\begingroup$ Could the down voters, and close voters, please leave a comment, to explain why. Closing a question without explanation is rude. And could lead to @redshift running away fast. $\endgroup$ – ctrl-alt-delor Oct 19 '17 at 8:37
  • 2
    $\begingroup$ I'm also puzzled by the close votes. This question certainly seems topical to me. $\endgroup$ – Ben I. Oct 19 '17 at 18:55
2
$\begingroup$

I have just written myself a web-mark server, to store book marks to my website. I got fed up with the proprietary ones, and decided to make one of my own (probably could have found a ready made one with a Free Software Licence).

It used Couchdb. This involves writing code in Java-script (the manual says that the server side code can also be written in python, I chose JavaScript, so it would help be learn it), but because it provides the framework, you write lots of small functions. You will also end up learning about the no-sql db couchdb, http, and client side web design (html, css, Java-Script). I used jquery and knockout.js on the client side.

First things first

Because I did not follow a tutorial, I ended up looking stuff up as I went. This would probably be to effort-full, if it was your first language, as you would be looking up everything, and not know what to look up (how can you look up how to do a foreach in java-script, if you have not yet heard of a foreach.

Therefore it would be beneficial to find a tutorial to do first, then work on a project.

You can also work on an existing project. There are many Free Software (Open Source) project that you could help with. It is much easier to contribute to an existing project, that to start from scratch. If you want you can contribute to my bookmark project. (If you do work on someone else's project, and it if for an assessment, then ensure that you tell the assessor what bits you worked on).

Learning two languages at a time may make things confusing, and make it take longer to learn. However research into natural languages shows that, for babies and infants, learning two or more languages at a time has a positive long term affect. Though it does slow externally measurable performance at first. For these children the languages are in different contexts, one for each parent, or one at home / one at school. I would suggest that you focus on one language, until you get sufficiently skilled.

Python seems to be widely used as a teaching language (1st scratch, then python). JavaScript has may pitfalls. A good language to learn Object Oriented is Eiffel. However you could learn, non-OO first (OO just adds to structured, most modern languages are structured or structured+OO). Therefore, if you have not used scratch, then have a play with it, then start on python.

Other project Ideas — python

  • Unix command line tools: rewrite some of the Unix tools (I did this in C in 1st year at university).
  • Create a web-server: there a libraries in python.
  • Something with a Raspberry-Pi: these thinks have connectors to add some sensors and output devices (barcode scanner, rfid reader, LEDs, motors, relays, buttons, …). They also run Debian Gnu/Linux ( Gnu/Linux runs on 490 of the top 500 super computers (the other 10 are other Unixes), ⅔ of web servers, most of the internet infrastructure, and a lot of inbedded systems.
  • A game: 2D (the SDL library is very good), or text adventure / interactive fiction.
$\endgroup$
1
$\begingroup$

A project one of my students did was to build a data visualization pipeline where python was used for data preprocessing and javascript was used for web-based data visualization using a javascript framework. That worled out very well and used the strengths of both languages.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.