r/PowerShell • • Sep 18 '19

Parenting Through PowerShell

My 8 year old decided to pretend to be sick so he would get sent home from school the other day. So after we finished all the work the teach gave us, I decided to make him some extra work. Since they are learning double digit addition I wrote a quick script that will generate a page with 25 problems on it. I kept printing him off new sheets until the end of the regular school day.

I thought I'd share it in case anyone else has a 2nd grader who likes to play hooky. https://www.dowst.dev/homework-double-digit-addition-without-carrying/

Does anyone else have any examples of parenting through PowerShell?

229 Upvotes

67 comments sorted by

View all comments

138

u/Dev-is-Prod Sep 18 '19

Do children have an API you can interface with? This would be so much easier if so. Where do I log a change request?

On a serious note, this is brilliant.

58

u/mdowst Sep 18 '19

They do, but it is not documented. Plus you could send the same command multiple times and receive a completely different result code for each one.

30

u/noobtastic31373 Sep 18 '19

Assuming you get a response at all

25

u/RandomSkratch Sep 18 '19

Damn UDP

29

u/GoodShitLollypop Sep 18 '19

I'd tell you a joke about UDP but you might not get it...

20

u/sorerutenshi Sep 18 '19

UDP packet bar walks a into

8

u/WadeEffingWilson Sep 19 '19

A TCP packet walks into a bar and says hi.
A TCP packet walks into a bar and says hi.
A TCP packet walks into a bar and says hi.
A TCP packet walks into a bar and says hi. The bartender says hello.

1

u/GoodShitLollypop Sep 19 '19

The onlooker surmises, "Rather chatty protocol, he is..."

9

u/jdl_uk Sep 18 '19

So children are an alternative to Get-Random?

8

u/dus0922 Sep 18 '19

No they are just an alias.

Edit: typo

3

u/xeroip Sep 18 '19

New-Alias -Name Get-Random -Value Children

1

u/popandacridsmell Sep 19 '19

Copy. Paste. Save as ...\Auto\Alias that will fuck up at least one of my scripts.ps1

5

u/AnonymooseRedditor Sep 18 '19

And for the love of God, watch out for the crash dumps

2

u/infinit_e Sep 19 '19

Ugh, non idempotent code is the worst! Who designed this API? It’s like it’s still in dev!

9

u/iceph03nix Sep 18 '19

GET my.child/What/is/wrong/

POST my.child/life/lessons/

PUT my.child/habits/bad?quality=good

DELETE my.child/ideas/bad/

8

u/ypwu Sep 18 '19

They support REST API :)

36

u/winter_mute Sep 18 '19

Mine is not RESTful. It also avoids SOAP wherever possible. I'm beginning to think we've got a fundamental architectural flaw somewhere...

7

u/beerchugger709 Sep 18 '19

It's probably too late for an RMA

2

u/DistressdDamsel Sep 23 '19

Some places won't even let you make changes after 6 weeks into dev.

4

u/[deleted] Sep 18 '19

Maybe check the spec for Really Problematic Child protocol

6

u/ridicalis Sep 18 '19

Where do I log a change request?

I don't know, but when you do change something, make sure you use revision control (e.g. "Old Git").

3

u/Fincho2191 Sep 18 '19

Possibly on r/Outside maybe?

1

u/Invoke-RFC2549 Sep 18 '19

I need to know if my toddler has a sleep function I can call...

1

u/_Unas_ Sep 18 '19

Yes they do, but it requires that you parse the WSDL since it is a SOAP API.