Tuesday, January 31, 2017

layout - When should a timeline go from top to bottom?


Some timelines are developed from top to bottom, where the oldest element is on top, and the newest is added at the bottom. The examples include forums and message boards, chats, event logs and also Facebook conversations.


Other timelines go the opposite- the newest element is added on top, and as you scroll down you dig deeper in history. This is seen at blogs, e-mail boxes, Facebook timeline and news feed and even in the homepage of Stack Exchange sites.


When should I use the top-to-bottom and when should I use newest-on-top?


I already realize that newest-on-top is very good for situations when you are most interested in the newest items, because current things are more interesting. Despite this tendency, sometimes items are dependent on each-other, and you get a better idea of the whole timeline if you consume it from oldest to newest. Frequently I experience this when I get a new message which is the last of a long thread I wasn't a part of. To understand the thread, I must scroll all the way to the bottom, and start reading from there up.


What should be the leading considerations when deciding the direction of a timeline?



Example: e-mail box with newest message on top enter image description here


Example: Facebook. News feed has newest item on top, while in conversations it developes downwards. enter image description here




calibration - How to get set the theta function in the Hull-White model to replicate the current yield curve


I want to calibrate the HW one factor model to current market data. How do I set the function $\theta(t)$ in


$$ \mathrm{d}r(t) = \kappa(\theta(t)-r(t))\mathrm{d}t+\sigma\mathrm{d}W(t) $$ to replicate the current yield curve, i.e. what data do I look at to calibrate (Libor curves?) and how do I use these data to get $\theta$?



Answer



Concerning your first question, this depends on what curve, currency, etc. you are interested in. The general method for constructing yield curves is called bootstrapping which allows you to derive spot, zero-coupon rates from the known price of coupon-bearing instruments $-$ such as bonds or swaps. In general:



  1. You start picking short-term (typically less than 1 year), zero-coupon instruments, such as Forward Rate Agreements (FRAs), futures, Certificate Deposits (CDs) to start the curve;

  2. Then for longer maturities (typically longer than 1 year) you pick coupon-bearing instruments such as swaps and you iteratively bootstrap zero-coupon rates for those maturities from the prices of these instruments and the previous zero-coupon rates you already have.



For a Euro curve, you might look at rate futures for maturities lower than 1 year and to standard fixed-for-floating swaps for longer maturities to derive a Libor-based yield curve.


As to your second question, we assume you have a bootstrapped yield curve up to a maturity $T_{\max}$. Then you can derive the price of zero-coupon bonds $B(0,T)$ for a continuum of maturities $T \in [0;T_{\max}]$ by interpolation. As these prices are derived from market data, I will write them as $B^M(0,T)$.


Now, note that there exists a relationship between zero-coupon bonds and instantaneous forward rates $f(0,T)$ which is the following:


$$ f(0,T)=-\frac{\partial \ln B}{\partial T}(0,T) $$


Thus you can derive market-implied instantaneous forward rates $f^M(0,T)$ from the current term structure $\left(B^M(0,T):T \in [0;T_{\max]}\right)$ $-$ using numerical differentiation techniques such as finite differences.


Slightly rewriting your SDE:


$$ \mathrm{d}r(t) = (\theta(t)-\kappa r(t))\mathrm{d}t+\sigma\mathrm{d}W(t) $$


In order to match your bootstrapped term structure you need to set theta as follows:


$$ \theta(t) = \frac{\partial f^M}{\partial T}(0,t) + \kappa f^M(0,t) + \frac{\sigma^2}{2\kappa}(1-e^{-2\kappa t})$$


Note that with the calibration procedure described above you will calibrate the model only to the yield curve. If you want to calibrate to more complex products such as options you can turn parameters $\kappa$ and $\sigma$ into time-dependent functions: $\kappa(t)$, $\sigma(t)$.



terminology - Defining "Instantaneous" as part of usability acceptance criteria


The Setup


I have run into this problem time and time again. An interface is performing slow and QA and/or Engineering come back and ask, "can you please define the acceptance criteria for how fast it needs to perform."


Often the answer is (or should be) Instantaneously, however this is often met with, "well we need a number." or similar comment. I agree instantly is up to interpretation, may be unhelpful, etc. However, me picking a number out of thin air like 50 milliseconds or 250 milliseconds is just as unhelpful as QA will have no way to validate this.


It usually comes down to the old adage "I'll know it's right (or wrong) when I see it"


So my question to you is:


The Question


How do you define "instant response" as part of your usability acceptance criteria when speaking about performance. What has worked, and what has not worked. If you did set a exact number, how was it tested or confirmed? What is instant reaction time?



An example situation


You have a grid that is editable and need to define how long it should take when you click to edit (how long till the cell displays as an input) and how long it should take to commit the change when exit the field (how long it takes to turn into or appear as plain text).



Answer



