r/learnpython • • Sep 17 '20

For any programming language, how far can you go by just knowing the basics? How more advanced does it get?

So I’ve had a bit of experience using JavaScript as I worked as a web developer for experience. I didn’t go too far into it before I left and got a new job where I learn Python now. But what I’ve realised is, all the languages of course do all the basic foundations like arithmetic, lists, loops. And I was wondering, how much further on in terms of learning does it go? Because I found in my web developer role that most of my tasks were solved by just using these basics they teach you at the start. And the only “advancedness” of it was just how creatively you could think about how to manipulate the code to solve your problem.

Is this really all there is and any new code you learn is really just a step forward in these basics? Or is it a whole new area that I’ve not even scratched the surface of yet?

343 Upvotes

112 comments sorted by

182

u/queen_debugger Sep 17 '20

5

u/[deleted] Sep 17 '20

Thanks. I will!

77

u/Rabo_McDongleberry Sep 17 '20

I’ll have to check this out. I’m on year 5 off the first chapter of Python book.

Cries in stupid at programming.

17

u/OnlySeesLastSentence Sep 17 '20

You're not necessarily stupid (I have to say necessarily because I don't know anything about you so I'm not going to make believe I know you're competent lol), you're just inexperienced. Or, come to think of it, you're not experienced enough to be where you want to be - being the equivalent of five years of experience is pretty good.

7

u/Rabo_McDongleberry Sep 17 '20

I’m not completely stupid. But just something about learning Python hasn’t clicked yet. Like I can do html and some css. But I can double check my result visually. With the python stuff I’ve tried, there are no visual clues. It’s just text. Does that make sense?

27

u/turningsteel Sep 17 '20

The print( ) method and the debugger are your eyes in this case. Use them and it won't seem so mysterious.

7

u/gvsa123 Sep 17 '20

And type()

6

u/Rabo_McDongleberry Sep 17 '20

Thanks for the suggestion. I’ll try it out.

23

u/OnlySeesLastSentence Sep 17 '20

Ah I get it. What i recommend is doing print statements along with ifs.

Then when it works the way you expect, delete or comment the print and continue.

Like let's say you want to make sure you know how to use input.

number = input("type a number")

print (number)

So you put in 10, and it shows 10. Great!

Now let's say you want to make sure you can check against the 10, so you add this:

if number == 10:

print ("yes, 10")

You put in 10

But nothing happens.... What?

So add:

else:

print("not 10")

It prints out:

type a number

"10"

"Not 10"

What the hell?

So you decide to see if maybe you can double it to see if you get 20...

print(number*2)

It puts out

"1010"

HUH? Why is it typing 10 twice as though it was a string and not an int?

Wait a second ....

God damn it.

You go back to the input thing and do:

number = (int)(input("give a number"))

And solved!

That's how I program anyway. A debuffse would be nice, but I have had luck using them.

3

u/Rabo_McDongleberry Sep 17 '20

Thanks! I’m saving this!

1

u/OnlySeesLastSentence Sep 17 '20

No prob, enjoy

0

u/[deleted] Sep 17 '20

[deleted]

1

u/OnlySeesLastSentence Sep 17 '20

You mean the part where I do (int) (number) ?

Because I've used this in my code before and it seems to work.

0

u/[deleted] Sep 17 '20

[deleted]

→ More replies (0)

3

u/Mooks79 Sep 17 '20

Yep totally. It might be that you just need to keep slogging away and something will suddenly click and then it’ll start being like “ooooh now I get it”. Or it might be that a language with a different paradigm might suit the way your brain works, such as a functional language. It’ll be hard knowing when to persevere and when to cut your losses though.

2

u/Rabo_McDongleberry Sep 17 '20

I’ll keep slogging. But then I get discouraged and stop doing it for a long time because I lose that drive. LOL, it’s a constant battle.

3

u/Gingerbreadmen14 Sep 17 '20

What helped me a lot is not just learning a language but also algorithms and "the way a computer thinks"

