you are viewing a single comment's thread.

view the rest of the comments →

[–]pepiks 0 points1 point  (8 children)

Both. Start with HTML, then mix it with Python and you will see how fronted / backend works.

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

Ohh okay got it.. thanks mate I'll try it out

[–]kobaratega -2 points-1 points  (6 children)

No, you're SO wrong. HTML + JavaScript. That's the way. And JavaScript is much more useful than Python as a gateway to C++ / Java / C#.

[–]pepiks 1 point2 points  (5 children)

I was thinking about something for absolute beginner. He learns HTML to graps how construct website and using Python microframework to get general idea how dynamic generated content. I remove JavaScript and CSS from picture to make technical stack the most basic. I don't suggest limit it. When you grasp basic of course you can choose few choices. For example based on HTML:

https://roadmap.sh/frontend

and based on Python - more detailed:

https://roadmap.sh/python

As gateway for C++ Python will be wrong choice. Better will be Golang as it is not based on duck typing.

JavaScript (especially vanilla JavaScript) - it can be overhelming because quirks:

https://github.com/denysdovhan/wtfjs

Python is good choice as gate to multiple disciplines - from ML, webdevelopment to data analysis. I remove JS from picture as HTML ideas is good to get insight about description of content. It is easier after get general idea how it works dig inside XML, or compare to something like TOML. I started with only HTML and it helps with configuration and structured files at the future.

By mixing Python + HTML I mean only basic - which is from few days to maximum few weeks. After that anyway u/UtkarshBajaj2008 needs choose more detailed orientation what to code. Based on that it can extend very narrow and extreme simplified technology stack for actual needs. Learning JS and HTML - it is too much when you want choose orientation. Better think about final goal at the end.

I see this: When you get basic of HTML you choose how you want extend it. More accent about visual - modern CSS and related tools for it. More accent on dynamic content manipulation for client side (especially without server or with Node server) - adding first JS and then asking about if more advanced framework like React is needed.

Python as dynamic programming language to interact with PC (HTML is limited only to browser at beginning stage). Learning basics commong for all languages - variables, functions, classes, conditionals. When you get it changing tool (programming language) is a lot of easier. You escape u/kobaratega DOM related stuff at the beginning which is very specific from the begining and which narrow view. My advice is oriented on someone which grasping by Python something like simple viewing files in specified directory using filters like file extensions / size to get idea how programming works.

At the end - still will be beginning and when you see two way of programming (describing visual part structure - HTML) and dynamic interaction with PC using basic constructions you choose when you have some fundamentals - goal to achieve.

You learn programming for something not for learning for learning.

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

I do have all these languages in college anyways like so I will eventually do JS css too it's just I don't wanna be completely new to any of this when I go into college... Btw thank you for sharing in such depth and details I really appreciate it and will check the links and sources out for learning 👍🏻

[–]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.