The general rule of thumb for usability is to start off with no feedback, but to then display some busy indicator after 200ms, and if the process normally takes 5 seconds or more to present a larger feedback element (usually with a time elapsed timer, but preferably not with a progress bar unless you're very sure how long it will take). If something is likely to take more than 30-60 seconds to complete then you should consider adapting the architecture to support queuing/background processing so the user isn't forced to watch and wait.


If the feedback is meant to be part of an interactive process, like typing on a keyboard and then seeing the keys appear, then you really should be striving to reduce latency/feedback to under 100ms


There's another marker too - it's been found that users make a sub-conscious evaluation of a product in the first 50ms of what they see.


There's another angle to consider too - some accessibility assistive technologies won't see changes to a page if they occur after a delay .. the way they are built is they capture and cache the contents of the page once it is loaded, and then use that cached copy to present to the user. [Specifically JAWS, I can't find the link right now]


Remove Background in Inkscape



I have two versions of a black and white image and would like to remove the background in both. I used Trace Bitmap in Inkscape with the settings below - the white background was no problem, but in the black image it keeps removing the white part that I want to keep. Any ideas how I can switch this, or another way to remove the black background and keep the white logo? Thanks!


The left ones are the jpegs I have, the traced bitmaps on the right



Answer




  1. Select Invert image in the Trace Bitmap dialogue.

  2. Perform the trace. You will first obtain your logo in black (like in the first case).

  3. Open the Fill and Stroke dialogue (Ctrl+Alt+F) and change colour of the result to white (or whatever you like).


Alternatively:




  1. Trace like you did in the example.

  2. Draw a rectangle around the inverted logo, but inside the traced rectangle.

  3. Move the new rectangle behind the logo (End).

  4. Select both the rectangle and the logo (e.g., using a rectangle selection).

  5. Path → Difference.


technique - Why is there such strong objection to the use of said-bookisms?



I am surprised by the vehemence of many writers' objection to said-bookisms -- the practice of using a verb other than "said" or "asked" in order to convey dialog. Writers are told you can't hiss an entire sentence nor laugh one either.


I feel like this is crippling writers in terms of semantics and inflection. Semantically, 'said' is a verb now primarily used as a placemarker to identify the speaker. Yet it doesn't add any inflection to what is written. We are told to contort our natural dialogue so the reader can understand what is written, in order to work around the need for nonstandard dialogue tags. Alternatively, we are urged to use of a never ending stream of 'said' or 'asked' because they are invisible to the readers.


Other than Groupthink and 'because Stephen King doesn't like them,’ how did bookisms fall so far out of favor in current writing? Why did great writers of the past have no trouble using them, but today they are viewed as a sign of an amateur writer?



Answer



First thing first: Avoiding said-bookisms is a guideline, not a rule.


Writers use said-bookisms all the time, precisely for the reasons you note. They're useful. Sometimes, they're the simplest, clearest way to get something across.


The problem isn't use. It's abuse.


There are multiple issues which are common with said-bookisms:


Using a said-bookism to force a reader into an unlikely, unsupported interpretation.




"I've been going over your tax returns," she purred. "It seems you've been claiming some awfully large deductions. But," she sulked, "I noticed you asked for a filing extension, as well."



This is a classic telling-rather-than-showing. What we're shown is somebody talking about tax returns, but we're told that we're meant to interpret it in a flirty, sexual manner.


Why? What gives us that impression? The author doesn't tell us.


Sometimes, that's absolutely fine. Sometimes, that's all that's needed. Sometimes, that's exactly what the author is aiming for. But (a) the more justification it needs, the less fine this kind of use it; it makes the dialogue tags feel arbitrary. And (b) if an author leans on this tool too heavily, then they wind up never showing anything, just telling us how to interpret everything.


Imagine, not one line of dialogue, but a whole scene of sexy tax returns. Imagine that besides the said-bookisms, there's no other description of flirting, of responses, of reactions -- just two people, going about their day, discussing really boring stuff, but being given lots of sexy dialogue tags.


This may sound ridiculous or extreme to you. But it's a painfully common error. Particularly when writers are establishing character, they can tend to just add descriptive dialogue tags to everything that character says -- in their minds, that character is now "acting" "correctly," because he's saying everything "the right way" -- and never actually demonstrate his character in a way the readers can see for themselves.


Using said-bookisms in a misguided attempt to avoid repeating the word 'said'.



"This is urgently important," she growled at him.



"Is it really?" he whined.


"It absolutely is," she affirmed. "So sit down and shut up," she commanded.



Some writers aren't even close to "I want a word here with just the right inflection and connotation." Some writers are -- or, in previous generations, have been -- more at the stage of "Oh no, I can't write 'Bob said' here, I've written 'said' three times on this page alone!"


Repeating obtrusive words is a problem. Some writers, particularly beginning writers, don't realize that "said" is not an obtrusive word. "Said" can be used over and over, whenever you are trying to express no concept more complicated than "this person said this line."


If writers do not realize this, they can find themselves hunting for words that are less good than "said", that carry connotations they do not want, merely for the purpose of not repeating "said" too often. Instead, the constant need to use unusual words to express the simple "said", becomes extremely obtrusive and annoying.


This is the origin of the term "said bookisms" -- there used to be "said books," full of dialogue tags, "she grumbled," "he sang," "they demanded." As you can imagine, writers who needed a book to hunt for words to express that yet again a line of dialogue has occurred, are probably not producing top-notch fiction.


Using said-bookisms which are jarring to the reader.



"Well, I am rather pleased to announce my betrothal and upcoming nuptials to my dear, darling Felicia," he snapped.



"Oh, I'm just so happy for you," she ejaculated.



Some said-bookisms just aren't expressing what you mean them to. Some readers will be genuinely jarred at a person "smiling" a line of dialogue, or "hissing" a line with no sibilants.


Yes, this is subjective; lots of readers won't mind. Of course, any writer can write some phrasing that grates on some readers anywhere, not only when writing said-bookisms.


But said-bookisms are particularly suspect, because, well, if you're describing somebody saying something, you kind of need a good reason to depart from plain old "said," and you need to do a good job departing from it. Your own connotations and inflections may not be commonly shared, and you run the risk of ruffling at least some portion of your readers if you say "Well OK but I don't mean she literally hissed," or whatnot.


Again -- a writer using said-bookisms out of desperation, is going to stumble on this much more than a writer using a said-bookism because it's the exact phrase that's appropriate here.




So: said-bookisms have many pitfalls, and are often entirely unnecessary and distracting.


None of that is to say you can't use them.


It just means you need to know the pitfalls, and when you do want to use a said-bookisms, make sure none of the pitfalls applies to you.



How to find complementary colors


I often find myself trying to determine which colour is the "complementary" one of (or would nicely fit with) two colours imposed by the client brand. At times, only one colour is imposed, and I want to find two colours that would fit it.


Is there a quick and easy way to figure it out?



Answer



There is a wealth of tools out there. If you use Illustrator, it has a colour guide option (other SW might have similar options):


enter image description here


enter image description here


Of online tools there are loads. Here are but a few:


Adobe Kuler


Color scheme designer



mudcube


Color Hexa


You can also find user-created colour schemes:


Color lovers


typography - How do you present typeface options to your team during a rebranding


The startup web dev shop I work for is maturing and all the design/branding decisions that were thrown together early on are being reconsidered (logo, typeface, colors, ect...) for a big rebranding. One of the things I'm dealing with now is choosing a new typeface. Does anyone have tips on how to present this to the team for meaningful discussion?


In this day and age the options are so endless it is really tough to focus. I understand enough about typography to realize I'm not an expert by any means but in a company full of developers I'm the most experienced designer.


I understand a typeface with many weights is important and choosing the right character for the type of business ect... But even if we decided on a San Serif Humanist typeface the options are so vast. Going the route of popularity is an easy solution (i.e. Open Sans) but how do you present multiple examples to the team and create meaningful feedback and discussion without overwhelming them? Thank you in advance.




Monday, January 30, 2017

creative writing - Help, I cannot decide when to start the story



So, this probably came up already thousands of times, though here I am. So let me explain...


I have a story I want to tell. I am planning for it to become a novel, possibly multiple novels because of its scale. It's quite a long ride, and I have the characters planned out so far, and I know where everything will go to. But now to my problem:


My story takes place in a "crapsack world", and starts with the MC wandering through it in search of something. So far, so cliché. The thing is, as the reader later on will discover, the world was not always that way, but the MC knows how it was before, and even lived in that world, which looked very much like our own. What's more, he witnessed the event where everything went downhill, where he (and everyone else) was betrayed by a person he had called a friend, and so he swore revenge and to try to revert the results of this event. The whole stuff before this turning point could probably fit into its own book. There is a whole world and society to describe, other characters (of which only two or three will even be alive in the main book I am wanting to write), and much character development for the MC. Especially how the event twists him into the Person he will be for the main part of the Story. But...this is not the story I want to tell.


What I fear is, either I start with this backstory, writing a whole book possibly, for everything to turn bad, and the next book starts with a whole other premise, or I start after this time skip, and introduce the backstory through dialogue, or flashbacks of some kind, which just doesn't fit the scope of this disastrous event.


So my question is, basically: If I as a writer have a backstory that is so long it could fill a book on its own, but is not the story I want to tell but merely results in the main story being there to tell, but still is essential because of this fact, how do I go about it?


Thanks in advance for any suggestions!


Edit: Wow, many great answers and suggestions here, and very hard to pick one. Thank you all for your quick support! As Amadeus' answer is very thorough on the general problem of "how to start a story" that also tackles the question regarding a long backstory, I accepted this answer. The other answers are also great, though, and gave very good suggestions and I wish I could have accepted all of them.



Answer



Nearly all stories, including novels and movies and even comic book series, begin with the MC in their "normal world." There is no law demanding that, other than the laws of economics: We want the story to sell!


We authors do this because for centuries, this has proven successful, and stories that try to violate this rule flop. Readers expect the beginning of a story to illustrate how the MC has been living, up until the incident (aka "inciting incident") that disrupts their life and pushes them in a new direction. This introduction to the MC, the setting, and perhaps other characters is the foundation upon which the story is told.



In your case, I believe the "normal world" for this MC is the post-apocalyptic world. True, that was not their normal world ten years ago or whatever, but whatever ended that world is a different story (and probably one that did not have a happy ending).


This post-apocalyptic world is now their normal, and the time that went before is in the past, something to be remembered, longed for, perhaps hated, but that is told through thoughts, dialogue, and perhaps flashback. (I don't personally use flashbacks.)


This introductory phase typically lasts 10% to 15% of the entire story length; it is rather long, and it is ALL before the story-driving inciting incident is outlined or discussed. You say the MC is looking for a McGuffin, typically the need to find this McGuffin would appear around halfway through the first Act, which is 12.5% of the way into the story. In other words, right at the end of the introductory phase.


But we don't want it to be a laundry list of factoids about this unusual world, we want it to be interesting to the reader.


The easy way to do this is to start with a minor daily-living-problem for the MC, not the inciting incident. Just like all of us, daily living can present little problems to be solved, and that can be interesting. The morning alarm fails to go off due to a power failure during the night, and you wake up already late for work. Your phone isn't charged. Your car won't start. The milk for your morning cereal has gone sour. In general, something disrupts the normal routine, but it isn't life-altering, just a problem you can't ignore.


That is what we give our MC. They have some normal routine you need to imagine, and then something goes wrong. That tells us where to start the book: I start with the character's name, doing something in their normal world, and often introduce this "inconsequential problem" in the first paragraph or two. The reader has something interesting to follow, the MC dealing with their problem, and the author uses that to begin the introduction to both the MC and the setting.


Your story starts with an MC already accustomed to navigating their post-apocalypse world. But the MC has memories and understanding of the pre-apocalypse world, that still informs their actions today. Those come into play as needed. But as the author, you can make some of those memories needed by devising the right kind of "inconsequential problem", e.g. maybe the MC is trying to find rechargeable batteries for a device, or looking for something somebody would trade food to get. perhaps he broke his blade, and is looking through rubble for material to make a new one.


The backstory may be interesting, but I'd think of this like a person's childhood: We read an awful lot of stories about adults, that have a backstory we learn almost nothing about. For example, what do we know of Dumbledore's childhood? Or Captain Kirk's? Presumably they were six years old, and went through puberty, and had first romantic kisses and virginal sexual experiences, momentous turning points in their lives. But in literature and movies they come to us fully formed. Just like in real life, we meet new people, already adults, and judge them by their looks, words and actions now, and once in awhile, we learn a few elements of their backstory.


Even in the first Harry Potter, Rowling introduces the magical setting while talking about his parents dying, then skips over ten years of childhood to get to the story.


Your pre-apocalyptic world is metaphorically the "childhood" of your MC; and we meet them in metaphorical "adulthood", the "childhood" incidents that shaped their beliefs, morality, skills, intelligence and knowledge are done deals.



To the extent those earlier times matter to how the MC behaves, tell us about them. Otherwise, like meeting a person in real life, let us judge them in-the-now, as we are wont to do: based on appearances, words and behavior. As readers, we will include in our judgment their thoughts, emotions, and memories.


Sunday, January 29, 2017

How to create a background like Dribbble.com?


I'm curious about the background of http://dribbble.com/ . I've seen something similar on a couple of other sites too.


What's it called?


How can I create something like with a different color?


Thanks for any pointers. I'm a non-designer trying to learn some design.



Answer



enter image description here


Both header and body part having gradient and inner shadow with some amount of noise. Play with sliders and you'll get the same result. I tried a bit just to show you; change values according to your needs...


black scholes - Asian Options-Change of Numeraire


Assume the risk-free bond $B_t$ and the stock $S_t$ follow the dynamics of the Black & Scholes model


without dividends (with interest rate r, stock drift $\mu$ and volatility $\sigma$). Show that $S_{u;T} := \frac{S_{u}}{S_T}$ under the measure $Q^S$ (with the stock as a numeraire) can be written as $exp\{(-r-\frac{\sigma^2}{2})(T-u)+\sigma\hat{W}_{T-u}\}$ where $\hat{W}_t$ for $t\in[0,T]$ has the same law of a Wiener process under the $Q^S$ measure.


I'm stuck on how to solve this question. Would really appreciate the help.



Answer



Let $\mathbb{Q}$ be the risk-neutral probability measure which uses the risk-free bank account $(B_t)$ as numeraire. In general, $\mathrm{d}B_t=r_tB_t\mathrm{d}t$. In the Black-Scholes setting, $r_t\equiv r$, we have $B_t=e^{rt}$.


The stock measure $\mathbb{Q}_S$ uses the compounded stock price $S_te^{qt}$ as numeraire and is defined via the Radon Nikodym derivative \begin{align*} \frac{\mathrm{d} \mathbb{Q}_S}{\mathrm{d}\mathbb{Q}}(t) &= \frac{B_0}{B_t}\frac{S_te^{qt}}{S_0} \\ &= \frac{1}{e^{rt}}\exp\left(\left(r-q-\frac{1}{2}\sigma^2\right)t+\sigma W_t\right)e^{qt} \\ &=\exp\left(-\frac{1}{2}\sigma^2t+\sigma W_t\right) \\ &= \mathcal{E}\left(\sigma W_t\right), \end{align*}



using that $\mathrm{d}S_t=(r-q)S_t\mathrm{d}t+\sigma S_t\mathrm{d}W_t$. Recall that $(W_t)$ is a standard Brownian motion under $\mathbb{Q}$. Using Girsanov's theorem, we know that $\mathbb{Q}_S\sim\mathbb{Q}$ and that the process \begin{align*} \hat{W}_t &=W_t-\sigma t \end{align*} is a standard Brownian motion under $\mathbb{Q}_S$.


So, we conclude with \begin{align*} S_{u,T} &= \frac{S_u}{S_T} \\ &= \exp\left(\left(r-q-\frac{1}{2}\sigma^2\right)u+\sigma W_u -\left(\left(r-q-\frac{1}{2}\sigma^2\right)T+\sigma W_T\right)\right) \\ &= \exp\left(\left(r-q-\frac{1}{2}\sigma^2\right)(u-T)-\sigma (W_T-W_u)\right) \\ &= \exp\left(\left(r-q-\frac{1}{2}\sigma^2\right)(u-T)-\sigma \left(\hat{W}_T +\sigma T -\left(\hat{W}_u+\sigma u\right)\right)\right) \\ &\overset{d}{=} \exp\left(-\left(r-q-\frac{1}{2}\sigma^2\right)(T-u)-\sigma \big(\hat{W}_{T-u}+\sigma(T-u)\big)\right) \\ &= \exp\left(-\left(r-q+\frac{1}{2}\sigma^2\right)(T-u)-\sigma \hat{W}_{T-u}\right) \\ &\overset{d}{=} \exp\left(-\left(r-q+\frac{1}{2}\sigma^2\right)(T-u)+\sigma \hat{W}_{T-u}\right). \end{align*}


probability - Random matrix theory (RMT) in finance


The new kid on the block in finance seems to be random matrix theory. Although RMT as a theory is not so new (about 50 years) and was first used in quantum mechanics it being used in finance is a quite recent phenomenon.


RMT in itself is a fascinating area of study concerning the eigenvalues of random matrices and finding laws that govern their distribution (a little bit like the central limit theorem for random variables). These laws show up in all kinds of areas (even in such arcane places like the spacings of the zeros of the Riemann-Zeta function in number theory) - and nobody really understands why...


For a good first treatment see this non-technical article by Terence Tao.


My question:
Do you know (other) accessible intros to Random Matrix Theory - and its application in finance?



Answer



Check out page 55 in "Quantitative Equity Investing: Techniques and Strategies," Fabozzi et al.



Section is titled "Random Matrix Theory" - very intro. The context pertains to the estimation of a large covariance matrix.


Also, see work at Capital Fund Management, filed under:


Random Matrix and Finance : correlations and portfolio optimisation


Saturday, January 28, 2017

How to create a grain / noise effect in Adobe Illustrator



I want to create a noise effect using Adobe Illustrator.


Inside the hexagonal shape there is some kind of texture effect, I don't know what the name of this effect is:


enter image description here


How can I create such an effect in Adobe Illustrator? or is it created using Photoshop?




fiction - How many times should I use the word "said" in one page?


When writing fiction and dialogue tags, I find myself using the word "said" approximately 1-1.5 times a page (or every 250 words or so), and the word "asked" slightly more.




  • What is (around) the average frequency of the words "said" and "asked" and other common dialogue tags in popular fiction?

  • Is my current rate of said/asked average, below average or above average?

  • Is "said" and "asked" favorable over fancier dialogue tags or should the more elaborate dialogue tags be used more than simple dialogue tags?

  • I realize it all depends on how it's being said and that sometimes elaborate dialogue tags are redundant, but in general what would be recommended?




Distribution of stochastic integral


Suppose that $f(t)$ is a deterministic square integrable function. I want to show $$\int_{0}^{t}f(\tau)dW_{\tau}\sim N(0,\int_{0}^{t}|f(\tau)|^{2}d\tau)$$.


I want to know if the following approach is correct and/or if there's a better approach.


First note that $$\int_{0}^{t}f(\tau)dW_{\tau}=\lim_{n\to\infty}\sum_{[t_{i-1},t_{i}]\in\pi_{n}}f(t_{i-1})(W_{t_{i}}-W_{t_{i-1}})$$ where $\pi_{n}$ is a sequence of partitions of $[0,t]$ with mesh going to zero. Then $\int_{0}^{t}f(\tau)dW_{\tau}$ is a sum of normal random variables and hence is normal. So all we need to do is calculate the mean and variance. Firstly: \begin{eqnarray*} E(\lim_{n\to\infty}\sum_{[t_{i-1},t_{i}]\in\pi_{n}}f(t_{i-1})(W_{t_{i}}-W_{t_{i-1}})) & = & \lim_{n\to\infty}\sum_{[t_{i-1},t_{i}]\in\pi_{n}}f(t_{i-1})E(W_{t_{i}}-W_{t_{i-1}})\\ & = & \lim_{n\to\infty}\sum_{[t_{i-1},t_{i}]\in\pi_{n}}f(t_{i-1})\times0\\ & = & 0 \end{eqnarray*} due to independence of Wiener increments. Secondly: \begin{eqnarray*} var(\int_{0}^{t}f(\tau)dW_{\tau}) & = & E((\int_{0}^{t}f(\tau)dW_{\tau})^{2})\\ & = &E( \int_{0}^{t}f(\tau)^{2}d\tau)=\int_{0}^{t}f(\tau)^{2}d\tau \end{eqnarray*} by Ito isometry.




Answer



Similar question has been discussed previously; see Why does the short rate in the Hull White model follow a normal distribution?.


Basically, the probabilistic limit of normal random variables is still normal. Then, as $$\sum_{[t_{i-1},t_{i}]\in\pi_{n}}f(t_{i-1})(W_{t_{i}}-W_{t_{i-1}})$$ is normal, the limit $$\int_{0}^{t}f(\tau)dW_{\tau},$$ in probability, is also normal, with the mean and variance as you provided.


Friday, January 27, 2017

How can I prevent Gimp from automatically changing colors of a .png?


So I am editing a .png file from a website that I am working on. I downloaded the image (.png) and it has a yellow/green color in one of the objects. This color is important because it matches with the rest of the website's color scheme.


However, when I made my edits and saved as a new file, the green color was noticeably different.


I wondered if it was my fault on accident, so I opened the original file and saved it to a different name without editing or touching any part of the image. Yet still the color was noticeably different again.


    Original Color: rgb(141, 184, 73)
Color After Save: rgb(127, 190, 65)


Is there any way to prevent this from happening in Gimp?



Answer



This has to do with image color profiles - in GIMP, before opening your file for editing, go to edit->preferences, and in the Color Management page, set the File Open Behavior to Ask What To Do - then try different actions - one of which should preserve the numeric color values.


interaction design - Smart phones, touch screens and the "Gorilla arm effect"?


I finally broke down and decided to get a smart phone for myself. While I find it really useful, I can't help wondering if any research has been done on the "gorilla arm effect" of holding a smart phone at a certain angle while trying to read something or going through an app. It won't be too prevalent if the phone screen is small enough that you can hold it with one hand and click with your thumb but having a smartphone with a large screen (4.3 inches), I can't help wonder what would be the impact as screens keep getting bigger (unless you have large hands).



Answer




Here you will find some papers mentioning the "gorilla arm effect". It's a pitty that some of them are not free to download.


Some more articles and references to this syndrome:



The last article defines the Gorilla Arm effect thusly:



“Gorilla arm” was a side-effect that destroyed vertically-oriented touch-screens as a mainstream input technology despite a promising start in the early 1980s.


Designers of touch-menu systems failed to notice that humans aren’t designed to hold their arms in front of their faces making small motions. After more than a very few selections, the arm begins to feel sore, cramped, and oversized—the operator looks like a gorilla while using the touch screen and feels like one afterwards. This is now considered a classic cautionary tale to human-factors designers; “Remember the gorilla arm!” is shorthand for “How is this going to fly in real use?”.



And finally:




Gorilla arm is not a problem for specialist short-term-use uses, since they only involve brief interactions.



So, as long as we keep having "short-term" interactions with our handhelds —or as long as they keep getting lighter—, this will not be a problem. The Gorilla Arm effect though is a nice reminder on how promising interaction patterns can go wrong.


adobe illustrator - How to align all selected points to a grid?


I'm working with Illustrator to make some icons. I use grid with step = 1px and after I scale/rotate shape elements I want them to automatically align to the grid. I know CS4+ has such an option in transform settings, but I have only CS2 at hand and I was hoping that there's some other way of aligning selected points to the grid (hidden option, script?).


At the moment I'm selecting each point and manually move it up-left them down-right so that it snaps to a grid, but that is VERY slow and prone to mistakes.



Is there a way in Adobe Illustrator CS2 to align all selected points to a grid?


UPDATE: Changed the question details: it should read grid instead of pixel grid (otherwise it was misleading).



Answer



Two possible approaches:




Scripting


The John Wundes script Pixel Align should be a good starting point. I don't have CS2 to test with, but I think it should work with CS2 (the notes seem to say that it's tested and works in CS1, so CS2 should be fine).


The approach the script uses is really simple: it loops through all objects and uses math.round() to round their top, left and where appropriate (i.e. lines), their height and width to the nearest whole number.


You'd need to adapt it so that, for paths, it loops through each point instead of each object. Any script that applies to all points could be a starting point (OP suggested Organify from the same source).





Save as SVG feature


This lets you choose how many decimal places the exported SVG uses to describe things like anchor positions (so people can reduce file size if they don't need super accuracy).


Set it to 0 decimal places, and it'll round anchor points to nearest whole number - i.e. nearest pixel.


So, save as SVG with 0 decimal places, reload, and you should see your image effectively snapped to a pixel grid. Then save as whatever format you need.


Be aware that things like curve angles will also be rounded so check it hasn't mucked up any important details.


Also be aware that snapping to a 1px grid might not give the results you intend when using strokes. For example, a line with a 1px stroke snapped to a 1px grid may give you 0.5px above the line and 0.5px below - you might need to set strokes to inside or outside, or move 1px stroked objects up/down/left/right by 0.5px after they are "snapped" to the grid.


Edit: the asker reports that for them, this almost works, but there are very small differences to the exact positions (presumably due Illustrator having somewhat ropey SVG support).


stochastic calculus - Variance of Brownian Motion


Can someone point me into the right direction to calculate this one: $E(B^4_t)=3t^2$


I had tried using the following property with no luck:


$E(B^4_t)=E(B^2_tB^2_t)=E(\int B^2 dt )E(\int B^2 dt )=[E(\int B^2 dt )]^2=[\int E(B^2) dt]^2=[\int t dt]^2$


Any other suggestion will be appreciated. Thanks!



Answer



Apply Itô's Lemma to $W_t^4$: $$ \text{d}(W_t^4)=4W_t^3\text{d}W_t+6W_t^2\text{d}t$$


Integrate: $$ W_t^4=4\int_0^tW_s^3\text{d}W_s+6\int_0^tW_s^2\text{d}s$$


The first term is an Itô integral, which is by construction a martingale, with expectation $0$ hence: $$E[W_t^4]=6\int_0^tE[W_s^2]\text{d}s=6\int_0^ts\text{d}s=3t^2$$


Thursday, January 26, 2017

publishing - Is it better to save each chapter in a separate word document or all in one document?


I'm new here.


In the past, I've written countless articles for newspapers, and I almost never needed to edit more than a page or two. However, I have agreed to edit an entire (existing) novel for its second edition/re-print.


I'm planning to use MS Word for this.


Is it better to re-write/edit each chapter in a separate word document or is it better to save everything to one file?


I plan on editing 1-2 chapters per day, which roughly equals 10-12 pages. There's a total of 502 pages in the book.


Thanks in advance for your help and advice.


PS: The book will be available in both paper and electronic formats.




categorization - Categories or tags based navigation ?


I am not sure if tags based navigation would be easier for users. In our web we categorize software (like download.com) and categories maybe are hard to understand.



Answer



I personally prefer tagging to using categories.


The advantages of categories:



  • clearly defined

  • could be hierarchical

  • static (in most cases)



The advantages of using tags:



  • unstructured

  • could be very easy user-defined


The advantages of using tagging is that the amount of tags something can have is unlimited, and ultimately users can tag items themselves. This is allows for a nice level of user-interaction, and your data will improve by each user adding a tag.


Navigation based on tags is then actually searching on any combination of tags, and will allow to get a very precise wanted collection of results. E.g. very good examples of succesfull tagging are (imo):



  • stackexchange

  • gmail


  • flickr


high frequency - HFT: What is the big differentiator in comparison to other time scales?


High Frequency Trading (HFT) seems to be the big money making mystery machine these days. The purported source of unlimited floods of gelt pouring into the investment shops using it.


For me, HFT is first of all nothing else but trading on a different (i.e. ultra short) time scale. You can make a fast buck, but you can also ruin yourself within seconds. Fast doesn't mean smart, right!


There are not too many players there at the moment so markets are not completely efficient? Fine but the players that are there are the best quants with the finest pieces of technology available on this planet.


My question
What is the biggest differentiator of HFT at the moment (apart form the fact that it is faster)? What can you do here to outperform what you can't do on other time scales? Or is it just like it is with all the other time scales: A few winners and many losers (survivorship bias)? In short: Does quantity turn into quality because it is faster - and if yes, when and why?



Answer





HFT seems to be the big money making mystery machine these days.



That's not correct. By its very nature, HFT can only produce a limited amount of revenue. The big money makers are still the large hedge funds that charge 2-and-20 on their \$10B worth of assets.



There are not too many players there at the moment so markets are not completely efficient?



There are tons of players in this space. Feel free to look at any job board.



What is the biggest differentiator of HFT at the moment?




HFT strategies operate at the tick level, and many shops use the full order book data (TotalView, OpenBook etc). That means they can act as market makers, and therefore provide liquidity to the market. There are many equity shops in the US that live off the exchange rebates; search for exchange fee schedule to see the structure at each venue.


That said, it's not easy money. With gross returns often under 1 bps, it's a really tight model and one mistake can seriously injure the firm. There's also the "arms race" to out-do the competitors in speed, which is really tough by itself.


I think we're in a period of over-expansion at the moment and we should expect to see consolidation (either bankruptcies or mergers) in the coming years, just as with any other "hot" industry.


fixed income - Bond asset class long term assumptions




How are long term capital market expectations set in the industry?


I'm looking to get some pointers about setting long term assumptions for fixed income asset classes like global high yield credit, or government bonds and how we could model or forecast the yield.


We could probably use term premia or add a liquidity premia to the current yield, then the question becomes one of estimating these premia...




urls - Are Domain Hacks usable?


A Domain Hack is when the top level domain (ux.stackexchange.com) and sometimes the subdomain (ux.stackexchange.com) is used to spell out a word instead of being used as a country code (.us, .uk) or organization type indicator (.com, .gov). This results in site names like "del.icio.us".


The resulting names are cute, but are they usable? I can't imagine telling my mother "Okay, just navigate to 'd-e-l-dot-i-c-i-o-dot-us'...". Comunicating such URLs in spoken conversation is awkward at best. If your only interaction with the URL is inside a browser it's largely irrelevant, but still the name might not look like a URL without the familiar .com/etc. top level domain.


Is there data or any good articles covering this issue?




Wednesday, January 25, 2017

Exporting square tiles from a stripe - in Inkscape or Gimp


I am using Inkscape and Gimp to create assets for a word game and am looking for an advice from more experienced users of these great tools.


In Inkscape I have created a stripe with 26 letters and their values:


Inkscape stripe


The stripe is comfortable to edit - I have enabled grid snapping there and also I can always revisit the SVG file and change font sizes or letter values.


Then I have exported the SVG file as a whole page to PNG files in different resolutions:



Inkscape bitmap


Unfortunately, loading a 6240 x 240 pixels PNG file does not work with Android (because of OpenGL width limitation for textures - 2048 pixels on many devices).


So I have to split the SVG file or the resulting PNG files in square images of 240 x 240 pixels for each letter (Android could process them without problems).


My question is if anyone knows a good way to perform such a split in Inkscape (that would be best) or in Gimp?


In Export Bitmap dialog of Inkscape I see a batch-related checkbox... Could it be used for my purposes?



Answer



Yes, you can do it in Gimp, but in my opinion is simpler with ImageMagick (see also here).


You need to put a lot of guidelines where you need to cut:


guidelines


And then simply apply the Guillotine transform:



guillotine


After this, you have the original image split in a lot of imagettes:


a lot of images


And you have to save - pardon, export - each of them with a proper name.


Ok, maybe you can use a script for the guidelines and apply the slice plugin (which saves the pictures in a folder) to make it faster...


In Inkscape you can choose the area to export, and you can simply calculate the proper coordinates and save each image:


save area in Inkscape


See also here for Inkscape.


Trust me, I love Gimp and Inkscape, but a more proper tool for this kind of operation is Imagemagick ;-).


Resizing groups of objects with fixed height of element in Illustrator


I've got a group of objects which shall serve as a template. I need to be able to resize the group but keep some sub-elements fixed to constrain the template.


Lets say I want to resize the object on the image below. The green area and "window title" should never change in size. Resizing should only affect the grey area.


How do I do this in Illustrator?


enter image description here




technique - How do I make a very short story powerful?


I'm currently working on a project where I write events for a story driven video game. The limitation is that I have to get through a discovery, the consequence and the character's response to that in a very short time, otherwise the players may lose interest from having to read too much. Are there any techniques I can employ which will make my writing more gripping, memorable and personal to the players experiencing these events in a way that doesn't feel rushed? These pieces of texts are at most two paragraphs long.


There is no pre-defined back story in these cases, but the characters explore many different locations (deserts, jungles, tundra) and potentially discover new types of flora, fauna, or may encounter hazards or have accidents, taking place in a sci-fi setting.




Answer



Sometimes with writing, what matters is getting the story down. If it is too long, or too slow, it is easier to find ways to cut it back when it already exists. If you worry too much about getting it right on the first try, not only will you fail to do much writing but you will still not have a perfect version of the little writing you did do.


Instead, allow yourself to suck on the first draft. Give yourself permission to write junk. You may be surprised at the quality of what you have written but even if it is embarrassingly poor, you can still edit the suck out of it.


That's what I do with short stories.


Short story techniques


A short story, at least when I write them, follows a simple pattern.



  1. The setup

  2. The attempt

  3. The punchline



This is a microcosm of the three-act structure. Something happens, someone reacts, there is a result. To get there, I work backwards. What is the kicker - aka the punchline - that I will end with. Now, what is the minimum I need to make that a real kick in the shins? Right, okay, now how do I set the stage for a (mostly) innocent character to run slap bang into that?


Everything that does not answer those three questions is cruft and I can (and often, will) cut it out in service of word count or pacing.


Here are some things that help me get word counts down and pacing up


Least words needed


Adverbs, extra description, even some adjectives - they can all be cut. Anything that is not absolutely vital to the effect of the story can go.


Pull in the scope


When I plan a short story, I aim for a single scene or moment that encapsulates the essence of the narrative. Ideally, I try to imply details as I am telling this one scene. That means very selective descriptions of only the most important details.


Having the story happen in a tight time space gives it urgency and keeps people reading. Even if that is for several pages, if the engagement level of the story is demanding enough, people feel compelled to keep reading.


I do not always get it right, which is why I use beta-readers. If they look bored or confused I know I need to make changes.



Cutting excess characters


Many of my shortest stories have exactly two characters. That's just enough for my "victim" to have someone to speak to as well as providing a voice with a different opinion.


Cut all sub-plots


Every short story that I had sub-plots for either needed to be a novella or needed to be cut further.


I like to take the shortest route from setup to payoff.


Show rather than tell


If at all possible, I try to show or imply every detail through what the character does and says. That way, I do not have to stop the action to explain anything and can move the plot forward even as the reader learns stuff about the setting and characters.


I must admit that I do not always do this as well as I would like but when I get it right, I find I have packed a lot of story into very few words.


Edit: For further reading, I highly recommend several answers to this question (including my own).


statistics - Normality assumption in Sharpe ratio


I have read that the Sharpe ratio imposes a normality assumption, but I fail to see how. Standard deviation is statistic for any type of distribution. Anyone have any ideas?




Tuesday, January 24, 2017

usability - Can I reformat personal names obtained from a single form field?


I have been reading this excellent question and its answers, about collecting names from people in forms.


The best answer (the accepted one anyway) seems to be to follow the W3C's advice on personal names, which is to collect the entire full name in a single field, rather than using separate "first name" and "last name" fields.


They also describe an alternate field to ask the user "What should we call you?" - which I think is a good idea and is helpful for sending emails, displaying a welcome message, etc.


What I am struggling with is - now how do I take this information and let someone run a report using a "Last, First" name format? I would like to put a dropdown to select running the report with a default name format or this alternate format, but how do I obtain the alternate format to begin with?



According to the W3C document, I can't make any assumptions about the number of spaces in the full name, or which "name part" is considered the last name, etc. So the only thing I can come up with is to add yet another field to collect this version of the name from the user.


I don't really like that idea though, because it might be difficult to guide them to actually supply it in "Last, First" format. I can see that many users would just type the same thing in to all three fields.


Surely there has to be some interactive way to collect this data that is more reliable? Perhaps just a single "full name" field that when entered uses some javascript to produce values in dropdowns for the other two fields? That way the user could select the form they prefer. But I can't wrap my head around how I could populate those values reliably.


Maybe there is some other intuitive or interactive design that would help?


UPDATE


Ultimately, I built the Name Editor UI as follows:


Name Editor UI


The options in the "Full Name" dropdown are calculated automatically with each keypress in either of the textboxes. I allow spaces in either of the textboxes, so that accounts for users with multiple given or family names.


The only validation I perform is that at least one character is entered in one of the two fields. This means that the combined "full name" will be at least one character long.


I am basically combining the given and family name fields in either order, and with or without a space. Then I reduce that to combinations that are unique (in case they don't have anything in one of the two textboxes, or if their first and last names are the same) and trim any leading or trailing spaces. So they can have 1, 2 or 4 "full names" to pick from.



In most of the application, I use just the "full name" field. But when required for sorting or for special reports, I allow the given and family names to be used separately.


I think that covers all bases? Did I miss anything?



Answer



The recommendation of the W3C article is not to always collect full name via a single field, but to:



ask yourself whether you really need to have separate fields for given name and family name.



This, I think, is the key.


If you are going to need to use only part of a person's name, then collect that part. As the W3C article (and one that I wrote) make clear, names vary too much for anyone but an expert with a lot of time (Graham Rhind perhaps?) to develop an algorithm for parsing them.


Note also that rather than "first" and "last" name, you should use "given" and "family" name (again, as the W3C does). This is because in some cultures, family name comes first whereas in other cultures family name comes last. "Given" and "family" avoid any ambiguity and confusion.



In summary, the following will meet everyone's needs:



  • Given name(s): [_________________________]

  • Family name: [_________________________]


wizard - Material Design Steppers - Lists inside steps


I am a bit struggling regarding a multistep process to create an item where the user has to fill out different data inside a mobile android application.



  1. Basic Data (e.g. a Location, a Date)

  2. Select multiple data from a given list

  3. A picture for the created item



So I looked up the material design approach/specification for steppers (Material Design Steppers).


Regarding the specification I have 2 possibilities that are suitable for mobile use cases as far as I see.




  1. The steppers presented under the Section "Types of Steppers/Mobile Steppers": enter image description here enter image description here




  2. The vertical stepper under the Section "Types of Steppers/Vertical Steppers": enter image description here





So now to the actual problem:
As mentioned above, in step 2 the user has to select multiple items from a list of items that can vary and increase over time and potentially become large up to an undefined size.


From that point of view I think the steppers 1 would be better suited, as the items could be presented in an own screen with possibly additional filtering/sorting possibilities.


From a "Design"-Point of view I think the vertical stepper just looks nicer, but I can not imagine a solution to include such a list inside it (and somehow a list inside has a slight "smell" of not being the accurate method).


What do you think would be better suited from an UX Point of view?


Thank you already!



Answer



Beyond looking nice, there are other reasons why "steppers 2" can be good:




  • Easy to keep track of progress

  • Step titles tell you what information is required

  • Greater sense of progress as you physically move down the form

  • You can access other steps out of sequence (e.g. go from step 3 to step 1 immediately)


However, as you said, step 2 has a list of varying size. The viewable area left after trying to embed the list with the Continue and Cancel buttons will make it more difficult for users so scan the list. And if there are helpful filtering/sorting tools then you're going to have a harder time trying to include them on the screen (or not put them in there at all).


Therefore I would recommend "steppers 1", specifically the design that has "Step X of Y" at the top. If you include the step title (e.g. "Step 1 of 3: Basic data"), this design still benefits from:



  • Easy to keep track of progress

  • Step titles tell you what information is required



I tend to avoid the page dots since a greater number of users should immediately understand "Step X of Y". If you'd rather use the stepper version with page dots you should still title your steps. The Nielsen Norman Group also wrote some things to keep in mind (https://www.nngroup.com/articles/4-ios-rules-break/ (yes, the article is for iOS but same principles should apply for Android)).


genre - What is Literary Fiction?


I keep hearing about literary fiction, and how it is so much better than genre fiction. What exactly is literary fiction?



Answer



There's always the good old wikipedia definition: http://en.wikipedia.org/wiki/Literary_fiction


My take on it is that it is often used to mean "serious" fiction (whatever that is), as opposed to fiction that is merely "entertainment". It often seems to be thrown about in the context of snobbery (that is, someone may not "read that airport bookshop rubbish" because they like literary fiction), but I don't know if people really say those sorts of things, or if it's just the impression that the other side ("genre" people) think they might say.


It's just one of those terms that means different things to different people (as @neilfein's answer suggests).


(For a quantitative answer, how about: the average number of metaphors per paragraph?)


adobe photoshop - How to create Gradient Highlight / Shadow using One Spot Metallic Gold Color


My client asks to use one metallic gold color (for example Pantone 871c) in large heading text and other designs. I'd like to make the gold color pop even more with gradient of light and dark. How do I do this in photoshop? Can this be done using only one single spot gold color? Below image shows an simulated gold color with similar effect I want.


enter image description here




adobe illustrator - How to quickly change multiple colors in the same text area?


As shown in the following image, how can I change the color of "Ms" or "Mr" in one go?


Is there any existing function that can be used or is it possible to script?


enter image description here



Answer



Use "Recolor Artwork"



With the text area selected, click on the "Recolor Artwork" button (or go to Edit → Edit Colors → Reclor Artwork):


enter image description here


Under "Current Colors" is a list of all the colors present in the selected artwork. The "New" column is where you set the colors to change to. You can also combine or swap colors:


enter image description here


Clicking the new color box will bring up the color picker. Choose your new color:


enter image description here


You can also change colors by altering Hue/Saturation/Brightness etc. or visually on a color wheel by switching to the 'Edit' tab.


Click OK once you are happy with your changes.


The result:


enter image description here



Monday, January 23, 2017

internationalisation - address form fields


I'm developing a website that displays information about European festivals, including their addresss. Given that different countries use different address formats, I'm wondering what is the best "one size fits all" form that I can use to capture the address data. Obviously I could use something like:


Address Line 1 _____________
Address Line 2 _____________
Address Line 3 _____________
Address Line 4 _____________


Country*

(Fields marked with * are mandatory)


The above is not very satisfactory as it allows the user to enter the address in an almost completely unstructured way. More specifically, it will make it difficult for me to extract the town/city and post code (if applicable), which I will need to do.


I want to make the form as structured as possible, while still accommodating all possible European address formats (within reason). The best I've come up with so far is:


Address Line 1 _____________
Town/City* _____________
Address Line 3 _____________

Post Code _____________

Country*

This will force the user to enter the nearest town/city and country, which should allow me to plot the location on a map. I think the concept of town/city is pretty much universal, and if the country uses post codes, I can capture that information too.


However, it seems like this problem must have been considered at least a million times before. Are there any "best practices" that I should be following?



Answer



There is an extensive article related to this topic by LukeW. http://www.uxmatters.com/mt/archives/2008/06/international-address-fields-in-web-forms.php


design patterns - Why the X is the symbol associated to the “Close application” action?


I was wondering about the reason of the choose of the X as symbol used to represents the "Close application" operation.



Answer



In the article "The origins of the use of [x] in UI design" you can read:



The use of [x] for close and [o] for open could come from the Japanese symbols batsu and maru.



Bastsu and maru



Batsu (x) is the symbol for incorrect, and can represent false, bad, wrong or attack, while maru (o) means correct, true, good, whole, or something precious. Batsu and maru are also common hand gestures. Cross your arms over your chest for batsu, circle your arms over your head for maru.




overflow - How do you deal with unusually long labels?


A piece of software that I'm updating uses some incredibly long labels, but due to the nature of the software (taxes and payroll) this seems unavoidable at times. On some pages, maybe 50% of the labels look like this in the current implementation:


current label design


To make this easier on the eyes, I'm considering whether I should phrase these long labels as questions:


label as question


But this makes the label somewhat harder to scan, and the label has been like this for about 10 years so many users are familiar with it as is.


Another option would be to present these options as a list of checkboxes, which might work better when there are a number of shorter options on the same page that cannot be worded as a question: label using checkbox


I'm curious how others have handled this and if there is a better solution. For the application that I'm working on, most of these options are boolean but there are others that may involve a dropdown or some other control. The layouts begin to look particularly cluttered and difficult to read when there are a mixture of different controls in conjunction with long labels. The application is also for trained expert users within this industry.




Answer



When I was involved with tax software (not in the US by the way) we also had a huge variety in the length of the labels. We dealt with it by adopting a two-column approach. One column for the labels and one for the answers. So the answers would always be at the same distance from the left edge and long labels would word wrap and simply take up more vertical space.


a long line of question            v yes     v no
that needed to be broken up

a short question v yes v no

Added bonus here is that it the lines of text are shorter which makes them easier to read.


pacing - How long can a fantasy novel stay in metaphorical Kansas?


I am writing a novel with the basic Wizard of Oz, Alice in Wonderland or the Matrix if you want structure. The novel begins in perfect modern day, and at some point in a very sharp way takes a turn for fantasy.
Right now Kansas currently takes up about 4000 words and aside from an end paragraph is the entire first chapter. There are virtually no magical elements in it. We meet the characters and find out what are their mundane daily lives before everything is subverted. By mundane I try to not mean boring. One is tied up with a crime family, and the other one is struggling with drug addiction.
The feedback I am seeing from my test readers is that because the book is in the fantasy genre they expect fantasy. They want foreshadowing to the fact that there is magic in this world.


My question is, is this something that the modern reader needs? Do we have to put early fantasy elements to keep readers interested? How long can a standard length novel spend in the modern day world before it has to show magic? I am assuming that the normal world action is interesting if the reader just did not know the book was in the fantasy section.



Answer



The purpose of the Kansas section is to establish the Real World before embarking on the Quest (to use the terms from the Hero's Journey).


The Real World is the place which the Hero (gender/age/number neutral) must leave behind. You can use it to establish character traits, and the Quest could potentially begin there, but generally I think your beta readers are right: either leave the Real World quickly or establish the existence of magic quickly. If it's a fantasy book, get to the fantasy. If it's an urban fantasy book, you still need to get to some element of fantasy promptly.


This can be something the hero doesn't understand, by the way. The White Rabbit can hop by without the hero chasing him; the reader knows what it is even if the hero doesn't. You can drop hints about Weird Things going on and not explain them for a few thousand words. So if you have a mob boss, one of the goons can be making a report about the night's activities and mention "this crazy thing that happened/that Fast Eddie told me about, you wouldn't believe it," and we don't have to get any more detail than to confirm that something unusual is going on.


ETA The Hero's Journey is a classic literary structure, popularly explained by Joseph Campbell in The Hero with a Thousand Faces and broken down into writing terms by Christopher Volger in The Writer's Journey.



transparency - Making the background of an image transparent in Gimp



I have some jpg images and I need for each of them to have a transparent background.


I have GIMP as a graphic tool.


I need to put them in a web page and I need to see just the main element and have a transparent background.




guidelines - Is it necessary to include an interface's "hidden functions" in the manual / help?


Background


A well designed interface allows any type of user, beginner, advanced, or expert, to achieve their objective quickly. In most cases, help information contains the description of elements and functions focused on beginner-level users. It allows one to quickly deal with an unfamiliar interface. In addition there are often many "hidden possibilities" which allow a user to considerably reduce time spent to achieve their purpose. The most widespread example of this is HotKeys/Shortcuts.


Other examples include swipe-to-unlock from the notification center in iOS5 and quick select a month daterange by double-clicking the header in Google Analytics ga


In most cases, information on similar features is learned as a result of interaction with/discovery of the interfaces or on web-forums for advanced users.


Question


Are there any rules on creating the help files in such situations and is it necessary to announce hidden functions? And is it possible to provide this information for advanced users while still explaining the basic functions of the application for novice users?



Answer



The idea that Help is for beginners is misguided. Novices don’t use help; advanced users do. Novices don’t use help because:





  • We are a victim of our own success. We’ve made apps and web sites that users can use without Help, so that’s what they expect. And, indeed, an app should be designed so that the average new user can be productive without opening help first.




  • Using help is itself a skill. Users need experience with an app to even know where to start with Help. They need to know the terms, architecture, and internal logic to be successful. Instead of searching Help, new users go to colleagues, friends, and family (we’ve all been there, right?). Novices might be helped with brief “Getting Started” documentation, but even that may get ignored.




Help should be written for that reality. Advance users typically use help when they know most of the solution but are stuck on a certain point. Help should concern the advanced details of the system, broken down and organized for easy searching and scanning.


“Hidden” capabilities, such as those effected through drag-and-drop, double-clicking, and accelerator keys, can be highlighted in help in a “Tips,” “Hints,” or “Short-cuts” section within the help on a particular feature or task. You don’t want to intermixed them with other content on a feature because users get confused by trying to learn two different ways of doing the same thing.



However, the real problem with short-cuts is that users don’t know they need them. Users usually go to help when they get stuck, not because they want to work more efficiently. Given the poor usability of so much out there, why should users expect there is a more efficient way to work?


For hidden features, you may want to use dynamic in-line help of super-brief hints (e.g., a tooltip appears saying, “Doubleclick for default,” when the user manually resets a field to default). In-line help is also about the only help new users read, so you might want to consider replacing novice hints with advanced hints as the user demonstrates progress. However, that’s getting complicated and experimental.


Sunday, January 22, 2017

adobe photoshop - Edit multiple layers at once in animated gif


Okay so I downloaded an animated gif from the interwebs.


I want to edit this gif and open it in Photoshop. Like I expected there are 481 layers.



I want to change the background color :-)))