An analogy they used for this in one of my classes is a book compared to a picture story.

The pictures can tell what the story is kinda about but using words it can accurately described. It's the same thing with programming. You have to know what you're telling the computer to do if that makes sense

1

u/Rabo_McDongleberry Sep 18 '20

Thanks man. I appreciate the help!

2

u/mr_bedbugs Sep 17 '20

Do you use Pycharm? That helped a lot for me to learn. Learn how to use the debugger (if you use linux, you need to have gdb installed for the debugger).

2

u/Rabo_McDongleberry Sep 17 '20

I haven’t used Pycharm. I was just using Visual Studio with Python addition to it. You suggest Pycharm?

2

u/OnlySeesLastSentence Sep 17 '20

Vscode works just as well. No need to change.

1

u/Rabo_McDongleberry Sep 17 '20

Cool! Thank you

2

u/DrShocker Sep 18 '20

What's funny is, I've had a hard time learning css and html because I just don't care what things look like as much as I care whether they work. That's why I bias myself towards embedded systems and stuff that interacts with sensors and actuators lol

So I find it good to know there are people who think from the opposite direction, it probably gives you a lot of strengths that I won't develop as easily

1

u/Rabo_McDongleberry Sep 18 '20

True man. There are opposites to everything. I can visualize almost anything and work purely based on concept and not needing to write anything down. But then this purely written stuff stumps me. lol

1

u/toastedstapler import itertools Sep 17 '20

repr, type and dir for debugging whilst running, and lots of tests for intended behaviour

1

u/Rabo_McDongleberry Sep 18 '20

Stupid question. Does that work in all environments? Or specific certain ide?

2

u/donjulioanejo Sep 18 '20

All. They’re standard python methods.

1

u/Rabo_McDongleberry Sep 18 '20

Aah. Got it. Thank you

1

u/fernly Sep 18 '20

Any full IDE will allow you to single-step through your code, watching the variables change value. That's quicker than editing in a bunch of print() calls and having to go back and comment them out later. Plus, you can set break-points, so the code will run full speed up to a certain statement and then stop so you can look at things.

Although, full disclosure, single-stepping is sometimes not enough, if you have a complicated expression in an if statement, for instance. You step through something like

if foo<bar() and obj.method(3) then:
    # whatever
else: #whichever

and it goes to the #whichever leg, why? So now you edit in stuff like,

dbg1 = obj.method(3)
dbg2 = bar()
if foo<bar() and obj.method(3) then:
    # whatever
else: #whichever

and now you can look at the display of global and local variables and see, in dbg1 and dbg2 what the if was testing. Almost as tedious as editing in print() statements.

1

u/Rabo_McDongleberry Sep 18 '20

Thank you! I’m saving this as well.

2

u/konhaybay Sep 17 '20

Dont short change yrself, I had similar issues, what worked for me was learning syntax theoretically first then attempting any problem solving. Its reverse of typical dogma in programming, but thats what worked for me, I need to visualize what I am doing before attempting it, once I learned (still learning) the syntax things became much easier infact now I m looking into other languages (currently on Java now thinking to dabble in Python n Go) n they dont look too bad. You need to find yr own way, its not difficult at all but requires continuous learning n practice, go slow but keep it steady.

1

u/Rabo_McDongleberry Sep 17 '20

Thanks man. I think that’s my issue. I’m a visual learner. So it’s easier for me to grasp things I can either see or understand enough to create a mental image. I’ll have to keep studying.

1

u/dxbmea Sep 17 '20

Try pythontutor.com bro

1

u/Rabo_McDongleberry Sep 18 '20

Thanks! I’ll take look.

0

u/[deleted] Sep 17 '20

[deleted]

2

u/Rabo_McDongleberry Sep 17 '20

Cheers brother. To years of continuous improvement.

15

u/Tanmay1518 Sep 17 '20

I watched this lecture two times and it was so amazing both the times.

