Monday, August 3, 2015

wizard - Multi step form vs single complex form


For a website that sells things, it's often needed to fill in a lot of information. When it comes to these types of forms you want the user to complete which one is the best?



  • A single form with all the fields a user needs to fill out

  • A multi step form, where each step is simple, and fits a normal screen


Have you any experience or tests about the above?



Answer



Use wizard when:




  • have ability to split process in well balances wizard steps collect and

  • process data from previous step to use in next step

  • want to complete and save some steps, to restore after cancelling


Live examples: iPage domain registration


Use form when:



  • can put everything on single page without a mess

  • can't split process due to technical issues (ex. we need to have user credentials and email in single step)

  • will be better for performance



Live examples: Google Mail account registration


Also, consider to use Intelligent form


What are "good" writing habits?


I always read that good writers shouldn't use similitudes and metaphors. Also, a writer shouldn't use too many descriptions. Then, I read Raymond Chandler and my little stupid world of securities went down. He wrote with similitudes, he described places in a pedantic way etc. etc. So, what is a good writing "habit"?



Answer




I'm going to answer this from a different point of view.


What you ask for, and what many inexperienced artists crave, is a secret or formula they can follow to create outstanding art. They read how-to-write/draw/whatever books, ask in online forums, and live with the apprehension of never learning that secret formula.


The truth is, there is no secret formula behind artistic success. There is no how-to that will invariably lead to success. But there is a well-known truth that nevertheless is constantly being ignored by most:


If you want to learn how to write, all you have to do is write.


This seems banal and lacking to those on the quest for the secret formula, but in fact it is all but lacking or banal. The simple truth is that only when you write will you understand what you need to know. A story is such a complex thing that it is impossible to rationally understand how it works and to master its creation consciously. But every man and woman have a faculty that is extremely more powerful than conscious rational thinking, and it is this faculty that both appreciates art (in the consumer) and creates art (in the artist). It is your unconscious, intuition, or procedural knowledge, or whatever different schools of psychology may call it.


When a reader reads a story or watches a movie or looks at a painting, the vast majority of them are "touched", but don't understand how this works. Every writer is first and foremost a reader. Long before we began writing novels or making movies, have we been reading, watching, and appreciating art. During these years of consuming art, have we subconsciously learned what a story is, which stories we find pleasing, and how they work. We may not be able to verbalize this knowledge, or not completely, but we can learn to actively use it in our own storytelling and creating of art: by practice.


When we write stories or make art, what we do is try to re-create what we experiences when reading or appreciating art. At first, we usually fail. But when we keep trying, we slowly begin to understand, on a subconsious or intuitive level, what we need to do to generate better results.


In this, writing is like all the other procedural knowledge we have aquired. We don't know how we do it that we can walk, but we can, and if we look back, we may remember (or see in other children) how we learned it not through explanation and rational understanding, but through trying and embodied understanding: we "grasped" it, in the literal sense – we felt, how it worked.


While many writers claim that they know what they do, and some even give courses trying to teach you, their claim is wrong. The proof for this is that participants in those courses do not turn into good writers, and many fail permanently, never publishing a single work. What these writers tell you is maybe not completely useless, but it is not the secret formula to writing well. The secret formula to writing well, if you want to call it that, is:


Write. And don't think about it too much. Just do it. And with practice, you will get better.



So the only habit you have to learn is to sit down to write as often as you can. The recommendation – founded on psychological research into the habits of successful writers and into creativity and productivity – is writing every day for between half an hour to four hours (you need to write long enough to get into the flow and stop when you notice your quality is deteriorating).


Here is how Hemingway described his writing habits:



When I am working on a book or a story I write every morning as soon after first light as possible. There is no one to disturb you and it is cool or cold and you come to your work and warm as you write. You read what you have written and, as you always stop when you know what is going to happen next, you go on from there. You write until you come to a place where you still have your juice and know what will happen next and you stop and try to live through until the next day when you hit it again. You have started at six in the morning, say, and may go on until noon or be through before that. When you stop you are as empty, and at the same time never empty but filling, as when you have made love to someone you love.

Ernest Hemingway (1958). The Art of Fiction No. 21 (interviewed by George Plimpton), Paris Review, 18. Available online at http://www.theparisreview.org/interviews/4825/the-art-of-fiction-no-21-ernest-hemingway)



What he does is:



  • stop writing while you still know what comes next (this will keep the story working in your subconscious mind during the day and night)

  • begin early in the morning, before anything could distract you (thus you are full of ideas from the night and your mind is in your story)

  • re-read what you have written (this gets you to the point where you left off and tunes you to what to write next)


  • write no longer than until noon (before noon are the most mentally productive hours for most humans)

  • write until you feel fulfilled, and don't begin to force yourself


Good luck!


style - Direct thoughts


The most commonly given advice for using direct thoughts seems to be to format them in italics. I am not really satisfied with that, however. I haven't seen this used anywhere (granted, I do not read contemporary fiction) and it feels strange to use italics for two purposes (the second one being putting stress on a word ). Even on stack exchange the italics are frowned upon in several answers.


