GUI Programming Introduction - Computerphile

  Рет қаралды 204,479

Computerphile

Computerphile

5 жыл бұрын

Who's in control? The real difference between programming for command line, or programming for GUI. Dr Steve Bagley introduces the differences between the two.
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 360
@KamiraXIV
@KamiraXIV 5 жыл бұрын
5:37 - "We can write a program, we can collect some data from the user" - Now you're ready to work for Facebook
@gartekk1987
@gartekk1987 5 жыл бұрын
Maybe not for Facebook, but looking at the software quality, after this you are probably ready for Twitter.
@GifCoDigital
@GifCoDigital 5 жыл бұрын
@@gartekk1987 I dont think you get it.
@FireWyvern870
@FireWyvern870 5 жыл бұрын
@@GifCoDigital he doesn't
@xristoss.2037
@xristoss.2037 4 жыл бұрын
Actually he can work EVERYWHERE
@lyrimetacurl0
@lyrimetacurl0 4 жыл бұрын
😂
@liquidpebbles
@liquidpebbles 5 жыл бұрын
Can't wait for the rest of this series. Know exactly how a gui works/happens from the very low level has been a question that I've had for years.
@CTimmerman
@CTimmerman 5 жыл бұрын
There's usually a thread that draws all the visible components, checks for user input like clicks, translates click location to component, and sends an event to the handler of that component. That handler can do things like getting the value of a text field and sending it to the origin of the web page whenever the reply button is pressed.
@jimbeammeup9879
@jimbeammeup9879 5 жыл бұрын
Me too.
@agentNirmites
@agentNirmites 5 жыл бұрын
If anyone makes a playlist, please share.
@kqvanity
@kqvanity Жыл бұрын
It can be nested. Take web browsers for instance inside operating systems. Both are layers upon layers of abstraction.
@douwehuysmans5959
@douwehuysmans5959 5 жыл бұрын
Nice, a buffer overflow...
@theobreakspear3323
@theobreakspear3323 5 жыл бұрын
Yes! Great to have a mini series on the really nitty gritty of something very interesting explained in simple terms by an expert.
@AdamReece87
@AdamReece87 5 жыл бұрын
Did "Namme" make anyone else uncomfortable? :P
@FlavioCamus
@FlavioCamus 5 жыл бұрын
its a feature!
@superscatboy
@superscatboy 5 жыл бұрын
It made me very uncommfortable.
@GeekManolis
@GeekManolis 5 жыл бұрын
The stack buffer overflow vulnerability (unrestricted scanf into fixed size buffer) makes me even more uncomfortable :D
@GabrielDubatti
@GabrielDubatti 5 жыл бұрын
Mme too.
@ZeedijkMike
@ZeedijkMike 5 жыл бұрын
No, not really. It was a demo.
@paulhowell
@paulhowell 5 жыл бұрын
Nice content, look forward to more. I was in your year for CS at Nottingham.
@brucewayne6932
@brucewayne6932 5 жыл бұрын
Im actually very interested in this so i am excited for the upcoming content. On my work, i had almost a possiblity to code high level guis (such as QT), but i have never understood what is going on under the hood and if i can write a gui library on my own
@parentteachernight
@parentteachernight 5 жыл бұрын
I'm really excited for this series!
@chaoslab
@chaoslab 5 жыл бұрын
Big fan of software rendering here and have been writing my own gui's for over 3 decades now. (6502, 680000, C and now Java).
@user-vn7ce5ig1z
@user-vn7ce5ig1z 5 жыл бұрын
Menus/pointers is better than mice/pull-down-menus not only because it's a lot more succinct, but also because it isn't limited to just mice, it can also include things like light-pens and touch. 0:33 - Touch interfaces do have pointers (an x-y index with activator); they don't have cursors (a graphical representation).
@TobiasWeg
@TobiasWeg 5 жыл бұрын
I am just learning\making my first GUI. Looking forward for the next videos on the topic.
@FlaSh3ch
@FlaSh3ch 5 жыл бұрын
Gooey
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
7:53 Don’t forget, server programs are also event-driven, and they often don’t have any kind of user interface at all. Instead, they are responding to events received over client connections.
@CTimmerman
@CTimmerman 5 жыл бұрын
Clients are often users, though.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@CTimmerman Who might be running GUI frontends. Or they might not.
@wonderingwhy6410
@wonderingwhy6410 5 жыл бұрын
The shell itself is a CLI program and the user is in control. The shell prompts only once and you can type what you wanna do. The input is parsed and the program responds based on what you wrote.
@johnpenguin9188
@johnpenguin9188 5 жыл бұрын
When I first encountered the visual studio/Xcode way of making GUIs I said “this looks like someone putting together a PowerPoint” And then I understood where so many garbage apps come from.
@alice_in_wonderland42
@alice_in_wonderland42 5 жыл бұрын
lol
@christopherg2347
@christopherg2347 5 жыл бұрын
A possible better name: "Event Driven Programming". Possibly a seperate episode about it. Usually Event Driven is implied with GUI and vice versa. But there are cases where you use one, but not the other.
@yash1152
@yash1152 2 жыл бұрын
thanks for your information. while event driven programming maybe a more precise name, but certainly not better. as that would have reduced this videos reach for me. so yeah... this can very well be mentioned in the description though.
@LiEnby
@LiEnby Жыл бұрын
There are immediate mode UIs eg IMGUI that are not event driven. Where input it handled *immediately*
@KrossX
@KrossX 5 жыл бұрын
Ah, the nightmare of programming GUIs.
@PapoochCZ
@PapoochCZ 5 жыл бұрын
The F in GUI stands for Fun
@noxabellus
@noxabellus 5 жыл бұрын
Use immediate mode
@tantumDicoQuodCogito
@tantumDicoQuodCogito 5 жыл бұрын
Noob
@31redorange08
@31redorange08 5 жыл бұрын
@@PapoochCZ There's no F in GUI.
@HMan2828
@HMan2828 5 жыл бұрын
@@31redorange08 r/woosh
@kushalchordiya7229
@kushalchordiya7229 5 жыл бұрын
Along with being a successful actor Phillip Seymour Hoffman is apparently also an experienced programmer.
@YourMJK
@YourMJK 5 жыл бұрын
Kushal Chordiya *was, sadly. RIP
@mesaber86
@mesaber86 10 ай бұрын
Command-line can be controlled by the user too but you chose to program it in such way that the program is in control of what to do. You could have a control loop to continuously ask what to do next and if the user is happy with current choices.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
6:20 There is another way to write a command-line program, and that is to get its inputs from command-line arguments. Options passed by keyword can typically be specified in any order. This is typically more flexible than asking the user to type input lines.
@dealloc
@dealloc 5 жыл бұрын
I think the point of the video was about how to write GUI and GUI-like programs both for devices with displays as well as terminals that may not have displays. This is a very high level look at how each work. Of course in the real world, you would often have a similar level of abstraction if you want to have more refined user interfaces.
@error17_
@error17_ 5 жыл бұрын
games are the ultimate GUI, the user and everything else in the game is in control in realtime
@UberAlphaSirus
@UberAlphaSirus 5 жыл бұрын
No, not really.
@johnpenguin9188
@johnpenguin9188 5 жыл бұрын
Unless you make it not real-time.... 🤔
@BrandNewByxor
@BrandNewByxor 5 жыл бұрын
True
@jhumphries76
@jhumphries76 5 жыл бұрын
I'd argue that games can have a GUI but most of their graphics are a rendering of a view of the world or some other changing graphical view. To me a GUI is a consistent set of graphical controls for the user to interact with a program, and for the program to display information. All GUIs (games or otherwise) aim to respond in realtime I would say.
@error17_
@error17_ 5 жыл бұрын
@@jhumphries76 thats a more accurate way of describing a GUI, that the controls are consistent. but its just a bit of fun to say games are GUIs :P
@Leeofland
@Leeofland 5 жыл бұрын
I love this channel!!
@adibzadeh
@adibzadeh 5 жыл бұрын
I love your videos :) Thank you, you explain very good 👌
@zipfooo
@zipfooo 5 жыл бұрын
Could you explain virtualization Docker / container platforms?
@Marius-vw9hp
@Marius-vw9hp 5 жыл бұрын
A whole series on it? Nice! I was just about to start learning GUI stuff now :) Can anyone recommend any books on the topic? I use XCode and Ecclipse on a Mac. Language is C++ and Java.
@abdalhadifitouri131
@abdalhadifitouri131 5 жыл бұрын
This was actually really insightful. Hadn't considered this frame of thinking
@callofdutymuhammad
@callofdutymuhammad 5 жыл бұрын
Look up the observer design pattern. Most GUIs use that for event handling
@abdalhadifitouri131
@abdalhadifitouri131 5 жыл бұрын
@@callofdutymuhammad thanks man
@Outfrost
@Outfrost 5 жыл бұрын
Nice explanation, but I have a suggestion. To me, applications like vi, nano, less, htop, etc. may run in a terminal, but they are not command line applications, they are GUI applications. Whether something runs in a terminal/console or a window manager, and whether or not it's event-driven, seem to me to be very much secondary to whether something is a GUI application. Command line applications, by definition, accept input from a command line (i.e. your terminal or another program's output) and print their output to a command line (i.e. your terminal or another program's input), sequentially. Those mentioned above (vi and company) don't do that, they interact with your terminal directly, accepting keystrokes without having to read strings line by line, and modifying the content of the terminal window completely at will. They are like typical desktop applications more than they are like typical command line applications.
@yash1152
@yash1152 2 жыл бұрын
they are not GUI application technically ('cz no graphics), like i said in a comment above, they are called TUI - terminal user interface
@AndersJackson
@AndersJackson 5 жыл бұрын
(That is not the ISO standard date format :-) ) (What about X11? )
@cozydino7691
@cozydino7691 5 жыл бұрын
Interesting video! I'm waiting for the next one regarding the low level GUI
@Luredreier
@Luredreier 5 жыл бұрын
Thank you, I appreciate this. =) Really looking forward to this series.
@Nomadjackalope
@Nomadjackalope 5 жыл бұрын
Looking forward to this series of videos!
@UberAlphaSirus
@UberAlphaSirus 5 жыл бұрын
This will make for an interesting series,please do cover windows 3.1 and amiga workbench.
@nab-rk4ob
@nab-rk4ob 5 жыл бұрын
My gui payroll story: We switched from a simple batch data entry quick two color payroll. It took eight people Monday through Tuesday. When we switched to gui we tripled the people and started on Friday night, WORKED ALL WEEKEND and barely finished on Tuesday. Man, was it slow. Corporate had to buy something to make it run faster.
@Chriva
@Chriva 5 жыл бұрын
At least whoever invented the term wasn't insane and pronounced it JUI...
@SlopeiZCSGO
@SlopeiZCSGO 5 жыл бұрын
dont even
@Chriva
@Chriva 5 жыл бұрын
@@SlopeiZCSGO Graphics Interchange Format. ie G. a dang _G_ :P Do you pour jass in your car? ;)
@25NN25
@25NN25 5 жыл бұрын
ah right, Giraffe, Giant...etc (dw tho i pronounce it with a hard G too x))
@SlopeiZCSGO
@SlopeiZCSGO 5 жыл бұрын
@@Chriva i say it with a hard g man, i just saw this argument comming a mile away haha
@Chriva
@Chriva 5 жыл бұрын
Even if you were using a J it's not your fault. I'm blaming the inventors (they really do say jif for some weird reason) :D
@NeilRoy
@NeilRoy 5 жыл бұрын
I'm not terribly familiar with how to program them, so the way I done it in my Deluxe Pacman 1 & 2 game, for my menu buttons was to create some button routines, some graphics for each button state (three of them, normal, mouse over, and mouse clicked), then i check the mouse vertical position and if it is within the range of a button, I check it's horizontal position and adjust the button state accordingly. I could have done better, but it worked. And the bonus is, it works on all operating systems.
@manstie
@manstie 5 жыл бұрын
Looking forward to the lower level stuff, have always been interested.
@vertxxyz
@vertxxyz 5 жыл бұрын
I hope this series is covering immediate vs retained GUIs
@blunderchips
@blunderchips 5 жыл бұрын
Like the editing
@bbdgl7413
@bbdgl7413 5 жыл бұрын
It would be very nice if you guys choose Qt or something cross platform to demonstrate this.
@neumdeneuer1890
@neumdeneuer1890 5 жыл бұрын
I agree
@legitt6093
@legitt6093 5 жыл бұрын
This needs more upvotes!
@HarmSalomons
@HarmSalomons 5 жыл бұрын
And then Windows, Linux and Android, I just gave up on Kivy... I'll try PyQt5 next
@johnpenguin9188
@johnpenguin9188 5 жыл бұрын
It’s fundamentally the same in Xcode or Visual Studio and C on the command line is C on the command line...
@noxabellus
@noxabellus 5 жыл бұрын
Immediate mode gui alleviates a lot of this difference he's talking about. It's great for games where you are already doing stuff in a loop
@MaakaSakuranbo
@MaakaSakuranbo 5 жыл бұрын
Sure, maybe games, but not everything else :D
@johanwilhelmsson1199
@johanwilhelmsson1199 5 жыл бұрын
The debugger RemedyBG uses immediate mode gui, so it certainly works for other things than games.
@johanwilhelmsson1199
@johanwilhelmsson1199 5 жыл бұрын
But the point he makes in the video, that a GUI requires a different kind of programming due to the inherent nonlinear nature of the interaction, still stands regardless of how the GUI is created, as far as I can see.
@noxabellus
@noxabellus 5 жыл бұрын
@@johanwilhelmsson1199 No, it really is different with immediate mode. For example with this standard method he's demonstrating, a button is typically represented by an object oriented hierarchical node and you would have to hook some event or message system to know when it was clicked. This is where the nonlinear nature comes from, not from the inherent nature of GUIs. In immediate mode, you simply have a function that you call in your regular loop within the condition part of an if statement. if (button("Click me")) { handle your button-clicked logic here }. Almost all of the typical functionality of a GUI can be handled in this manner. This also eliminates the need for intermediate state data where you have manipulator widgets. Highly recommend checking out Dear ImGui if you're interested in seeing how this pans out at a larger scale.
@mahidharc4866
@mahidharc4866 5 жыл бұрын
Very interesting. Is there any technical book that I can read to learn more about the details of gui implementations and their history?
@eldorado3523
@eldorado3523 5 жыл бұрын
AFAIK honestly anything to do with .Net or other higher level framework/programming language applications pretty much ends up in making GUI programs. GUI programming isn't so much a technical field in itself as the type of programs that will use GUIs are.
@YouGenom
@YouGenom 5 жыл бұрын
I remember learning programming in Visual Basic 6.0 (yes before .Net), where everything was connected to buttons and timers. Nothing "happened" unless user clicked on something. Of course it was the logic for me as a noob. No threads, no main loop, GUI was driving everything. Hehe.
@hdt1948
@hdt1948 5 жыл бұрын
how do Operating systems (or the video driver, i don't know) manage windows and prepare a image to put on the screen?
@ScubaJoe7Blue
@ScubaJoe7Blue 5 жыл бұрын
I
@kc9scott
@kc9scott 5 жыл бұрын
Command line and GUI are opposites. Don't you mean command line UI? That would make more sense. BTW, I also
@ScubaJoe7Blue
@ScubaJoe7Blue 5 жыл бұрын
@@kc9scott probably better to call it a command line UI! Lol
@ScubaJoe7Blue
@ScubaJoe7Blue 5 жыл бұрын
@@kc9scott nah. I think ascii can be graphics. Just because you are more right doesn't mean I am wrong. ;)
@ScubaJoe7Blue
@ScubaJoe7Blue 5 жыл бұрын
Examples of command line GUIs were given as VI and Aptitude.
@keinunvergebenesaliasgefunden
@keinunvergebenesaliasgefunden 5 жыл бұрын
may it be with command line GUI's you meaned something like midnight commander, that is based on versatile text interfaces, such as Ncurses or S-Lang, which allows it to work on a regular console, inside an X Window terminal, over SSH connections, all kinds of remote shells, and even with mouse support?
@francistremblay9162
@francistremblay9162 3 жыл бұрын
I wonder if in some cases the programming language can determine the hardware engineering and if in other cases the hardware engineering determine the programming language. If both ways are possible are their limitations and advantages.
@thegordon5394
@thegordon5394 5 жыл бұрын
What is he using to build the GUI? It looks so fluid
@noxabellus
@noxabellus 5 жыл бұрын
His hands
5 жыл бұрын
Xcode? Used to be called Interface Builder.
@MaddTheSane
@MaddTheSane 5 жыл бұрын
The Interface Builder part of Xcode.
@rchandraonline
@rchandraonline 5 жыл бұрын
Vie? hmmm.... :-) A sort of GUI written for a character cell terminal is often called a TUI. Still the same paradigm, that TAB goes between input fields as well as maybe arrow keys, OK and cancel buttons you can TAB to or arrow to and type ENTER or space. In some environments, it would even use a mouse or other pointing device, with something like gpm.
@MaddTheSane
@MaddTheSane 5 жыл бұрын
rchandraonline vi. There’s a better version called vim.
@salat
@salat 5 жыл бұрын
By this definition, programs on mainframes with terminals were also GUIs, since the program had to wait for the user to fill in all fields before he'd press enter, right?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
Those were block-mode terminals. Proper GUIs can do things like change parts of the window in response to input elsewhere (e.g. enable/disable one option based on the setting of another, update a live preview image etc), while those terminals could not do any such thing.
@HairyTheCandyMan
@HairyTheCandyMan 2 жыл бұрын
I feel like this is kinda similar to physical computing/arduino. With an arduino your buttons, LEDs, or motors are like the GUI
@watercat1248
@watercat1248 3 жыл бұрын
i have meny qustion 1. what application is this ? 2. this application exist in windows ? 3. in the application you use the have the option to add icons to change the windiows color....?
@friggindoc
@friggindoc 3 жыл бұрын
Maybe clarify difference between text mode and graphics mode?
@TheNewton
@TheNewton 5 жыл бұрын
So any tool out there letting you filter down options like concepts(windowed,file access), paradigms(web,local,OOP),source license,pricing,etc to select a language|toolchain to build GUIs?
@TheNewton
@TheNewton 5 жыл бұрын
Theres stuff like todomvc for web UI's but that's generally just showing you what code looks like not really listing things like price, setup times, compiling, etc
@sasuke2910
@sasuke2910 5 жыл бұрын
Please cover immediate mode guis!
@homemedia4325
@homemedia4325 5 жыл бұрын
Confusing... if you are programming for a GUI ...wouldn't you be using libs from the OS and not writing/checking your screen position? ...otherwise you have a million programs trying to do the same thing differently?
@casperes0912
@casperes0912 5 жыл бұрын
I fundamentally disagree here. A CLI program can have as much flexibility with code execution as a GUI. When you run the program, it can be set that various inputs will jump around the code execution, giving the user control over the execution flow. Similarly, a GUI program can be limited, spawning the UI elements in a specified order.
@okie9025
@okie9025 5 жыл бұрын
GUI >>>>>>>>>>>> CLI
@CiprianHanga
@CiprianHanga 5 жыл бұрын
What you're referring to seems to me like very peculiar cases, not the mainstream way CLI/GUI interfaces are usually done, which I think is what he refers to. They COULD technically be done the way you say but very few people actually do it that way.
@casperes0912
@casperes0912 5 жыл бұрын
Ciprian Hanga maybe not GUI programs but I use plenty of CLI tools all the time with complex user initiated control flow. Htop, Gdisk, Vim, hh just to name a few.
@casperes0912
@casperes0912 5 жыл бұрын
Bunny is that supposed to mean greater than? If so, no. Just the ability to use pipes in bash alone gives CLI programs a huge boost. I like a GUI for some things. Like a web browser or a video editor. But I’d take hashcat over a graphical alternative any day. Or brew/apt. Or git
@bersl2
@bersl2 5 жыл бұрын
I think the situation is more elaborate than saying that the programmer is more "in control" with a CLI but less so than a GUI. As a user: when I am in front of a GUI, I feel as though I am being given a fixed menu of choices and told to pick what I want; and if what I want is more complicated than the interface allows, then too bad. When I am in front of a CLI, I feel as though I am in control: the program is literally waiting for me to tell it what to do; and if its vocabulary is too simple, I readily have the tools available to combine those simple actions with the actions of other programs. Sure, a well-made GUI can give unprecedented clarity with the presentation of data, far more than the same textual program can do. But the well-made GUI is so much harder to make and therefore happens much less often, and average GUI programs lack the modularity to give the user full control over the computation. Therefore, effectively, textual programs (at least from my own perspective) end up being so much more empowering than GUI programs.
@yash1152
@yash1152 2 жыл бұрын
9:58 nice to hear the mention of RISC-OS
@Wolfgang13451
@Wolfgang13451 5 жыл бұрын
What is being displayed in that picture frame? I must know!
@MKermy
@MKermy 4 жыл бұрын
QT
@abhishekkaushik4927
@abhishekkaushik4927 5 жыл бұрын
have 512 character array,types sean like a boss i hate wastage of memory
@schifoso
@schifoso 5 жыл бұрын
It's a program stack that's not being used, so no waste of memory.
@quill444
@quill444 5 жыл бұрын
Isn't the GUI program more likely to be bound by product and platform dependence, where as the Command Line code tends to be product and platform independent?
@c.james1
@c.james1 5 жыл бұрын
Not necessarily, you can write a command line program in C and compile it on windows, and the compiled binary file will only work on windows. The source code is platform independent, that same source code could then be compiled for whatever platform, as long as it has a C compiler.
@dealloc
@dealloc 5 жыл бұрын
In fact, depending on the level of abstraction that an API has for defining GUIs, the GUI may be more compatible between systems. It all comes down to how you translate the language, being it a DSL or an XML file, into a GUI in the program. Although in this case, a lot of controls may be platform dependent in the way that the underlying APIs are only available on the OS-in this case macOS and Cocoa. The same is true for GUIs in Win32 applications on Windows that uses the underlying OS APIs, whereas WPF is actually just XML that gets translated to whatever target it may support.
@Magnezone962
@Magnezone962 3 жыл бұрын
What is the language u r using or software?
@stephanesonneville
@stephanesonneville 5 жыл бұрын
You can programming a GUI using Xlib with VI in a Xterm.
@johnjoyce
@johnjoyce 5 жыл бұрын
I don’t know. You really rambled about it and almost said it. The key distinction is really that GUIs tend to be built around an almost endless event loop and command line tools tend to use those only for specific inputs resulting in a chain of simpler event loops.
@ofbguppies2325
@ofbguppies2325 Жыл бұрын
3:09 what’s the tool he uses to structure the GUI ??
@Yupppi
@Yupppi 5 ай бұрын
When you start writing GUI programs, you start to dislike your life choices. So, if you fuzzy test this program with insane name inputs, do you gain root access?
@Kavukamari
@Kavukamari 11 ай бұрын
i can't believe he was born in year 3, that's pretty impressive
@Kitsune_Dev
@Kitsune_Dev 3 жыл бұрын
What program is that?
@sabitrap
@sabitrap 5 жыл бұрын
Computerphile if you are hearing "I" need more of Matt Philip.
@cokentomatosaucelol
@cokentomatosaucelol 5 жыл бұрын
Can someone please tell me why he didn't put an "&" in the scanf function, just before name variable?
@Starguy256
@Starguy256 4 жыл бұрын
Hella late but since name is an array, it's also considered a pointer to the memory address of the first char. So you don't need to get the memory address as it's already a pointer.
@SteveGouldinSpain
@SteveGouldinSpain 5 жыл бұрын
'VEE EYE' (I'm old skool!)
@harstar12345
@harstar12345 5 жыл бұрын
"Might be a long name" lmao
@rohandhar967
@rohandhar967 5 жыл бұрын
Is it just me or does the absence of space between “day,month” annoy anyone else?
@FriedEgg101
@FriedEgg101 5 жыл бұрын
If that line is defining integers then it should annoy the compiler too.
@RealCadde
@RealCadde 5 жыл бұрын
It annoyed Steven too. He paused for a moment before saying F IT and typing year as well.
@RealCadde
@RealCadde 5 жыл бұрын
@@FriedEgg101 How so? That is perfectly legal and readable. If he declared "int day, month, year = 1970;" then yes, that would be confusing as day and month would be initialized to 0 while year was initialized to 1970. One shouldn't mix multi-variable declarations and assignments in the same statement. Unless it's a function with default arguments. It's about avoiding confusion for the programmer. But as far as the compiler is concerned, that is fully legal. What you are talking about is code inspection. The code inspector should WARN but still pass it on to the compiler.
@bennylofgren3208
@bennylofgren3208 5 жыл бұрын
Not as much as him misspelling "name"... 😃
@FriedEgg101
@FriedEgg101 5 жыл бұрын
@@RealCadde I haven't programmed for over 20 years, but I think you misunderstood me. I wasn't referring to the multi-variable declaration (which I know is common practice), but rather the lack of space after the comma between day and month (that the op was also referring to), which I assume the compiler would struggle to read.
@devesh5067
@devesh5067 5 жыл бұрын
Hey never been so early
@YisraelDovL
@YisraelDovL 4 жыл бұрын
Why do all the videos have hand written code?
@yash1152
@yash1152 2 жыл бұрын
7:38 no, CLI - command line interface programs stay command line lol. keep those latter type of programs for the term "TUI - text/terminal user interface" or as said at 8:20 "CMI - character mode interface"
@danielcristian1977
@danielcristian1977 5 жыл бұрын
What if we use ncurses?
@dealloc
@dealloc 5 жыл бұрын
ncurses is effectively a high level API for writing to the terminal. There are many layers of abstraction to make the API as easy to create GUI-like terminal programs but eventually it ends up with writing to a stdout, character for character, rather than pixel by pixel. There's a lot of similarities between the two, except that terminals require you to handle ANSI escape codes in order to move the cursor, set the color and style of a cell or save and restore state; and each escape code requires a number of characters in front of what is being written, so they'll have to be parsed in different layers. And that's not to mention that there are different kinds of terminal emulators, like xterm, vt100/vt220, win32 console, etc. that may have different kinds of commands to write characters, move the cursor and more.
@FPChris
@FPChris 2 жыл бұрын
C should have a native cross platform GUI by now BUILT IN. It’s 2022. Let’s go.
@reinhold1616
@reinhold1616 Жыл бұрын
why?
@talllobster251
@talllobster251 5 жыл бұрын
#computerphile is it prounced gui or jui?
@delu
@delu 5 жыл бұрын
1st
@stefanluginger3682
@stefanluginger3682 5 жыл бұрын
We use C and GTK
@TheStevenWhiting
@TheStevenWhiting 5 жыл бұрын
Visual basic is what I used to use in the 90s
@SuviTuuliAllan
@SuviTuuliAllan 5 жыл бұрын
CMV: Everything should be accessible by keyboard.
@ScubaJoe7Blue
@ScubaJoe7Blue 5 жыл бұрын
Definitely.
@abhishekkaushik4927
@abhishekkaushik4927 5 жыл бұрын
A long name , with 512 characters are you kidding me? That is a very very long name
@bersl2
@bersl2 5 жыл бұрын
If the name is UTF-8 and uses characters outside of the basic multilingual plane, that brings the character count down to about 130.
@Paltse
@Paltse 5 жыл бұрын
Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfe­schlegel­stein­hausen­berger­dorff­welche­vor­altern­waren­gewissen­haft­schafers­wessen­schafe­waren­wohl­gepflege­und­sorg­faltig­keit­be­schutzen­vor­an­greifen­durch­ihr­raub­gierig­feinde­welche­vor­altern­zwolf­hundert­tausend­jah­res­voran­die­er­scheinen­von­der­erste­erde­mensch­der­raum­schiff­genacht­mit­tung­stein­und­sieben­iridium­elek­trisch­motors­ge­brauch­licht­als­sein­ur­sprung­von­kraft­ge­start­sein­lange­fahrt­hin­zwischen­stern­artig­raum­auf­der­suchen­nach­bar­schaft­der­stern­welche­ge­habt­be­wohn­bar­planeten­kreise­drehen­sich­und­wo­hin­der­neue­rasse­von­ver­stand­ig­mensch­lich­keit­konnte­fort­pflanzen­und­sicher­freuen­an­lebens­lang­lich­freude­und­ru­he­mit­nicht­ein­furcht­vor­an­greifen­vor­anderer­intelligent­ge­schopfs­von­hin­zwischen­stern­art­ig­raum, Senior.
@Paltse
@Paltse 5 жыл бұрын
@EuropeanJetPilot 2000 Greetings from Finland to You!
@debojitacharjee
@debojitacharjee 3 жыл бұрын
How can we create the GUI using only the C++ code and without using any graphical toolkit like visual studio?
@Loundre3
@Loundre3 3 жыл бұрын
Learn useful CLI tools including whatever compiler you are using, select a suitable GUI library, compiling it, writing your C++ code in whatever text editor you want to use, compile it all and link, then test run resulting executable.
@debojitacharjee
@debojitacharjee 3 жыл бұрын
@@Loundre3 I want to create GUI app for Windows using C++ but how do I create installation setup file like visual basic? In visual studio its possible but how do I do that using the C++ IDE and what's the difference between visual C++ and traditional C++?
@Loundre3
@Loundre3 3 жыл бұрын
I missread your comment abit, it seems. I don't know the differences, but knowing Microsoft, chances are high there are some non-standard things in there. For deeper understanding, i think its best you research the differences by looking up their documentations (the one on Microsofts website, and the one for the standard C++). Also keep in mind, which C++ standard you want to use. The most popular one currently seems (atleast to me) to be C++11 . For compatibility reasons, check what your GUI library uses.
@noferblatz
@noferblatz 5 жыл бұрын
This really amounts to whether you have a "control loop" or not. The C program didn't have a loop. It was strictly linear, and couldn't execute any other way. The GUI did have an internal loop. It was event-driven. C programs can be written that way, but the result is extremely hard to write and difficult to debug.This is why GUI programming is often done WYSIWYG, using some sort of coding framework or library.
@CTimmerman
@CTimmerman 5 жыл бұрын
He might as well have drawn a bunch of buttons before entering the input loop that prints to the screen while typing, and entering 512 or more characters would lead to undefined behavior, but the benefit of WYSIWIG editors is not having to calculate initial element locations by hand. In Visual Basic 6 you'd still need to account for system font size and resize events, though.
@wannabedal-adx458
@wannabedal-adx458 4 жыл бұрын
"I am going to write this program on my mac here on my desk. And the first I have to do is open up a Window." (Bill Gates will be pleased)!! :D
@sooskca
@sooskca 5 жыл бұрын
Do one about text editors...
@vinaybhade7046
@vinaybhade7046 5 ай бұрын
How was the first c compiler made?
@mgord9518
@mgord9518 2 ай бұрын
Pretty sure it was bootstrapped in B, which would've been bootstrapped in assembly
@vinaybhade7046
@vinaybhade7046 2 ай бұрын
@@mgord9518 Thank you
@fleks6564
@fleks6564 4 жыл бұрын
What language is that
@MidnightSt
@MidnightSt 5 жыл бұрын
I think there's two sentences missing in this introductory video. Something like: console - code-driven: user sits there while program does stuff, and waits for the program to ask them to do things. GUI - (user-)event-driven: most of the code sits there and waits while user does stuff, to (some of) which the program then responds. i mean, yes, that's basically what you've been explaining through the whole video, but usually you're able to wrap it up into a short sweet quip like that in the end, or somewhere along the way.
@kernelpanic2887
@kernelpanic2887 5 жыл бұрын
Woah, KZbin CAN show me new videos. Haha
@humanrays
@humanrays 5 жыл бұрын
I haven't seen that paper since...primary school? I don't even remember what it's for.
@gotj
@gotj 5 жыл бұрын
And the browsers UI !!!
@SevenDeMagnus
@SevenDeMagnus 4 жыл бұрын
Cool
@jimbeammeup9879
@jimbeammeup9879 5 жыл бұрын
Where‘s part two?!?!
@TheNovus7
@TheNovus7 5 жыл бұрын
and what about programming multiplatform GUI, that could be interesting
@nosuchthing8
@nosuchthing8 5 жыл бұрын
Lazarus allows you to do that
@TheNovus7
@TheNovus7 5 жыл бұрын
@@nosuchthing8 i thought maybe something haxe based but ok
@IconicNameTV
@IconicNameTV 5 жыл бұрын
i wish the decimal point wouldn't be in this channel's subscriber count. . .
@samvente1261
@samvente1261 5 жыл бұрын
GUI programming is easily some of my least favourite kind of programming.
@hagen1555
@hagen1555 3 жыл бұрын
TLDR: In CLIs, the program is in control, in GUIs, it's the user.
@elgalas
@elgalas 5 жыл бұрын
Paving the way to present React :)?
@heitormbonfim
@heitormbonfim Жыл бұрын
And I was using customTkinter... when I could use a drag and drop kind of thing.....
GUI: Under the Hood - Computerphile
17:26
Computerphile
Рет қаралды 153 М.
How WiFi Works - Computerphile
17:19
Computerphile
Рет қаралды 196 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 11 МЛН
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
why do void* pointers even exist?
8:17
Low Level Learning
Рет қаралды 313 М.
Graphical User Interfaces: Crash Course Computer Science #26
12:59
CrashCourse
Рет қаралды 451 М.
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 345 М.
Programming a GUI Library for my New Game
9:15
ThinMatrix
Рет қаралды 291 М.
Ordered Dithering - Computerphile
10:35
Computerphile
Рет қаралды 128 М.
What Is A Graphics Programmer?
30:21
Acerola
Рет қаралды 361 М.
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 465 М.
Have You Been Pwned? - Computerphile
10:59
Computerphile
Рет қаралды 477 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 11 МЛН