Even though I don't need metaclasses in my current usage, it is still so satisfying to understand stuff like that. Plus, he is an amazing teacher. I understood more about expert python from him than in any other lecture.

4

u/testfire10 Github mokrunka Sep 17 '20

This is actually a really cool video. Thanks for sharing that.

4

u/LargeFood Sep 17 '20

Thanks for sharing that. I watched the entire thing and loved every minute of it.

4

u/ronster2018 Sep 17 '20

Just watched this video and it really made me want to become an expert. I thought I had a good grasp on the language until I watched this. Now I'm looking at the editor and having a lost "John Snow" moment.

2

u/alphadist Sep 18 '20

Coincidentally, Powell is one of the keynote speakers for this year's pycon

1

u/coldbumpysparse Sep 17 '20

whoa I used to go to the nycpython meetup, didn't know James was such an expert - yes he was always well dressed and for some reason that made me think he was just a liason between the meetup and the times sq microsoft office where the meetup happened.

1

u/hisfastness Sep 17 '20

Thank you for sharing this! That was really enjoyable to watch, and humbling. I have so much more to learn...

1

u/cvak Sep 18 '20

Ha, didn't know about __init_subclass__ nice.

Is it really necessary to use metaclasesses when you need child classes to have a method, can't you just have empty method that raises error when not overwritten?

1

u/GalacticSuperCheese Sep 18 '20

When I first watched this video, halfway through I was thinking... where's this dude going? And then towards the end it all came together for me and I was wow!

In all of his videos, there are some very basic concepts, some things that simply go whoosh! and then there are some nuggets that simply blow your mind.

-1

u/tek314159 Sep 17 '20

There may be some good info in here, but man is the presenter such a patronizing, condescending douche that it's hard to get through. Half hour in and I'm still not sure what the point of this talk is. He's going over some basic python concepts you get from many books and hasn't laid out any framework or general ideas to support the title of the talk. Maybe I'll watch the rest when I have time due to the recommendation, but not too hopeful.

3

u/queen_debugger Sep 17 '20

“Basic”? :’)

Man, I really am stupid I guess

But.. interesting points. Curious if others feel the same

-2

u/tek314159 Sep 17 '20

Definitely not saying that. Actually, I'm sure there is some good stuff in there, which is why I plan on watching the rest. But the presenter is really awful.

3

u/Decency Sep 18 '20

If you're watching a video covering something you're already familiar with, in a talk explicitly aimed at non-experts, consider skipping ahead...

2

u/greebo42 Sep 17 '20

I watched it a few months ago and really liked it, learned a bunch ... I'd classify myself as limited intermediate with python, so a lot of it was enough to expand my mind a bit. I just rewatched the first 5m and can see that a confident guy in a suit might come off that way ... I wasn't particularly offended, though.

1

u/DanBcReasons Sep 18 '20

As an intermediate, it definitely didnt come off as patronizing! I really loved it. He knew his audience and went to a more basic level and refreshed some topics that certainly helped me. I think calling him a douche is definitely a bit much.

42

u/GalacticSuperCheese Sep 17 '20

You are right in the sense that most problems can be solved using basic knowledge of a language. Having said that, digging deeper is required to come up with elegant solutions to complex problems - solutions that require less code and are more efficient. Also greater knowledge means that you can take advantage of advanced language features that result in much faster code.

A couple of examples of somewhat advanced features of python are things like List Comprehensions and Generators which really take your code to a new level.

Usage of constructs like

for thing in list_of_things:

in place of

for i in range(len(list_of_things)):
    thing = list_of_things[i]
    ...

are not only easier to understand but much faster. The examples are endless but I am sure you get the idea.

So, to answer your question, yes there are tons of things beyond the basics that you should be learning. Also keep in mind that this applies to any language you use and learn.

4

u/[deleted] Sep 17 '20

Thanks for your answer! So for the most part, in terms of advancedness, it is really building on concepts that have already been introduced at your foundations and making them more elegant and less so of learning entirely new concepts that you’ve never seen before?