Can I do this in a quick way? or do I have to edit every layer?


M.




website design - Is displaying search bar in Search Result/Error 404 page redundant (when it's already on sidebar/header)?


Is it redundant to display the search bar on Search Result or Error 404 page again when the website already has it on the sidebar/side navigation or on header?


I've always felt it's kind of redundant since user can easily scroll the page to use the search bar again, but I often see various websites keep employing this. I thought that the search bar is displayed again to prevent the hassle to scroll the page, but I'm still not sure if that's really the reason (especially when it's still on same screen).


Here are some few examples to illustrate:


screnshot


screnshot


screnshot


Sorry for the long question title!




Answer



My rule of thumb: If redundancy makes things easier and doesn't confuse the user, it's fine. If it confuses the issue, then it's best to leave alone.


In this specific case, a search bar atop a search results page tends to be a web standard and can keep the user focused in the area of the page where the results are, even as they modify the search. Verdict: I think that redundancy is fine.


On 404 pages, I think prominently featuring a search bar is nice, but not necessary. Since it's so close (in the third png), I would personally leave it out, but if it were more separate (like in some of the other examples), I'd leave it in. A user may experience a 404 from an exterior link and the less they have to think about finding their content, the less likely they are to give up from frustration and find the content elsehwere.


usability - Best way to call out important content to screen readers?


We're adding new content to our page that describes the accessibility options available at a destination. The user may make accessibility requests via checkbox inputs (bathroom, hearing-impaired equipment, etc.) but we're now providing a disclaimer for things that cannot be reserved online (braille, accessible parking, etc.)


As this is geared specifically towards people with accessibility needs, what's the best way to call out this content to a screen reader?




How to fill color in this bottle using Photoshop?


I want to fill "ink" (color) into this empty ink bottle using Photoshop?


Please let me know the steps.



Thanks!


enter image description here



Answer



Here are some results I got:


Black Ink Blue Inky Substance


The steps for black ink are as follows:




  1. In Photoshop, put the bottle image onto a layer, and duplicate this layer. To do this, you can select the layer in the Layers panel and press Ctrl+J on Windows or Cmd+J on Mac. We will work with this duplicate layer only, which must be above the original.





  2. Use your favorite method to select just the glass of the bottle. You should have your duplicate layer selected in the Layers panel at this point (if not, then select it). Once you have the selection around the glass, continue.




  3. Click on the Add Layer Mask button at the bottom of the Layers panel. Since you had your duplicate layer selected and also a marquee selection on that layer, this should create an opacity mask that reveals only the glass part of the duplicate layer. You won't notice that anything has happened, but the layer mask will show a white shape (the glass). Now click on the icon of the duplicate layer so that we’re not working with its opacity mask.




  4. Using the main menu, select Image > Adjustments > Levels... and set the three slider values (left to right) to be 68, 0.10, and 255. Leave the output levels alone. This should darken the glass showing through in the duplicate layer to about the consistency of black ink.





  5. Now take a size 45 brush with 0 hardness and set foreground color to black. Then select the opacity mask on the duplicate layer, and carefully mask the edges of the dark glass shape with the brush. You will want to do a little on the sides and a bit more on the bottom because there’s more solid glass there. enter image description here




  6. Using a much larger brush, like 500px with 0 hardness, or the gradient tool with foreground color still set to black, carefully mask the bottom of the dark shape and also the sides. The bottom should receive maybe a bit more than the sides. This step is crucial because a container with dark liquid will reflect its immediate background. That’s the effect we’re trying to create, as though the dark glass is reflecting the gray surface on which the bottle sits. enter image description here enter image description here




That’s it. Enjoy your bottle of ink. Keep in mind you can play with how much you mask the dark shape. I maybe went a bit overboard. There is a sweet-spot there somewhere, I know it. Just use the edges of the soft brush so you're not erasing but just fading slightly.


Update: To create some other color substance inside the bottle, it's pretty much the same process, you can just play with the Levels a bit. The Levels dialog has a "Channels" dropdown option. If you select the individual Red, Green, Blue channels, you can create almost any colors and then go back to the RGB option to adjust the darkness to your linking. If you want a more solid look to the ink, you should use the Clone tool to take out anything seen through the glass, like the little bits in the middle, which I took out in the blue ink version. By the way, you can use Hue controls to change color, but I would leave Saturation alone, since it highlights compression artifacts.


emotion - Do emojis provide any value over emoticons?



Some background


By emoji, I mean these: http://www.emoji-cheat-sheet.com/


By emoticons, I mean the standard :), :P, ;) etc.


