What's new
What's new

OT TSA Roulette, an app i made.

iMillJoe

Hot Rolled
Joined
Jun 12, 2013
Location
St. Louis
SO, The TSA bought a really expensive iPad app. It shows an arrow right or left. That's it.

I decided to make a bit of a mockery or it.
It gives you something like a 1/10 chance of getting a summation of a TSA Horror Story.

I could really use better quibs, my English is a little corse, perhaps a British gentleman could advise me on how best to artfully apply these mishaps, real or fictional, into to a few sentences.

I's also like to know, what I could do to make it as random as is truly possible. I've though about perhaps trying a plinko style randomizer... The 1/10 chance of getting screwed, followed by a coin flip model I have, seems a bit aloof. I don't do much random number statistical analysis, I'd hazard a guess, I'm not doing something correctly.

I know political posts can get locked, if that happens, I have no hurt feelings. I only put it here because this might be the place I get the biggest audience, and a few readers do have sound advise for things like this, that can't be placed on StackOverflow and the likes.
 
Github has good statistics. I looked today, I don't think any one ever navigated to the source file with the snarky remarks, I should have put those in my first post.

"Your 8 y/o must be stripped searched, by a known pedophile, the delay will cause you to miss your flight, you get no refund, and have to pay bail for your subsiquent actions"

"A lovely looking TSA agent is called you to the inspection station, whist patting you down she unintentionally, yet firmly grabs your 1/2 hard cock, blissfully unaware it was dangling there. She blushes and walks away. This is the only time this incident has been reported.",

"Your Grandmother who you are escorting to a cancer hospital must receive the most thorough of TSA screenings, in the process, the TSA agents bleed all the air from her oxygen tank. She does not survive."

"Upon running your name through the TSA database, it was discovered you have name similar in spelling to that of an IRA bomber, who died before you were born. You should feel lucky, most people never get to know why they are on the no fly list"



I could use about 6 more of those, and the grammar for what I have is probably ins't all that good, I'm machinist not a writer.
 
Not even remotely related to anything on this forum. In before the lock.

I hope it don't get locked, I am asking for advise on random numbers, and with writing quibs . I don't know of another place I can ask, and get any kind of answer. I don't have Facebook, and something like this would get voted off by the time 5 people saw it on stackOverflow.
 
The tsa agent you are about to encounter has just seen a rather seedy video of his wife and 10 other men and is going to take his anger out on you. . . I hear gitmo is nice this time of year, happy travels.
 
The tsa agent you are about to encounter has just seen a rather seedy video of his wife and 10 other men and is going to take his anger out on you. . . I hear gitmo is nice this time of year, happy travels.

I went ahead and merged it on in for ya.
 
Just for fun.


To get 1 in 10...

Most programming languages have a RANDOM function that will return a number from 0 to some number. You divide that result by 10, and if it's an even number you display the snarky comment.

A snarky comment:

The Xray machine shows that you might have a knife in your bag. They manually check the bag and find that there is no knife. They repack the gun, magazine and mace very professionally before waving you on.

Dan
 
Just for fun.


To get 1 in 10...

Most programming languages have a RANDOM function that will return a number from 0 to some number. You divide that result by 10, and if it's an even number you display the snarky comment.

A snarky comment:

The Xray machine shows that you might have a knife in your bag. They manually check the bag and find that there is no knife. They repack the gun, magazine and mace very professionally before waving you on.

Dan

Thanks for the snarky remark, I've merged it in. As for the random numbers, Swift does have randoms,

There is so little "model" to this app that I had no real reason to isolate it away from the view control, which X-Code creates for you when you first create the app (so long as its simple anyway) If you take a look at ViewController.swift, in the Git Repo above, it you will see this snippet,

