mage2tv / topics

Discussion and voting on future and existing mage2.tv topics.
27 stars 1 forks source link

[General] Core Exploration #170

Open alanablett opened 6 years ago

alanablett commented 6 years ago

I think it would be great to have a series on how you explore core concepts of Magento, and how you come to understand the concepts. I appreciate that this is a very open ended and complex scenario, but it could be good to perhaps see how you would tackle such things.

I know that some core concepts are very difficult to explain but it' be good to perhaps go through your thinking/internal monolog as to how you read through the source code, and navigate your way through to understanding it.

I'm sure there are plenty of real concrete practical examples that should be covered first , but as a mechanism of exploring the core, a series like this may be beneficial.

Vinai commented 6 years ago

Thanks for the suggestion @alanablett! Usually exploring the core for me involves going through the code in circles for a while muttering swear words. Usually it's just reading code, but sometimes it also involves xdebug or print statements. I sometimes also start writing exploratory tests, or using a REPL to poke the system to confirm or disprove ideas once I have at least a theory. Over time understanding grows, like puzzle pieces fall into place, and the underlying ideas start to emerge in my mind. That could take minutes, hours or years (ui components...). It mostly depends on familiarity of the surrounding code I guess. Recognizing patterns also helps, but that actually sometimes has hindered more than helped, when I thought I recognized a design pattern where there actually wasn't one (or at least not the one I though I recognized).

Another big factor for me is if I like the style of the code. So usually anything that is more functional is easier for me to grasp, compared to long imperative methods. I don't think those are inherent properties of the code, it's more my personal preference. Trying to understand code that is written in a style I personally don't like to write is harder than understanding code that is closer to how I like to think.

Once I have gained an understanding, I can usually refresh that much more quickly by navigating through the code when needed. That is the point at which I feel I can teach about an area in a class.

Right now I have no idea how to do videos on the topic. It would be great to come up with a more methodical way to approach exploration. I think it probably is possible.

So far I haven't found anybody else in the Magento ecosystem who uses exploratory tests or a REPL as a tool to learn about the core. I find them valuable tools that I could cover in screencasts, but I think that's not what you where thinking of when opening this issue, right?

I'll definitely leave this issue open so it can be voted on. If it gathers interest I'll start thinking about it more.

Thanks again, I appreciate your input a lot 👍

mmmols commented 6 years ago

This is something that nearly EVERY teaching websites neglects. The deductive reasoning when encountering a problem which the documentation doesn't say anything about. This is something we learned quite well in Magento 1 because the docs just isn't there and the community had to do it all by themselves. However, this turned out to valuable. Because many sites simply doesn't teach you how to READ core code. Whether it is Magento or __ framework.

So I totally like the idea of a tutorial with you teaching us how YOU would read the code, find a solution to a problem and then implement a solution based on the deductive research into the core code.

One format could be to have series of issues. Each video would be to tackle one issue at a time. A video would contain of e.g.:

Well, this was just a quick thought.

Just to summarise, I really agree that this would be sooo beneficial to have such content.

alanablett commented 6 years ago

Thanks for your response @Vinai

I totally agree. I think these kind of videos would be hugely beneficial, though i'm sure they would be pretty tricky to produce.

So far I haven't found anybody else in the Magento ecosystem who uses exploratory tests or a REPL as a tool to learn about the core. I find them valuable tools that I could cover in screencasts, but I think that's not what you where thinking of when opening this issue, right?

To be honest, I think there would certainly be interest in seeing how you use those tool as part of your exploratory efforts. Even if its some of the more "simple" areas of Magento, that workflow would be great to see.

Thanks for considering my suggestion. Keep up the great work.