3

u/GalacticSuperCheese Sep 17 '20

Most basic concepts (conditionals, looping, etc) are quite similar in most languages; using the best algorithm or basic concepts (like difference between if and while) takes some practice and experience and in some instances is down to personal preferences.

Language specific constructs (like list comprehensions in python) are concepts you will have to learn.

Other things you have to learn is which external library to use in what scenarios (e.g. numpy or pandas); each one of these libraries will also require some effort to learn the best usage etc.

2

u/ccr10203040 Sep 17 '20

What would you recommend to anyone that has gone over Python basics already?

2

u/entanglemententropy Sep 17 '20

There's a nice book called Fluent Python that goes over a lot of really neat more advanced features and a little how Python works 'under the hood'. The video linked in the top comment is also nice.

1

u/ccr10203040 Sep 17 '20

I've heard great things about Fluent Python.

3

u/GalacticSuperCheese Sep 17 '20
  1. Learn some more basics :) I'd recommend looking up Raymond Hettinger on YouTube (especially beyond PEP8).

  2. Write a lot of code, and when you get stuck (which you will) look up your problem on Google (or your search engine of choice) and you'll probably learn 2 or 3 new things. Repeat forever!

1

u/ccr10203040 Sep 17 '20

I really want to learn how to write more pythonic code. And get the hang of object-oriented python.

1

u/thrallsius Sep 17 '20

Idiomatic python like your example is really a de facto standard. I believe the second pattern would rather be used by someone with experience in another programming language that does things this way.

There are much more complex python things that can be considered advanced.

0

u/[deleted] Sep 17 '20

[deleted]

7

u/GalacticSuperCheese Sep 17 '20

Yet you'd be surprised to see how many people do it incorrectly, especially those who already know another language.

2

u/NewShamu Sep 17 '20

Yeah I didn't use for in loops like that for a long time because I came from a C/Java background and that was the only way I knew how to do for loops haha. It's funny, I've been using Python long enough now that it feels so inelegant whenever I have to use range().

2

u/MonsterMeggu Sep 17 '20

Im definitely guilty of doing the second. I just started using Python instead of java one day and didn't learn the pythonic way to do things.

2

u/ErinMyLungs Sep 17 '20

I've done the second when I've had to iterate through multiple lists at the same rate because I didn't know itertools or about zip.

You can do a ton of stuff in python even if your knowledge of it is super shallow. And honestly I think that's pretty great.

86

u/[deleted] Sep 17 '20 edited Sep 17 '20

I've been coding Python at work for 9+ years and I still only know the basic. At least that's what I feel about myself. I would try figuring out the logic of the script I needed, and Google almost 90% of things I needed Python to actually do. Even simply read/writing text/csv/json.... I still need to Google that.

I've watched tons of videos, read tons of articles, dived into tons of documentation. When I needed to do something, my first thought has always been this "I've seen/read about this somewhere"... very rarely would I be able to just code it out.

Weird I know...

39

u/GalacticSuperCheese Sep 17 '20

True, in my opinion, a good programmer has to be an expert at googling stuff

1

u/cvak Sep 18 '20

And having the good stuff already purple in google search.

10

u/djh_van Sep 17 '20

So if you were applying for a python job tomorrow, what level would you apply for? A Junior, Mid-Level, or Senior Programmer? I'm not sure if you code professionally or just for fun. But I do wo set how much a python coder is expected to know all the constructs in their head, or just be able to understand how to make an algorithm and then just google the correct syntax to accomplish that goal.

3

u/[deleted] Sep 18 '20 edited Sep 18 '20

Im curious about that as well. All my experience are in the VFX/Animation industry and getting some insight/experience into actual software dev/engineer job is somwething I highly desire. Ive taken some online algorithm and code interview courses and will need to heavily revisit them if I apply to such position.

Job posting around my area (Bangkok) for Python are almost always data science/engineer by the way while dev jobs are mostly web dev requiring dominantly C# or PHP backend

