I read in on C but it’s also true for JavaScript. The code implies that x was declared as an int sometime previously, or if JavaScript, just an object if not assigned a value giving it a type.
- 0 Posts
- 2.04K Comments
I know. OP asked what x was before the loop, and I just said it’s an int. The int can be any value because as you pointed out it will be set to 0 in the first loop iteration.
BassTurd@lemmy.worldto
politics @lemmy.world•Grassley built a reputation for government oversight. He abandoned it under Trump.
7·2 days agoI’ve written my fair share of emails to this ghoul. I’m definitely on the domestic terrorist list they are compiling.
An int. Value doesn’t matter because it’s overwritten.
BassTurd@lemmy.worldto
Asklemmy@lemmy.ml•What programming language would you recommend for teaching to non-technical people that use a variety of different OSes?
1·5 days agoFor a basic setup to learn hello world and basic if/then logic, it’s extremely simple to setup Python on Windows or Linux. For Windows, which I’m guessing every non technical viewer will be using, download the installer and hit next taking the default values. Open idle, type the very human readable, print(“hello world”). Save and press f5. That’s it no complicated setup.
OP isn’t talking about teaching a lesson where any confusing syntax will come into play. They are giving an intro to programming class. That’s all about learning basic programming concepts which is done very easily in Python. You wouldn’t teach a non technical first time programmer a ternary operator or a list comprehension. You’d teach them:
if a == 10: print("a = 10") else: print("a is not 10")and simple for loops
for x in range(10): print(x)I don’t know about you, but to me that’s about as human readable as it gets. No imports required. No extra packages. Just default python install and copy paste and this will work.
There are other languages with minimal setup that can be used. OP could go as far as basic JavaScript in JS fiddle so no setup would be required. The basics of JavaScript are also very easy to read compared to a language like C where explicit typing is required. That can be a difficult concept for people that have never even seen code before. Python and JavaScript soften that blow. Once the concepts of if/then, loops, and functions are grasped it’s much easier to pivot to other languages with more verbose syntax.
I’m not here suggesting that Python is by any means the superior language of the universe, just that it’s a very good option to learn with for it’s entry level simplicity and syntax readability, which I’ve demonstrated.
BassTurd@lemmy.worldto
World News@lemmy.world•Millions of children and teens lose access to accounts as Australia’s world-first social media ban beginsEnglish
1·6 days agoI’m not convinced it happens. I sure as shit feel like an old man some days physically, but my mind ranges from juvenile 12 year old potty humour to 70 year old get off my lawn and everywhere in between. It’s less often as I get older, but some days I get humbled when presented with something that I was sure was true that turns out to not be. It’s best to take it in stride as a learning opportunity rather than mope about it. It’s the xkcd “lucky 10000” situation.
BassTurd@lemmy.worldto
World News@lemmy.world•Millions of children and teens lose access to accounts as Australia’s world-first social media ban beginsEnglish
3·6 days agoWithout a doubt. Like I said, I remember having views as a teen that were bad due to lack of life experience. I can look back into my 20s and think of plenty times where I was notably better than my teenage years but now I can see I still didn’t have it. It’s just the nature of growing up and getting older. We all evolve and have new life experiences that highlight our previous gaps in knowledge. It was just really noticable when I was listening to the sound bites in those PBS interviews the other week and it hit me like a truck. A sad, sad truck.
BassTurd@lemmy.worldto
World News@lemmy.world•Millions of children and teens lose access to accounts as Australia’s world-first social media ban beginsEnglish
62·6 days agoI’m not saying today’s youth is dumber than past youth, I’m saying all youth are dumb due to ignorance, but especially when it comes to social media since that’s relatively recent in the grand scheme of the world.
BassTurd@lemmy.worldto
World News@lemmy.world•Millions of children and teens lose access to accounts as Australia’s world-first social media ban beginsEnglish
3·6 days agoI’m not saying they are dumber than we were, I’m saying all kids are dumb due to ignorance. I do think that a lot of the current generation coming out is better adjusted than my generation, but they are still ignorant to the real world. The more I experience the real world the more ignorant I see that they are.
I really enjoy the jetbrains IDEs. They offer a free license, so you can try it without penalty. I prefer them over vscode personally.
It’s opt out for the free license, but it is possible to block AI in JB IDEs.
BassTurd@lemmy.worldto
Linux@programming.dev•Discord gets improvements for video on Linux PCs and Steam Deck
43·6 days agoUnfortunately it’s a necessary evil if you want voice and video chat. I think people and companies that use it professionally for customer support and similar are making a terrible choice. If there were a competing product that was as simple to setup and had even the most basic voice and chat features without the extra discord bloat, I’d jump ship, but that’s not really an option right now.
BassTurd@lemmy.worldto
politics @lemmy.world•Trump administration announces $12 billion in one-time payments to farmers
3·6 days agoDoctor Samuel Johnson is right about Orson Johnson being right.
BassTurd@lemmy.worldto
politics @lemmy.world•Trump administration announces $12 billion in one-time payments to farmers
7·6 days agoI’m not so sure that’s true. There is a shit load of land used to grow corn to make ethanol that’s farmed by independent farmers. In the US most farmland is used for soy beans and corn for livestock feed or fuel. It wouldn’t be a simple or cheap undertaking, but that last could be utilized more efficiently to directly or indirectly fees people.
I would also bet there are enough people that would love to be farmers that can’t because land isn’t available or cheap that would step up if large farm operations were broken up. That’s pure speculation, but even if one mega farm were split 4 ways, that would still be an improvement to the current situation.
BassTurd@lemmy.worldto
World News@lemmy.world•Millions of children and teens lose access to accounts as Australia’s world-first social media ban beginsEnglish
93·6 days agoI was watching a piece on this the other day on PBS and they had some sound bites from youths they interviewed. It really hit me just how much dumber kids get as I get older. They aren’t actually dumber, but my understanding about how ignorant they are just keeps getting clearer. I remember think similarly in my youth, so it’s not unique to this generation, so no shade, but kids are dumb.
BassTurd@lemmy.worldto
Asklemmy@lemmy.ml•What programming language would you recommend for teaching to non-technical people that use a variety of different OSes?
21·6 days agoPython 100%. It’s the most human readable and easiest to pick up, especially for a non tech person. It’s easy to setup contrary to what I’ve read in the comments. Go to python.org install the latest version and that’s it. The downloader includes Idle so no other ide is required, but I’d consider vscode as well. Either watch an install video or better yet do it yourself before going to class.
I think you need to highlight the differences between OSs when it comes to setup if you plan on having a mixed environment of systems. It will also affect the code you write, so to be thorough, you’ll need to cover those differences as well.
Don’t go low level like C. These people will die the first time they have to compile in terminal.
BassTurd@lemmy.worldto
Fuck Cars@lemmy.world•John Whitmire is the dumbest Mayor in the United States. He is reversing safety improvements on Houston's already dangerous roadsEnglish
22·6 days agoI disagree. He might be intelligent, but he is dumb AF.
BassTurd@lemmy.worldto
No Stupid Questions@lemmy.world•Why do minority characters need a justification for existing, but white male characters can exist without needing justification?
81·6 days agoWelcome to America is a black African coming to America. I’m sure there’s multiple Jackie Chan movies that fit the bill. Once upon a time in Mexico was mostly Hispanic people in Mexico.
I guess I’m not sure what you exact question is. Does it have to be a fantasy where a minority dies and ends up in a fake, white dominate location, like opposite of Wakanda?
I’m not well versed in foreign films, but I bet there are a bunch of Bollywood films as well that cover these bases.
BassTurd@lemmy.worldto
Asklemmy@lemmy.ml•What are your opinions on name changes in general?
9·7 days agoAmerica isn’t the only place with sponsored stadiums. Emirates stadium (Arsenal FC) and Etihad stadium (Man City) are both sponsor names for example. It’s more common in lower leagues for the financial bump.


Obviously if there’s someone in the cross walk you wait for them, but the expectation is that nobody starts crossing in front of the procession.