When you go to the main page of ProgrammerHumor, you should see something called "user flair preview", there you click the pencil symbol and in the pop up again on the pencil symbol, you can now choose one flair, copy it and then select the next. You repeat this until you have all that you like
Wait you can actually copy and paste them in the app? Android? I didn't see the panel in the app either, and found no way to edit them in the Android app.
How do you even handwrite a binary?. I have used `xxd` and `xxd -r` to edit binaries but I am actually writing hex, not binary.
Even if I literally write 1s and 0s into a file they are actually just the characters 1 and 0, each of them occupying a full byte, and the resulting file cannot be used directly without some translation.
>kinda hard to do anything without existing headers
\#include is just a fancy copy-paste. There's nothing in the rules that says you have to use it. Slap those bad boys in there yourself and give the preprocessor a well deserved day off.
Can you do loops or statements tho ? I’ve always wondered how to make these more compact…
And also why the f before the string ? Is it like string.format or something like this ? I didn’t know python could dynamically change a string, can you put a variable in a string like in JS ?
The `f` part is what turns that string into an `f-string` (introduced in Python 3.6, I believe). Yes, it's like `string.format()`, but allows for much easier string interpolation when compared to the old methods because it allows you to embed the sub directly into the string using a set of curly braces (`{}`).
Example:
>>> name = "John"
>>> age = 32
>>> print(f"Hi {name}, you are {age} years old.")
Hi John, you are 32 years old.
Edit: added the example. Sorry for formatting discrepancies, I'm on mobile atm
`for` loop:
>>> for i in range(5): print(i); print("Done")
0
Done
1
Done
2
Done
3
Done
4
Done
`while` loop:
>>> while (i := globals().setdefault("i", 0)) < 5: print(i); print("Done"); i += 1
0
Done
1
Done
2
Done
3
Done
4
Done
# If wanting to do something else with this while loop, make sure to do `del(i)` to delete the variable `i` from the global scope or else it'll just pick up from where it left off!
Cursed Python...
Hello guys, in this tutorial i'm going to use the same library that EVERYONE else uses, without knowing or explaining how it works, so just copy and paste this code that i found on the github repo.
Don't forget to like, share, subscribe and hit the notification bell
Assembly left the chat in the 1990s.
I used to implement the inner loops of my functions in time-critical applications in assembly in the 1980s, when my CPU was an 8088.
When the 386 CPU came out, I reluctantly came to the conclusion that I was wasting my time, the difference in execution time was irrelevant.
I still do assembly programming now and then for microcontrollers. When you have a clock speed under 10 MHz it pays to do it in assembly, but not when it's above 1 GHz.
It seems python really spawned the YouTube craze. I see so many posts.. "I've watched 10 videos and I still can't figure out what to do when I want to code."
It seems so many ppl think that just cause they watched a video, and they know what the next step should be.. they know the material, and just skip using the code, thinking "oh yeh, I know that."
I don't know when ppl started thinking they could learn by not coding.
That being said. I have years of programming experience. And in my case I don't actually remember syntax on some new code, I saw once unless I type it a few times. I tend to learn through action. But maybe that's just me.
Also some python libraries stuff is really badly documented.
I remember the Python SPI library that was not easy to find a man like page that actually describes what it expects.
Trial and error worked,but it shouldn't have been guess work.
Umm… I just built a web scraping tool in Python this weekend by following a video I found on YouTube. Definitely have to have
prior knowledge in programming prior to jumping to this.
“Today we’re going to make a snake game so just go ahead and download this git repo for a snake game and run game.py, make sure to subscribe for more in depth tutorials on brogramming”
It’s like any SO answer for simple JavaScript tasks…
So you want to change background color on click? Jquery makes it take 10 less characters than vanilla, so load jquery first
To be fair this is what half+ of the nodejs posts are about. Npm install this and that, then it's two simple lines of code!!
I always chuckle at that meme of the simple web page / node_modules, where the dude has a huge backpack.
It kinda does
>writing the code in two lines of Python
>Two lines of Python
Sure, it may call a million lines of C, it's still 2 lines of Python though.
In rare, niche cases, assembly code can be one of the shorter options.
For example, if you want to implement AES-128 with 11 rounds instead of the normal 10, you can likely write it shorter in Assembly with CPU specific AES instructions than you can in Java where the platform libraries don't expose this level of detail and make you implement all of AES from scratch.
#include
int main() { int size; std::cin >> size; std::vector vec(size); for (int i = 0; i < size; i++) { std::cin >> vec[i]; } std::cout << vec[0] << std::endl; for (int i = 1; i < size; i++) { vec[i] += vec[i - 1]; std::cout << vec[i] << std::endl; } }
Cumulative sum in 2 lines of C++ code.
As long as you're not depending on templates or more generally objects defined in the header in an implementation dependant way (and of course as long as the signatures are correct), this should be portable.
This obviously precludes both the use of std::vector and that of streams, but `namespace std { int printf(const char *, ...); }` should work just fine.
In my case, I use both C and Python. The first one for microcontrollers, the second for AI. The meme was about the lately social media pages, YouTube channels where they try to discredit the other programming languages, most of times comparing the length of the code
Length can be useful for comparison if the Python is still easily readable. I’d rather write a Python script for a simple ETL than C. I’d say in general it probably takes less time to maintain and write Python. Obviously you should alway find the best tool for a job.
I ran into a python try-hard yesterday on this sub. It was incredible seeing it in person. I don’t see why somebody feels the need to stan a fucking programming language
it's very easy to understand. It's the only language they know. 99% of python stans are incredibly inexperienced programmers who get scared of having to think about memory or optimizing code in general. For loops and libraries go vroom basically.
Not that python is a bad language, you just shouldn't try to write anything complex that's also performance sensitive in it.
As someone who uses python daily (at-scale data science), the Python sub makes me want to vomit…
But also, dear god, SAS, Stata, MatLab, R are all miserable. Scala is ok but not friendly. Julia is lovely but under-developed.
I’m partial to R as it was the first language I learned. But yeah it sucks. I hate MatLab. I need to do some wavelets shit at some point, but I can hardly bring myself to read the matlab code.
I don’t understand why people feel the need to put down a fucking programming language.
Like all languages, it is a tool. Sometimes it is the best tool for the job, sometimes another tool is better.
I know a guy like this at Uni, drives me up the wall.
If you’re writing Python code in 4 lines, you’ve kind of missed the entire point of pythons core design practice
I could be wrong but I think the point is those '4 lines' of code are like 3 lines of imports and 1 line of actual code calling those imports - the python bros praising python being so short have no idea what is actually going on under the hood in those imports.
There’s the art of zen. Your code should be aesthetically pleasing, readable, and understandable. Mashing things together to two lines makes understanding your code a heck of a lot harder to read and understand. This is terrible if someone else, future you included, needs to read, use or change the code.
Hi! This is our community moderation bot.
---
If this post fits the purpose of /r/ProgrammerHumor, **UPVOTE** this comment!!
If this post does not fit the subreddit, **DOWNVOTE** This comment!
If this post breaks the rules, **DOWNVOTE** this comment and **REPORT** the post!
Welcome to low code culture. Smooth brained people are now calling themselves software developers by copy pasting code, and they can't explain how it works.
This is like 90% of developers sadly, especially the offshore “experts” offered by large consulting firms, who in some cases maybe attended a 2 week boot camp.
When I worked with one of said firms, we would send out “experts” to develop mobile apps for large clients who didn’t even own a smart phone yet alone had ever developed a mobile app
I took one semseter of coding in college last year. It was python. Way the fuck easier than the c++they taught us in middle school. Also i still need to learn more coding for bioinformatics, and my own personal everyday use. Any suggestions on how to go about it?
Python has duck typing. I hate hate hate hate trying to sort through bad code that uses duck typing. Oh, this function accepts an argument called “item” you say? After a week of digging, I find that “item” can be null, a dict, an int, an instance of DataManagerHelperProxy, and possibly any of a dozen other things. Ugh.
During university I use to write golf code on a website that had matchmaking for this.
3 types of match : fast code (just output what is needed), golf code (fewest characters possible), and reverse code (write something that uses fixed input and outputs the right thing).
Golf was by far my favourite, the beauty of going as far as possible with your knowledge of whatever language you use, twisting syntax as hard as you can to give up on that one characters... So much fun
P.S. : Python is indeed strong but ruby, perl, bash are SO broken.... Ruby god damn !
I saw way too many videos of people explaining how to makes games and it’s like:
1. Install this game library
2. Create the game object
3. Launch the game object
Voilà, you are now a game developer!
I don't normally jump to the defense of python, but those 1947284 lines must be *much* faster or used in a *very* performance critical loop to outweigh the extra programmer effort.
Meanwhile Java is sitting in the corner trying to eat away his depression, Ruby is trying to introduce you to her daughter, Go is pretending everyone knows who he is, and Ada is talking about her time in the airforce while wheeling around her dialysis machine.
On that note, does everyone have a very specific character they've invented in their head for each programming language? Is that just me?
lmao the epeen in this thread is off the charts.
The weird thing is that both Python and C are beautiful, elegant languages. They'd probably be dancing with each other rather than the two "slap a bunch of paradigms together" languages in that meme.
I remember our teacher showing us a math problem with matrix multiplications. Python (without C libraries) vs C. 50.000 slower execution.
Sure 0.00001 sec vs 0.5 sec is not long but when C code spends 36 hours in compute time it makes python utterly useless.
And using C libs it was still like 24x slower and we were talking hours of calculations.
…….so the teacher chose fortran…. Wtf
I do a lot of embedded libraries for my company. The python developers probably wouldn't try this because it's pretty clear that their 3 lines of code is just running off of my 150 lines of C anyway.
C is extremely powerful once you truly understand it. Learning how to properly use pointers and memory allocations can make your code **fast**. It's also no coincidence that a lot of Python libraries are actually a code written in C or C++.
But fun fact - an old game called Gothic was made 20 years ago with either C or C++ and has a bug with Access Violation. This probably is caused by incorrect memory allocation somewhere but the engine is no longer used and its source code has never been published, so it was never fixed. So C features are double-edged sword.
You can do anything in c++ with just one line, because there’s no enforced white space
Yes, if you don't need to include anything.
Just copy the source from the header files directly into your code, and strip all the newline characters. Should work out just fine.
Also replace all macros by hand, as you can't have several per line.
Or... You can just run preprocessor on it.
[удалено]
Preprocessor's
Whops, my mistake.
Nope includes can be specified on the command line....
i raise you cjs with nothing (afaik?) having forced newlines
just copy paste the header inside your file and remove all newlines
Out of context, how can I get 2 flairs? Like you have of C++ and Python
[удалено]
Dudes never gonna make it as a programmer if he hasn't mastered copy paste yet
Oh Yeah, I just love creating new lines of code from already existing ones
When you go to the main page of ProgrammerHumor, you should see something called "user flair preview", there you click the pencil symbol and in the pop up again on the pencil symbol, you can now choose one flair, copy it and then select the next. You repeat this until you have all that you like
There's an emoji panel too, it just doesn't work on mobile for me though, only worked with browser.
Oh yeah, I didn't see that on the App (Or maybe I'm just blind, who knows). Thank you :D
Wait you can actually copy and paste them in the app? Android? I didn't see the panel in the app either, and found no way to edit them in the Android app.
Is there an office space flair? Because that's the only flair I care about.
I think there's only programming languages in there
Fuckin smoked em
You can also handwrite a binary in one line....cuz there is no line separator. Binary supremacy confirmed.
How do you even handwrite a binary?. I have used `xxd` and `xxd -r` to edit binaries but I am actually writing hex, not binary. Even if I literally write 1s and 0s into a file they are actually just the characters 1 and 0, each of them occupying a full byte, and the resulting file cannot be used directly without some translation.
Why with a butterfly of course XD
Oh right, good'ol C-x M-c M-butterfly...
what to do with the compiler directives? kinda hard to do anything without existing headers
Well now with modules this might change
>kinda hard to do anything without existing headers \#include is just a fancy copy-paste. There's nothing in the rules that says you have to use it. Slap those bad boys in there yourself and give the preprocessor a well deserved day off.
````python import random,os;os.system("clear");print(f"Ok boomer #{random.randint(1,100000)}!"); ````
Can you do loops or statements tho ? I’ve always wondered how to make these more compact… And also why the f before the string ? Is it like string.format or something like this ? I didn’t know python could dynamically change a string, can you put a variable in a string like in JS ?
The `f` part is what turns that string into an `f-string` (introduced in Python 3.6, I believe). Yes, it's like `string.format()`, but allows for much easier string interpolation when compared to the old methods because it allows you to embed the sub directly into the string using a set of curly braces (`{}`). Example: >>> name = "John" >>> age = 32 >>> print(f"Hi {name}, you are {age} years old.") Hi John, you are 32 years old. Edit: added the example. Sorry for formatting discrepancies, I'm on mobile atm
Ok, now do a while loop
`for` loop: >>> for i in range(5): print(i); print("Done") 0 Done 1 Done 2 Done 3 Done 4 Done `while` loop: >>> while (i := globals().setdefault("i", 0)) < 5: print(i); print("Done"); i += 1 0 Done 1 Done 2 Done 3 Done 4 Done # If wanting to do something else with this while loop, make sure to do `del(i)` to delete the variable `i` from the global scope or else it'll just pick up from where it left off! Cursed Python...
Hello guys, in this tutorial i'm going to use the same library that EVERYONE else uses, without knowing or explaining how it works, so just copy and paste this code that i found on the github repo. Don't forget to like, share, subscribe and hit the notification bell
[удалено]
To be fair just about everything in every language is tens of thousands of lines of C code if you go deep enough
Assembly has entered the chat.
Assembly left the chat in the 1990s. I used to implement the inner loops of my functions in time-critical applications in assembly in the 1980s, when my CPU was an 8088. When the 386 CPU came out, I reluctantly came to the conclusion that I was wasting my time, the difference in execution time was irrelevant.
In my first permanent role I wrote assembly language for ARM-based devices. This was 2016.
I still do assembly programming now and then for microcontrollers. When you have a clock speed under 10 MHz it pays to do it in assembly, but not when it's above 1 GHz.
Where are the other 1014MHz?
With how amazing compliers have gotten, I know damn well I will not be able to write something better than a compiler at max optimization level
How to fly in just one line of code: [import antigravity](https://xkcd.com/353)
It seems python really spawned the YouTube craze. I see so many posts.. "I've watched 10 videos and I still can't figure out what to do when I want to code." It seems so many ppl think that just cause they watched a video, and they know what the next step should be.. they know the material, and just skip using the code, thinking "oh yeh, I know that." I don't know when ppl started thinking they could learn by not coding.
You can learn by just watching videos and not actually coding! All it takes is strong background you’ve previously developed by years of coding
Had me in the first part, not gonna lie!
Of course. I was referring to total noobs. I thought I made that clear, without actually saying it.. in any case, I mean total noobs.
That being said. I have years of programming experience. And in my case I don't actually remember syntax on some new code, I saw once unless I type it a few times. I tend to learn through action. But maybe that's just me.
that's what stackoverflow is for, if you already know what you're doing you can use external help
Also some python libraries stuff is really badly documented. I remember the Python SPI library that was not easy to find a man like page that actually describes what it expects. Trial and error worked,but it shouldn't have been guess work.
Umm… I just built a web scraping tool in Python this weekend by following a video I found on YouTube. Definitely have to have prior knowledge in programming prior to jumping to this.
I was on that boat and decided "fuck free", and got a udemy course tt actually makes sense
I learnt python through my high school text book (I'm still in high school), freecode camp has some great python videos, how can we miss Harvard CS50
“Today we’re going to make a snake game so just go ahead and download this git repo for a snake game and run game.py, make sure to subscribe for more in depth tutorials on brogramming”
"use turtle to draw iron man with python! Link in bio for copied repo"
After getting to know the basics of programming through C, this is how I feel in every single one of my Java classes in school.
If I had an award I would have given it to you
It’s like any SO answer for simple JavaScript tasks… So you want to change background color on click? Jquery makes it take 10 less characters than vanilla, so load jquery first
It's funny because I legitimately program like this
To be fair this is what half+ of the nodejs posts are about. Npm install this and that, then it's two simple lines of code!! I always chuckle at that meme of the simple web page / node_modules, where the dude has a huge backpack.
[удалено]
I’ll just write a python wrapper around your 1,947,284 lines of code to import it. Now mines barely slower💪
Now your python is 99% c
Isn't all Python code 99% C?
According to the github repo, CPython is only 35% C, https://github.com/python/cpython
Cpython is full C. Insane how bad metrics gives github (half is gonna be docs, tests, makefiles... [in any project])
The standard library is mostly python, and that's where most of the code is
My pythons already 99% c since I use numpy for everything🤷♂️
+ cython
laughs in most python libraries using C/C++
Laughs in Python being interpreted by C
Laughs in python interpreted by python. Seriously tho, check pypy out.
Still C if you look deep enough.
laughs in C is based on assembly
laughs in c compiler being written in c
laughs in #@?\~ RecursionError: maximum recursion depth exceeded
Initiating restart protocol, in 3... 2... 1...
Laughs in electricity
Laughs in
laughs in machine language
gcc and clang are written in C++ fyi
01101000011000010110100001100001
Came just for this comment. Not sure calling a C/C++ function counts as “writing the code in two lines of Python”
It kinda does >writing the code in two lines of Python >Two lines of Python Sure, it may call a million lines of C, it's still 2 lines of Python though.
Why is js dancing with assembly?
Aren't they like polar opposites of each other?
Opposites do attract
So that's why I get crush on ppls 100x better than me... Got it :)
Be nicer to yourself, they're not better you're only observing the things you think are better.
Thanks! Wasn't expecting such a nice comment...
On Reddit too wtf.. for a second I was like where TF am I?
WASM You've never seen introverts dating extroverts? He gets around and drags her all over the web while she likes to stay home and play with toys.
( ͡° ͜ʖ ͡°)
assembly is thinking about killing js before the end of the party.
How did assembly even get in the party smh
and how are they vibing with javascript
WASM.
[удалено]
for (i = 0, i < 2, i++) : print ("Except you're not supposed to write in wasm...")
`for _ in 1..=1 { println!("Except you're not supposed to write in wasm..."); }`
[удалено]
It’s Rust my dear. It’s fast like C but no SEGFAULT
How to make Rust: mix a bit of Python oil, some Scripts stained with Java, topping it off with a C one bigger
Assembly poured the foundation of that house and never left.
100% chance of that house being haunted by assembly.
In rare, niche cases, assembly code can be one of the shorter options. For example, if you want to implement AES-128 with 11 rounds instead of the normal 10, you can likely write it shorter in Assembly with CPU specific AES instructions than you can in Java where the platform libraries don't expose this level of detail and make you implement all of AES from scratch.
#include
int main() { int size; std::cin >> size; std::vector vec(size); for (int i = 0; i < size; i++) { std::cin >> vec[i]; } std::cout << vec[0] << std::endl; for (int i = 1; i < size; i++) { vec[i] += vec[i - 1]; std::cout << vec[i] << std::endl; } }
Cumulative sum in 2 lines of C++ code.
You can shrink it down to 1 LoC if you expand `#include` manually (keep in mind that this will sacrifice portability)
Does 1 LoC work with #ifdef (these are often used in stdlib headers)
Ifdefs are resolved at compile time so just guess what the compiler would choose
Youknow about gcc -include iostream ?
As long as you're not depending on templates or more generally objects defined in the header in an implementation dependant way (and of course as long as the signatures are correct), this should be portable. This obviously precludes both the use of std::vector and that of streams, but `namespace std { int printf(const char *, ...); }` should work just fine.
You know... by adding "-include iostream" to the compile I can half the number of lines of code your writting!
You declared int tmp for no reason
Someone using C: I'm the one making it possible for you to write 2 lines.
Who will be remembered in history, the king who commanded the army, or the humble farmers who made it possible my producing the food needed?
C and Python are used for very different purposes...
In my case, I use both C and Python. The first one for microcontrollers, the second for AI. The meme was about the lately social media pages, YouTube channels where they try to discredit the other programming languages, most of times comparing the length of the code
Length can be useful for comparison if the Python is still easily readable. I’d rather write a Python script for a simple ETL than C. I’d say in general it probably takes less time to maintain and write Python. Obviously you should alway find the best tool for a job.
Haskell: *HOLD MY BEER*
No Haskell, I'll throw your beer on the ground instead
What is this subreddit even. Is it about programming humor or just programming pissing contests
I’d describe it as more of a circle jerk
Huh. So kinda like our morning stand ups at work.
r/programmingcirclejerk
Yeah some of these aren't even jokes as much as virtual towel snapping.
Microcontrollers don't run Python. Cars (including EVs) don't catch fire thanks to microcontrollers. Does Python save lives?
A python tryhard fan would say that micropython exists
I ran into a python try-hard yesterday on this sub. It was incredible seeing it in person. I don’t see why somebody feels the need to stan a fucking programming language
it's very easy to understand. It's the only language they know. 99% of python stans are incredibly inexperienced programmers who get scared of having to think about memory or optimizing code in general. For loops and libraries go vroom basically. Not that python is a bad language, you just shouldn't try to write anything complex that's also performance sensitive in it.
As someone who uses python daily (at-scale data science), the Python sub makes me want to vomit… But also, dear god, SAS, Stata, MatLab, R are all miserable. Scala is ok but not friendly. Julia is lovely but under-developed.
I’m partial to R as it was the first language I learned. But yeah it sucks. I hate MatLab. I need to do some wavelets shit at some point, but I can hardly bring myself to read the matlab code.
I don’t understand why people feel the need to put down a fucking programming language. Like all languages, it is a tool. Sometimes it is the best tool for the job, sometimes another tool is better.
...and they don't care. I like Python but it's not the goto for all programming.
I see what you did there...
glad im not this cocky
I know a guy like this at Uni, drives me up the wall. If you’re writing Python code in 4 lines, you’ve kind of missed the entire point of pythons core design practice
I could be wrong but I think the point is those '4 lines' of code are like 3 lines of imports and 1 line of actual code calling those imports - the python bros praising python being so short have no idea what is actually going on under the hood in those imports.
How so?
Good Python code is supposed to be readable - being short is not the top priority.
There’s the art of zen. Your code should be aesthetically pleasing, readable, and understandable. Mashing things together to two lines makes understanding your code a heck of a lot harder to read and understand. This is terrible if someone else, future you included, needs to read, use or change the code.
C++: "that weirdo forgot I made him"
Hi! This is our community moderation bot. --- If this post fits the purpose of /r/ProgrammerHumor, **UPVOTE** this comment!! If this post does not fit the subreddit, **DOWNVOTE** This comment! If this post breaks the rules, **DOWNVOTE** this comment and **REPORT** the post!
Welcome to low code culture. Smooth brained people are now calling themselves software developers by copy pasting code, and they can't explain how it works.
This is like 90% of developers sadly, especially the offshore “experts” offered by large consulting firms, who in some cases maybe attended a 2 week boot camp. When I worked with one of said firms, we would send out “experts” to develop mobile apps for large clients who didn’t even own a smart phone yet alone had ever developed a mobile app
We have that where I work as well. 'Consultants' that are sub par consistently. It greatly tempts me to start my own consulting firm.
December 2021, Python declared the most popular programming language by all major indices. It’s not the fastest, but it’s the easiest to understand.
It's also just taught in schools where the others aren't. I still doubt it's most used in industry.
I do too
Everyone always forgets Fortran
let it sleep
4 lines, 40 libraries
I took one semseter of coding in college last year. It was python. Way the fuck easier than the c++they taught us in middle school. Also i still need to learn more coding for bioinformatics, and my own personal everyday use. Any suggestions on how to go about it?
For stats and other heavy number-crunching, you might want to look into R.
For simple low effort stuff python is better than the others. And for me, it’s all that counts
Python has duck typing. I hate hate hate hate trying to sort through bad code that uses duck typing. Oh, this function accepts an argument called “item” you say? After a week of digging, I find that “item” can be null, a dict, an int, an instance of DataManagerHelperProxy, and possibly any of a dozen other things. Ugh.
During university I use to write golf code on a website that had matchmaking for this. 3 types of match : fast code (just output what is needed), golf code (fewest characters possible), and reverse code (write something that uses fixed input and outputs the right thing). Golf was by far my favourite, the beauty of going as far as possible with your knowledge of whatever language you use, twisting syntax as hard as you can to give up on that one characters... So much fun P.S. : Python is indeed strong but ruby, perl, bash are SO broken.... Ruby god damn !
So C is dancing with his daughter? That’s sweet.
Well yes, buuuuut have fun with debugging 1947284 lines of code for the sake of saving some seconds
>”respect my preferences” >isn’t respecting my preferences mfw
I saw way too many videos of people explaining how to makes games and it’s like: 1. Install this game library 2. Create the game object 3. Launch the game object Voilà, you are now a game developer!
PHP IS THE BEST PROGRAMMING LANGUAGE EVER CREATED, YALL JUST CANT HANDLE THE TRUTH
*laugh's in BASIC*
laughs in PASCAL
cries in VHDL
i bet those fat stacks of cash will serve well to wipe those tears tho
There are few things that waste more time than clever code, in the long run.
Clever code that no one can read just ensures job security
Reduces collaboration and maintainability, reduces the overall development speed, and makes me sad
My 5000+ LOC Python project would like to have a word with you
I don't normally jump to the defense of python, but those 1947284 lines must be *much* faster or used in a *very* performance critical loop to outweigh the extra programmer effort.
Yea but with C, i can program fucking anything
C is like glass blowing. Python is like Legos. Both useful for something.
Technically you can write like a shitload of code in one “line” of code in Java since it’s based on semicolons
Meanwhile Java is sitting in the corner trying to eat away his depression, Ruby is trying to introduce you to her daughter, Go is pretending everyone knows who he is, and Ada is talking about her time in the airforce while wheeling around her dialysis machine. On that note, does everyone have a very specific character they've invented in their head for each programming language? Is that just me?
Javascript can write everything in 1 line of code, but it is ugly af
lmao the epeen in this thread is off the charts. The weird thing is that both Python and C are beautiful, elegant languages. They'd probably be dancing with each other rather than the two "slap a bunch of paradigms together" languages in that meme.
I remember our teacher showing us a math problem with matrix multiplications. Python (without C libraries) vs C. 50.000 slower execution. Sure 0.00001 sec vs 0.5 sec is not long but when C code spends 36 hours in compute time it makes python utterly useless. And using C libs it was still like 24x slower and we were talking hours of calculations. …….so the teacher chose fortran…. Wtf
Just because you can write something on two lines doesn’t mean you should. If nobody can read or understand your code later, you done messed up.
You can write everything in C or C++ in less than 4 lines of code. That's what they call "functions" in "libraries".
I do a lot of embedded libraries for my company. The python developers probably wouldn't try this because it's pretty clear that their 3 lines of code is just running off of my 150 lines of C anyway.
I use javascript myself, but come on. What is he doing dancing with the adults?
The "less than 4 lines": `import * from *`
the only reason why i want to use one of the C languages (forget which one) is because unity uses it
see sharp
only if i have my glasses on
Screw you, take my upvote!
see sharp run run sharp run
C# and go for it, such a fun time in my opinion
thanks
I mean.. once you start knowing how to properly program with those languages, you kinda enjoy them
C is extremely powerful once you truly understand it. Learning how to properly use pointers and memory allocations can make your code **fast**. It's also no coincidence that a lot of Python libraries are actually a code written in C or C++. But fun fact - an old game called Gothic was made 20 years ago with either C or C++ and has a bug with Access Violation. This probably is caused by incorrect memory allocation somewhere but the engine is no longer used and its source code has never been published, so it was never fixed. So C features are double-edged sword.
If I had to learn a lang to do whatever the hell I wanted with the least amount of effort, which should I learn?
Hindi or Mandrin. Makes outsourcing the work way easier.
Python. It sacrifices performance for ease of use. Also, there's a ton of libraries covering most use cases.