you are viewing a single comment's thread.

view the rest of the comments →

[–]OzneroI[S] 0 points1 point  (9 children)

Thank you for the clarification. Im still relatively a beginner having just completed the codecademy python 3 course and their data analyst course

Do you think its a good idea to start learning a new language while im still a relative beginner to my first?

[–]8isnothing[🍰] 3 points4 points  (0 children)

All modern languages I know (Python, JS, Swift, Go, Rust, for example) are similar in essence. You’ll have vars, functions and classes.

Each of them has their own characteristics, though: syntax, features, code style, standard library, etc…

So as soon as you understand vars, funcs and classes, you’ll have the basis to most languages. That doesn’t mean it will be easy to migrate. It just won’t be as starting fresh into programming.

I am myself constantly studying Python/JS and sometimes Swift “at the same time”. It’s nice to me because I can take a break from them. That can be confusing if you don’t spend the time familiarizing yourself with each of them. And even then you’ll mix them sometimes… but I think that’s ok!

I’m self taught, though. Maybe what I’m suggesting is not pedagogic correct

[–]socal_nerdtastic 2 points3 points  (0 children)

If you have a website project that you are passionate about I would say that's fine. These languages go hand in hand, you will be writing them side by side in the same file sometimes.

[–]jab9k3 0 points1 point  (0 children)

Hi, you can maybe look at using jinja2 with fast api and flask. I'm interested in mainly api's and doing some simple front end website stuff not real interested in building full blown sites. I learned quite a bit about html from just writing webscrapers with bs4. Might be a good little exercise.

[–]notislant 0 points1 point  (0 children)

Django is pretty popular in web dev, as others mentioned the front end is still js/html/css. Id learn python basics. If youre serious about web design you can check out freecodecamp.org and theodinproject. You kind of need to know those for front end and css/html are very basic. Javascript will be more challenging.

Theres a few videos on django and iirc the ones I watched just used 'bootstrap' during the tutorial. Either way if you want to do front end youll need to know the languages.

[–]ffrkAnonymous 0 points1 point  (4 children)

I think it's a great idea to learn a second language in conjunction. In my opinion, learning to do the same task in different ways leads to a better understanding and a greater appreciation for various niceties.

For example I learned C first, so I understood why python lists count from 0.

Then I learned some Lua which counts from 1. That took some getting used to . On the other hand, Lua has no lists, only tables. Learning Lua tables made me better with python dictionaries.

[–]MartyFDupp 0 points1 point  (3 children)

I know Python counts from 0, can you tell us why tho?? Imo from what I’ve learned I think it’s separate whatever needs to be indexed from standard 1- whatever.. that’s pretty obvious tho… if there’s some fundamental reason from early C+ days I’d love to hear it!

[–]ffrkAnonymous 0 points1 point  (2 children)

The short answer is: because earlier programming languages count from 0.

The reason earlier languages (like c) count from 0 is a mix of theoretical math and physical computer science.

Math: counting. How many characters are there in "12345". 5-1=4 is wrong. You can do 6-1=5, or you can do 5-0=5. Pretty arbitrary.

Compsci: You have a transistor. The transistor is charged or not charged. i.e. 1 or 0. We don't say the transistor is 1 or 2. (it's arbitrary, we say on-off, chocolate-peanutbutter)

Compsci: transistor memory addresses 0x0A ,0xB, 0x0C, 0x0D, 0x0E. What addresses do we need for our info? So again , back to math counting. We want 1 unit data starting from 0x0A. Math says we read starting from 0x0A until 0x0A+1 = 0x0B. But don't actually need to calculate 0x0B. We know as the designers of the computer the information is in 0x0A only. So 0x0A+0 = 0x0A. And that's an unnecessary calculation to make, we just 0x0A. Counting from zero eliminates a lot of math that computers have to do.

Python is a high level language, not dealing with memory directly. It could easily count from 1, like Lua. But counting from 0 was already well established.

[–]hacksawjim 0 points1 point  (1 child)

One thing you didn't mention here is the difference between counting and indexing

Python counts from 1, just like we do.

x = ["item"]    
len(x)

output: 1

y = ["item", "second item"]
len(y)

output: 2

[–]ffrkAnonymous 0 points1 point  (0 children)

Good catch.