Tumgik
#a level comp sci
horse-head-farms · 3 months
Text
with stuff like “polyhermits” do people imagine it as a full mesh network (everyone is dating everyone else) or a partial mesh network (each person is dating multiple people who are themselves dating multiple other people etc so everyone is connected even if not directly involved with eachother)
87 notes · View notes
lightuponearth · 8 months
Text
introduction post ✩‧₊˚
hello everyone, welcome to my silly little blog <3 i'm not new to tumblr, but it has been years since i was active so... anyways! i'm shifting from twitter to here and i would love to gain some mutuals and friends. here are a few things about me :)
basic info!
- she/her, asian, 17, estj - self-learning french + sql and python - bs hons in computer science: first year
interests!
☆ all things girly and pink ☆ literature ☆ writing, i'm an aspiring novelist ☆ crocheting ☆ films
this blog is honestly more of an online diary but it's definitely going to be a mix of studyblr, codeblr, langblr, productivity, and self improvement content. also do expect some ranting from time to time and me rambling abt my interests lol
Tumblr media Tumblr media Tumblr media
73 notes · View notes
seallbay · 1 year
Text
My code is so inefficient it isn’t even funny 😭 it takes like 3 minutes for this one algorithm to execute. I need like a loading screen so I know it isn’t just broken or in some kind of loop 😭
53 notes · View notes
esme-studies · 2 months
Text
Total study time yesterday
Tumblr media
[6 hours 5 minutes]
I was aiming for 12 hours but I guess this is a start
3 notes · View notes
raskies456 · 5 months
Text
learning python rn and nothing boosts your confidence like finding the bug while the person teaching you is coding live
3 notes · View notes
lover-of-mine · 6 months
Text
im taking a course online and it's allegedly a beginner's class, so you don't need any previous knowledge to understand, but I lowkey can't imagine understanding this without previous knowledge.
3 notes · View notes
they--slash--them · 7 months
Text
no srsly tho is like the concept of like letters to my younger self and knowing how your younger self would feel about your present self figurative or do ppl actually like have a connection with their younger self and remember things their younger self wanted and stuff like that???
5 notes · View notes
livi-erudite · 1 year
Text
One of my computer science teachers (I have two) promised to buy us rubber ducks at the end of our A Level and if he breaks that promise I will be pissed
(btw it's because there's this thing called rubber duck debugging where you explain any problems you're having with your code to a rubber duck. It's because verbalising your problems can help you find solutions to them.)
8 notes · View notes
clownstudy · 8 months
Text
Tumblr media Tumblr media Tumblr media Tumblr media
Learning how to code in Java and meeting some ducks on the way
0 notes
chamomiletea511 · 5 months
Text
hermits as professors
made by my friend and i, just based on vibes
bdubs: architecture
beef: business, he's the nicest prof you'll ever meet
cub: corporate business but he unofficially teaches tax evasion in all of his classes
cleo: sculpting
doc: robotics, everyone is scared of his reputation until they take a class with him
etho: redstone but only 400/500 level classes, he's that one cryptid professor
false: self defense
gem: interior design, but she's also the advisor for the fencing club
grian: chaos theory
hypno: website design
impulse: industrial engineering
iskall: game dev and comp sci
jevin: medieval history but also the advisor for all the tcg clubs
joe: philosophy and/or literature
keralis: comedy (and city planning?)
mumbo: redstone or cinematography
pearl: organization
ren: theatre
scar: entrepreneurship, but teaches landscape design as well
stress: education and fictional lit
tango: game dev
tfc: geology/geoengineering
wels: modern history, you walk into class and think he's going to be Standard Midwest Guy and then he turns around and has a rap battle with himself and is super chill
xb: ancient history
xisuma: management/org leadership (the joke among profs is that he's such a derp)
zedaph: the advisor for 20 different ridiculous clubs, nobody knows where he came from or what he teaches
281 notes · View notes
fairyofshampgyu · 2 years
Text
Corrupt File !
genre: smut, college au
pairing: programmer! beomgyu x gn reader (afab when it comes to smut)
warnings: nsfw, sub virgin nerd! beomgyu, dom! reader, corruption kink, mentions of p0rn, handjob, riding
word count: 1.8k
Tumblr media Tumblr media
Choi Beomgyu. Goodie two shoes in your comp sci class who was the teacher’s pet and notorious for being an ‘excellent’ and ‘strong’ programmer who can program amazingly well in any language and has great debugging skills. Apparently he learnt how to program at the early age of 7 and made his own pac man after a week. 
He’s also a little pretentious bitch. He thinks he’s better than everyone else in the class and doesn’t bother speaking to anyone, giving others judgemental stares. You’ve seen him a couple times on campus with four other dudes though but none of them were in any of your classes. He comes to every single class early with his cute little outfits, sweater vests and cardigans whilst everyone else is in their hoodies and deranged with little sleep, sits at the front and doesn’t talk to anyone but the teacher. 
You? Well, you’re mediocre at programming. You’re not too bad but you prefer other aspects of computer science and your programming skills have always made you slightly insecure because you weren't the best of the best and you didn’t learn it at some ridiculously young age and program 24/7 all types of games and websites and other stuff. You had to work so hard to actually get to a good level of programming whilst it came so easy to people like Choi Beomgyu. He seems so perfect. It made you want to imperfect him. 
You were late to class today, getting a bit delayed by some cats on the way there. They were really cute cats what can you say! And you loved cats. But being late to class today meant that all seats were occupied except for the front row and the spare seat, unsurprisingly was next to Choi Beomgyu. He doesn’t pay you any attention though, waiting for his computer screen to load and then the teacher begins.
“Alright, today I thought our class was in great need of some partner work and we’ll be doing programming today. With whoever is sitting next to you, I’d like you to develop a program with them. It can be on everything and anything and you have the weekend to create it, using Python.”
Wow. It was just your luck. 
The boy besides you sighs, pushes his cute, round, kinda too big for his face, glasses up and turns his body to face you. 
To be honest, you wouldn’t have minded working with him. Despite being slightly jealous, you did admire his skill but with how hostile he was being and how clearly he resented the idea of working with you, you didn’t think this was going to go too well.
“...We could make like a simple video game or something...” You speak up first.
 “On python? And too basic.” He rolls his eyes and shuts your suggestion off.
You’re slightly agitated with him now and you show it with your tone. “Well what do you think we should do then, huh?”
“I think we should make a music suggestion tool. We could make an algorithm run that recommends music based on what we think the user will like.”
He doesn’t wait for you to agree, opening up python and already starting to write some code.
For the rest of the class, you don’t contribute much, just trying to give him some suggestions to add maybe a function over there or a loop over here, maybe trying to find a reason as to why a syntax or logic error came up. You’re already halfway done and sure it would need more refining but now you know it won’t take up your whole weekend which is good. You watch him carefully as he stays very focused, fluffy dark hair falling into his face and eyes and his circular glasses that had drooped back down to his nose. You look down to his hands. He was very fast at typing and his hands were oddly very pretty.
Upon inspecting his features, you come to the conclusion that he was in fact actually pretty attractive. How had you never noticed before?
“We can carry on working on it at my place right now if you want?” Beomgyu asks, packing up his pink laptop, pink pencil case and pink notebook back into his crossbody bag after the class had finished. You stare at your own laptop that just has a black hard case cover, your pencil case that looks like it’s been through three wars, and your notebook that was really just a bunch of lined paper. Wow, he even had a theme going on. 
“Oh I've actually got another class after this that won’t be done until about two hours but I can come after that. Just send me your address.” So you exchange phone numbers and go off your separate ways. 
Apparently you were the only one who wasn’t informed that your class was actually cancelled today, your professor going on strike or something like that. Sighing, you check your phone to see that beomgyu had sent you his address and it’s not that far from the campus. You could go there early then.
knock, knock, knock. He was taking weirdly long to open his door and you could hear some rustling and bustling until he finally did open his door.
“Oh. You’re here early.”
“Yeah turns out my class was actually cancelled.”
His room was exactly how you expected it to look; clean and cute and quite perfectly him. The room had a pastel coloured running theme but mostly just pink and white. Fairy lights, strung across the headboard of his bed, a pastel pink record player in the right corner with an assortment of vinyls underneath, ones you recognised and liked and some you didn't recognise, an acoustic guitar to the left on a stand near his shelf and there was a worn out teddy bear occupying his bed. 
He sits on his bed and you follow...and then you both just sit there doing absolutely nothing for a few seconds in awkward silence.
“Uhhh aren’t you gonna get your laptop? We wrote it on your laptop?” You laugh, awkwardly.
“Uh yeah. Right.” So he gets his laptop, very slowly opening it and he’s just about to open the .py file when his mouse board falters over the safari accidentally and the hidden window was freed with a very suggestive video on it paused and an even more suggestive website. Your eyes go wide and so does his.
“I-it’s not- it’s not what it looks like! I-it’s just when you’re watching on a dodgy website and those pop ups come up! yeah...yeah!” He’s furiously clicking the red button on the top left hand corner to close the window immediately. But you can’t help the grin slowly appearing on your face.
You move slowly closer towards him and he moves back, stopping when his head touches the pretty fairy light headboard. “Oh really? Because it seems like you were jerking off before I was here.” Your face is only a few inches away from his now and he gulps, looking up at you. When he doesn’t even say anything to defend himself, you chuckle at him. “What happened to the little goodie two shoes? I didn’t know you were such a fucking whore.”
“I’m not-i’m not a whore!”  
“Are you sure?” You move to his clothed dick which was painfully hard now, lightly palming it and his whole body jerks, moaning and eyelids fluttering. 
“More, more...” 
You scoff. “Have you ever had a handjob before?” He shakes his head. “Do you want one?” Slack-jawed, he nods his head profusely.
You free his dick and take it into your hands, starting to stroke him and his hands fly to shyly cover his face, attempting to conceal his moans but not to much success.
“Don’t cover your pretty face.” You tut at him, “I wanna see it.” You bring your own hands to remove them away from his face. Not gonna lie, it’s turning you on immensely seeing beomgyu like this. Little put together, pretentious, perfect beomgyu is like this right now, begging you to touch him, clueless and embarrassed. You want to absolutely ruin him. 
 “Aw I bet you didn’t get to cum before did you?” 
“yeah...”
“Don't worry, baby I'll let you cum.”
You use your thumb to go back and forth on his sensitive tip while your other hand grabs the base of his dick and his mouth hangs wide open in endless moans and gasps. You pump his dick fast up and down, ruthlessly jerking him off and his breath hitches.
“Close!” He lets out the loudest moan so far and you abruptly stop. He utters a frustrated whine, hips bucking up and pouting at you, “I thought you said you’d let me cum.”
You can’t help but giggle at him. He’s so cute. “I will. In my pussy.” That seems to shut him up.
You get on top of him, straddling his waist and gently pinning both of his hands to the headboard. He looks at you slightly nervous.
“We don’t have to if you don’t want to.”
“But I want to.”
“You sure?” He nods his head.
“Okay.” You inhale a breath before positioning his tip to your entrance and you look to his face again for confirmation and when there’s no sign of uncertainty , you slowly sink down.
“Oh, fuck! Feels so gooood” His face contorts in pleasure and he turns his head to the side, burying it into the pillow whilst his mouth stays parted. You lift up and drop back down hard, making him cry out a loud moan and you begin to ride him slow.
He was already so blissed out by you riding him slow you wonder how he’d be if you quicken your pace so you do, riding him mercilessly now, basically bouncing on his cock and he moans uncontrollably, incoherent words coming out of him with a fucked out face in a daze. Only his moans getting higher in pitch by the second and the noise of skin slapping filling the room.
“C-cumming, cumming!” And with a loud whine and his eyes slightly rolling back, his dick jerks and spills all inside of you with his body trembling.
His face right after being fucked is gorgeous. He’s breathless and panting by his first proper orgasm with his cheeks and chest flushed, face glistening because of the sweat and his fluffy hair completely wrecked now, glasses a bit crooked and head in the clouds.
Yeah, maybe you won’t end up getting the program done in time after all.
COMMENTS AND REBLOGS ARE REALLY APPRECIATED GUYS 😭<333
3K notes · View notes
Text
I probably made a mistake taking a freshman level comp sci class in senior year but at least I have Rain World
The project was just to recreate a scene in Scratch, so I chose Rain World. We didn’t have to but I drew all the sprites for this (with the Splatoon brushes lol) so ig this counts as Rain World fanart??
(The music in the background wasn’t supposed to be there it was just in the recording bc I had it playing in another tab. The video wouldn’t have audio without and it somewhat fits though so I just kept it in)
Here are the sprites I made btw
Tumblr media Tumblr media Tumblr media Tumblr media
66 notes · View notes
virgil-my-emo-son · 2 months
Text
One Business Card Lighter
Dukeceit Week Day 4, Hair/Teeth!
Dukeceit week is run by @imnotgrimimjustagrumpyreaper ! @dukeceitweek @dukeceit-week-2024
I feel like I kind of cheated with the prompt... this is a punk singer Remus x comp sci professor Janus fic LOL. I'm so happy with this AU and honestly I might expand on it in the future. I've been working on a giant paper about punk fashion history so I tried to get the punk stuff as accurate as possible! Listened to a lot of Sex Pistols during the writing of this fic!
Also there's a fnaf reference in here if anyone's a fnaf fan 👀
Enjoy!!
Ao3
Janus stood awkwardly at the back of the room, holding his old fashioned in one hand, the other fiddling idly with the twist of orange zest in the glass. His eyes, however, were undistracted, glued to the small stage at the front of the bar.
He came to Junior’s for their jazz nights on Thursdays. He knew all of the hits that the bands usually played, and he was always interested to hear their original work. Sometimes it made Janus question why the artist had picked up music in the first place, and sometimes it made him wonder why the hell they were playing in a tiny little bar in the middle of the city instead of in the stadium just across the river.
Janus was used to Thursday nights. He liked Thursday nights.
But tonight was a Friday, and Janus had never been to Junior’s on a Friday.
For one thing, it was far more crowded than he was used to, mostly college students who were either freshly 21 or had good-enough fake IDs. Janus stayed at the back of the room, leaning against the wall and sipping on his drink, taking his eyes off the stage for a moment to scan the crowd. It would be a little awkward running into one of his freshmen from Computer Science 170 at a bar.
Janus only taught one 100-level class this semester, so it was a little less likely he’d run into those students than the juniors and seniors from his software engineering courses. Those students might be legally allowed in Junior’s, but it wouldn’t make an interaction any less uncomfortable.
Janus looked back at the stage. For another thing, Fridays were not jazz nights.
Fridays were punk nights.
The band onstage was… the best word Janus could think of was outrageous. He didn’t mean it negatively, but there was no denying they were provocative.
The drummer and bassist both had long hair. The drummer’s was pulled back, revealing a sleeveless shirt covered in strategic rips and tears, while the bassist’s fell in dark curtains over his white T-shirt that Janus was pretty sure had an upside-down crucifix. The guitarist’s hair was spiked to heaven, and he wore a jacket covered with enough patches and pins that Janus couldn’t tell what the original fabric was, with a T-shirt beneath reading FUCK OFF.
But what really caught his attention was the singer.
He was short, but the presence with which he commanded the stage made him seem seven feet tall. He marched around the stage in beat up work boots and dark, ripped jeans. A few tears near his thigh were patched with safety pins, affixing them to a grey Sex Pistols T-shirt with the eyes of each of the band’s members scribbled out. His hair was a calico dye job of orange, a weird orangey blond Janus could only assume was the result of an attempt to bleach the orange out, and dark brunette in spots he’d missed with both the orange and the bleach.
He was striking, and Janus found himself unable to stop watching his tongue as he rolled the “r” in “antichrist” during a jerky rendition of “Anarchy in the UK.”
Suddenly, the singer looked up, making direct eye contact with Janus. He winked—Janus could’ve sworn directly at him—as he sang, “Don’t know what I want, but I know how to get it!”
Janus suddenly couldn’t look at him any longer, a blush heating up his face. He took a fortifying sip of his alcohol.
Janus stayed for the rest of the set, despite not knowing a single one of the songs they played or even whether they were covers or originals. The fact that he recognized “Anarchy in the UK” was only because of his friend Virgil’s high school punk phase, and even that was a small miracle.
That singer…
“Thank you for coming out tonight!” He yelled over the drummer doing a long roll on the snare. “My name is Remus and we’re Hair and Teeth and fuck the IRS and fuck the military and fuck you all!” He kicked his foot up as the drum roll concluded with a smash on the cymbal.
The crowd went crazy, cheering and clapping and yelling stuff Janus couldn’t quite make out. The band walked offstage, and Janus was sure he locked eyes with Remus as he threw a kiss over his shoulder and disappeared into the back room.
The bar began to empty out as the evening got later and later, and Janus found himself sitting on one of the barstools, chatting with the bartender. It wasn’t the usual Thursday bartender, rather, a man in a red satin shirt with a loud laugh. He was fun to talk to, but all Janus could think about was Remus.
“Say, do you know the band just playing?” Janus set down his glass, leaning a bit on the bar. He’d moved on from his cocktail to a series of low proof beers. His small house was within walking distance of Junior’s, but despite his high tolerance for alcohol, he didn’t want to get too drunk.
“I do.” The bartender smiled. “I know them very well.”
“In what sense?”
The bartender indicated his head at something over Janus’s shoulder. “My brother.”
Janus looked behind him to see the singer, Remus, walking up to the bar.
His chest leapt.
“Can I have something on the house?” Remus stood by the bar, leaning on it with his forearms.
“No.” The bartender raised a judgmental eyebrow. “What makes you think I’d do that?”
“I’m your baby brother, Roman! You love me!”
Roman rolled his eyes. “No free drinks.”
Remus turned to Janus. “He’s so annoying.” His eyes raked up and down Janus, and he desperately wished he’d taken the time to change into something other than the pinstriped button-up shirt and plaid slacks he’d taught in. “Are you going to a wedding?”
Janus blinked. “Pardon?”
“You’re dressed all fancy.” Remus gestured to his outfit.
“No wedding, I’m afraid. Came from work.”
“What’s work?” Remus’s head tilted. “Office job? You The Man we hated on for an hour during our set?”
Janus gave a short laugh. “Not really. I’m a professor at Sanders University, computer science.”
Remus mimed a yawn. “Computer science? Boring.”
“And you’re a musician full-time, I assume?” Janus gave him a quick once-over. “You look the part, Remus.”
“Thank you, I am!” Remus winked. “You already know my name, so what’s yours, handsome?”
“Stop flirting in front of me right now.” Roman interjected, pointing a finger at Remus. “I don’t need to hear this. Out.” His finger moved to the door.
“Fine.” Remus moved his hand to hover over Janus’s. “Can I take your hand, handsome?”
“Depends. Where are you taking it?” A grin twitched at Janus’s mouth.
“Out of this bar!” Roman called over his shoulder.
“Yes.” Janus looked back to Remus, smiling in earnest.
A twinkle in his eye, Remus grabbed his hand and pulled him out the door of Junior’s. The street outside was busy, one of the main roads in town, and the glow from the streetlamps and signs of other bars, restaurants, and shops lit everything up.
Remus leaned against the wall. “So, come here often?”
Janus laughed. “Yes, every Thursday, actually. They have good jazz.”
“Jazz? Yeah, you’d like jazz.” Remus nodded.
“Whatever does that mean?”
“You just look like you’d listen to jazz music.” Remus nodded to his whole figure. “So, then, why’d you come tonight?”
“I just had a… a feeling I should.” Janus looked down. “I think I made the right decision, though.”
“So do I, handsome. I never got your name.” Remus tilted his head again.
“Janus.”
“Last name?”
“Constance.”
“Janus Constance?”
���Janus Constance.”
“Mm.” Remus hummed. “Interesting.”
Janus fumbled in his pocket for a moment. “I should be going, but I… here’s my card. Call me.” He held out a business card.
“A business card at the bar is hilarious.” Remus took it. “You’re definitely a professor.”
“Did you think I was lying?”
“Well, now I know for sure.”
“Mm.” Janus was amused.
“I’ll call you.” Remus’s eyes twinkled. “Professor Constance.”
“Please.” Janus rolled his eyes. “It’s Janus.”
“Alright, Janus. I’ll call you.” Remus took Janus’s hand again and held it up to his mouth, giving it a short kiss before winking again and walking away. Janus was left blushing on the sidewalk, one business card lighter.
24 notes · View notes
oliviabutsmart · 9 months
Text
Physics Friday #5: The Wonderful World of Programming Paradigms
Welcome to the first actual post on the dedicated blog! This will be continuing on from what I started over on my main account @oliviax727. But don't worry, I'll still repost this post over there.
Preamble: Wait! I thought this was Physics!
Education level: Primary School (Y5/6)
Topic: Computer Languages (Comp Sci)
So you may be thinking how this is relevant to physics, well it's not. But really, other adjacent fields: computer science, chemistry, science history, mathematics etc. Are really important to physics! The skills inform and help physicists make informed decisions on how to analyse theoretical frameworks, or to how physics can help inform other sciences.
I may do a bigger picture post relating to each science or the ways in which we marry different subjects to eachother, but what is important is that some knowledge of computer science is important when learning physics, or that you're bound to learn some CS along the way.
Also I can do what I want, bitch.
Introduction: What is a Programming Language?
You may have come across the term 'programming paradigm' - especially in computer science/software engineering classes. But what is a programming paradigm really?
Computers are very powerful things, and they can do quite a lot. Computers are also really dumb. They can't do anything unless if we tell them what to do.
So until our Sky-net machine overlords take control and start time-travelling to the past, we need to come up with ways to tell them how to do things.
Pure computer speak is in electrical signals corresponding to on and off. Whereas human speak is full of sounds and text.
It is possible for either one to understand the other (humans can pump electrical signals into a device and computers can language model). But we clearly need something better.
This is where a programming language comes in. It's basically a language that both the computer and the human understands. So we need a common language to talk to them.
It's like having two people. One speaks Mandarin, the other speaks English. So instead of making one person learn the other's language, we create a common language that the two of them can speak. This common language is a synthesis of both base languages.
But once we have an idea of how to communicate with the computer, we need to consider how we're going to talk to it:
How are we going to tell it to do things?
What are we going to ask it to do?
How will we organise and structure our common language?
This is where a programming paradigm comes in - a paradigm is a set of ideas surrounding how we should communicate with a device. It's really something that can truly only be understood by showing examples of paradigms.
Imperative vs. Declarative
The main two paradigms, or really categories of paradigms, are the imperative vs. declarative paradigm.
Imperative programming languages are quite simple: code is simply a set of instructions meant to tell the computer specifically what to do. It is about process, a series of steps the computer can follow to get some result.
Declarative programming languages are a bit more vapid: code is about getting what you want. It's less about how you get there and more about what you want at the end.
As you can see imperative programs tell the computer how to do something whereas declarative programs are about what you want out.
Here's an example of how an imperative language may find a specific name in a table of company data:
GET tableOfEmployees; GET nameToFind SET i = 0; WHILE i < tableOfEmployees.length: IF tableOfEmployees[i].firstName == nameToFind THEN: RETURN tableOfEmployees[i] AND i; ELSE: i = i + 1; RETURN "employee does not exist";
And here's that same attempt but in a declarative language:
FROM tableOfEmployees SELECT * WHERE firstName == INPUT(1);
Note that these languages aren't necessarily real languages, just based on real-life ones. Also please ignore the fact I used arrays of structures and databases in exactly the same way.
We can see the difference between the two paradigms a lot more clearly now. In the imperative paradigm, every step is laid out clear as day. "Add one to this number, check if this number is equal to that one".
Under the declarative paradigm, not only is the text shorter, we also put all of the instructions about how to do a task under the rug, we only care about what we want.
With all this, we can see an emerging spectrum of computer paradigms. From languages that are more computer-like, to languages that are more English-like. This is the programming languages' level:
Tumblr media
Lower level languages are more likely to be imperative, as the fundamental construction of the computer relies on a series of instructions to be executed in order.
The lowest level, the series of electrical signals and circuitry called microcode is purely imperative in a sense, as everything is an instruction. Nothing is abstracted and everything is reduced to it's individual components.
The highest level, is effectively English. It's nothing but "I want this", "I'd like that". All of the processes involved are abstracted in favour of just the goal. It is all declarative.
In the middle we have most programming languages, what's known as the "high level languages". They are the best balance of abstraction of reduction, based on what you need to use the language for.
It's important that we also notice that increasingly higher-level and increasingly more declarative the language gets, the more specific the purpose of the language becomes.
Microcode and machine code can be used for effectively any purpose, they are the jack-of-all trades. Whereas something like SQL is really good at databases, but I wouldn't use it for game design.
As long as a language is Turing-complete, it can do anything any computer can do, what's important is how easy it is to program the diverse range of use-cases. Assembly can do literally anything, but it's an effort to program. Python can do the same, but it's an effort to run.
Imperative Paradigms: From the Transistor to the Website
As mentioned previously, the imperative paradigm is less a stand-alone paradigm but a group of paradigms. Much like how the UK is a country, but is also a collection of countries.
There are many ways in order to design imperative languages, for example, a simple imperative language from the 80's may look a lot like assembly:
... ADD r1, 1011 JMZ F313, r1
The last statement JMZ, corresponds to a "Jump to the instruction located at A if the value located at B is equal to zero" what it's effectively saying is a "Repeat step 4" or "Go to question 5" type of thing.
Also known as goto statements, these things are incredibly practical for computers, because all it requires is moving some electrical signals around the Registers/RAM.
But what goto statement is used as in code, is really just a glorified "if x then y". Additionally, these statements get really irritating when you want to repeat or recurse over instructions multiple times.
The Structured Paradigm
Thus we introduce the structured paradigm, which simply allows for control structures. A control structure is something that, controls the flow of the programs' instructions.
Control structures come in many forms:
Conditionals (If X then do Y otherwise do Z)
Multi-selects (If X1 then do Y1, if X2 then do Y2 ...)
Post-checked loops (Do X until Y happens)
Pre-checked loops (While Y, do X)
Counted Loops (For i = A to B do X)
Mapped Loops (For each X in Y, do Z)
These control structures are extra useful, as they have the added benefit of not having to specify what line you have to jump to every time you update previous instructions. They may also include more "safe" structures like the counted or mapped loop, which only executes a set amount of time.
But we still have an issue: all our code is stuffed into one file and it's everywhere, we have no way to seperate instructions into their own little components that we might want to execute multiple times. Currently, out only solution is to either nest things in far too many statements or use goto statements.
The Procedural Paradigm
What helps is the use of a procedure. Procedures are little blocks of code that can be called as many times as needed. They can often take many other names: commands, functions, processes, branches, methods, routines, subroutines, etc.
Procedures help to organise code for both repeated use and also it makes it easier to read. We can set an operating standard of "one task per subroutine" to help compartmentalise code.
Object-Oriented Code
Most of these basic programming languages, especially the more basic ones, include the use of data structures. Blocks of information that holds multiple types of information:
STRUCT Person: Name: String Age: Integer Phone: String Gender: String IsAlive: Boolean
But these structures often feel a bit empty. After all, we may want to have a specific process associated uniquely with that person.
We want to compartmentalise certain procedures and intrinsically tie them to an associated structure, preventing their use from other areas of the code.
Like "ChangeGender" is something we might not want to apply to something that doesn't have a gender, like a table.
We may also want to have structures that are similar to 'Person' but have a few extra properties like "Adult" may have a bank account or something.
What we're thinking of doing is constructing an object, a collection of BOTH attributes (variables) AND methods (procedures) associated with the object. We can also create new objects which inherit the properties of others.
Object oriented programming has been the industry standard for decades now, and it's incredibly clear as to why - it's rather useful! But as time marches forward, we've seen the popularisation of a new paradigm worthy of rivaling this one ...
Declarative Paradigms: The World of Logic
Declarative languages certainly help abstract a lot of information, but that's not always the case, sometimes the most well known declarative languages are very similar feature-wise to imperative paradigms. It's just a slight difference in focus which is important.
Functional Programming Languages
Whereas the object oriented language treats everything, or most things, like objects. A functional language uses functions as it's fundamental building block.
Functional languages rely on the operation of, well, functions. But functions of a specific kind - pure functions. A pure function is simply something that doesn't affect other parts of the computer outside of specifically itself.
A pure function is effectively read-only in it's operation - strictly read-only. The most practical-for-common-use functional languages often allow for a mixture of pure and impure functions.
A functional language is declarative because of the nature of a function - the process of how things work are abstracted away for a simple input -> output model. And with functional purity, you don't have to worry about if what takes the input to the output also affects other things on the computer.
Functional languages have been around for quite a while, however they've been relegated to the world of academia. Languages like Haskell and Lisp are, like most declarative languages, very restrictive in their general application. However in recent years, the use of functional programming has come quite common.
I may make a more opinionated piece in the future on the merits of combining both functional and object-oriented languages, and also a seperate my opinions on a particular functional language Haskell - which I have some contentions with.
Facts and Logic
The logic paradigm is another special mention of declarative languages, they focus on setting a series of facts (i.e. true statements):
[Billy] is a [Person]
Rules (i.e. true statements with generality):
If [A] is [Person] then [A] has a [Brain]
And Queries:
Does [Billy] have a [Brain]?
Logical languages have a lot more of a specific purpose, meant for, well, deductive/abductive logical modelling.
We can also use what's known as Fuzzy logic which is even more higher-level, relying on logic that is inductive or probabilistic, i.e. conclusions don't necessarily follow from the statements.
Visual and Documentation Languages
At some point, we start getting so high level, that the very components of the language start turning into something else.
You may have used a visual language before, for example, Scratch. Scratch is a declarative language that abstracts away instructions in-favour of visual blocks that represent certain tasks a computer can carry out.
Documentation languages like HTML, Markdown, CSS, XML, YML, etc. Are languages that can barely even be considered programming languages. Instead, they are methods of editing documents and storing text-based data.
Languages that don't even compile (without any significant effort)
At some point, we reach a point where languages don't even compile necessarily.
A metalanguage, is a language that describes language. Like EBNF, which is meant to describe the syntaxing and lexical structures of lower-level languages. Metalanguages can actually compile, and are often used in code editors for grammar checking.
Pseudocode can often be described as either imperative or declarative, focused on emulating programs in words. What you saw in previous sections are pseudocode.
Diagrams fall in this category too, as they describe the operation of a computer program without actually being used to run a computer.
Eventually we reach the point where what were doing is effectively giving instructions or requesting things in English. For this, we require AI modelling for a computer to even begin to interpret what we want it to interpret.
Esoteric Paradigms
Some paradigms happen to not really fall in this range form low to high level. Because they either don't apply to digital computing or exist in the purely theoretical realm.
Languages at the boundaries of the scale can fall into these classes, as microcode isn't really a language if it's all physical. And pseudocode isn't really a language if it doesn't even compile.
There are also the real theoretical models like automata and Turing machine code, which corresponds to simplified, idealised, and hypothetical machines that operate in ways analogous to computers.
Shells and commands also exist in this weird zone. Languages like bash, zsh, or powershell which operate as a set of command instructions you feed the computer to do specific things. They exist in the region blurred between imperative and declarative at the dead centre of the scale. But often their purpose is more used as a means to control a computer's operating system than anything else.
Lastly, we have the languages which don't fit in our neat diagram because they don't use digital computers in a traditional manner. These languages often take hold of the frontiers of computation:
Parallel Computing
Analog Computing
Quantum Computing
Mechanical Computing
Conclusion
In summary, there's a lot of different ways you can talk to computers! A very diverse range of paradigms and levels that operate in their own unique ways. Of course, I only covered the main paradigms, the ones most programmers are experienced in. And I barely scratched the surface of even the most popular paradigms.
Regardless, this write-up was long as well. I really wish I could find a way to shorten these posts without removing information I want to include. I guess that just comes with time. This is the first computer science based topic. Of course, like any programmer, I have strong opinions over the benefits of certain paradigms and languages. So hopefully I didn't let opinions get in the way of explanations.
Feedback is absolutely appreciated! And please, if you like what you see, consider following either @oliviabutsmart or @oliviax727!
Next week, I'll finish off our three-part series on dark matter and dark energy with a discussion of what dark energy does, and what we think it is made of!
54 notes · View notes
esme-studies · 2 months
Text
class: computer science
Duration: 3 hours
Topic: revision of first 3 chapter for p1
Tumblr media
What I'll be doing:
Chapter 1, information representation and multimedia.
Chapter 2, communication.
Chapter 3, hardware revision.
Tumblr media Tumblr media
Countdown until Computer Science p1: 11 days
2 notes · View notes
shoyostar · 10 months
Text
INTRO 002. ( THE FRIENDS )
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
ꕥ masterlist. ↺ previous. ➛ next.
cardinal rule number one of university ; don't fuck your classmates. unless they happen to have something you want.
SUMMARY friends with benefits? more accurately fuck buddies with perks. to get the most out of your time, you're picky about who you fuck and why.
kita from comp sci is the smartest student on campus. suna from gen chem is fun to be around. atsumu from physics is the best fuck of your life. and osamu from biochem is a damn good cook.
all different classes, all different bonuses. no strings attached, you thought you had nothing to worry about.
"you know suna?
"why do you know suna? how do you know suna??"
Tumblr media
MISC.
— kuroo is more active on instagram because he networks the most on there. kenma’s gaming career requires him to be on twitter more often.
— kenma has a public twitter for his online platform, but keeps his personal life private on instagram.
— akaashi has way more followers than his following count because he’s friends with bokuto.
— bokuto attends UTokyo on a volleyball scholarship.
— akaashi is a double major in japanese & comperative literature.
— bokuto wanted to try out for a pro team when he graduated but decided playing at a university level would make the jump from highschool - pro easier.
— reader and akaashi met in the library during freshman year finals week. he drank out of her coffee cup while studying beside her by accident.
— a third of bokuto’s followers may be bots but he doesn’t realize that.
— kuroo posts gym / workout pics & videos on his instagram.
Tumblr media
reblogs appreciated ໒꒰ྀི´ ˘ ` ꒱ྀིა
© SHOYOSTAR 2023 — do not repost, copy, translate or edit my works. do not recommend my account outside of tumblr.
107 notes · View notes