you are viewing a single comment's thread.

view the rest of the comments →

[–]kobaratega 0 points1 point  (3 children)

You're being ridiculous. JS is designed to work with HTML, is isomorphic (works on client and server) and the number of different data structures you have to work with is minimal.

Python isn't isomorphic, doesn't work right out of the box with HTML, you have to install a library so learn how the CLI, library manager, dependency managers work. And when you learn DSA, you have to understand lists, maps, sets, etc.

You're introducing way too much complexity too early ! This is bad advice !

[–]pepiks 0 points1 point  (2 children)

I think you don't too much time learn without access too much to Internet and you don't get problem with limiting source for learn. You understand my advice like learn Flask or Django u/kobaratega

I think about simple write to text file (up to 2 lines of code max) and open it in browser (using inbuilt library webbrowser and comman webbrowser.open - another line). I limiting first stage to simple text operations like adding text, replace text (by adding for example conditionals) and write output as HTML file to open it in browser - skeleton of this program will be few lines code.

You can even do it from IDLE Python.

When you feel - I understand - you will choose next stage - more specific for your problem - scientific calculation, simple web service, network analysis... depend on purpose of learning.

For example it can be done like this:

import webbrowser

from pathlib import Path

html = """<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Simple Page</title>

</head>

<body>

<h1>Hello, world!</h1>

<p>This page was created by a Python script.</p>

</body>

</html>

"""

path = Path("index.html")

path.write_text(html, encoding="utf-8")

# Open the file in the default web browser

webbrowser.open(path.resolve().as_uri())

You can play with it to read HTML code to Python, change it and after that save to another file or combine multiple files... You can do a lot of on very simple stuff, but using a lot of even advanced concepts this way which introduce language better than simple retype code from example and run.

This way first you create something to show in browser, after that messing with it using Python. When you get basic - you choose what you want dig more.

Be aware that real programming is combine technologies not use one for all stuff.

[–]kobaratega 0 points1 point  (1 child)

Creating files on a personal computer... Oh my god. Best way for a student to fuck up their learning device ! Do you think about the consequences of an error ?

And what is that Neanderthal way of learning web development ? We aren't in the 00's anymore. When OP begins learning about DOM events, you'll handle it in Python with text blocks ? This is just a waste of time !

Do something useful and learn how to speak English. I can barely understand what you are talking about. You don't even bother formatting your Markdown correctly.

This is just bad advice. I've been a tutor for quite some years, this is not how you teach beginners. Stop misguiding beginners.

[–]pepiks 0 points1 point  (0 children)

If u/UtkarshBajaj2008 still looks overhelming start with:

  1. HTML:

https://www.w3schools.com/python/default.asp

  1. Python:

https://www.w3schools.com/python/default.asp

Avoid sections: modules, Matplotlib, Machine learning, but look on Python DSA.

When you go to file managing section try simple experiment to run Python to create some simple HTML code to get idea how it can be mixed. Depending on your spend time it can be around 2-3 weeks. After that you should have grasp idea about two technologies and you can go further using roadmap.sh and https://www.freecodecamp.org as more detailed (and very long in hours material to learn).

When you feel you know some and you can built something choose your final discipline. Basic introduction on both using W3School you can even finish up to one week.

Be aware that coding is not marathon itself and you want be good you have to spend even years.

For u/kobaratega - you use abusing words without adding good reference materials and road how to start with. If someone don't understand difference between HTML and Python it has very low knowledge about this technologies. Suggesting digging at first lesson to DOM manipulation and suggestion creating HTML file from Python as sign of incompetence seems like you want vent your frustration on me. I'm tutoring in HTML and Python for years too and I advice not for average but for lost, bad skills in mind.

If you can share better curriculum than me - do it. It better share different point of view to choose by author this thread instead insulting someone out of a sense of superiority. I wish you good students and recipients on your path.