My preference would be to just leave them unformatted, inserted into a paragraph of indirect thoughts/feelings of the same character. My question is, would this confuse you? eg. in the below (the last sentence is the direct thought of the heroine):



It wasn't his look that unsettled her, however. It was the realization that her anger had vanished, and that what was slowly taking over its place within her mind was fear. What have I done?




Answer




The quoted passage is completely comprehensible; it's clear that the question is being asked by the character. The alternative would be absurd - the narrator making some kind of parenthetical commentary on her own narrative! Adult readers of serious fiction will not be even momentarily confused by your example.


The technique you're using is called 'free indirect style', and has been around for a long time, although it came to occur much more frequently in the heyday of the great realist novelists: Austen, Eliot, Tolstoy, Flaubert. It is not at all old-fashioned, however. It's very commonly used today by contemporary fiction writers.


The habit of italicising characters' thoughts should be left where it belongs, in the pre-New Wave history of science fiction, and cheap pulp fiction thrillers. Unless you are writing 'young adult' or juvenile fiction, I would strongly advise you to continue to avoid italics, punctuation or any other clunky markers to separate chracters' thoughts from the enclosing narrative.


Sunday, August 2, 2015

creative writing - How do we handle pauses in a dialogue?


How do we handle pauses in a dialogue?



Let's say that character A speaks and then after a pause character A speaks again. How should we separate the two moments, should we write two lines of dialogues or should we cut the two lines of dialogues with a brief description?


For example:



"Was the computer software hacked?"


"No, it was a bug caused by legacy software. Any other question?"


"No? Ok, see you on Thursday."


"Bye"



Bolded parts represent lines spoken by the same person.



Answer




You indicate pauses with action, even mentioning the pause. (Or, as Cyn says in comment, with other exposition or thoughts).



Chad said, "Was the computer software hacked?"


Bryce shook his head. "No, it was a bug caused by legacy software. Any other question?"


Bryce waited for somebody to answer, but everyone averted their eyes, or looked at the wall clock.


"No? Okay, see you on Thursday."


Noise filled the room as students gathered their books and belongings, and began to wander into the hall. He waited for Alice to pass, his star pupil. She caught his eye.


She said, "Bye."


Bryce smiled and nodded to her.




Saturday, August 1, 2015

Should Put/Call Parity result in Zero Return or the Risk-Free Rate?


Sorry in advance if this is a basic question. I'm examining some potential at-the-money put/call arbitrage. What I found surprised me somewhat:


            Bid   Ask    Mid
ATM Call = 3.31 x 3.33 (3.32)
ATM Put = 2.93 x 2.95 (2.94)


Expiration = ~ 1 Month

Underlying Stock Price = 190.00

The resulting Put/Call Parity return is equal to:



(Sell Call, Buy Put, Buy 100 Shares of Underlying)


$(3.32-2.94) \cdot 100 = \$38$


$\dfrac{\$38}{\$190\cdot100} = 0.2\%$


Annualized Return = $0.2\%\cdot12=2.4\%$




This return is very close to the current stated treasury 'risk-free' rate of 2.48%


I would have expected the return on Put/Call Parity to be zero, however, since the combination of assets is risk-free at that point it would make sense that it pays exactly the risk-free rate.


Is it expected that I should see this risk-free rate of return or should I be seeing zero return?


Is this some other component of return - is this an arbitrage opportunity?


Am I merely seeing an algebraically extracted risk free rate from the put call parity formula?


$C_0+X*e^{-r*t} = P_0+S_0$


$3.32+190*e^{-0.024*(1/12)} = 2.94 + 190 = 192.94$


Thanks for any clarification.



Answer




You should see the risk free rate as the return on the strategy. That’s because you actually have to invest money , namely usd 19000 minus usd 38, for the one month period. Hence, there is no arbitrage in the market data you observe.


color - Clearly distinguishable colours for scientific figures


I am looking for pointers on how to pick a set of colours (or a colour gradient) that are clearly distinguishable, for use in scientific figures. Was there any systematic research on this? If yes, I'd appreciate some links.


When creating scientific figures, colour is often used to distinguish elements. One example is lines in a plot:



Mathematica graphics


Another example is a colour gradient to denote values:


Mathematica graphics


I'm interested in two questions:




  1. How can I pick the largest set of colours that are still distinguishable from each other, for use in a plot? Similarly, what colour gradient will allow the eye to discern the largest set of values and detect the slightest change? Are there colour schemes made specifically for this? I'm looking for something that works well both on-screen and in print.




  2. How can I pick a set of colours (or a gradient) that are still distinguishable enough when converted to greyscale, but the contrast is enhanced when they're viewed in colour? Is there a colour gradient that is not much worse in this respect that a full-white to full-black gradient when converted to greyscale, but gives significantly enhanced contrast when reproduced in full colour? (Take e.g. my example figure from above with the rainbow colour: it has excellent contrast in colour, but it's unusable in greyscale. Many scientific journals will publish figures in colour online, but ask for figures that are usable in greyscale too, in the print edition.)







Pricing an american style option on a bond future


what is the good way to pricing american option on bond future? From bonk fixed income securities 3rd by Tuckman, I understand how to pricing European option on bond future, but I still have no clue how to pricing american option.




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