mucked: (☂ any place is better)
Peggy Carter ([personal profile] mucked) wrote in [community profile] 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.
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?
winn: (48)

[personal profile] winn 2016-12-08 01:49 pm (UTC)(link)
[ taking his cup with him, he puts it down on the table and sits by her side, digging out his own phone. ]

Here, let me see it for a sec?

[ he'll start the transfer while they do their work. ]
winn: (60)

[personal profile] winn 2016-12-08 02:06 pm (UTC)(link)
I'm transferring software from my phone to his that will enable you to write your own code and test it out.

[ and he does just that, putting both phones down on the table to allow the transfer to take place. ]
winn: (I took the liberty of bullshitting you)

[personal profile] winn 2016-12-08 04:46 pm (UTC)(link)
[ easy, a lifetime of abject humiliation, bullying, and misplaced guilt that led him to bring himself down in every way and trapped him in a dead-end job. ]

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.
winn: (60)

[personal profile] winn 2016-12-08 05:19 pm (UTC)(link)
Oh, yeah. You have no idea. People basically spy on themselves. These phones come equipped with GPS so you can find people anywhere, they got cameras that can be remotely activated, a microphone of course...some people post their likes, their dislikes, their family, their history, their medical issues - basically their entire life to social media. When something goes down, people take video and post it online so you get footage of incidents within minutes. Nothing is private, and nothing's forgotten, the internet's pretty unforgiving that way. Of course all this also means the sheer amount of data available is mind boggling and it can still be falsified but - all in all it's a pretty exciting time.
winn: (23)

[personal profile] winn 2016-12-08 07:49 pm (UTC)(link)
[ he shakes his head ]

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.
winn: (06)

[personal profile] winn 2016-12-09 05:07 pm (UTC)(link)
[ she gets an apologetic smile, sorry peggy but this is his world and he tends to get carried away in it. he hasn't realized just how much he's been missing it until he started talking. ]

Don't worry, you'll get the hang of it and it's not really like that here anyway.
winn: (I took the liberty of bullshitting you)

[personal profile] winn 2016-12-20 07:22 am (UTC)(link)
Yeah, still haven't figured out how to firewall a brain.

[ 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?
winn: (75)

[personal profile] winn 2016-12-20 02:45 pm (UTC)(link)
[ he's too invested in the lesson to care for personal space anyway, and it's not like he's got a blackboard or a projector here - that's back on the iskaulit in the lecture hall, and feels kinda stupid to turn on for one person. ]

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.
winn: (72)

[personal profile] winn 2016-12-22 08:02 pm (UTC)(link)
Yeah - [ he smiles and nods, excited that she's picking up on it as easily as she is. ]

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. ]
winn: (I took the liberty of bullshitting you)

[personal profile] winn 2016-12-22 08:45 pm (UTC)(link)
[ he's impressed. too many people forget to change the class name - it shows an attention to detail that's vital when you get into longer code.

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?
winn: (23)

[personal profile] winn 2016-12-22 09:15 pm (UTC)(link)
[ he smiles, because she fell exactly where he expected her to. he framed it that way, so the lesson will be easier to remember. ]

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.
winn: (76)

[personal profile] winn 2016-12-22 09:35 pm (UTC)(link)
Better me than the code.

[ 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 ]