5

u/[deleted] Sep 17 '20

i mostly use R at work (it at least seems like Python is better for how I use it, which is why I want to learn it), and this is how I feel about using it. Copy and paste with StackOverflow are most of my scripting process

4

u/Kbotonline Sep 17 '20

I’m the same with SQL. Constantly googling how to do stuff, even though I’ve created my own db models and all that. But then I’ll forget how to return records from the past hour or something and off I go googling again. The worst is when you can’t remember the name of a function, like it’s on the tip of your tongue and you’re googling all kinds of terms to try to figure out how to use it.

4

u/ladystardustxxx Sep 17 '20 edited Sep 18 '20

I was given a tip by one of my lecturers. If you have a good solution for something that you won't use often, or you find yourself googling something a few times, to keep a notebook with it. Be it a physical or just a .txt file. It's been a great time saver for uni.

2

u/Kbotonline Sep 18 '20

That’s what I have. I have different repositories with all kinds of scripts sorted by type and function. I’ve powershell, cmd, python and sql repositories with examples various things. Still though, it’s always the simple things I forget.

2

u/frex4 Sep 18 '20

Maybe do yourself a cheatsheet?

I'm having trouble learning git command and flow, so I made my own cheatsheet for git. Printed it out, just taped it to my workspace. Helped me a lot :).

4

u/mywan Sep 17 '20

I'm the same way. For me it doesn't matter which language it is, or even whether I've used that language before. I don't even remember basic built in command names. The first time I ever looked at shell code I wrote a config file parser the same day, and implemented a configurable file type handler from that. Once I have a clear language neutral model of what I want in my head it's simply a matter of identifying the features of the language needed to accomplish it.

3

u/uberdavis Sep 17 '20

I’ve been coding twenty years and I still review my framework and revise the code. You never stop learning and finding better ways to do things.

1

u/alphadist Sep 17 '20

Wow is it the same for all libraries or only a few?

1

u/[deleted] Sep 18 '20 edited Sep 18 '20

There are a few I use more regularly than others that I can code without looking up as much. PyQt/PySide is 1 of them.

1

u/CatolicQuotes Sep 17 '20

What do you do?

1

u/[deleted] Sep 18 '20

Im a pipeline dev in VFX/Animation studio

41

u/AngelOfLight Sep 17 '20

There is more to a language than simply getting familiar with the syntax. Most languages come with an ecosystem that involves tools and libraries. Python is one of the more well-supplied in this area. There are modules for just about anything you can imagine - some of the more well known are pandas (dataframe operations), numpy (numerical and array operations) Spark (parallel dataframes, distributed map/reduce functions), SQLAlchemy (RDBMS operations). This is in addition to base libraries that you should be familiar with, like collections and requests.

Python's base syntax allows for some elegant syntax that can greatly simplify your code. List comprehension and map/reduce, for example, can accomplish some highly complex operations in a handful of lines of code. Ditto for generators and decorators.

So, the actual syntax is just one part of the story. You can learn nearly all of Python's syntax in a fairly short amount of time. Its true power lies in combining the constructs so as to produce clean and simple code that can still accomplish far more than the equivalent, probably highly verbose code in other languages.

5

u/tek314159 Sep 17 '20

I think this is a big point. Python has so many libraries available that being familiar with what's out there goes a long way towards making you a more efficient and productive programmer. Don't need to reinvent the wheel and you can integrate all sorts of solutions to do what you want. When I started python, I had some trouble imagining exactly what I could do with it. But since then, I've played around with pandas, flask, pillow, sqlalchemy, and more to do lots of stuff I wouldn't have thought so easily achievable from core functions.

In that way it still harkens to its roots as a simple scripting language - a way to tie together lots of tools quickly and produce results in minimum time.

7

u/deadjojo7493 Sep 17 '20

You getting paid to learn python. Tell me where to sign up.

12

u/[deleted] Sep 17 '20

