Peggy Carter (
mucked) wrote in
driftfleet2016-11-30 01:08 pm
video + text + action
Who: Peggy Carter & YOU
Broadcast: Y, fleetwide.
Action: Aboard the Starstruck, if you like.
When: Today.
[ a video feed flickers to life, and fights for a moment to adequately focus on its subject. peggy carter sits in the kitchen aboard the starstruck, cup of tea and her elbow and half a biscuit in her hand. dabbing at crumbs, she sets her food aside and offers the network a bright smile. ]
That message -- the ominous one, in the bizarre language? It put me in mind of the sort of cryptograms and puzzles you might see in the Sunday paper. [ her expression is cheery enough, although she's not being wholly honest about her interest in such games. she won't be the one to say the words bletchley and park.] I loved them. Them, and crosswords. I thought maybe some of you might like them, too. [ ... ] We could do a few together. I'm not saying we all join a club, exactly, but back home they were always better solved in good company.
Let's start you off with one that's easy enough. But there's no shame in needing a hint, if needed. For what it's worth, the text I'm attaching is, in its deciphered form, English -- not yet certain how the augments' translation will handle it. We'll see.
[ -- and then an afterthought: ]
...By chance, has anyone been brewing their own beer?
Broadcast: Y, fleetwide.
Action: Aboard the Starstruck, if you like.
When: Today.
[ a video feed flickers to life, and fights for a moment to adequately focus on its subject. peggy carter sits in the kitchen aboard the starstruck, cup of tea and her elbow and half a biscuit in her hand. dabbing at crumbs, she sets her food aside and offers the network a bright smile. ]
That message -- the ominous one, in the bizarre language? It put me in mind of the sort of cryptograms and puzzles you might see in the Sunday paper. [ her expression is cheery enough, although she's not being wholly honest about her interest in such games. she won't be the one to say the words bletchley and park.] I loved them. Them, and crosswords. I thought maybe some of you might like them, too. [ ... ] We could do a few together. I'm not saying we all join a club, exactly, but back home they were always better solved in good company.
Let's start you off with one that's easy enough. But there's no shame in needing a hint, if needed. For what it's worth, the text I'm attaching is, in its deciphered form, English -- not yet certain how the augments' translation will handle it. We'll see.
BLSTKBC YLBSFKGISRX XL QIYT SL SFVBWIKAKJR STR QKBZ VX V XSRVZU EIFELXR — V ELKBS LB OTKYT STR XLIA QVU NKM KSX KBSRAARYSIVA RUR.
[ -- and then an afterthought: ]
...By chance, has anyone been brewing their own beer?

