Monday, April 30, 2018

young adult - How explicit can violence and sex be in a YA novel?


Many of the most popular YA novels are pretty brutal, rape and murder are a common ingredient. Many show teenagers having sex. But how far can you go, before you cross the line into adult fiction, simply by being too detailed or too extreme?


I'm writing a novel about a young woman who gets drawn into a terrorist network and commits some atrocious acts before she turns from this path. I attempted to describe what she does in a way that makes the reader experience some of the distress the protagonists feels witnessing her own deeds. I feel this is integral to the development of the character and the direction of the plot. It may not be, but this question does not aim at what is necessary, but what is allowable. Do I leave YA fiction with this?




characters - Can dream reveals make good climaxes for a POV’s internal struggle?


Dream twists just spoil our senses of disbelief. I can see how that can be excetuted carelessly, but if done for the need of showing what the main character wants or fears most then maybe it would be the better way of involving the trope.


My story is about the issues between good-lawyer Adrian and his brother Isaac. Coming to the climax, there is a brief but painful sequence where Adrian finds Isaac has shot himself together with Adrian’s wife Noelle;


The deal with the brother characters are several issues such as Isaac’s own wife cheating and his paranoid suggestions about her ‘sneaking around at night’, whereas the tension building up with Noelle who is going through clinical depression is a subplot.


The importance is that when the dream is revealed and that it never happened, it is very well shown to the reader that from the real events of the story, Adrian is genuinely so afraid that the two people he loves very much will come together and ‘free’ themselves from their misery if he doesn’t negotiate with them first.


Should this be a good strategy?



Answer




The trope you're referring to is called All Just a Dream (tv tropes warning). While some authors can pull it off, it is usually considered a bad trope to use. The reason for this is that the "it's all just a dream" reveal is anticlimactic: there's something very dramatic happening, but then it has no consequences; the character instead gets a reset button to prevent the dramatic thing from happening in the first place. If you introduce a plot element, as a reader I would like to see that element followed through to the end, with its consequences and implications, not reset and prevented.


Another problem with this trope is that it strains the reader's willing suspension of disbelief. Real dreams are weird: things happen in random order, reality shifts, and to add to the confusion - your brain flushes most of it upon awakening, so you only remember bits and pieces. Think of your own dreams: how often do they make much sense?


password - Are there numbers and letters to avoid for activation codes via SMS?


We are at a fairly early stage in our application development and have run into a usability issue related to typing an activation code sent via SMS into a browser URL.


Here's the basic scenario:



  1. You can sign up with email or phone


    • if you sign up with email, you get an email with a link to activate;

    • if you sign up with phone, you get an SMS with a link to activate.



  2. You click the link to activate, then set a password.


We had someone attempt this with a "dumb phone" (standard clamshell with no web browsing ability). This person did not have an email she felt comfortable sharing or using for our service. She proceeded to type the activation url into a browser on a desktop computer.


However, it turned out the activation code had enough confusing numbers and letters in it to require multiple attempts before getting it right (e.g., ones and zeros were hard to distinguish, "l" or "1" or "O" or "0").


Sample activation code: AX6elp90grPo



Initial Fix


We plan to address the immediate issue by "guessing" which letters and numbers seem easy to confuse with each other and eliminating them, or always using one (e.g., anything that looks like a "1" is always a "1").


Question:


I was wondering if there is already a standard recommendation or practice for situations like this (specifically, which letters or numbers should be eliminated)?


I'm also open to any other relevant suggestion, including how better to handle activation information over SMS.




mobile - Is there a "best place" to put ads in an app to avoid user irritation or will users look over them anyway?


I'm embarking on a new project and one of the stipulations from the client is that the Android app I am designing MUST have banner ads in it but they are also to be put where they will "cause the least amount of irritation". The revenue made from these ads is based on impression rather than clicks so it makes sense to put them where they are least likely to get in the way This made me wonder, is there somewhere to place ads that will annoy users less than if they are placed elsewhere or do users just ignore ads anyway?


I know that this shares some points with web based advert placement but as with all things mobile it has it's own unique problems.



Most apps seem to put their ads at the bottom of the screen, however a fair few put them at the top now too. I know from personal experience that I tend to look over ads and don't really notice them so if I place the ads in these usual places will it cause less irritation to the user? Have users seen so many ads that their eyes automatically skip over them in a sort of mental ad block?



Answer



Android developer docs has a section titled Advertising Without Compromising User Experience


Unfortunately, it only highlights the don't do's rather than the do's:



When deciding where to place ads within your application, you should carefully consider user-experience. For example, you don’t want to fill the screen with multiple ads that will quite likely annoy your users. In fact, this practice is banned by some ad networks. Also, avoid placing ads too closely to UI controls to avoid inadvertent clicks.



enter image description here


Not the most helpful, but I think it's because you're already going down a limited path when you start implementing ads. That said, I would stick to common patterns. Deciding between top and bottom placement should depend on your layout (i.e. away from controls).


In response to some of the other discussion about ads in general, a user experience will be diminished by ads, but less so by targeted ads as a result of a value-for-value tradeoff (i.e. free product that has ads).



I'm taking a bit from another thread, but if the rest of you are more interested in this, check it out.


Appending to my prior answer.


I found this use of banner ads to be a good example for a couple reasons:



  • Not blatantly staring at the user the whole time

  • Doesn't force the user to close it

  • If accidentally tapped, it doesn't launch the browser (only expands and requires one more tap to launch browser).

  • Despite being loud, it's not cleverly hidden/disguised to attract unwanted taps.


Sportscenter app ads .gif



information design - How to visualise two-dimensional scientific data-points in a chart... in grayscale?


I am not sure whether this is the correct site for this question. The model comes from Physics, the data comes from computational physics, the plot is made with LaTeX but my question is about the presentation and layout of it all.


You can click on all images to get a vector PDF.




I have data points that depend on two parameters, so I have made a 3D plot with them:



http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/mesh.png


I think that this gives a good impression that the data falls off for small “a” and that there is a bump for moderate size “sigma”. However, you cannot really read any numbers off this. I need that, though.


So I put all the data into a two dimensional plot, encoding the “sigma” with a color. Since the data points overlap, I find it helpful to connect them with lines like so:


http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/a-E0-solid-dotted.pdf.png


To me, the above version is the most readable version of them all. The connecting lines between the points are not really justifiable from a scientific perspective, since I cannot assume that they describe the Physics there well. The only things that can have some meanings are the interpolated lines that I have dotted in the above version.


It would be more scientific to have it like this, without connecting line segments:


http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/a-E0-none-solid.pdf.png


Even with the color, it is harder to follow the points of each color. The first version shows me right away that the points drop down for small “a”. With the second one, it can be seen, but only if you look at it closely.


Maybe I can use dotted line to help the eye of the reader, but not implying anything, like so:


http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/a-E0-dotted-solid.png



Also, I would like to avoid using color. This will be printed a couple of times and color pages are tenfold in price compared to grayscale pages. I have tried to split up the data in the middle, such that they do not intersect any more. This is the second half of the data, the small “sigma” ones. I added the unscientific line segments and have the legend ordered from top to bottom:


http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/Abbildung-minus1-fein.pdf.png


I think this is readable, except for the connecting line segments. Splitting up the data in multiple plots makes each plot easier to read, but it is harder to compare the data.


Without the line segments, I need different markers for each data set to keep them apart. This yields cluttered plots right away, so I made the less important data sets a little lighter.


http://chaos.stw-bonn.de/users/mu/uploads/2014-06-25/Abbildung-minus1-grob.pdf.png


This has no line segments and does not use color, but I do not think that it is easy to see what is going on.


What could I do to get the data shown in a readable way?




adobe photoshop - how would you recreate the distorted/noise effect that google uses in their new material design illustrations?


Illustration from google inbox app


I've been trying with brushes but it just doesn't get close to this. Has anybody been able to accomplish this effect? how did you do it?


I'm using photoshop cs6



Answer




Follow this! https://medium.com/google-design/salt-pepper-the-art-of-illustrating-texture-c962dc67cc35#.aa24epyn7. Finally a good method, and that by a googler!