These emoticons or emoji will be available to users in things like text areas for posting comments and writing blog posts.


Context


I am considering cases where we provide a rich text editor and the user can select the appropriate emoji/emoticon from a drop down.


The second approach is a plain text area where users will need to type in :) or :smile: and an autocomplete dropdown like github's: enter image description here


Question


Emojis provide a lot of images which does add to the fun factor. However, from my personal experience, I have always found them hard to use (because I need to remember all the codes :smile:, :stuck_out_tongue: etc). The fact that someone has created cheat sheet means that I am not the only one having this problem. Having to use something like :smile: over :) provides more friction too.


In addition, because I can't be bothered loading up the cheat sheet most of the time, I just end up using the same 3 or 4 emojis in my posts and comments.



Is there any value in using emojis over the classical emoticons?




risk neutral measure - SDE simulation: P or Q?


Let's take a GBM under $P$:


$dS=\mu dt+\sigma dW_{t}^{P}$


and then under $Q$


$dS=r dt+\sigma dW_{t}^{Q}$, where $dW_{t}^{Q} = dW_{t}^{P} + (\mu - r)/\sigma dt $



Now, let's say that I have calibrated my model on the mkt option prices (using B&S) getting the parameters that i need. Question:


Do I have to simulate the path subtracting from $W^{Q}$ the market price of risk? Or what i only need is a brownian motion (knowing that $r$ in the drift part is already the result of the change of measure)?