A lot of time, the basics (the loops, the arrays, the try/catch if/else statements) is where the meat of a program works. Much of the rest is fluff to make it more user friendly.

I'd place myself at a hobbyist level. My biggest fault when it comes to programming, is never really knowing where to start. If I want to make something, usually it's already up on Github and I just need to modify it to suit my needs. But this is also important because whilst I'm not writing my own code, I'm still capable of understanding someones code well enough to know what I need to change/add/remove to function to what I want.

This is where the imposter syndrome comes into play. You'll see guys who started coding on a C64 in Basic. And they still feel like they know nothing.

Programming(And hell lets just tack all of IT into that) isn't so much knowing every library, syntax marking, service call there is. (Because that's a friggin' LOT and impossible to know everything) but it's about being able to understand what you need to make something work the way you want, and how to implement it. Referencing my Github comment above, it's about knowing what I need to change, add, or remove to make it function how I want it to function and when I don't know, do I know where to look and understand what I am looking at when I find a solution?

You'll get some hardcore fanatics that go "Just write it all yourself" and others (from what I've seen the vast majority) "Don't reinvent the wheel" and you'll always have this.

1

u/alphadist Sep 17 '20

Well said

6

u/Yojihito Sep 17 '20

After the basics come the frameworks.

You don't "just" code, you do projects/tasks which require specific stuff which require specific frameworks.

E.g. for Python:

  • Webframework: Django

  • ML: Scikitlearn

  • Tabular data: pandas

  • Math calcs: numpy

And so on.

4

u/thrallsius Sep 17 '20

Where do you draw the line between the basics and past the basics?

Just treat the process continuously.

3

u/joelwallis1 Sep 17 '20 edited Sep 21 '20

You can get to the moon. Whenever you dive into advanced concepts of software engineering you realize all these tools, techniques, paradigms, etc., are created to make the life of a developer easier. It's true your software can get more mature, resilient, performance, etc., if you're using the right tools/languages/paradigms/techniques to solve the problem at hand, but there's nothing stopping you from doing things on "bare hands" (aka. using rudimentary language constructs like variables, functions, and some other basic language constructs).

This is also a recommendation: get good with the basics and you'll get over the advanced stuff quickly. They are just clever ways to use and manipulate the basic stuff.

3

u/veeeerain Sep 17 '20

You will have to just learn the short cuts that come with any new language, and the capabilities it has. For example python you will see that a lot of functions that are there are almost similar to some in js, but you may be able to do things in python that were better than js. Such as machine learning and data science. Honestly the foundational stuff will always stuck with you b you will always need to just adjust to syntax.

3

u/jerryelectron Sep 17 '20

Different languages have their strengths. So it's not all the same.

Fir example, classic for loops are probably one of the last things you should use in python.

3

u/01123581321AhFuckIt Sep 17 '20

Honestly with python you can get away with a lot knowing the basics. I consider Automate the Boring Stuff very basic but you can accomplish so much with just the knowledge learned there.

3

u/[deleted] Sep 17 '20

A program gives you a result. A good one gives you the correct one. A great one does so quickly and efficiently.

A higher level language like Python is obfuscating the basics, which is why a language like python is approachable and easy to learn. Which I guess is ironic, because what you might think of as the advanced stuff, is really the basic stuff. The advanced stuff is what gets you to the efficiency.

So, I'd wager you haven't even scratched the surface, but that really depends on what you're trying to accomplish.

3

u/throwaway0891245 Sep 17 '20

Imo, in general the basics of any programming language is the same. However, there are key concepts that different programming languages focus on that aren't found in other programming languages.

For example, some languages focus on exposing relatively low level concepts in computing, like memory management and syscalls (e.g. C). Some languages are really as direct to the hardware as you can really go (assembly). But the concepts are not necessarily just how abstracted the computer is. The concepts may be abstractions themselves. For example, languages like Swift have the abstraction of optionals which is supposed to help you avoid issues with nulls. Some languages are more geared towards functional programming and all of its constructs, like Haskell. Types is another one, the abstraction of a data type and a language's requirement for explicit types is optimized for developing on large codebases. Rust provides an abstraction of memory ownership, which is supposed to help with concurrency and security. Go has the concept of vendoring dependencies. Underneath the language, the implementations and the way these languages work also differ and have consequences in terms of performance and optimization.