Sunday, April 29, 2018

forms - Slider control when there is no maximum value


I'm trying to design a control where the user can enter a figure that has no maximum value. For example, how many miles that person wants to travel that year.


There's a text field there for direct entry, but I want to make this tweakable. The control updates another field in real-time, so as they make changes to this 'miles' field it updates a map elsewhere showing how many times around the world that works out as, or how far towards certain countries it would take you. That sort of thing.


Text fields aren't very 'tweakable'. But because the total in the box could be anything (it could be 10, it could be `10,000) going with standard +/- options would be pretty painful. so I added in a slider to adjust the value that way.


mockup


download bmml source – Wireframes created with Balsamiq Mockups



However, the drawback with a slider is that by the very nature of the control there is a maximum value. So I tried to come up with an alternative.


My idea was to mimic a horizontal 'thumbwheel' - the sort of scrollable cog you get on volume controls (or the mouse scrollwheel too) but one with no end - it just keeps rotating as you scroll:


mockup


download bmml source


I designed it so that when the user gets to the end the thumb drops back to the middle, or when they let go of it the thumb returns to the middle again, so that they could then scroll to the end again, then repeat ad infinitum.


Unfortunately, this is suffering from the same issues as the slider. Usability testing finds that people still treat this control like a slider - pulling it to one end of the bar and not letting go, or not understanding that it can be used in the manner I had hoped.


I think my metaphor of a thumbwheel may not have been ideal here. Unfortunately I only have horizontal space to work with. So what am I doing wrong? Is there a better control I could go with to allow the user to adjust the text figure up/down?