Thanks.




jobs - What to ask when hiring UI Experts?




I'm creating a desktop (PC) application. A dictionary / thesaurus / spell check tool that works across applications (explorer / browser / spread sheet etc..)


I know my own intuition on UI sucks and ditto with my graphic capability. I plan on reaching out to hire help but would like suggestions on what I should be looking for.




Saturday, January 21, 2017

web app - A cross between a DropDownList and AutoComplete Text Box


I am trying to come up with an web interface that allows the addition of an item to a list. For simplicity I'll use an example of a list of names which, when selected will be assigned to a club/group.


I originally thought of a drop-down list containing all the names. However if you have a lot of them it can be a pain to go all the way though the list. So then I thought of an auto complete text box which will auto-predict as they type, problems with this would be speculative browsing though the list and the ability to type names which are not in the database.


I wondered two things; Is it a good idea and can you think of a technique that would intersect both UI elements? Perhaps an example of recommendation of something similar that is used?




Answer



The Chosen javascript plugin may be exactly what you're after. It's a versatile combo-box solution. Elegant, too. Here's a screenshot example.


Chosen screenshot


Friday, January 20, 2017

critique - Is this logo redesign a step in the right direction or is it better to stick with the original?



NOTE: This is a continuation from a previous question: Critique Request: CAD drafting contractor logo