I think that expertise in a language has to do with being able to code in its idioms and knowing the standard library well, as well as specific details regarding the language implementation. The idea is that if you're really good at a language, then you can quickly make elegant and efficient code by using the idioms of the language in a way that you can create optimized code - not necessarily optimized for performance, but optimized for whatever you need it to do like being easily understandable, maintainable, extensible. In terms of performance optimization, it is probably knowing the language on a deep enough level to understand how the abstractions connect to the hardware and applying that information appropriately.

But ultimately, I think you can go far knowing just the basics because it seems to me that a lot of times, a lot of problems that you run into aren't even necessarily about the language so much as it is about some deeper issue that may not even be related to something related to technology. Of course, programming is a tool and its applications are wide and diverse. I'm sure you'd have to know very much about hardware and programming languages for something like being a compiler developer, or a language designer, or someone that develops highly optimized libraries in a low level language.

5

u/softwarethrowf Sep 17 '20

Remember that programming is not the same as coding, and computer science is not the same as programming

2

u/bumlove Sep 17 '20

What's the difference?

0

u/[deleted] Sep 17 '20

[deleted]

1

u/artificial_neuron Sep 17 '20

Programming is part of CS but it's entirety.

I'm not sure why think programming and coding is different. I wonder if it's down to perception or if they consider coding to be writing a script and programming as writing a program.

1

u/RoosterBrewster Sep 17 '20

Maybe he means a programmer is a software developer. Similar to how an engineer is not the same as a drafter.

1

u/softwarethrowf Sep 18 '20

Well CS isn't necessarily knowing the best algorithm its more the theory behind the algorithm and why it works and how to make algorithms, coding is literally writing code with no kind of mathematical logic like front-end web development and programming is solving problems using code, turning an input into a solution.

2

u/badjano Sep 17 '20

Everything in programming is just file reading, serialization and networking, understand these 3 things and you can do a lot of stuff

2

u/TazDingoYes Sep 17 '20

Personally I feel like knowing the basics has helped me understand most languages I've tried to pick up on a surface level... But for me that creates the problem of getting bored easily because a lot of courses don't go into how to implement those things in a meaningful way. I did a whole JS course and by the end knew what I felt was enough to get a basic job in it if I wanted to, but at no point did the course teach me how to implement JS into a website, so ultimately it was useless. It seems like a lot of online places are like this, Unity, C#, and Python were ones I had the same issue with, it's like, cool you wrote out what an array looks like but how would I use this in context with other bits of code or inside a useful program/app.

Maybe I'm just really specific about how I learn, but I just hit a wall after a point because I feel like the fundamentals don't change all that much between languages and there's only so many times I can tolerate a beginner chapter on "this is an if statement" and "here's how to make a bunch of console based 'games' you will never use again"

2

u/[deleted] Sep 17 '20

Learning the language's constructs is only the first step. Mastery of this stage is illustrated when you can be shown an arbitrary segment of code in that language, and you'd be able to identify what every operator, expression, statement, etc. means, as well as what the entire segment does as a whole. Using natural language as an example, it's like if I showed you a random sentence in English and had you define what each word in the sentence means, and state what the sentence as a whole is saying.

The next major step is learning algorithms and data structures. This is analogous to learning how to write a strong sentence in a natural language such as English, and understanding what makes that sentence strong (or weak). In programming terms, you'd want to learn the most common algorithms, algorithm paradigms (divide and conquer, greedy, DP, backtracking, etc.), data structures, and space-time complexity analysis. Mastery of this stage is being able to implement a solution to a computable problem, determine if your subroutine is optimal, and if not, what tradeoffs exist to improve it asymptotically.