Code:
[COLOR=#0433FF][FONT=Menlo]let[/FONT][/COLOR][COLOR=#000000][FONT=Menlo] bitchFlip = [/FONT][/COLOR][COLOR=#3495AF][FONT=Menlo]arc4random_uniform[/FONT][/COLOR][COLOR=#000000][FONT=Menlo](10)[/FONT][/COLOR][FONT=Menlo]                
[COLOR=#3495af]print[/COLOR]([COLOR=#b4261a]"bitchFlip:[/COLOR]\[COLOR=#b4261a]([/COLOR]bitchFlip[COLOR=#b4261a])"[/COLOR])[/FONT]

[COLOR=#008F00][FONT=Menlo]// if it's time to make a sassy stament,[/FONT][/COLOR]
[FONT=Menlo][COLOR=#0433ff]if[/COLOR] bitchFlip == 9 {[/FONT]
[COLOR=#3495AF][FONT=Menlo][COLOR=#0433ff]    let[/COLOR][COLOR=#000000] thisMishap = [/COLOR]arc4random_uniform[COLOR=#000000]([/COLOR]UInt32[COLOR=#000000]([/COLOR]arrayOfTSAMisery[COLOR=#000000].[/COLOR]count[COLOR=#000000]))[/COLOR][/FONT][/COLOR]
[COLOR=#3495AF][FONT=Menlo]    bigButton[COLOR=#000000].[/COLOR]titleLabel[COLOR=#000000]?.[/COLOR]font[COLOR=#000000] = [/COLOR]UIFont[COLOR=#000000].[/COLOR]systemFontOfSize[COLOR=#000000](30)[/COLOR][/FONT][/COLOR]
[FONT=Menlo]    [COLOR=#3495af]bigButton[/COLOR].[COLOR=#3495af]setTitle[/COLOR]([COLOR=#3495af]arrayOfTSAMisery[/COLOR][[COLOR=#3495af]Int[/COLOR](thisMishap)], forState: [COLOR=#3495af]UIControlState[/COLOR].Normal)[/FONT]
[FONT=Menlo]    } 
[COLOR=#0433ff]else[/COLOR] {[/FONT]
[COLOR=#3495AF][FONT=Menlo]    bigButton[COLOR=#000000].[/COLOR]titleLabel[COLOR=#000000]?.[/COLOR]font[COLOR=#000000] = [/COLOR]UIFont[COLOR=#000000].[/COLOR]boldSystemFontOfSize[COLOR=#000000](260)[/COLOR][/FONT][/COLOR]
[FONT=Menlo]    [COLOR=#0433ff]let[/COLOR] coinFlip = [COLOR=#3495af]arc4random_uniform[/COLOR](2)[/FONT]
[FONT=Menlo]    [COLOR=#3495af]print[/COLOR]([COLOR=#b4261a]"coinFlip: [/COLOR]\[COLOR=#b4261a]([/COLOR]coinFlip[COLOR=#b4261a])"[/COLOR])[/FONT]
[FONT=Menlo]    [COLOR=#0433ff]if[/COLOR] coinFlip == 0 {[/FONT]
[FONT=Menlo]        [COLOR=#3495af]bigButton[/COLOR].[COLOR=#3495af]setTitle[/COLOR]([COLOR=#b4261a]"←"[/COLOR], forState: [COLOR=#3495af]UIControlState[/COLOR].Normal)
[/FONT][FONT=Menlo]        [COLOR=#3495af]lefts[/COLOR] += 1[/FONT]
[FONT=Menlo]    } [COLOR=#0433ff]else[/COLOR] {[/FONT]
[FONT=Menlo]        [COLOR=#3495af]bigButton[/COLOR].[COLOR=#3495af]setTitle[/COLOR]([COLOR=#b4261a]"→"[/COLOR], forState: [COLOR=#3495af]UIControlState[/COLOR].Normal)[/FONT]
[FONT=Menlo]        [COLOR=#3495af]rights[/COLOR] += 1[/FONT]
[FONT=Menlo]}[/FONT]


The idea is, that the above should (and what little i've tested does) give you about a 1 in 10 chance of getting a snarky remark. If you don't get one then you will either be sent right or left, at random. Something seems amiss about this to me. I keep thinking, something more like a plinko board (Price is Right), where a coin bounces left to right to end up in 1 of 10 or so buckets seems more fair, but I'm not sure why I think that, or if it's true. I've yet to think of a way to implement it either.
 








 
Back
Top