Old logo



I've implemented some of the suggested changes from my previous for this logo redesign project, incorporating a simpler grid (to hopefully keep my client happy). :) Here's where that led:


Simpler Cube



Then I decided to try something even simpler, working a little harder at incorporating the name into the logo, hopefully to emphasize the "CAD" part a bit more, but retain the idea behind the cube:


More modern design


I have shown these to my client, and he told me he likes the second one better of the two, but he voiced concerns that he is apprehensive of moving away from the logo he has had for years (the old logo at the top of this post). He mentioned the possibility of getting another professional opinion on the matter, so here I am. :)


My main questions are:





  1. Are these new logos an improvement on the original? (I need a more objective standpoint than my own.) :)




  2. If yes, do you have suggestions on improving either of these designs?




Thank you once again for your help!




statistics - How to make the final Interpretation of PCA?


I have question regarding final loading of data back to original variables.


So for example:




I have 10 variable from a,b,c....j using returns for last 300 days i got return matrix of 300 X 10. Further I have normalized returns and calculated covariance matrix of 10 X 10. Now I have calculated eigen values and eigen vectors, So I have vector of 10 X 1 and 10 X 10 corresponding eigen values. Screeplot says that 5 component explain 80% of variation so now there are 5 eigenvectors and corresponding eigenvalues.