Because the total in the box could be anything (it could be 10, it could be `10,000) going with standard +/- options would be pretty painful.



Answer



I've always been enamored at the way the iOS quicktime application works when viewing MP3s in Safari, and I think this method can be adapted for your use. We can stay with a normal slider bar - perhaps the handle could be changed from the normal circle to show a difference. We can add tick marks to the bar and numbers that change on either end. Then, instead of having the user drag a moving marker along the fixed slider bar, we can flip the equation - fix the marker and illustrate a movement on the slider bar by animating the ticks. We allow the user to slider their finger / mouse off of the marker and use the y axis of this input to adjust the scrubbing speed - the further offset the mouse / finger is from the marker, the higher the scrubbing speed in the given direction (we can use the x axis to determine forward / backward). We can even offset the marker visually a bit to illustrate the current direction of movement. The ticks animate, and the numbers on either side change to illustrate the current range.



Reasons I feel like this might work:



  • The variable range you mentioned is present

  • It allows for fine tuning - simply move your finger closer to the bar when you want the multiplier to be lower


Reasons why it might be confusing:



  • It might not be immediately apparent that you can move your finger from the slider bar to adjust values, and there may be a confusion because the user is used to dealing with slider bars and this one behaves differently.

  • It may be a more difficult analogy with a mouse pointer instead of a finger



I don't have an iOS device, so I've included a small sketch as well to (hopefully) better illustrate this. Sketch of a slider bar!


illustrator pathfinder minus front not working?



enter image description here


How come pathfinder - minus front is not working? I want a stylized N where that white part is taken out


enter image description here





finance mathematics - Mark Joshi, Quant Interview Question problem 2.34; replicating a digital option on a 4-step symmetric binomial tree


Question:




Team $A$ and team $B$, in a series of $7$ games, whoever wins $4$ games first wins. You want to bet $100$ that your team wins the series, in which case you receive $200$, or $0$ if they lose. However the broker only allows bets on individual games. You can bet $X$ on any individual game that day before it occurs to receive $2X$ if it wins and $0$ if it loses. How do you achieve the desired pay-out? In particular, what do you bet on the first match?



Thoughts:


My initial thought was breaking this problem up in terms of combinatorics and probability by asking questions like: how many possible combinations are there for one of the two particular teams to win? What is the probability that $A$ wins?, what is the probability $A$ wins given $B$ wins the first game?, etc...


I was a bit stumped by this question so turning to the solution the author suggests that well this is just replicating a $4$-step symmetric binomial tree. Continuing on I could not really follow his solution, I was wondering if there were other ways of answering this problem. Any suggestions or guidance are greatly appreciated.



Answer



The answer above is only confusing because it is missing the the bet amounts.


You have a series of events, you are only allowed to bet on single events.


You want to construct something such that the payoff is dependent on the various outcomes:


enter image description here



Now we need to fill in the blanks - the current winnings, and the bet at each point. for each node $n_{ij}$, the current winnings must be the value at the previous nodes $\pm$ the bet (depending on if it were a win or loss).


The first layers are pretty trivial:


if i have X, and betting Y leaves me with 0 if i lose, then X must equal Y. and if winning leaves me with 2Y, then X = half the winnings. So the final node has me with a balance of 100, and betting 100. I do the same for all the nodes where i can infer the same thing:


enter image description here


Note that you can only fill in nodes where you know both possible outcomes. Fortunately these always exist. Now you fill in the middle node where the score would be 2-2, and then all of those diagonals:


enter image description here


And you then arrive at the same answer as above.


I'll have a think about it tomorrow on how to do it with just 4 nodes though.


Book on market microstructure


Can I get some recommendations for a book on market microstructure? I'm not looking for some author's questionable methods for trading, I'm just looking for a book that provides me with facts about how order books, closing auctions, order execution, etc. really works.



I'm also NOT looking for the type of depth that a HFT would be interested in. I know that whole books can be written about the various plumbing of a particular exchange. I'm simply looking for a general overview of how exchanges work.



Answer



I've not yet read it, but Lehalle's recent book is bound to be a goldmine of good micro-structure bits and pieces. Market Microstructure in Practice


EDIT: I'm reading the book now, so far it's quite good.


portfolio - Is a graphical/original resume a good idea for a designer?


This is more a question about graphic design as a field than about methods.


I am applying for web designer jobs out there, and have been wondering more and more about my resume. I have a quite correct but very classical resume: photo, text, and voilà.


I am hesitating more and more on create a more graphical resume (more original arrangement, maybe even an infographics). I am not worried by my ability to do it, but more by its reception.



No matter how "cool" the company is, I still imagine the recruiting person as a stern "suit guy", who might not appreciate this kind of initiative. And I can't really send the basic resume and the original one, and a note "Here is my fun resume, but if you are a boring person, my boring resume is attached."


So, if possible based on personal experience, is a graphical/original resume a good idea for a designer kind of job?


What is the average ratio of companies where it would help? (if 1 company out of 100 would like it, but the others like it, well, that might be problematic.)


Is there a "too much" line not to cross?



Answer



As someone who looked over résumés, I would be more impressed by a résumé which was elegant and a little different but readable than something with enormous graphics, fancy fonts, or blinking text. Or glitter.


Remember that the readers are going over dozens of résumés in every batch. They need to look for keywords, for skills, and for experience. A nicely-designed résumé will be more memorable, but if it's too fancy, I won't be able to find quickly where you've spent 10 years working in magazine layout.


My personal rule of thumb would be "no fancier than a formal wedding invitation," if that makes sense.


Import vector data into illustrator


I have a program that generates thousands of vector points (just coordinates), the format is not fixed, but it could be something like this:


(2.4785|77.01)
(78.8|9.88)
(45.33|0.2)


I am able to format/convert this coordinates any way necessary.


My question is: How can I import these coordinate data into Illustrator as vector points, so I can work with them properly (give them a stroke, scale them etc.).


The result could be something like this, but this is pixel data. I want something similar to that, only as a vector.



Edit: Each coordinate should result in one dot/circle being rendered in Illustrator, so maybe each coordinate should be made into a line with identical beginning and end in illustrator?


It is a little hard to see in the screenshot, but the lines actually consist of many individual dots which are not always touching.


I generated the dot coordinates with a little java code, if anyone is interested in it, just PM me.


Solution: Jackson Hyde suggested SVG as a possible format in his answer, which turns out to work perfectly. I just generate this SVG file and then import it into Illustrator. There I can select all points and add a stroke and do some other fancy stuff.






xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
version="1.1" baseProfile="full"
width="20px" height="20px">



[...]




Answer



As a alternate to SVG you could generate a EPS file instead, its less verbose than SVG and has less caveats. Here's a quick intro:


http://paulbourke.net/dataformats/postscript/



EPS is a framed form of postscript meant to be included in other postscript jobs/desktop publishing applications. To handle this it needs a header to define the bounding box etc. The header would look as follows:


%!PS-Adobe-3.0 EPSF-3.0 
%%BoundingBox: 0 0 100 100
%%Title: Demo for GD.SE

%%Creator: Janne Ojala
%%CreationDate: 2014-06-23
%%EndComments

This info is strictly not necessary for illustrator, as illustrator is a postscript engine. Nevertheless, you may want to include it so the file can be used as is without illustrator. Using a header also makes it easier to use in illustrator. The Bounding box defines the size of your artwork, coordinates lower left, upper right.


Next you need to handle your data for ease you may want to add a simple routine for drawing a single point:


/P {newpath 1 0 360 arc fill} def %draw circle with radius of 1

Now all you need is to define each point as follows:


15.23 2.25 P

8.1234 7.85 P
...

Finally your eps needs a end marker like this


%%EOF

Done. In general EPS is one of the easiest formats to generate, you could actually omit all the P calls by iterating over an array, file or binary data but ill leave this as it is for time being.


Workflow


Here is a trick that you can use for visualizing the data while your developing the EPS file. After all something can go wrong and its useful to have some feedback:




  • Place the EPS file in Illustrator


Now each time you edit the EPS file and jump back to illustrator it will ask you you want to update. If you click yes, you get instant feedback, and if you have an error you get a blank image. You can expand it when your ready.


Other resources



  1. Online postscript 2 reference

  2. Ghostscript a software postscript engine, for debugging, conversion to PDF etc.


Alternate functions in EPS


The function could be replaced by:



1 setlinecap
/P {newpath moveto 0 0 rlineto stroke} def

for the same kind of 0 size line approach. you can add a:


1 -1 scale 

and use negative bounding box for top left measurement directions.





In addition to EPS and SVG another easy transfer format is DXF. The DXF spec can be found here:




PDF is also relatively easy to generate in this specific case. Tough the easiest way would be to distill the EPS with acrobat or ghost script. Generating the data tables and check-sums is a bit of extra work but other than that its almost as straightforward as generating a EPS file. PDF Spec can be found here:



A manually crafted pdf sample, this uses the same idea as described in the the EPS and SVG answers containing the 2 demo points. Search for % graphics here for the relevant section (if you paste this in a text file that has PDF set as extension it should just work).


The problem with PDF is is generating the lengths of the sections for the XREF table which is a bit painful to do by hand. This is why I avoid PDF in quick cases like this. Granted, adobe will ignore the tags if the PDF is just one page. So ignoring those you may generate a technically incorrect PDF file that still just works. Fun example exploiting this phenomena can be found here.


fiction - What does Show don't Tell actually mean



I am asking this question because I think we need a precise definition of what Show Don't Tell means if we are to decide if it is good advice or bad, or if it is a valid suggestion for certain passages but not a general rule for a whole book.


Orson Scott Card was a particular critic of Show Don't Tell



OSC Replies: You said: "I made it a point throughout the novel to not tell motivations, but try to show them."


And you did this because ... of those morons who told you "show don't tell"?


Because motivation is unshowable. It must be told. (In fact, most things must be told.) The advice "show don't tell" is applicable in only a few situations -- most times, most things, you tell-don't-show. I get so impatient with this idiotic advice that has been plaguing writers for generations.



But in this discussion it is suggested that reporting of motivations is allowed in Show Don't Tell, which provokes the question: what is in and what is out in Show Don't Tell. Because if it is good advice or bad, we can't expect people to follow it if it is not well defined.




adobe photoshop - How to create animated GIFs of prototype mockups, like the ones on Dribbble?


I'm sure you've seen Dribbblers upload animated mockups of their designs.


Here's an example:




I can create mockups on Photoshop and even apply simple Tween Animations to them but I can never get my GIFs to look like the example here.


What are Dribbblers using to create these animations?


Notice that the animations also include touch points and perfect motion. I would like to convert my Photoshop mockups to do the same.


How can I create an animated example of my mockups, similar to the ones created by Dribbblers?



Answer



Things you need to know to create something like this in After Effects:


enter image description here






How to make a Project and Compositions



When you start AE, you can press Cmd+N to create a new Project with one Composition inside it.


If you already have a Project open, pressing Cmd+N only creates a new Composition.


In this project, I used 2 compositions. GUI comp to hold the GUI and its animations. iphone comp to hold both, the background and GUI comp.


The second composition with GUI animations should be the same size as the screen, or at least have the same aspect ratio. Later, when you are going to place it on the screen, it might stretch to look odd if the aspect ratio is off.






Importing images to AE


After Effects has a pretty good system for importing .psd files, but I don't like to use it because if you misplace, move or rename the .psd file, after effects can't find it and you have to replace footage for every layer separately.


If you import a folder of images into the projects and you, for example. rename the image folder, you only have to replace one image footage and all the missing images are restored ( As long as all the missing images exist in the same folder ). Also this way there's less clutter.


How to import images to a project



Right-click inside the Project panel on the left choose: Import > Multiple files


...or you can just drag files into that panel


I used slicy to export my images out of photoshop.






What objects should you save as separate image files


Essentially you'll want to save all moving objects separately. You may also need to save a few static objects separately.


In this project I could've potentially saved the header and footer as one, but the header had a shadow that goes over the first button, so I had to save them separately.


Here's a breakdown of how I saved my image files in photoshop before importing them to AE.


enter image description here







Animating 101


Position animation:



  1. Position animation:

    • Select your object in the list on the left side of timeline.

    • Press P

    • Click the stopwatch icon that is now below your selected layer. This automatically adds the first keyframe, where ever your time indicator is ( it's red line in the timeline ).


    • enter image description here

    • move the Time indicator forward in the timeline. Drag it or Cmd+{Arrow left or right} or Cmd+Shift+{Arrow left or right}

    • in the composition viewer, drag your object to the position where you want it to move ( You can also use Shift+arrow keys, just like in photoshop Or by dragging the number values. ).

    • Another keyframe appears in the timeline and now you have an animation.

    • enter image description here

    • You can play the animation by pressing space




Move the keyframes closer to eachother to speedup the animation or further away from each other to slow it down.



Continuing animations after a pause.


a scenario: You've animated something from A to B and you want to pause for X amount of milliseconds and then move from B to C.


When you've animated B, go forward in the timeline and click the keyframe icon on the left side, here: enter image description here


It should look greyed out, so don't worry. That just means there is no keyframe in that position


Since keyframe #2 and the newly created keyframe #3 transform have the same values, there is now a pause between those two keyframes. Then you can continue animating normally, by moving forward in the timeline, and changing the values again.


Animating other things, like Rotation or Opacity


I just wanted to take this time to tell you that all of them work just like position animations ( ...minus the dragging ).


Just use the number sliders that show up when you press the hotkeys below.


Hotkeys for different transform methods:




  • P - Position

  • T - Opacity

  • R - Rotation

  • S - Scale

  • A - Anchor point


Just select object(s) and press one of these hotkeys and start animating. If you don't select anything, it reveals transform methods for each object in the comp.






How to slave objects to other objects



In the Comp panel you'll notice a Parent dropdown list on every object.


You can use it to define a parent for an object.


enter image description here


If you then move the Parent, you'll notice that the Child element now moves with it. Same goes for animations that you attach to the Parent element.


If you animate Parent object to rotate, the Child will follow...






Adding elasticity to your animation


So maybe you noticed that the button animation doesn't stop to a wall, instead it stops in a very elastic way.


After Effect Expressions can be used to achieve this ( It can do a lot more as well ).



To apply Expression script to an animation, Alt+{mouse click} the stopwatch and paste in the script.


enter image description here


The Expression I used in my button animation


The first 3 variables amp, freq, decay can be edited to get different results out of it.


You can apply this same script to movement based animations. For example, opacity animation is not affected.


Can also be found in here.


amp = .1;
freq = 1.0;
decay = 9.0;
n = 0;

if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}





Easing....


So this is another thing that can make the animation seem a lot less linear, just like the Expression script above.


I used Ease Ease in that "touch indicator circle" to make it look at bit more human like movement.


You can select one or multiple keyframes and right-click one of them.



Then from the list: Keyframe assistant > Easy Ease enter image description here


I often use Easy ease, because I'm lazy...


Pics or didn't happen...


Here's a simple position animation demonstrating how easing and this particular expression script can have a huge impact on the animation.


enter image description here






Placing animated comp/footage into a screen


So after the GUI is animated, it's time to place it on the screen of the device.




  1. Place GUI comp inside iPhone comp, just like you place images inside a composition.

  2. Double click iPhone comp in the Project panel

  3. Select GUI comp enter image description here

  4. From the top menu Effects > Distort > Corner pin

  5. Then just drag each corner to match the device screen corners.


enter image description here






Exporting to .gif



AE doesn't have native method for doing this, but do not worry, there are ways.


I prefer to do this:



  1. Click a composition in the Projects panel

  2. Composition > Add to render queue Cmd+Ctrl+M

  3. Then at the bottom where timeline normally sits, you choose what to export and where.

    • I usually export a lossless .mov

    • If you click the "Render settings", you can choose a framerate, otherwise it'll use the Comp framerate




  4. Then just press render on the upper right corner or that panel.

  5. Find the exported file and open it up in photoshop.

  6. Save for web Cmd+Shift+Alt+S

    • Save as .gif




It's honestly not that bad...







Exporting as a video file


So even though the above method shows you how to export a lossless file, it's not the way you should export video files.


You do that like this:



  1. Save your project file.

  2. Click a composition in the Projects panel ( if you have more than one )

  3. Composition > Add to adobe media encoder queue Cmd+Alt+M

  4. Drag a preset from the right column to the left column


  5. Press play.

  6. If you don't choose export folder, by default it goes right next to the project file.






How to replace footage


So AE can't find your files? Do this:



  • Right click one of the missing footage in the Project panel

  • From the list Replace footage > File...


  • Locate your footage and stuff






Other useful hotkeys



  • U - Reveals all used keyframes in the comp (if you have nothing selected). Really useful when you need to move multiple keyframes at once, for example.

  • U (Double tap) - Reveals everything that was changed.

  • E (Double tap) - Reveals all used Expressions.

  • J - Moves to the previous keyframe.


  • K - Moves to the next keyframe.

  • space - Plays comp

  • I or home key - Moves current time indicator to the beginning on the timeline.

  • Cmd+K - Current composition settings.

  • Cmd+I - Import files.

  • Alt+{Arrow keys left and right} - Select keyframe(s) and press the hotkeys to move them around.

  • Alt+Shift+{Arrow keys left and right} - Select keyframe(s) and press the hotkeys to move them around.







The project files can be found here.


Saturday, April 28, 2018

publishing - What are advantages/disadvantages to use a CC-license for your writings?


What are the implications, if I choose a Creative-Commons-license for my work? Cory Doctorow seems fine with this. Is this exceptional?



Answer



For Cory Doctorow it has attracted a great deal of attention to his work that he would likely not have received otherwise. If he has twenty times as many readers, but the proportion who pay for the text they read drops from, say, 70% to 10%, there is still about three times the turnover.


Is it good for you? Some considerations:




  1. If you care about reaching readers, free texts with money put into marketing are hard to beat.

  2. If people are to pay for a book they could have browsed on their machine or printed out themselves for free, the physical product had better be a more rewarding thing to own. There's no way, for instance, I would want to print out a full English dictionary for myself, and I find it hard to work from textbooks from screen. But for a novel that one does not expect to reread, what makes the physical book so great?

  3. Most books attract very few readers, whilst some are written by J.K.Rowling. Free content can help build up momentum for your work, though it is unlikely to make the need to market your work go away, but it will make exploiting the pockets of your readers harder. And how else will the expensive marketing campaign be paid for?

  4. Not many people can be well-known as "the author who releases their books for free", so Cory's marketing bonanza can't be shared by all that many people. If you're looking to make money, you have to think about just how many new readers CC-ing your work will attract. I'm guessing CC-ed content can work very well for reference works, where lots of people will be attracted to your website, and will want to refer to your work many times, but not so well for fiction.


I've wondered about the idea of releasing texts as minimally formatted text files under a CC-AS-IS license, with a beautifully typeset version available as, say, a paid e-Book or printed. This would be trying to exploit point #2.


My work is mostly concerned with scientists who want to reach as many readers as possible. This might seem to make CC publishing ideal, but in fact it is troublesome: to attract readers, they need to publish in prestigious journals, which are not CC and want copyright assignment. So the goal of reaching readers here speaks against the CC route.


pdf - Rotate illustrator canvas and contents?


Is there a way to rotate the canvas in illustrator 90 degrees? It's pdf format. I've tried the Artboard tool (Ctrl/Command + O)


I found an answer regarding this: Illustrator opens PDFs rotated 90 degrees. Why, and how do I deal with it?


Is this still the case? Do i have to use adobe acrobat / reader to rotate it? Is it possible to rotate it in illustrator CS6?




Answer



Press Shift+O. At the top of the screen you can switch from portrait mode or landscape mode. Select your desired position.


rotate canvas


Then press V (Selection Tool) then Ctrl/Command + A (Select All) to select all the objects.


Move your mouse to any corner of the selected box. Your mouse should change to this


rotate cursor


Hold Shift and Click & Drag to rotate the selected object 90 degrees. There are number a ways to rotate objects, you can also right click the selected object > Transform > Rotate then apply what degree you want.


It does not matter if you rotate the canvas first or the objects first. They are independent of each other. To my knowledge there is no "one-click" method to doing both at the same time.


risk - Compute moments of aggregate loss using Monte Carlo


Spin-off from here.


Richard referred to me an article that tells me how to get parameters of a translated gamma distribution to which I should consider fitting simulated aggregated loss values.


The parameters depend on moments of S (or. in Richard's terms, L):


enter image description here



How do I compute the $E(S), E(S^2) and E(S^3)$ given simulations of S?


Do I estimate them with mean(S), mean(S^2) and mean(S^3), or do I use the formulas given in the article?


enter image description here


I wouldn't know how to compute the $E(S^3)$ ...


Cross-posted: https://stats.stackexchange.com/questions/136830/compute-moments-of-aggregate-loss-using-monte-carlo



Answer



as you post 3 questions on this topic and after reading them: this is homerwork/study material- right? So for comparing Fast Fourier, MC and Panjer there are tons of publications out there. For the formulas for the momemts of $S$ look here or google "moments in the collective risk model". You should notice that:



  • If you know the distribution of $N$ and $X$ then you know the moments and using those formulas you can calculate the moments of $S$ without MC. Just plug in.

  • If you do MC then you can work on the sample directly and calculate quantiles (e.g. VaR) or an empirial estimate of expected shortfall. Apply statistics (method of moments) to the sample.


  • If you fit a distribution and you know its density then use maximum-likelihood - it does not need the moments to exist.


Friday, April 27, 2018

What is the correct convexity adjustment for an Interest Rate Swap with unnatural reset lag?


I am looking at the valuation of an Interest Rate Swap (IRS thereafter) which is pretty much vanilla with one small tweak. Floating leg pays 3 months LIBOR in monthly intervals. To be precise: floating leg resets every month, and the 3M LIBOR prevailing at the reset date is paid out at the end of the monthly interval. Payment is of course scaled to 1 month period (multiplied by year fraction equivalent to this monthly period). I feel that I should use convexity adjustment similarly as in the case of the in arrears IRS (but the adjustment will be different this time around). Can anyone guide me to the appropriate convexity adjustment for this case?


Maturity: 5 years. Floating leg: monthly payments based on the 3M LIBOR prevailing on the reset date (reset dates occur monthly 2 business days before the start of each monthly coupon period). Fixed leg: annual fixed payments.


The closest case that I've found was in great Brigo and Mercurio book "Interest Rate Models - Theory and Practice" 13.8.5 page 566 "Forward Rates Resettung Unnaturally and Average-Rate Swap". However Brigo and Mercurio discuss contract that pays after natural payment date (and in my case it is before natural paymen date).




print design - Making a business card. Any advice?


I went around the web, reading articles about business card mistakes, and here is a full list of them:



  1. Don't use cheap materials/techniques or attempt to print your own.

  2. Don't use metal business cards. They won't get through airport security. (Is that true?)

  3. Don't use a big font for the address and contact info.

  4. Don't put a picture of your face on the card.

  5. Don't use pixelated or other substandard images.

  6. Don't flirt with the margins.


  7. Don't overcrowd your card.

  8. Not including information that is attractive to clients, i.e. "5-year warranty," etc.


Obviously name, address, email, phone number, and fax number are necessary, but are there any other do's or don't's?


PS: For a 3.5x2 card, I should use the following settings in Photoshop, correct? 3.75x2.25, 300 DPI.



Answer



If you have a logo and a website, add them also.


I suggest no more than two colors. (edited to clarify: two colors for your text. Your logo's colors are outside this suggestion.)


option strategies - Why/How does a hedged portfolio make profits?


This is probably a very easy question but I am new to the field and couldn't find an answer.


Assuming that I am building a hedged portfolio with a long option and going short delta on the underlying. Then, if I understood correctly tomorrow's value of the portfolio will be the same as today's. (Please correct if this is a wrong understanding.)


My question is: If tomorrow's value is the same as today's (and by extension the day after tomorrow and so on until the option expires) how does this strategy make profits?


Thank you




pseudonym - Using a pen-name: possible legal issues


My question is about publishing under a pen-name. Does it have to be registered as a trademark? If it's not registered as a trademark, can someone sue a writer for using it? Because every name you pick is surely also someone else's name. (Every name I could think of returns thousands of results in Google...) I just basically try to understand how to use a pen name without getting into trouble...Is there maybe a place online where I can get a legal consultation on this topic? Thanks in advance! Jackie




Thursday, April 26, 2018

Is there any other way to measure option pricing model performance than proximity to market prices?


Short version



Why do we take market prices as the prices to be estimated and predicted? The common answer is efficient markets hypothesis as in "Market agents do their best effort given their information set, therefore market prices are optimal." Is there another way?


Edit: I should add that it is the academic way of doing this. If you are to publish a paper you show how well your model represents the market compared to other models. See an example


http://www.researchgate.net/publication/222404856_GARCH_vs._stochastic_volatility_Option_pricing_and_risk_management


Long Version


Suppose I have a nice option pricing model (say Model A) to estimate some option contracts' fair prices. I use this model to estimate some of the contracts existing in the market. Let's denote the set of the price estimates as "Estimate Set A".


And let's say there is another option pricing model (say Model A) doing the same thing and get some estimates as "Estimate Set B".


And then we have the market prices since those are exchange traded options. And let's call them, well, "Market Prices".


I would like to know whether model A or model B is a 'better' option pricing model.


From what I have seen on numerous academic studies, the convention is to use an error function like root mean squared error (RMSE) and sometimes relative pricing error or some other derivation and take the Market Prices set to measure the error from. To illustrate let's say there are 4 contracts Estimate set A consists of (1, 2, 3, 4) and estimate set B consist of (4, 1, 3, 2) and market prices are (2, 3, 2, 3).


RMSE of A:



$$\sqrt{(1-2)^2+(2-3)^2+(3-2)^2+(4-3)^2} = 2$$


RMSE of B:


$$\sqrt{(4-2)^2+(1-3)^2+(3-2)^2+(2-3)^2} = \sqrt{10} \sim 3.16$$


Conclusion: A is better than B (of course it is slightly more complicated)


The only rationale I can find from the literature behind this logic is the assumption that comes from efficient markets hypothesis.



All that is required by the EMH is that investors' reactions be random and follow a normal distribution pattern so that the net effect on market prices cannot be reliably exploited to make an abnormal profit, especially when considering transaction costs (including commissions and spreads). Thus, any one person can be wrong about the market—indeed, everyone can be—but the market as a whole is always right.



Option pricing performance convention is built right atop of this hypothesis. The problem is the implicit assumption of the market price optimality. If the market prices are optimal then there is no way a model can be used as a trading strategy.


Suppose your model estimate the price of the contract as 1.5 (say dollars) and the market price of the contract is 1.2. If you gauged your model with the market prices you should accept you are off 0.3$. So why bother with a model, even more why bother with trading?



Is there any other way?




How to modify an image to make it clear it's an image (and not a clickable button.)


The image has a button in it, as we're referencing another part of the site to show customers what they can expect, and what to look out for site-wide.


What is a good way to modify the image to make it clear it's just an image?


Edit: So we have an image (screenshot) we're displaying on a page of another page on our site. The screenshot has a button on it, and I don't want customers clicking on the image thinking it does something.


enter image description here


I added an image to help clarify. Customers use a tool to help them get some information. We then display info, and a picture showing what to expect on our category pages. As is, looks very much like the green button is clickable. I scaled it down a little, but it still bothers me.




Answer



You can do several things in this case. For example, you could Photoshop the screenshot in a device (a notebook, iPad, whatsoever). People don't expect buttons in a picture of a device. Besides, it gives the screenshots a more realistic feel: the product is out there in the real world. What I would be worried about is the overused practice of using devices for screenshots (especially in design portfolios).


If you don't wan't to use a device, you could try to transform the image a bit. Let the perspective work or maybe even skew the screenshots a bit. This will transform the buttons as well and thus making them part of the image (instead of appearing as a stand alone button).


I would not recommend to change the image on hover for two reasons. One is that touch devices can't easily access this functionality. Two is that a roll overs give the feeling of interaction (which is the opposite of what you want).


What I am wondering however is the following. You are referencing to another part of the site. What is the problem with linking to those parts? Are those parts behind a login? Because if they are not, I would advice you to make the whole image clickable and let it refer to the part of the site the screenshot is showing.


kalman - How to find optimal noise covariance matrices Q & R



I am trying to use the discrete Kalman filter for forecasting and I wonder what is commonly considered as the optimal way of determining the measurement noise covariance constants (Q and R) for a given time series? Do you recommend some approaches based on your research/experience?



Answer



I recently blogged about this very topic.


Essentially, there are 3 ways to estimate Q & R.



  1. approximate

    • calculate variate estimate of error in a controlled environment

    • if z doesn't change, calculate variance estimate of z

    • if z does change, calculate variance of regression estimate of z




  2. guess

    • use some constant multiplied by the identity matrix

    • higher the constant, higher the noise



  3. MLE


    • pykalman's em

    • unfortunately, non-convex problem => local optima




Check out the rest of my post here


Wednesday, April 25, 2018

Photoshop: use the pen tool without anti-aliasing?


I'm building some "8-bit" style sprites in Photoshop, and using the pen tool so that I can scale them for different resolutions.



The problem is that they are coming out anti-aliased, which I don't want. Is there a way to turn off anti-aliasing with the Photoshop pen tool?


Thanks




website design - Tools for *lossy* PNG compression?


I'm trying more and more to get by sans PhotoShop for my personal/freelance work. I do primarily web work these days and don't do enough side gigs to justify keeping up with the Creative Suite beast.


Alas, that does bring to the table some limitations. On OSX I've been enjoying Pixelmator but it has woefully inadequate PNG export support. I can dump it out as a PNG then use one of the many great PNG optimizers like PNGCrusher and can reduce the size fairly well.



Alas, all of the PNG optimizing tools I've found are purely lossless.


Is anyone familiar with a tool (other than PhotoShop) that would offer up some lossy PNG compression options as well like reducing the color pallet, converting 32bit to 24 or 8bit, etc?


Addendum: I'm open to OSX or Windows software. I could even fire up Ubuntu if I had to, I suppose...



Answer



I ended up using ImageOptim:


http://imageoptim.com/


What it is is a wrapper around several different PNG optimization tools. It comes with OptiPNG, PNGCrush, AdvPNG, PNGout and a few other's you can add-on.


The idea is that it picks the best tool for the particular PNG.


It's not perfect in that it's still mostly automatic, so I can't fine tune more lossy options. Alas, Pixelmator is still woefully lacking in PNG export options so, for now, this is what I'll use.


user expectation - Will forcing response time to the average time as a minimum improve UX?


I have a situation where my Ajax call response time could vary from 14ms to 600ms, because of the complexity of a Query they could make.


From my experience Users take for granted those 20-80 ms round trips and expect to have the same speed all the time and everywhere, in reality in my particular project it is impossible.


So I came up with an idea that I could force users always wait for at least some x amount of time before getting results.


Question is: Should I use an average of my own data of response round trip lengths already gathered or should I just use a publicly agreed highest allowed response time to a Users action?



From what I can remember that was somewhere between 100 - 200 ms I can't remember now.



Answer



You should not artificially delay how long a user must wait. Do not punish a rapid response by slowing them down to an "average". Let all queries complete naturally, for longer query times you may want to consider the following...


Jakob Nielson did some research on wait times back in 1993. From "Response Times: The 3 Important Limits" -



(1) 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.


(2) 1.0 second is about the limit for the user’s flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.


(3) 10 seconds is about the limit for keeping the user’s attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done.



These numbers would show that your expected average (100-200ms) wait time would generally not require any additional feedback to the user in order for them to perceive it as "instantaneous". Even with wait times up to 1.0 second no special feedback was normally required, even though the user may "lose some feeling of operating directly on the data."



It is important to note that the study, and the above times, are not associated with interactions on the web! These numbers represent raw wait times for user engagement. Don't fall into the "this data is so old, the web was so young" trap! The above isn't "on the web", it is basic "how long will a user wait until they become disengaged" on a task.


What does that mean? At worst it means take the numbers as they are (web users expect faster and faster response these days). At best it means you have a little extra room because users will give you a little extra wiggle room on the web.


In fact, Nielson kept getting questions about "what about on the web" and updated the answer slightly in 2014:



0.1 second: Limit for users feeling that they are directly manipulating objects in the UI. For example, this is the limit from the time the user selects a column in a table until that column should highlight or otherwise give feedback that it's selected. Ideally, this would also be the response time for sorting the column — if so, users would feel that they are sorting the table. (As opposed to feeling that they are ordering the computer to do the sorting for them.)


1 second: Limit for users feeling that they are freely navigating the command space without having to unduly wait for the computer. A delay of 0.2–1.0 seconds does mean that users notice the delay and thus feel the computer is "working" on the command, as opposed to having the command be a direct effect of the users' actions. Example: If sorting a table according to the selected column can't be done in 0.1 seconds, it certainly has to be done in 1 second, or users will feel that the UI is sluggish and will lose the sense of "flow" in performing their task. For delays of more than 1 second, indicate to the user that the computer is working on the problem, for example by changing the shape of the cursor.


10 seconds: Limit for users keeping their attention on the task. Anything slower than 10 seconds needs a percent-done indicator as well as a clearly signposted way for the user to interrupt the operation. Assume that users will need to reorient themselves when they return to the UI after a delay of more than 10 seconds. Delays of longer than 10 seconds are only acceptable during natural breaks in the user's work, for example when switching tasks.



Still, with your expected averages, a user will feel that they are "directly manipulating" the data or will notice the delay but do not necessarily need to be informed as they "feel the computer is 'working' on the command." Only if your queries are taking over (or regularly close to) 1.0 second would a notification be necessary.


But that might not be the whole story. A NYTimes article, "For Impatient Web Users, an Eye Blink Is Just Too Long to Wait" discussed work being done by Google and Microsoft on how long users are willing to wait for a page when "like services" are available.



From the article:



People will visit a Web site less often if it is slower than a close competitor by more than 250 milliseconds (a millisecond is a thousandth of a second).



enter image description here


This doesn't tell you to include a notification or not, but does point out how important response times are to users! If you artificially inflate wait times you'll potentially be pushing users to a competitor!


input - Windows directory picker: why need an extra button?


The standard directory pickers are as follows. They have a long input box with the current chosen directory, a '...' button next to it that opens a directory picker to chosen a new direcotry.


Why is this '...' button required? Why not simply open the directory picker when the user clicks to input box? Would this be bad UX?



Answer



The input field is really just a place to show the file name/path of the file you chose, it's no longer in fashion to let the user actually type into it it seems. Google Chrome, Mozilla Firefox and Internet Explorer have already taken note of this and implemented alternate solutions.


Firefox is the closest to your recommendation: enter image description here

They maintain the standard text input/button combination, but clicking either will open the "Open" file dialog window from your OS.


Chrome has taken the opposite of your suggestion, and ditched the input field in favor of the button: enter image description here


Internet Explorer 8 (somewhat infuriatingly) gives you what appears to be an input field but you can't actually type into it.


enter image description here


Clicking that input field does nothing, nor does typing, even though the "type" cursor appears. Double clicking the input field brings up the Open File dialog as everyone else does.


It's also important to note that the standard file open dialog window often includes this ability to directly type out the file name, so this functionality is almost always included even if you only use the dialog window.


enter image description here Perhaps more important is to consider exactly how many users are going to be able to and want to type out the exact path to an individual file with no typos or mistakes.


I don't have any figures, but unless you're dealing with mostly Linux users I would severely doubt a plurality of your users are going to use such a method. The File Dialog allows you to view the context of your current window, manually drill down/up through folders, see every individual file in a nice GUI, and it lets you manually type out the file name. How do you plan to compete with that UX?


As the three most popular browsers all completely eschew the idea of using an input field to manually type out the file path and the standard File Open dialog gives you the option to do that same exact thing I think it's becoming quite clearly unnecessary to include both elements, it's likely a holdover of the old web that the input field is there at all.


volatility - Squared and Absolute Returns



I've always wondered why do one use squared or absolute returns to determine if volatility modeling is required for the return series? We understand that there are various tests for its autocorrelation and conditional heteroskedasticity. However, I don't quite grasp the concept behind it. Can anyone kindly explain what's the statistical intuition behind using squared/abs returns to determine if vol representation is needed? Thank you.




Tuesday, April 24, 2018

Divergence issue with my monte carlo pricer...


I am trying to implement a vanilla European option pricer with Monte Carlo and compare its result to the BS analytical formula's result.


I noticed that as I increase (from 1 million to 10 millions) the number of simulations, the MC result starts to diverge.


Note that I deliberately only use only one variance reduction technique: antithetic variables. I was hoping that by merely increasing the number of simulations, I would manage to increase the precision.


Can anyone please give me clues or pointers as to why my result diverges?


Included below is the C# code for the pricer:


using System;

using System.Threading.Tasks;
using MathNet.Numerics.Distributions;
using MathNet.Numerics.Random;

namespace MonteCarlo
{
class VanillaEuropeanCallMonteCarlo
{
static void Main(string[] args)
{

const int NUM_SIMULATIONS = 10000000;
const decimal strike = 50m;
const decimal initialStockPrice = 52m;
const decimal volatility = 0.2m;
const decimal riskFreeRate = 0.05m;
const decimal maturity = 0.5m;
Normal n = new Normal();
n.RandomSource = new MersenneTwister();



VanillaEuropeanCallMonteCarlo vanillaCallMonteCarlo = new VanillaEuropeanCallMonteCarlo();

Task[] simulations = new Task[NUM_SIMULATIONS];

for (int i = 0; i < simulations.Length; i++)
{
simulations[i] = new Task(() => vanillaCallMonteCarlo.RunMonteCarloSimulation(strike, initialStockPrice, volatility, riskFreeRate, maturity, n));
simulations[i].Start();
}


Task.WaitAll(simulations);

decimal total = 0m;

for (int i = 0; i < simulations.Length; i++)
{
total += simulations[i].Result;
}

decimal callPrice = (decimal)(Math.Exp((double)(-riskFreeRate * maturity)) * (double)total / (NUM_SIMULATIONS * 2));


Console.WriteLine("Call Price: " + callPrice);
Console.WriteLine("Difference: " + Math.Abs(callPrice - 4.744741008m));
}


decimal RunMonteCarloSimulation(decimal strike, decimal initialStockPrice, decimal volatility, decimal riskFreeRate, decimal maturity, Normal n)
{
decimal randGaussian = (decimal)n.Sample();
decimal endStockPriceA = initialStockPrice * (decimal)Math.Exp((double)((riskFreeRate - (decimal)(0.5 * Math.Pow((double)volatility, 2))) * maturity + volatility * (decimal)Math.Sqrt((double)maturity) * randGaussian));

decimal endStockPriceB = initialStockPrice * (decimal)Math.Exp((double)((riskFreeRate - (decimal)(0.5 * Math.Pow((double)volatility, 2))) * maturity + volatility * (decimal)Math.Sqrt((double)maturity) * (-randGaussian)));
decimal sumPayoffs = (decimal)(Math.Max(0, endStockPriceA - strike) + Math.Max(0, endStockPriceB - strike));
return sumPayoffs;
}
}
}

Answer



This is essentially the same question as your previous question and the issue is still the same: variability just does not go away just because you use 100 million draws once. Compare the distribution of results of $N$ Monte Carlo simulations at $n_1 = 1,000,000$ with those for $n_2 = 10,000,000$. You will see a reduction but that does not imply that every single run get a tighter answer.


Monday, April 23, 2018

input - Approaches for setting a time period


In a GUI application I have a setting for a time interval. In this case, it's a refresh period, but the same issue comes up when you set how early you want a calendar reminder, how long to snooze an alarm, how long to keep old messages, &c.


There seem to be three accepted patterns for doing this:



  1. A list of preset intervals. There are often technical advantages to doing it this way (you can coalesce different events with the same interval, allowing the processing system to handle several events at once). It's also very simple to understand, but it doesn't allow the user to specify an arbitrary time interval.

  2. Use a text input for entering some numbers, alongside a mechanism for selecting the units, such as in this example from Google Calendar. This allows entering any interval, but it's hard to enter compound intervals (e.g. a month and two days). It's also inconvenient to make changes across unit boundaries, such as changing from 13 days to two weeks.

  3. Use a slider. This is simple to understand: unlike the text-based approaches, it's easy to see the rough magnitude at a glance. It can be very tricky to enter a time precisely, especially through a touch-screen interface. I've only ever seen this used with a linear (as opposed to logarithmic) range, which means it works badly if the input can range from a second to a week.



There are also combinations of the above approaches, such as a slider with an editable text field next to it, or a text field that lets you enter free-form text such as "1 week". Are there any other accepted patterns for setting a time interval graphically? I'm especially looking for something that allows precise data entry over a wide range of input values, and I don't think any of the approaches I've listed are good enough.



Answer



I thought so little of the existing methods that I decided to make a new one for a touchscreen interface, consisting of concentric dials. It's used as a "custom..." item in a list of preset intervals (because there are technical reasons for preferring certain intervals). It looks like this:


Screen shot on Nexus 7 (click through to full-size)


In the resized screen shot it's quite hard to see the unit labels, but they're "days", "hours", "minutes". The user drags any dial to rotate it, and at the end of a drag, the dial smoothly settles at a tick mark. (That is, you can't drag it to be in between two ticks.) Dragging across 0 increments or decrements the next dial smoothly. The user can also double-tap a dial to spin it to that point automatically. Catching the dial (by touching) while it's spinning interrupts the animation and allows a drag.


The innermost dial (for days) has a "cut-out". When numbers go behind the cut-out they're replaced. From the state shown in the screen shot, if you rotate anti-clockwise, 3 comes out from the cut-out; or if you rotate clockwise, 11 comes out from the cut-out. This means that the range of times isn't limited by the numbers on that dial: the maximum value could be arbitrarily high (but is limited to 30 days in my use case).


I was worried that it might be a little too hard to read off the current value, but this is mitigated in use by the enclosing screen (in the background here) displaying the current value in written form (in the user's language). I also made an experiment with having the read-off point for the dial on the right instead of the bottom, so the numbers would read left-to-right, but it looked very unnatural to have the numbers rotated that way. So far, the response from my trial group of users has been encouraging, and I'm waiting to learn how it performs "in the wild".


style - How can I make a non-linear timeline less confusing?


My story is broken into 8 sections. Sections 1 and 2 take place simultaneously, in two different worlds. The other 6 continue in a linear fashion (switching back & forth between the two worlds as needed).


Right now it's not particularly obvious that 1 and 2 are happening at the same time. There's only 1 character who appears in both (he appears towards the end of each section).



What can I do to make this more obvious to the reader?


Some options I've already considered:



  • Give up and merge 1 and 2. I'm really trying to keep 1 and 2 separate - otherwise I'll be introducing about 20 different characters and worldbuilding info for 2 separate worlds all at once.

  • Put dates on each chapter. This feels heavy-handed, and the two worlds aren't supposed to be using the same calendar.

  • Leave it as is. Hopefully, the shared character gives enough information for the reader to figure it out. (The trick here is to make it look less forced.)


Edit: Time flows at the same rate in both worlds. Sections 1 & 2 last for 1 month.


There is one event at the beginning that affects both worlds, but it doesn't look the same in both worlds.



Answer




You have three issues to solve:



  1. There are two different worlds.

  2. The sequential nature of each world's chapters (that there are not gaps where the other world's chapters are).

  3. The two timelines run simultaneously (vs one being a flashback or something).


I would solve 1 and 2 the same way: with a clear calendar system for each world that is different enough to show that they aren't different dates in the same system but totally different calendars.


For example:



  • World 1: July 27, 3009.


  • World 2: The 18th day of the 3rd month in the reign of Kala year 47.


Number 3 is a lot harder and the solution will need to revolve around the shared character. This isn't hard to do...it's hard to do well. Drop hints, show the character's thoughts if narration allows, or he can speak about the transition.


Do this subtly but more than once. It's easy for a reader to miss a single reference, but multiple references will get their attention. If the mission is the same or related, this may be the best way to make things clear.


What character can I use to represent the space bar?



I provide the user with a list of key sequences that lets the user type only with ASCII characters and generate various Unicode characters. This is what they see in the sequence list window:


character list


My problem is that some sequences use Space, and using a space character in the “Sequence” column makes things confusing.


So I tried using {spc} but it’s not very aesthetically pleasing, because it takes too much place. Then I tried (U+2423) but I think it’s too easy to confuse with _ (underscore). In short, none of the following solutions were really satisfying:


 spc ␣


Can someone maybe suggest a single non-ASCII character that I could use, which would make it clear to the user that they are supposed to press Space as part of the sequence, while not taking too much screen space? Due to the limitations of the framework I am using (AutoHotKey) I would strongly prefer not having to rely on rare fonts/symbols or to use colour.



Answer



I had similar task — the dialog that showed specific keyboard shortcuts for map editing software. To solve such a case I've used visual keyboard button representations with labels on it — it took some space (and increased a visual noise a bit), but was ultimately obvious to most users:


Keyboard shortcuts


RC — Create new rectangle with it's centre in mouse position



RTL — Create new rectangle with it's top-left corner in mouse position


RSpace — Display list of possible options for new rectangle


Ctrl — Move to nearest left object


etc.


creative writing - 'The Chosen One' paradox


In many books novels or other forms of fictional writing, the reader is introduced to a so called 'chosen one'. This character or being is of higher power or in general, of different nature than other characters.


To be more precise - my question is about the making or formation of said 'chosen one'.


In my experience, being the 'chosen one' is often related to a certain event in which the 'chosen one' overcame a certain enemy or challenge in which most other characters would have perished/not succeeded.


In this specific event, I see a paradox: Did the character overcome the enemy/succeed in the challenge because he is the chosen one - or did he become the chosen one by overcoming the enemy/succeeding in his task.


How can I approach this paradox in a fictional story that has a 'chosen one' as the main character?



Answer



It's not a paradox - it's a choice



You, as the author and creator of your specific fictional world, have the choice to define which of these statements is true. There is no inherent reason to assume one or the other is true and that the other one is false. In fact, it's often used as an important plot device for the characters themselves to explore whether they are just a pawn doing what some higher power wants from them or they have a "choice" and can influence the world around them.


There is not even a reason to tell your reader what you decided. Simply explore this very paradox in-universe and see what your characters make of it. And if it ever blocks you from writing just choose one and go with it for the moment - if it doesn't feel right later you know that you need to change it and that the other one is the right one for you, your story and your specific world.


futures - How is this probability (45%) of Fed raising rates 3 times in 2017 calculated from Fed Funds market?


The probability of the Fed raising rates 3 times in 2017 is above 45%.


What data and formula is used to calculate this probability?



This Financial Times article is published on 17Dec2016.



She portended that three rate rises were in the pipeline for next year, more than had been expected.


Second, the market actually believed her. The sharp rise in bond yields that has followed, with the US 10-year Treasury now yielding more than 2.6 per cent for the first time in more than two years, shows this.


So does the fed funds futures market, where investors place bets on the future path of rates. On election eve, this market put the chance of three rate rises next year at less than 5 per cent. By Wednesday, before Ms Yellen spoke, this had risen to about 30. Now it stands just above 45 per cent.




Answer



Using the following data from 12/18/16: Jan 2017 Fed funds futures =9936, Jan 2018 Fed Funds futures =9877 implies that 99.36-98.77 = 59bp of hikes are built in for 2017. IF you assume the only two possibilities are 2 hikes or 3 hikes (meaning, 50bp or 75bp of hikes, assuming each hike would be 25bp), then by simple linear interpolation the probability of 3 hikes must be (59-50)/(75-50)= 36%


The above is a commonly used method when there are only two realistic possibilities, so the only data you need is the correct fed funds futures contract. If there are more possibilities, you need to utilize the options market in order to obtain more information. For example, if the Fed hikes 3 times the Fed fund futures will be at about 98.61. We look at the options market:


Jan 2018 98.6875 put option = 0.095, Jan 2018 98.625 put option = 0.0775, Therefore Jan 2018 98.6875-98.625 put spread = 0.0175, but the max payoff of this put spread is 0.0625



so the implied probability of the put spread being in the money (ie futures<98.625) is 175/625 = 28%, a slightly different answer. This is equivalent to the probability of at least 3 hikes.


For some reason I'm not getting 45%, but the market may have moved, or the option prices i am using may be stale. Anyway i hope this illustrates the methods typically used.


forms - Best way to indicate that progress autosaves with local memory?


I'm building an app that allows users to take small self-assessments (more or less a quiz). The app doesn't require login credentials or a signup, as user progress is auto-saved (almost instantaneously) in local storage.


Currently the app will display a live point counter in the upper right that updates whenever a user creates/updates an answer.


Screenshot


During some initial user testing some users were concerned about whether or not the app was saving their work. How do I remedy this?


The site is still very much in beta, but here's a link so you can check it out first hand.


Link


Edit (Jan 20, 17): Implemented a lot of the advice here including adding a saving indicator and changing some of the copy. Thank you all for the guidance


Screenshot


Link




Answer



Auto-save pattern work well when there is a fear of losing a lot of work


Often the issue of not knowing if your changes are saved is linked with the fear of losing you have invested a lot of time in. This aspect is addressed by always giving a confirmation that the work is saved. See Slack and Google docs for a good implementation of this pattern.


Maybe your users are more concerned about how their work is saved


However, the task related to your web page does not seem to involve so much time or efforts. If we assume this to be true, then your users are maybe not concerned about loosing their work, but more about how it is saved by the system. It's another problem and I would recommend testing again with a modified version clearly stating that the save is local. You will then be able to confirm/infirm this assumption.


viewpoint - How can I ensure my POV character's writing isn't too sophisticated?


I am writing a piece which features two POV characters. A conceit of the story is that the POVs are writing their chapters, so each one reflects not just their personality, but how my characters would actually write.


One of my POVs is very sophisticated and cultured, and I have endowed his writing with complex sentences and sesquipedalian words and fancy references.


The other character however, is not a native English speaker (though she is fluent), and an average high school student in terms of writing ability. in addition, I want her writing to have an informal, almost conversational tone. Her chapters have been difficult to write, because I tend towards complex sentences and fancy references. As a preliminary step, I've tried banning semicolons from her writing, but I often find myself re-reading my own work and thinking, "No 18 year old would write this."


How can I ensure this character's writing is age and background appropriate, when my own writing is very different?



Answer



Boy does this sound familiar! I struggled for a year trying to coloquialize my YA characters. Every week, I would bring a new sample to my writing group. It became a standing joke, guess how old my POV characters is! The group's conscensus never got within a decade of my targetted age.


Then I received the suggestion which I will share with you now...


Buy a digital voice recorder.


Write your sophisticated character with a keyboard, carefully refining every sentence, phrase and word. Write your non-native character using only your own spoken words. Talk fast! Don't pause to find the right words. Instead, pour our thoughts out in words as if someone were fighting with you for the microphone.



Later, when you're transcribing the recording into your story, keep your fingers off of the backspace key and try your best to capture your words without adjustment or replacement. Yes, you are allowed to drop the "umm's" and extra "and's", but try to limit any other restructuring to grammar only. Finally, keep all your contractions! Dropping apostrophes, increases the formal correctness of any narrative, so for this charcter's words, don't drop them.


You will not believe how less literate you are when you limit yourself to spoken words.


Sunday, April 22, 2018

design - What reason could Nintendo have had for putting the A and B buttons in a non-alphabetical order?


When Nintendo brought out it's first game system, the NES, it had a controller with four buttons:



  • Select

  • Start

  • A

  • B


However, somewhere, a designer, in their infinite wisdom, decided that the A and B buttons should not be in alphabetical order. So the B button was placed to the left of the A.



The reasons for this have long puzzled me. Surely the layout is counter-intuitive, and has confused many a gamer.


Can anyone suggest the reason for this design?


NES controller



Answer



I'm guessing they viewed the button on the right hand side as the primary action button as it's closer to the users thumb, with the button on the left for secondary/less-used action, as it's slightly further away from the thumb (more of a physical exertion on the user).


They then may have wanted to label them accordingly - so A for primary button, B for secondary. Perhaps they felt it odd to name the primary button B and the secondary button A.


A-primary B-secondary


does appear more memorable. Maybe it does not matter so much for the physical act of playing but for things like explaining the game moves in instructions or for gamers discussing/explaining moves to friends etc. it probably makes it easier to communicate.


Problem: Color change when pasting from Photoshop to Illustrator




I want to copy an image in Illustrator and paste it into Photoshop. The image is just a grey circle with a #d1d1d1 fill and no stroke.



Bottom line, the color of what I'm pasting changes.The pasted image is a different shade of grey: #d5d6d8.



I've checked my color settings in both Photoshop and Illustrator (Edit > Color Settings). The settings are identical.


Any ideas on what's causing the color difference?



Answer



The problem isn't in your color settings, it's in the document color modes and colors. From what you describe, you have your Illustrator document in CMYK and your Photoshop document in RGB or vice versa.


The #d5d6d8 you're seeing is very close to the screen representation of CMYK that I get after I eyedropper a #d1d1d1 RGB object in Photoshop into a CMYK object in Illustrator.



After quite a bit of experimenting, though, I wasn't able to reproduce your exact problem by just pasting into PS from AI, even when I brutalized and mismatched color profiles, turned color management off and on, etc. If your color settings include "Convert to Profile" (see the Color Management Policies in the dialog below), you should have no problem if the color profile and color space being used in each document are the same.


enter image description here


technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...