The third major step is Design Patterns. Recycling the writing metaphor, this would be like learning how to write great paragraphs/stanzas. Design patterns are used to create software architectures in a methodical and commonly recognized way, just like written works such as poems, novels, and articles are often composed of paragraphs/stanzas. Mastery of this stage is illustrated when the developer can skim through a library/framework and identify the patterns that were used and why it made sense or didn't make sense to use those patterns.

This is what I call "building up" the language. There is also "building out" the language, which involves acquiring experience in the most popular frameworks and libraries of that language.

3

u/egehurturk Sep 17 '20

Python can be very very complicated and complex if you dug deeper. Asynchronous code (__aiter__), Metaclasses (class Test(type), class Subtest(metaclass=Test)), Higher order functions, and many more. If you want to master and become a true pythonista, you can read Fluent Python

1

u/Flynni123 Sep 17 '20

With python you can learn things like everything: From algorithms to artificial intelligence. From easy apps to complex guis. From a webapp to a complete html Server.

So its a wide range and nobody can say how hard one thing is 🤷‍♂️

1

u/Herodegon Sep 17 '20

Learning programming is relative. There's a near-endless quantity of material on the general subject, increased exponentially by all the nuances each language adds.

Instead of seeing it as steps forward through the basics, look at it instead as an infinite learning experience that could see you using the same tools in ways you never though of before.

1

u/titojff Sep 17 '20

I learn as I go, if i need more I'll search and learn it(It's a a hobby)

1

u/[deleted] Sep 18 '20

Beyond the basics what makes you intermediate in a language is knowing the libraries, so you can solve problems faster and easier than from scratch

1

u/[deleted] Sep 18 '20

You should be able to get yourself solving problems at the first place. Try to create a thing based on an idea and in order to do that, try to break things into smaller parts and solve the smaller ones first.

0

u/Chris_Hemsworth Sep 17 '20

Coding is literally like learning a language. Imagine the difference between English, Spanish, and French. There are lots of similarities, but they have a focus on different aspects. French and Spanish rely much more on the differences between masculine/feminine words, as well as bring a lot of emotion in to convey concepts in a slightly different way. There are some words that don't translate very well at all, and what you end up with is a 'rough translation'. That said, almost everything that needs to be communicated can be in some form or other.

Coding languages are the same. For example, in Python there is no 'case' statement (yet), but there is in other languages! You can get around it by using dictionaries and their get() command, but that is one of those 'rough translations'.

Some languages are designed around solving a specific problem. MATLAB for example was designed for data science and to make things intuitive for scientists, but you'd be crazy if you said you wanted to create a web application purely in MATLAB. It can probably be done, but its just not efficient and would require lots of work.

1

u/jabpoke Sep 19 '20

It is a good metaphor.

There could be a concept that is a standard notion in one language but requires much more explanation in another. (In French, someone might respond to the question, "did you get up early?" with a single word: "trop". Way too early. Maybe it comes with a groan. Or did you eat too much at dinner? again, "trop", meaning "way too much." And so on. But in English, it's more words for the same thing. You see the same word in Italian - when the musician sees a marking on music that reads "allegro" it means fairly fast, but "allegro non troppo" means, "but don't go overboard.")

Programming languages have that. Some languages think in matrix operations and make them easy - MATLAB, APL. Otherwise try to do business logic using plain-english: COBOL's claim to fame was that.

In fact, the inventor of COBOL (Grace Murray Hopper) repeated - constantly - that we needed different programming languages. The specialist in meteorology might need to write out his/her programs differently than the person writing interest computations for a credit card account.

1

u/redfacedquark Sep 17 '20

If we're comparing verbal languages with computer languages I can't help but think that (British) English would be the PHP of the world. Too much broken, legacy artifacts to be a useful reference language going forward but currently annoyingly pervasive.

0

u/[deleted] Sep 17 '20

Stupid comment in my opinion.