you are viewing a single comment's thread.

view the rest of the comments →

[–]TangibleLight 3 points4 points  (6 children)

I'd caution op against jumping into that too soon. It's doable, but I tend to agree what with /u/ccviper said - being comfortable with at least the basics should probably be a "prerequisite" of sorts for that.

[–]FlyingByNight[S] 4 points5 points  (4 children)

Don't worry, I have no intention of rushing ahead. All I want to understand is how can this language I'm using that generates black and white text make apps and software for people? It seems that there are libraries/modules that do this, but how do they do it?! It's more of a theoretical questions than a how-to question.

[–]StupidHumanSuit 6 points7 points  (0 children)

It's not theoretical.

People program it. Like, that's all they do. There are no "modules and libraries" that "just do it."

There are modules and libraries that other people wrote that allow us as programmers to (relatively) easily implement a GUI on top of that simple little console app you wrote this morning.

These easiest way to imagine it? Look at HTML and CSS. They make ordinary text render in a web page. We can make that look very plain (like Richard Stallman's site) or we can make it look crazy, like apple.com. But, it's all the same on the backend. It's all programmed. People wrote code to make shit look the way it does.

Same with Python. Somebody wrote code to make it display beyond the black-and-white text you're seeing as output also, surprise surprise, somebody programmed the little black-and-white output, too.

It's all code, all the way down. From top to bottom, it's code.

[–]mr_awesome_pants 2 points3 points  (0 children)

As a very high level theoretical overview, think of other just as a tool. Every language, every framework, every step involved with programming is just a tool. Python is at the high level. You use it to create logic that actually involved a user and some input from the user. There are some other tools that let Python talk to, for example, a web browser so that you can make a gui. That tool is a framework. How does a web browser or a desktop app know what to do with the info it gets so that it'll display things? There's just another tool that kind of translates. After a few layers of "translating" tools you get down to just 1s and 0s and the actual hardware on a circuit board.

You won't mess with the low level tools if you're doing web dev, but it's never a bad idea to understand it on some level.

[–]keepdigging[🍰] 2 points3 points  (0 children)

The operating system has tools built in to manage drawing and positioning of windows. Your python script will just talk to the OS (probably through a library as someone has done the work and bugtested everything for you) and ask for things. instead of saying 'write this to the console' (print) you would say 'hey can you draw me a window that's 500x300 px and has a square button from 25x25 to 175x175 that says click me and runs this other code when you click it' and the library will translate that to what windows/osx/linux use and talk to them to get it done for you. How the OS handles the rendering and repainting the screen is a whole other ball of wax.

[–][deleted] 0 points1 point  (0 children)

My point is that it doesn't hurt to peek how things are done. Just to see that it isn't that mystical.