Now further how to load them back to original variable and how can i conclude which of the variable from a,b,c.....j explain the maximum variation at time "t"



Answer



To make things really clear, you have an original matrix $X$ of size $300 \times 10$ with all your returns.


Now what you do is that you choose the first $k=5$ eigenvectors (i.e. enough to get 80% of the variation given your data) and you form a vector $U$ of size $10 \times 5$. Each of the columns of $U$ represents a portfolio of the original dataset, and all of them are orthogonal.


PCA is a dimensionality-reduction method: you could use it to store your data in a matrix $Z$ of size $300 \times 5$ by doing:


$$Z = X U$$


You can then recover an approximation of $X$ which we can call $\hat{X}$ as follows:


$$ \hat{X} = Z U^\intercal $$



Note that as your 5 eigenvectors only represent 80% of the variation of X, you will not have $X=\hat{X}$.


In practice for finance application, I don't see why you would want to perform these reduction operations.


In terms of factor analysis, you could sum the absolute value for each row of $U$; the vector with the highest score would be a good candidate I think.


Correlation between prices or returns?


If you are interested in determining whether there is a correlation between the Federal Reserve Balance Sheet and PPI, would you calculate the correlation between values (prices) or period-to-period change (returns)?


I've massaged both data sets to be of equal length and same date range and have labeled them WWW (WRESCRT) and PPP (PPIACO). Passing them into R we get the following:


> cor(WWW, PPP)
[1] 0.7879144

Then applying the Delt() function:



> PPP.d <- Delt(PPP)

Then applying the na.locf() function:


PPP.D <- na.locf(PPP.d, na.rm=TRUE)

Then passing it through cor() again:


> cor(WWW.D, PPP.D)
[1] -0.406858

So, bottom line is that it matters.



NOTE: To view how I created the data view http://snipt.org/wmkpo. Warning: it needs refactoring but good news is that it's only 27 iines.




research - Mental model vs Conceptual model -- what's the difference?


I'm reading Apple's Human Interface Guidelines about Mental models and I can't understand what is the difference between Mental and Conceptual models.


I prefer a short answer if possible :)



Answer




"A mental model is the representation that a person has in his mind about the object he is interacting with. A conceptual model is the actual model that is given to the person through the design and interface of the actual product." (Susan M. Weinschenk. 2011. 100 Things Every Designer Needs to Know About People)


So a mental model is the way the person thinks about what it is they are doing. For example, when getting a book out of the library, they form a mental model of the things they have to do to achieve this.


A conceptual model for an online library is the interface the person interacts with as a represented concept of a library.


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...