#c sharp programming
Explore tagged Tumblr posts
Text
For my internship I have largely been working with Python and I gotta say; this language is such a mixed bag for me. On one hand support is great, running on multiple architectures and operating systems is a breeze, and there's almost always an easy way to do what you want. On the other hand the lack of types makes me want to pull my hair out. Oh you want to know what this method returns? Sucks to be you, dig through the source until you find a return statement then trace that back to an argument which shocker doesn't have a type so now you've gotta find a place where it was called and see what it was passed there. And don't get me started on the lack of access modifiers. "Just don't use it if it starts with an underscore!" THEN TELL ME WHERE I CAN GET IT FROM.
Anyway rant over. Thankfully being on a small team that uses Pylance and detailed docstrings for in-house code has made this a lot less painful. I can only imagine what it'd be like if it weren't for that. To those of you who like Python, tips on dealing with the lack of types would be greatly appreciated
28 notes
·
View notes
Text
PROGRAMMING QUESTION
hey i got a question about programming languages that i feel like is a very stupid question but i wanna ask it anyway is there a reason besides "easier to learn/more classes available/ect" that most consumer programs/devices/games tend to be written in JS, Python or likewise? Like, I don't know what the actual amounts are for how many things are programmed in what languages, I just feel like most things are programmed in "The Popular Langauges" I feel like I never see a software or device or anything that's just programmed in C (or children) and I've definitely not seen something programmed in Rust in a very long time Maybe i'm just dumb and I don't know how things outside my very limited perspective get coded and I just need a reality check but theoretically nothing is stopping a big company from programming their next touch-screen control panel thing in C, right?
#i'm not counting HTML or CSS#those are style only#i know this is very vauge#look i'm running on several days no sleep#programming#coding#software#javascript#python#c sharp
22 notes
·
View notes
Text
Post #83: Tumblr Opinion Poll by Python-Programming-Language, Question: Which programming resp. script language do you prefer?, 2023.
#programming#coding#coding is fun#i love coding#learning#education#i love programming#programming language#python#c++#c sharp#visual basic#small visual basic#i love python#php#scratch#html#css#java#javascript#script language#opinion poll
212 notes
·
View notes
Text
Ah yes, programming in C#, famously a kid centric activity
7 notes
·
View notes
Text
WHAT THE FUCK DO YOU MEAN C++ DOESN'T HAVE A SPLIT FUNCTION
#I'm just trying to do my homework man#spare me this suffering#let me out#let me go back to c sharp i beg#fuck man I'll take js#oh yeah i also learned the other week it called dictionaries “maps” instead???#code#codeblr#coding#programming#cppprogramming#cpp#c++#c++ programming
2 notes
·
View notes
Text
do you think my code pretty
#programming shitpost#programming#c sharp#id say I'm sick and that is my excuse#but I don't think there's an excuse for this
7 notes
·
View notes
Text
Question regarding languages: Python & C#
Is it possible to learn both languages at the same time? Or will it be easy to get confused between the two? I thought I would come to the lovely codeblr people who have a vast amount of experience for advice. C# is something I *want* to learn, but I *have* to learn Python for for my course that starts in January...I just want to see if it is plausible to learn both at the same time or if it will mess up my learning if I try and learn both. I'd love to hear about your experiences and what your first languages were when you first started out in the world of coding!!
#codeblr#coding#programming#computer languages#python#c sharp#c#learning to code#c++#object oriented programming#advice please!!#learning
48 notes
·
View notes
Text
Programming is so fun whaatt the hell
I even enjoy the rabbit holes I fall down trying to learn something new/solve a problem; there's so much vocabulary I don't know so I end up looking for a solution and then needing to search "what does [funky coding word] mean" every few mins LOL
And the flow is just so nice once I understand what Im doing! You get into a groove n you're just typing code for hours while listening to music or a podcast or whatever aaaahhh
#I'm entirely new to everything so its all super exciting!!#ive started learning c-sharp for game development.. but I love how many languages there are to learn#feels like there's always something new I can do/learn with programming#will I ever run out of fun??#Im almost certain any programmer reading this is thinking 'enjoy this excitement while it lasts..' LMAO but I am and I WILL#feli thoughts#codeblr#programming#csharp#game development#game dev
25 notes
·
View notes
Text
how is it possible that when i try to fix an error in a code it gives me 10 new errors i literally just fixed you
#i literally has no idea what i am doing and i don’t think anyone in my class has any idea#i literally fixed an error it gave me 10 new errors i need to fix what the -#programming#coding#c sharp
3 notes
·
View notes
Text
If any of ya’ll have any advice/resources/sources on the most basic of basic beginners courses for programming I would be ever so grateful if you’d share them with me. I took one (1) computer class in high school and stopped immediately because the teacher was an asshat (he taught all four levels of the computer science courses at that time so i kind of just gave up hope) anyways I would love to learn myself but google is useless as usual. Ive been able to find a bunch of books but they all start with an assumption of some prior programming/coding knowledge.
#trying to learn#programming#coding#?#my goal is to eventually get to c sharp#however I’m not even fully sure if that’s what I should aim for
7 notes
·
View notes
Text
progmramming 😍😍😍😍😍😍😍😍😍
Im making this blog post how I want to cause idc idc. My intro is that i am going to attempt to program something that is probably way out of my skill set but i have resources 😍🤞 I want to try to program a better version of my school’s version of google classroom, schoology, cause i think the ui is trash and ugly. So far I didn't do all that much, I just started brainstorming what changes I would like to make and I asked some friends and classmates about what improvements they would want to see in schoology, like things that they don't like. I'm thinking of making the ui more familiar, which will make it more basic but at least the navigation won't be something new you have to learn, cause most people already learned it. I also think that the classes should not be ordered alphabetically because that makes it so virtually all the classes that you actually need to use often are at the bottom, with the top place going to “advisory” or the stupid lockdown browser help. I also find it a heavy pet peeve that there is no scrolling feature for “upcoming assignments” and missing ones, like the upcoming assignments just has a long list and its not its own separate scrolling window, separate from the website, and for the missing assignments, if you have more than a certain amount, clicking to see more opens a whole nother mini window???? Like thats not efficient, it's not optimal, it does not look good, it is not demure, it is not mindful, it is not classy, or elegant. Things like that about schoology make me full of hate, put me in my hating era I plan on starting to figure out how to program and continue shaping my idea of wtf i want the new website to look like, btw i'm calling it skulogy cause im insasnly clever 🤯 Apologies for the cringe overuse of slang 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏 im practicing my right to freedom of speak 🙏🙏🙏🤯🤯🤯🤯🤯🤯🤯
#programming#website#javascript#java#python#c sharp#funny#funny meme#copy pasta#america#USA#my pronouns are U S A#merica#albino
2 notes
·
View notes
Text
I dislike using rigidbodies to move my objects because physics interactions can sometimes go ham and while that can be very amusing, I prefer things to be predictable. So for moving arrows in this game I handled the movement math myself via coroutine. Let's take a look-see, shall we? :3
The goal of this coroutine is to move its symbol object in an arcing motion from its initial position, moving it upward and to either the right or left. Then it will fall downward. Rather than having each symbol object run this coroutine from an attached script, I am using a central script (my GameManager) to apply this movement to a given object, so the first thing I do is make sure the symbol still exists before proceeding with the coroutine:
If we find that our symbol has been destroyed, we exit the coroutine with "yield break". You wouldn't need this check if the script is running this movement on its own object, as coroutines are ended upon an object's destruction.
There are a bunch of variables we'll define within our coroutine to calculate our desired motion; we'll start by defining an arcDuration:
This determines how long the object will take to move in the arc shape. A shorter duration results in faster movement. Using a random amount between a min and max duration creates some variance in how fast different symbol objects will move. I have my minArcDuration set to 1 and maxArcDuration set to 2.5 for quick bouncy movements.
These variables referencing the outermost bounds of the camera's view will be used to ensure that symbols remain within the visible area of the camera at all times. I'm not using a topBound because I'm fine with symbols possibly going off the top of the screen, but I use a maxArcHeight variable that is set low enough that they never do.
For even more spawn variability, we add a little randomness to our starting point. My spawnPointVariance is set very low at 0.3; my initial symbol spawn position is low on the screen, and due to how the rest of this coroutine works, it's important that the symbols are never allowed to spawn below the bottomBound or else they will be instantly deleted (and result in a miss!)
The height here is, of course, how far up the symbol will travel, and the distance refers to how far it will move to the left or right. We calculate the peak of the arc by adding our distance and height to the x and y values of our starting position. Randomizing between negative and positive distance values for our x position adds another layer of variability which includes the possibility of moving either left or right, even though our minArcDistance and maxArcDistance are both set to positive values for clarity (mine are set to 1 and 6).
This is the part of the code that decides upon our symbol's speed by calculating the distance it has to cover from its start to its peak. By dividing our horizontalDistance by our arcDuration (distance divided by time), we calculate how fast the symbol needs to move to cover the entire distance in the given duration. Mathf.Abs is used to ensure that horizontalDistance is always positive, lest we get a negative value that causes us to move in the opposite of the intended direction.
We'll also want a speed variable for when the arcing motion ends and the symbol starts falling, that's where downwardSpeed comes in. In earlier versions of this function, I used downwardSpeed alone to transform the object's position, but I've since refined the logic to take the current horizontalSpeed into account for more consistent motion; we'll see that later. (Also you can see I've been tweaking that arbitrary range a bit... the fall speed was brutal during those mass waves ;o;)
Here we create an elapsedTime variable starting at 0. In our while loop, we will use this variable to count how much time has passed, and if it becomes greater than or equal to arcDuration, we'll change isFalling to true and begin moving down.
We create a Vector3 moveDirection which gives the vector pointing from the startPosition to the peakPosition, and then turn it into Vector3 horizontalDirection, which retains only the X-axis direction. Both values are normalized to ensure consistency. Without normalization, the magnitude (or distance) of the vector would vary depending on the distance between the start and peak positions, which could result in inconsistent speed. Normalization caps the magnitude at 1, meaning the vector represents just the direction, not the distance, allowing for consistent speed calculation later.
Here's how we start our while loop: as long as our symbol object is not null and the game says we canMove, we say yield return null, which will instruct our loop to occur every frame. If either the symbol becomes null or canMove becomes false, the while loop will end and so will the coroutine - for this reason, I only set canMove false when the game ends and the symbols will never have to resume movement, rather than in cases where I want them to pause movement and resume later, such as when a player pauses the game or during level-up periods. For the latter I use an isLevelingUp bool in my while loop that waits until that bool is false before proceeding (yield return new WaitUntil(() => !isLevelingUp)), and for the former I actually change the game Time.timeScale to 0, which is not typically recommend but fuck it we doin it live, because I don't have a mechanism for resuming this function with appropriate variables if it is stopped. It could surely be done if you just store the local variables somehow.
This is the first part of our movement logic that we put in the while loop; remember we already set isFalling false, so this part will proceed with the rising motion.
We count our elapsedTime here by adding Time.deltaTime, a variable which represents the time in seconds that has passed since the last frame, ensuring that time calculation is frame-rate independent. Do NOT use Time.time in cases like this unless you want your users with varying computer specs to all have different experiences with your game for some insane, villainous reason
The variable 't' is looking at the elapsedTime divided by arcDuration, a ratio that tells us how far along we are in the arc movement. If elapsedTime equals arcDuration, this ratio would be 1, meaning the arc is complete. We use Mathf.Clamp01 to clamp this value between 0 and 1, ensuring that it won't ever go higher than 1, so that we can use it to calculate our desired arcPosition and be sure it never exceeds a certain point due to frame lag or some such. If 't' is allowed to exceed 1, the arcPos calculation could possibly go beyond the intended peakPos. We are going for predictable motion, so this is no good
We define our Vector3 arcPos with Vector3.Lerp, short for "Linear Interpolation", a function for calculating smooth transition between two points overtime. Ours takes our startPos and peakPos and moves our symbol between the two values according to the value of 't' which is incrementing every frame with Time.deltaTime. As 't' progresses from 0 to 1, Vector3.Lerp interpolates linearly between startPos and peakPos, so when 't' is 0, arcPos is exactly at startPos. When 't' is 1, arcPos reaches peakPos. For values of 't' between 0 and 1, arcPos is smoothly positioned between these two points. Very useful function, I be lerping for days
Then we alter the y coordinate of our arcPos by adding a calculation meant to create smooth, curved arc shape on the y axis, giving our object its rounded, bouncy trajectory. Without this calculation, you'll see your symbols rising and falling sharply without any of that rounded motion. This uses some functions I am not as familiar with and an explanation of the math involved is beyond my potato brain, but here's a chatgpt explanation of how it works:
Mathf.Sin(t * Mathf.PI): This calculates a sinusoidal wave based on the value of t. Mathf.PI represents half of a full circle in radians (180 degrees), creating a smooth curve. At t = 0, Mathf.Sin(0 * Mathf.PI) is 0, so there’s no vertical displacement. At t = 0.5, Mathf.Sin(0.5 * Mathf.PI) is 1, reaching the maximum vertical displacement (the peak height of the arc). At t = 1, Mathf.Sin(1 * Mathf.PI) returns to 0, completing the arc with no vertical displacement. This scales the vertical displacement to ensure the arc reaches the desired height. If height is 10, then at the peak, the symbol moves 10 units up.
With those positions calculated, we can calculate the "newX" variable which represents where we want our symbol to appear along the x axis. It adds the horizontal movement to the current x coordinate, adjusted for the time passed since the last frame.
We use Mathf.Clamp to ensure our newX value doesn't exceed either the left or right bounds of the screen. This function limits the given value to be between min and max value.
Finally we tell our loop to actually reposition the symbol object by creating a new Vector3 out of newX, arcPos.y, and using our symbol's own z coordinate. That last bit is important to ensure your sprite visibility/hierarchy doesn't go out of whack! If I used arcPos.z there instead, for example, it's likely my sprites would no longer be visible to my camera. The z position the symbol spawned at is the z position I want it to retain. Your needs may vary.
This part tells us our arcDuration should end, so we set isFalling to true, which will cause the secondary logic in our while loop to trigger:
Previously, objects retained their x position and only had negative downwardSpeed applied to their y position, but I didn't like that behaviour as it looked a little wonky (symbols would reach their arc peak and then suddenly stop and drop in a straight line downward).
By creating a new Vector3 fallDirection that retains the horizontalDirection and horizontalSpeed from the arc phase, we're able to apply smooth downward motion to the symbol that continues to the left or right.
Just below that, we once again clamp the symbol's x position to the left and right screen bounds so the symbols can't travel offscreen:
The loop would continue causing the symbols to fall forever if we didn't have this check:
which triggers some project specific logic and destroys the symbol, then exits the coroutine with "yield break". Although the coroutine already exits when the symbol becomes null, which it will see is the case in the next frame as we destroyed the symbol here, adding an explicit yield break is an added layer of security to ensure predictability. Once again, not super necessary if you decide to run this code from the moving object itself, but just be sure you move your Destroy() request to the bottom of any logic in that case, as nothing after that point would be able to trigger if you destroy the object which is running the coroutine!
and that's all folks. If this helps you make something, show me!
HEY, did you really make it all the way to the end of this post?! ilu :3 Do let me know if this kind of gratuitous code breakdown interests you and I will summon motivation to make more such posts. I personally like to see how the sausage is made so I hoped someone might find it neat. If ya got any questions I am happy to try and answer, the ol' inbox is always open.
#gamedev#solodev#made with unity#c sharp#tutorial#coding#programming#clonin game#code explanation#code explained
3 notes
·
View notes
Text
putting this here because i don't feel like logging into my personal account but if i have to look at one more line of code tonight i'm going to start bashing my head against the wall. until i die, even
#SORRY I'VE BEEN DOING THIS STUPID PROJECT FOR MY UNIVERSITY COMPUTER SCIENCE CLASS ALL DAY AND IT'S MAKING ME#WANT TO GOUGE MY EYES OUT.#grabbing the entirety of the c-sharp programming language and destroying it with my bare hands. DO WHAT I WANT YOU TO DO GODDAMMIT#okay i'm done.
12 notes
·
View notes
Text
hello codeblr more poc techniques this time it’s worms and spreading malware combined with the registry edit persistence technique!
https://github.com/peroxidee/gigas
using the .NET framework for obfuscation as well as ease of regedit access.
3 notes
·
View notes
Text
my monolingual ass salutes you guys.
2 notes
·
View notes
Text
Seeing what everyone is currently up to is so inspiring.
It also reminds me that I should probably screenshot my things, so I can see the development in skills over time.
Luckily, I am still very much at the start of my journey and still have much to learn haha!
But thank you, to everyone who shares their projects and their progress. It's only a small thing, but it reminds me that no one gets 'amazing' in a day...and I think that is quite possibly the most motivational thing I could see. 🥰
#codeblr#coding#learning to code#programming#python#c sharp#thank you#web development#studyblr#study motivation
27 notes
·
View notes