no subject
no subject
Here, let me see it for a sec?
[ he'll start the transfer while they do their work. ]
no subject
What exactly will you be doing to it? [ not doubtful, merely curious. ]
no subject
[ and he does just that, putting both phones down on the table to allow the transfer to take place. ]
no subject
What sorts of things can these...codes do, by the way?
no subject
Practically everything, it's a way to transmit, receive, and process data. Back home everything is computerized - banking, media, intelligence, you name it. And if you're really good - you can hack all those things. Our network, these ships - they're controlled by a code, it's just not one I can figure out [ he irritably rubs at his augment ] but it's there. It's calculating our trajectory, monitoring our life support systems, comms, code is how we're still alive.
no subject
but something winn says catches her attention. ]
Intelligence, hm? [ a stiff clearing of her throat. this, at least, should by now be no secret to a clever mind like winn's. ] That sort of work must become rather different in an age of little telephones in everyone's pocket. Good Lord.
[ she'd be a fossil, indeed. and maybe that's why she's so curious about upgrading this skill. ]
no subject
no subject
she resolves to ask him, later. ]
I hope you don't feel offended when I say it sounds absolutely horrid. [ she values her privacy almost to the exclusion of friendships; letting just anyone know her legitimate likes, beyond the superficial story that appeases surface curiousity?
makes her stomach churn. ]
no subject
Nah, I get it. The implications can be terrifying, but if you know what you're doing and you're smart about your personal info, you can stay safe. I've had to sit through a lot of data security lectures and they all come down to the same basic points - don't share private information online, keep your camera covered, back-up your files, don't open unverified files from people you know or anything from people you don't, and have some sort of basic firewall and anti virus program installed, that's enough for most private people. You just get used to it.
no subject
oh so dryly: ] Well, if I didn't feel like a fossil before...
[ no offense, winn. but that's quite a lot to swallow. ]
no subject
Don't worry, you'll get the hang of it and it's not really like that here anyway.
no subject
But we're getting ahead ourselves. You promised me a basic lesson.
no subject
[ but it's on the to-do list! ]
Right, yeah. [ sitting down to a sheet of paper, he begins with the basic flow chart of how programming works. ]
Okay so basically machines speak in numbers only. The language they use is called 'binary' and it's pretty impossible to program in, it's just endless sequences of 0s and 1s. So we use either a high level or assembly language - high level is closer to the way we speak, assembly is closer to the way machines speak - and the computer translates our commands into binary - processes them in what's called the CPU - Central Processing Unit - and performs the task. It's a simple input-work-output flow chart. So far so simple, right?
no subject
it's clear she's studying what he's putting down -- mapping it to memory, like she might blueprints. ]
A CPU is like a brain, isn't it?
no subject
Yeah, pretty much. [ he nods. ] There are a lot of programming languages out there - some are case specific - like internet only, app only - some are more universal. Since we don't have a network we can work on here, I'm gonna teach you one called C# it's pretty handy for most uses and the app I'm giving you is geared for it. Ok - a few simple base rules. Making notes is important - notes start with a double forward slash - any line that doesn't start with two of those will be considered code and if it's not code - your program won't work. In code, if so much as one semicolon is missing or redundant - it won't work. Okay so - this is pretty much the first exercise they teach you in any programming class ever.
[ he starts writing ]
public class Hello1
{
explaining this line is something I'll do later or it'll get confusing but what you need to know now is that Hello1 is the name of our class, and our class is the program we're writing now. The curly brackets have to open and close every segment of code.
[ he continues writing, speaking as he does ]
public static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
Main is the main body of our program, we can write sub sections, which we'll talk about some other time. System.Console - is the name of the output portal we're asking the action to appear in - write line is the action - and hello world is the content. Every action has to end with a semicolon. So basically, when we input this into our app --
[ he demonstrates. and hits execute - the screen now says 'Hello, World!' ]
Voila. A basic program. Input commend - output result.
no subject
[ she offers her verdict in a tone so soft it's nearly beneath her breath. with a well-edged nail, she taps the class and it's name. ] Here's the squad or battalion or whatever unit you like.
[ peggy draws an invisible line down to the main body. ] And here are the commands themselves. North Africa. Deploy West. Et cetera, et cetera. Executing the program is like acknowledging the telegram. Words, codified and regulated, making things happen.
[ -- the analogy is a little sloppy, admittedly, but she wants to express to winn that she follows the logic behind his work. ]
no subject
So - [ he erases the code and hands her the device. ] If you wanted the screen to read 'my first program' - how would you do it? [ she's got the sheet of paper with his example written out in front of her if she wants to consult it. it's not about actually memorizing the code, it's making sure that she got the basic logic of it, that she knows which parts to substitute and which to leave unchanged. ]
no subject
stiffly, she takes the device from his hand. and wordlessly (and feeling no shame in consulting the sheet) she recreates the original code. with alterations: System.Console.WriteLine("My First Program");
peggy resists the additional urge to have the product say anything but what she's been asked to produce. however, she does change the class name to also read 'my first program' all before handing the phone back to winn. ]
no subject
he nods in appreciation. ]
Perfect. Remembering to always name your classes meaningfully - and add notes - will be a lifesaving habit when you get into thousands of lines of code. Now, obviously, most of the time we'll want our code to actually do something, not just repeat what we say like a trained monkey. When we put text or numbers in quotation marks - they'll be printed as is. When we take out the quotation marks, however, the computer will treat them as variables. Variables have to be defined before they're used. If we just use a number - it'll mean that number so, if for example I put down -
[ changing the class name to basic algebra he changes the content of the parentheses to 5+4 and sure enough - the screen now reads 9. ]
It'll solve the equation. It can be as long or short as you like. But again, when we just write out 4 and 5 - the program will just repeat. If we want to someday have a user able to input his own values, we'll have to sub them out with generic variables. So, if I want to define my variable, I first have to let the program know what kind of variable it is. The types of variables we use are pre-existing classes, they've already been defined, so in order to use them, we need to first write the name of the class we'll be using - to start you off I'll give you 2 basic classes - [ he writes her notes with short explanations as he speaks ] string - that's for text based types, and int - short for integer. Always make sure you use all lower case when you're defining the type of variable you're using or it won't work. I forgot to mention - c# is what we call a case sensitive language so - super important. A capital or lowercase letter in the wrong place can bring down the whole thing.
[ he clears his throat. ]
Anyway - this is how we define a variable. var int nameOfVariable; The name can be written out however you feel like but if you're going to be collaborating with other programmers it's policy to start the name with a lower case letter and capitalize the first letter of any other word. Right now we have an integer variable, but it has no value, so if we try to print it out - we'll get an error message. [ he demonstrates. ] Variables need values before we can use them. We can do it dynamically, with user input or - we can do it like this - [ he adds a line below the variable definition. ]
nameOfVariable = 4;
We can also do it all in the same line - [ he edits it to read var int nameOfVariable=4; ] and now we can print it or use it in our calculations -
Console.WriteLine(nameOfVariable+5); [ the screen once more reads 9 ]
We'll leave getting input for later, right now, I'd like you to get used to defining variables. How do you think we'd define a string variable?
no subject
String variables are text, so -- [ a puff of her cheeks. she pulls the mental bricks apart and reassembles them with a bit of pragmatism. she starts be settling on an appropriate textual variable. ] Like nationality. Or even the fleet's vessels.
[ peggy grabs the pencil and (in a tight and elegant script) improvises a solution from the pieces she's already been taught. she writes: ] var string fleetVessel=starstruck;
[ it's her best guess. and even then, she can already recognize the limitations of such a simple line. code must build on code, she suspects. ]
no subject
Really close - but when you write it like that the system will read it as if you're inserting the value of another variable called starstruck into your new variable, and since it doesn't exist - you'll get an error. Text values have to go in - [ adding them ] double quotation marks.
no subject
You set me a trap, Winn. [ she doesn't smile. indeed, there's a toothless breath of frustration because she resents the tactic while also recognizing its utility. she cannot fault him. michael used to do much the same, when they were children scrapping in the backyard. he'd leave obvious openings and allow his younger sister the brief joy of exploiting said opening before thumping her on the back of the head. ] I see I'll have to take better care in future.
no subject
[ there are so many tiny little rules that can mess up months of work if you forget about them, that can take ages to find if you're working without an automated debugger - and even if you, if you make the wrong kind of mistake you're screwed, you could be stuck debugging for weeks. he has no idea how far she means to go with these lessons, but he's determined to give her a good foundation to build on.
(and yeah, he enjoys feeling like his old self again, like he's the best at something. it may not be nice, but he hasn't gotten to feel of real use in a long time, and he's savoring his little triumphs.) ]
You can use as few or as many variables in the same command as you want, and you can mix and match their types, as long as you remember where to put your quotations. For example -
[ writing into the app now
var string vessel1="Starstruck";
var int numOfStarCrew=7;
var string vessel2="Tourist";
var int numOfTourCrew=6;
System.Console.WriteLine("The "+vessle1+" has "+numOfStarCrew+" people. The "+vessel2+" has "+numOfTourCrew+ " people.
Total crew: "+numOfStarCrew+numOfTourCrew);
clicks execute, and the screen now reads: ]
The Starstruck has 7 people. The Tourist has 6 people.
Total crew: 13.
This is butt-ugly code and when you'll advance you'll never do it, but it's a good exercise to get the rules straight in your head. So, build something that mixes different kinds of variables. [ handing her the phone ]