Source here:
Exploring the cognitive load of Hello World programs in Java, C, C++, Rust, Python, F#, Haskell, Nim, & Scala, including coding practices and decisions that need made after hello.
Charles Petzold blog post on win32 Hello World:
0:00 Java
2:50 C
3:25 C++ & more C
4:48 Rust
6:07 Python
8:40 F# (F Sharp)
10:27 Haskell
12:39 Nim
14:05 Scala
14:47 Win32
world , Complexity of Hello World & what comes after , #Complexity #World
, programming,programming languages,hello world,education,learning,ergonomics,java,c language,c++,rust,rustlang,python,f#,fsharp,f sharp,haskell,nim,nimlang,petzold,win32,winmain
Nice video! About python, yes, one of its primary strength is the flexibility to write programs. One of the core principles of python is "to get the job done", maybe it's not done fast, or tidy, but it gets done nontheless. Of course any mid-level programmer can offer suggestions to the beginner, but we missed the point that to the beginner got the job done and went home early. If you have to do fixes and attachments, in Python probably you would be ok using a couple decorators and call it a day.
As always, each tool to it's strengths and weaknesses. Where python goes best, other languages are weak, and where python wobble, other languages are there to replace it.
so basicly after hello world it becomes completely impossible to understand, i thought this video would be understandable, im lost, have done hello world though in several languages…
Hello, GUI App! comes next.
Yeah, not for noobs I guess, but it's good training.
Java's 28, now. I'm getting old…
Good vid, btw.
Scala 3 has now a one liner hello world, with the @main annotation
For C, you could've just used "puts" instead. Also prints a new line automatically ("fputs" does not, however). "printf" shouldn't be used unless you're actually formatting something. In fact, smart compilers even detect such "non-optimal usage" and, as for your hello-world example, would optimize the printf-call away into a simple "fwrite".
Yeah i have that i have to learn a new language for using rust, TOML
早安yongxiang
Honestly, C’s hello world should, if it is supposed to be as simple as possible, use puts. Puts is non-varadic, saving cognitive load.
I always found GUI programming in Windows to be nightmarish in comparison to Linux. I don't really know why I feel like that, but some initial reactions are that the naming conventions play a massive role there, along with it's "non-standard" way of doing things, meaning, it feels like you're writing in a subset language (even though you're not). Compare using X11 on Linux, something which is old as hell but even so, you can start doing things, painting things, and working with it relatively fast. Writing your own window manager is a perfect starting example of a project for beginner programmers for instance. Try doing something similar in Windows? You more or less have to jump into frameworks immediately, if you don't want to lose interest of programming altogether.
Ergonomics is important, is a conclusion that I've been coming to more and more easily, the older I get.
That final python solution wasn’t KISS. You are in direct contradiction of the holy zen of python.
You AMAZING, bro!!! please continue sharing you amazing videos with us!!
I'm wondering if you can share with one (or more videos) in which you show us how is it possible to use in One project more than programming language, as in big companies where they have different programming languages in the same project? how for ex you can make a Java back-end project with Python machine learning? how using many different language at the same time is possible!?
Many Thanks for all your hard work bro!
x86 Assembly:
section .text
global _start
_start:
mov edx, len
mov ecx, msg
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
msg db 'Hello, world!',0xa
len equ $ – msg
print("Hello World!")
now talk about drawing in java.
wHO USES VAR IN JAVA????
Easiest is python and F sharp but python is slow af but it is very powerful but hey you can write a neural network in just 11 strokes.
I think allredy know all this form unity c#
How about use Python to write to a text file the word “hi there”. The use Java and Apache poi to read that file and converted to a word file. Then print that file. Put it in an envelope, mail it to yourself, and be happy with your “hi there” program.
Chant could be implemented as.
chant count message = mapM_ putStrLn $ replicate count message
I think that's a more natural way to do it.
What software do you use for coding? Looks awesome to use.
Hm I don't know… for me you're just trying to overcomplicate simple things. After all, no one gonna stick with the code style they used in their first program
“var” 🤮🤮😒
int main()
is not valid C
Please improve your brace placement. The opening and the corresponding closing brace should be either on the same vertical or the same horizontal line.
This means adding a newline before in most cases. Your stile is hard to read, error prone and ugly, sorry.
Can't wait till c++20 and std::format
I like swift: https://ideone.com/VvEuBQ
how about HolyC?
Thank you. I'll keep to Python.
Java: has var
My JavaScript brain: internal screaming
I think the Haskell example is a bit misleading, because I think most people start from REPL and than graduate to loading a file from the REPL and calling functions from that.
At least in the tutorials I read the introduction of IO came rather late or was only briefly mentioned in the beginning and properly explained later.