Saturday, January 31, 2015

adobe illustrator - Can Photoshop be used for vector purposes?


Usually vectors are only created in vector-based programs such as Adobe Illustrator or Inkscape, with some limited support for drawing vectors in programs like Adobe Fireworks and Flash.


However, can Photoshop be used for vector purposes? Would it be optimal to do all your vector-based image creation there, for example, considering that it might be later on used in the project in a web design layout?



Answer



Photoshop has support for vectors, or as it calls them 'paths'


There is a pen tool for drawing paths freeform, text tool, shape tools and selection tools for editing previously laid paths.



Once you have a path laid you can fill it with a colour or apply layer effects to it non destructively.


So the basics are there, but Illustrator and other programs have much more advanced tools for editing those vectors. Also photoshop only outputs as its own psd format or a flat image. The only way you can export paths to another program is as an illustrator file.


So for simple things or if that's the only program you have access to, go for it! You might find yourself in Illustrator never using any of the features that PS doesn't have. But once you really get into the things you can do with Illustrator it's hard to go back!


fiction - Building empathy with a character and interest in a story


I've written several chapters of a (fiction) story. I wasn't happy so I spent some time reading about fiction, and trying to figure out what was wrong with it. I came to the conclusion that, while the main character is in danger, I have not done enough to build up: want, obstacle, and struggle.


First, I need to build up the character's 'want'. In my story there is a small isolated town, and someone has been killed in it. The main character is scared, and "wants" to survive, though there is no demonstrated threat to him, yet. It does not seem like this vague, "he's scared and wants to get out of there but can't" is good enough want, as the story still seems lifeless.


What can I do to build up "want" for the character, given this scenario? Someone elsewhere writes that a character's desire for survival may not be enough, that one may need to increase the reader's empathy with the character (his example was to give the character a wife or daughter.)


The story is now roughly: guy goes to a very small town, guy gets stuck in the town, someone gets killed. Guy is interested in leaving. The fact is, the killer is after the guy, but the guy doesn't know it yet, and won't know it for awhile.


If I can supply any more details, please let me know.


Edit:


The reader doesn't know the killer is directly after him, yet. The events are: 1) protagonist gets to an isolated, small town. 2) the killer has a reason for not wanting him there. 3) kills someone as part of the process of getting the protagonist himself killed (it's complicated...), 4) the killer finds out that his plan didn't work, so will go after the protagonist in another way. Right after step 3 is where things get boring, and where I decided to stop and figure out how to make things sound better.




Answer



It sounds like you are missing two major parts of story development: Character and Stakes. These two topics could fill two small books, so I'll try to give you the run-down below.


The purpose of Character Development is to get the reader to care about the protagonist. If the reader doesn't care about who he's reading, what's stopping him from closing the book?


The purpose of Stakes is to increase the worth of the main conflict not only to the character, but to the reader. Keep in mind that all the development you do is for the reader. You aren't trying to make a better story, get that out of your head right away. You're trying to make a better story for the reader, so that he will keep reading. With that in mind:




The first step in developing your main character is giving him strength. This strength is usually a quality - discard any ideas of increasing his worth by giving him family members, that's preposterous. This quality can be anything, as long as it is something the reader could hope to attain. Honesty, loyalty, tenacity, kindness... the list is endless. It could also just be a 'little' thing, like loving a daughter or sibling. As long as the reader feels the heart-felt tenderness of that love, it works. Essentially, strength gives the reader a reason to root for the protagonist.


The next part of character development is inner conflict. You want your character to be realistic, and in this case that means he needs an element of inner turmoil. Without this, he comes across as too sure of himself. He needs to doubt.


I like to think of inner conflict as something that pulls the protagonist in two opposite directions at the same time, usually surfacing as a battle between what is needed and what is desired. However, it can also surface as a battle between two needs, neither of which are desired. (Having it surface as a battle between two desires, neither of which are needed, generally doesn't work so well.) For example, the protagonist may need to make a choice between two unpleasant choices. Or he may need to make a choice between keeping what he loves and doing what is right. Or a choice between honoring his code or doing what is needed.


Inner Conflict is almost always strongest when one of the choices is linked to the main goal, and the other side is linked to not completing it. In your example, the protagonist could easily want to leave the small town, but something is holding him back (feeling of duty to root out the killer, feeling of protection to someone he loves who won't leave, etc.)





There are two kinds of stakes: public and private. A stake is what could be lost if the protagonist fails in whatever it is he is trying to do. A private stake is what the hero would lose. A public stake is what the world of the novel (in this case, likely your isolated town) would lose. You need a combination of high public stakes and deep personal stakes to make this work.


High public stakes are easy to invent. The world will end! We'll all die! What you need to focus on is how those things come about. You need to be detailed just enough so that the reader feels it is real. This doesn't mean you throw a bunch of medical terms at him to explain how a plague works. It means you know how the plague works, and then use just a few terms to give your reader the sense that this is real. If you know how something works, you won't need to explain it: it will show in your writing. Details are the key to public stakes.


Deep personal/private stakes concern your characters, and what they would lose if the protagonist fails. You can determine when your personal stakes are deep enough by asking yourself the question: If my hero doesn't (insert goal here), then what would he lose? What would be lost? A job? Security? A life? Do NOT fall back on putting your protagonist's life at threat. Once, it was enough, but no longer, not with people on TV running for their life half a million times a day. You have to put something deeper at risk: you have to threaten the protagonist's very being.


Remember when I talked about strength? Put that at risk. If the hero's strength is an inherent part of who he is, you are no longer simply threatening to destroy his life. You are threatening to destroy him, and the very reason the reader cares about him. That makes your reader heavily invested in your novel.


Another way to do this is to give your hero a code or belief that he adheres to. This code doesn't even have to be right or moral. It can be as twisted as you want, but the hero has to believe in and adhere to it. If this is the case, you can put that at risk. Maybe the killer is after the hero, and to defeat him, the hero will have to do things his code forbids. Boom! Strength, inner conflict, and personal stakes in one line. In this example, the hero's code would take the place of strength (as long as it is a moral code). Not that adding additional strength is a bad idea.


A great example of threatening the hero's essence like this are the Perry Mason novels. With each case, Perry Mason feels that his client is innocent, and sticks to that belief no matter what.




These two things: stakes and character development, will, I believe, give your story the life it's been missing.


How to find specific vector images, like this one?


I wanted to know the place where I can find a vector. This small animal hand symbol is used in the image below. (after the name Ed Sheeran)


The Small Hand Symbol/Vector



Answer



That particular item is part of Photoshop's Default Shapes set.



paw


Simply select the Custom Shape Tool in Photoshop, then Select the shape from the menu on the Control Bar.


Should I look into different graphic design softwares?


I have so far used nothing but GIMP for photo touch-ups, logo designing, etc..etc.., Now I have seen that many use illustrator for logo designing, lightroom for photo editing so on...


Should I practice then on using other opensource alternatives(since I can't afford adobe suite) for different things? say Inkskape for example? I am not a professional graphic designer/photographer but I do like my hobbies too much, a word of advice is much appreciated!



Answer




Well the recommendation of software depends on the type of design work you are doing. If you are designing logos for print I would certainly suggest you use a vector program. Since you mention you can't obtain Adobe for personal reasons, I would suggest Inkscape as you have stated.


If you are doing primarily web designs such as sites, banners, email flyers than Gimp will serve a purpose and I don't see why expanding beyond Gimp would be necessary unless you just want to learn other design software.


Now preference wise, I try to only use a vector program for certain tasks. I say this because I am allowed to take a vector logo and use it for print work or I can import it directly into my site designs. I have seen and started using Illustrator for even web design but it is a learning curve and pixel accuracy is some what difficult over custom guide shortcuts for Photoshop.


If you are interested in comments on the alternative solutions to Adobe you can head over to alternativeto.


Friday, January 30, 2015

risk - What distribution should I apply to estimate the likelihood of extreme returns?


Say I have a limited sample, a month of daily returns, and I want to estimate the 99.5th percentile of the distribution of absolute daily returns.


Because the estimate will require extrapolation, I will need to make a distributional assumption. Is there a standard approach to take here if I want to include the higher kurtosis in my estimate?



Answer



What you refer to as the 99.5th percentile is known as the "Value-at-Risk." You are correct that you will need to make a distributional assumption, and there is a popular and well-researched approach to this problem, though I'm not certain it could be called "standard." I would recommend you use the "truncated Levy flight" distribution. James Xiong at Morningstar has written a few papers on this topic, and you can find more by googling him and this topic. Here is a less technical, more introductory piece on the topic.


Also, you should consider other risk measures, most notably Expected Shortfall (ES), also known as Conditional-Value-at-Risk (CVaR), which examines not just what the 99.5% percentile is, but what the conditional expected return is beyond that point. I also recommend you read this MSCI piece on the topic.



greeks - What does it mean to be long gamma?



When you are "long gamma", your position will become "longer" as the price of the underlying asset increases and "shorter" as the underlying price decreases.


source: http://www.optiontradingtips.com/greeks/gamma.html



My intuition tells me that if you're long gamma, all that means is that if gamma increases, so does the value of your portfolio. Correct me if I'm wrong, but this seems to conflict with the quoted definition above (it is possible for gamma to decrease while the value of your portfolio goes up). Am I totally wrong? Does being long gamma simply mean your portfolio has a positive gamma as the quoted definition suggests?



Answer



Gamma is the second partial derivative of the change in the price of the option wrt to the change in the underlying. Said another way, it is the change in delta. If you write down the Black-Scholes pricing formula, you's see the gamma term:



$$...\frac{1}{2}\frac{\partial^2C}{\partial S^2}(\Delta S)^2...$$


Notice that the $\Delta S$ (change in stock price) term is squared, meaning that the gamma term is positive when long regardless if $\Delta S$ is positive or negative. (This comes from the derivation of BS using Ito's Lemma.) What this means is that if you are long gamma (long a call or put option) then the P/L attributed to your position from gamma will increase regardless of the direction the stock moves.


Gamma (convexity) is a gift from God in this regard when the payoff is nonlinear, but remember there is no free lunch. The theta of a long option position is negative and will erode your P/L at the same time - faster than you will accumulate P/L from gamma if you are not careful.


creative writing - Showing that a character is in pain in a dialogue


Do you add pauses? Do you add interjection? Which ones? Do you misspell certain words? What are some of the tricks writers use? I don't want to say it in the descriptive passage. I want people to feel it while they're reading the character's dialogue. I want them to really feel the pain.



Answer



It's hyper-specific to a character. But here are some things I use. Note that the non-verbal cues will hit home harder when coupled with verbal ones.





  • Some will refuse to talk, not trusting their voice. With these characters I try to offer visual cues: profuse sweating, grimacing, 'pained' look, balling an relaxing hand, squaring jaw, or the well-placed unintelligible scream.




  • Swearing profusely. This is more striking with characters that don't swear.




  • Sharp inhales of breath (doesn't work with injured ribs/chest).





  • Being irritable, withdrawn, sullen. 'Needing a drink'.




  • Tearing up.




  • Voice becoming haggard, shouting.





  • Suddenly becoming violent.




  • Becoming confused, forgetful, unable to focus (the pain is all they can process, and they wish to the gods to forget that too).




  • Otherwise unexplained actions. Suddenly needing to walk, suddenly needing to stop walking. Curling up into a fetal position (more common with extreme pain). Biting/sucking on finger (the sucking reflex we have as babies doesn't fade, it's just muted from disuse).




For other possibilities look into pain scales. (note: link is to one site, but there a many out there.





EDIT




As requested, an example. Again, note that this is character specific, pain type specific, and injury or pain source specific. I'm a writer, but I was also a nurse, so I have a LOT of experience with people in pain.


Hmm, let's see. Injury: bruised ribs (incurred less than a day, so fresh-ish, but not as bad as initial injury, bet on a 4-5 on the pain scale detailed in the link above). Character: somewhat stoic. Scene, father (injured) talking to his daughter (1st person narrator).



Dad sits up in his hospital bed. His hair is dishevelled, his breathing even but shallow. It's the look in his eyes, though. That drawn look and the subtle frown even as he smiles.


"Hey." He coughs, his lips tightening against his suddenly bared teeth as tears well up in both our eyes. He takes a purposefully slow and deep breath, as if working up the courage to continue. "Hey, sweetie. When'd," he swallows as slow and careful as he can, another breath, shallower this time, "you. Get here?"



Things to take note of. Bruised ribs hurt. Not as bad as fractured or broken ribs, but they hurt all the same. And breathing with our chest causes ribs to move and do all the things you don't want. Speaking is a challenge with pain management with injured ribs. After a few days it becomes more 'natural' to speak with the altered speech pattern, so you learn to manage your breathing differently (or many patients I dealt with did this, consciously or otherwise).



Mirror top navigation order between left to right-languages and right to left-languages?


It's common to see international companies and organizations having a global web site with several country web sites. The country web sites is often translated to the countries' own language, which enables native language only readers to consume the content of the web site. This is very good and widens the audience of the web site.


When moving from "left to right"-languages (LTR) to "right to left"-languages (RTL) the top navigation menu language change accordingly. However the navigation order does not change. It is still in the same reading order as the site was first developed. This means that the nominal order of top navigation is reversed on RTL sites where the most important top menu item is placed last.


To solve this one can always develop a mirror site (!) for RTL sites where the most important top navigation item is placed to the right. But from the frameworks I know and work with, this comes with a substantial cost. However, from a usability perspective this should be done.


Should we mirror top navigation order between left to right-languages and right to left-languages?




Answer



Continuing my search on the answer to this question, I looked at two web sites that are multinational by nature: Wikipedia and the United Nations.


I used Chrome web browser to get a translation of each site I visited, both in English and two major right to left-languages; Farsi and Arabic.


On Wikipedia I found that the top navigation were completely mirrored. On the English web site the order is Main Page, Talk, , Read, View Source and View History. On the Farsi web site the top navigation is reversed exactly - meaning the order of navigation items are the same.


Wikipedia in English, Farsi and Farsi translated to English


The same pattern is used on the United Nations web site (Arabic|English) where the top navigation is in exact order of the LTR and RTL languages order. The most important navigation item comes first of your reading order. As an interesting side effect of this I found that even the video player arrow is reversed on the Arabic web site.


The UN web site in English The UN web site in Arabic The UN web site translated from Arabic to English


To summarize the answer to the question is Yes, the entire site - including the top navigation should be mirrored.


terminology - What's the common name for this GUI element? (left-right box, assignmentbox, relationbox)


You often see the following element to assign objects of a certain type to another object. We call it relationbox, but I can't find anything at all about relationboxes on the internet...
It's such a simple and well known element, there's got to be a well known name!


Here is an example (source: http://community.zimbra.com):
enter image description here




Answer



It seems to be known as Dual Listbox or Dual Multiselect.


When to use one-point versus two-point perspective drawing?



Are there any general rules of thumb on whether to use one-point or two-point perspective?


EDIT: I should point out that I'm asking this question in the context of general art and painting.




Thursday, January 29, 2015

Should Forms Auto Submit (Auto Advance) When Questions Are Correctly Filled In?


Here's my form.


enter image description here


Now, I'm curious if I could remove the 'Continue' button and just have the form move to the next stage when someone correctly fills everything in.


This is a bit different than When is an auto-saving form appropriate?- because there's more questions to answer.


Here is another, similar, question but is a different context: Auto Advance to Next Field


Suggestions?




Answer



There is a difference between auto-saving and auto-advancing, so I wouldn't necessarily prescribe the benefits of one to the other in terms of user experience and usability.


The problem with auto-advancing is that you are removing control from the user. Users like to feel like they are in control. If the form starts to advance them through the workflow before they "feel" they are ready, they are going to feel a lack of control:



Most flame wars you read about user interface issues focus on the wrong thing. Windows is better because it gives you more ways to resize the window. So what? That's missing the point. The point is, does the UI respond to the user in the way in which the user expected it to respond? If it didn't, the user is going to feel helpless and out of control, the same way I felt when the wheels of the dough bathtub didn't turn the way I pushed them, and I bumped into a wall. Bonk.


UI is important because it affects the feelings, the emotions, and the mood of your users. If the UI is wrong and the user feels like they can't control your software, they literally won't be happy and they'll blame it on your software. If the UI is smart and things work the way the user expected them to work, they will be cheerful as they manage to accomplish small goals. Hey! I ripped a CD! It just worked! Nice software! Wooooooooooo!


To make people happy, you have to let them feel like they are in control of their environment. To do this, you need to correctly interpret their actions. The interface needs to behave in the way they are expecting it to behave.


Thus, the cardinal axiom of all user interface design:



A user interface is well-designed when the program behaves exactly how the user thought it would.




As Hillel said, everything else is commentary. All the other rules of good UI design are just corollaries.



Source: Controlling Your Environment Makes You Happy by Joel Spolsky


The other problem beyond how the user feels about the experience is that you do not necessarily know that what the user entered is correct. It may be valid according to your regular expressions and form validation, but it might not be what the user intends to enter. If the form advances as soon as they have entered valid data you are taking away their ability to review to ensure it is correct data.


Giving them a button allows them the ability to review, plus it gives them the sense of control that they are using the form instead of the form using them.


adobe illustrator - How can I randomly color paths?



I have a couple hundred paths in one image.


Example of many paths


Is there a tool in Illustrator that would allow me to select a few (10) colors, and then using those colors to randomly fill all my paths.


An example would be a military camouflage pattern




There's a tool in Illustrator called Recolor Artwork (However I don't believe that this solves my dilemma)


Recolor Artwork Symbol


Recolor Artwork Panel


I'm not exactly sure how this tool works. I believe that it recolors the artwork, meaning that if all of your paths are already colored in, you can "randomly" change their colors.


I'm looking for a way to do the first step (once I have all my paths filled, I can use the Recolor Artwork in order to change hues etc.)



Edit:


So I've found multiple different scripts that accomplish this (and they do it quite well), but I'm still curious if there's a way to do it within Illustrator, since running the scripts is kind of a hassle - and if I want to reset my colors, I have to do it again. (is there a way I can make it into an action?)



Answer



There is a free script from Vector boom which accomplishes this task.


mySelection = app.activeDocument.selection;
myDoc = app.activeDocument;
if (mySelection instanceof Array)
{
selSwatches = myDoc.swatches.getSelected();


if(selSwatches.length != 0)
for (i=0; i {
if(mySelection[i].typename == "PathItem" || mySelection[i].typename == "CompoundPathItem")
{
selItem = mySelection[i];
selItem.filled = true;

swatchIndex = Math.round( Math.random() * (selSwatches.length - 1 ));


if(selItem.typename == "PathItem")
selItem.fillColor = selSwatches[swatchIndex].color;
else
selItem.pathItems[0].fillColor = selSwatches[swatchIndex].color;

}
}
}

You can also easily change fillColor to strokeColor (which I did and now have 2 independent scripts, one for each)







  • Select your paths to be filled


enter image description here





  • Ctrl + click and select all your swatches you want to use



enter image description here





  • Run the script


Result:


enter image description here


brush - Ink in water Photoshop


how can I best replicate an ink-in-water effect in Photoshop CS6? I'm guessing the best way is most probably to use brushes.


The following image is a good example of what I wan't to achieve:



Thanks in advance, any help would be much appreciated!




plot - How to derive a storyline from a beginning?


I have an idea for the beginning of a story. I have the setting, the protagonist, and the events that set the story in motion, including the inciting incident and the first plot point. I have, in short, what might become act one.


But I don't know how to go on from there. I know how to plot (when I have a storyline), but I don't know how to come up with a storyline when I have its beginning.


I have tried:




  • to "discovery-write", and see where the beginning leads me: the outcome was a tale that meandered randomly and, as the story wasn't about anything, lacking a satisfying resolution at the end

  • the Snowflake Method: this does not work if you don't know the one-sentence-summary of your story

  • writing another story in the meantime


Consider the Hunger Games as an illustrative example: I have the world Panem, the protagonists Katniss and Peeta, and the story up until the two are chosen as tributes and board the train to the Capitol. If that was all the idea I had for a story, how would I go about finding the rest of it? How do Rue, the berries, and President Snow follow from that beginning?


(I understand that the author, Suzanne Collins, very likely did not create the plot of her trilogy from its beginning. I would just like to use an example where we know the whole story as it has been published and successful and consider how the main storyline might be derived from its beginning.)



Answer



You have an inciting incident and a protagonist.


I think something is off about one of them. Your protagonist is under-developed, or your inciting incident is under-developed.



In a typical story, this inciting incident forces upon the protagonist their central dilemma / opportunity, and addressing this dilemma / opportunity is what the story is about. The two of those together should explode, and apparently for you they fizzled.


Here is a straightforward example: If my character's single-engine plane crashes at sea, and she is the sole survivor and swims to a deserted island, she has a dilemma if she wishes to return to society. She has an opportunity if she does not. I don't know what the story is about if she doesn't care either way. For me as a writer I cannot write a story about a protagonist that truly doesn't care what happens to them; I am not that skilled!


Now that is pretty straightforward as an inciting incident. If she wants to be rescued like nearly everybody would, it is Castaway or Robinson Crusoe.


To write a story where this wreck is an opportunity, I need to make it plausible. First, she needs a damn good driving reason and a certain kind of personality to consider living alone on an island indefinitely a viable proposition, and then a plausible reason to do it. I need to make sure those traits and that situation is clear in Act I.


Either way, the inciting incident creates a story based on the personality and situation of the protagonist, and by the end of Act I the inciting incident is a done deal and she is faced with a decision of what to do next.


In The Hunger Games, the inciting incident (a lethal threat to somebody our hero loves) is immediately dealt with, but still plausibly throws our hero into her own particularly lethal and morally fraught fight for survival.


On to your story: A less straightforward inciting incident may feel to the writer momentous and exciting, but if their protagonist, her emotions and her situation are under-developed, then she (the protagonist) has no clear reaction to the incident, or just typical reactions everybody else has. She doesn't stand out, the incident creates for her only the typical dilemma (or opportunity) it presents everybody else, she is not unique in her response and she is interchangeable with other characters. We call that 'cardboard'. The reader needs a reason to understand her as a unique person, and you need to give her traits or a past so she plausibly has a strong desire spring forth from the inciting incident.


In stories where the strong desire is typical --- protect a loved one, return to normality, take vengeance on the guilty --- I would have to give the character some unusual character elements, mental or personality or ability, or isolate them (as in Castaway) so the audience has no choice but to follow them. In many stories the hero is unusually skilled, astute, perceptive or gifted in some way.


My first thought is that, if your discovery writing experiment meanders, then your protagonist is not motivated by the inciting incident to accomplish anything. That is an underdevelopment in Act I of your protagonist, the inciting incident should incite them.


Of course your protagonist might be somebody you like, and you don't want to change them: But then you must change your inciting incident to incite that personality to do something. Either hurt the crap out of the protagonist, or make them choose to risk their life out of love, or give them an opportunity that makes them abandon everything to pursue.



Then your missing story comes to light so you can plot it, because I see roughly three core plots: Your protagonists succeeds, fails, or learns and changes her mind about what constitutes success and failure.


Once she wants something (or someone) so much she devotes her immediate future to nothing but that, you can plot a story. If you can't figure out the story, you need to change something so the inciting incident incites your protagonist and creates a terrible dilemma (or fantastic opportunity).


ADDED: If this still doesn't answer your question, I would look at your inciting incident and consider the ramifications of it, both for some individuals and the world of your protagonist. What is the worst thing this incident does to people? Or to people that continue to live; e.g. if the worst thing is killing them, then consider the emotions of the living that cared about the killed, or survivors with lives ruined or facing hardship or a bleak future. The consequences of your inciting incident must be awful or great for somebody, and you need your protagonist to be one of them.


Convert shape to line with a stroke in Illustrator


Example. I drew a line with a pencil, set stroke to 5 px and made a shape using Object->Path->Outline Stroke. Is it possible to convert this shape to line with a stroke again? 100% accuracy isn't necessary.



Answer




  1. Select your shape.

  2. Swap the fill back to stroke(shift x).


  3. Use the Scissors tool(C) to cut two end points on your shape (with the Scissors tool selected click on the first anchor point that was created when you used the pencil tool, and then click on the last anchor point that was created when you finished with the pencil tool.

  4. You should now have two paths similar to your original line. You can delete one of them

  5. You might run into trouble if your original pencil line overlapped itself.


General name for the website style that appears in wide pages


The front page on https://trello.com/ is an example of something I am seeing more and more frequently on the web.


It is almost like a set of slides, stacked one on top of the other.


Here's another example: https://www.atlassian.com/ And another http://www.thoughtworks.com/


Is there a name for this style? Is there a history or source of where it came from?



Answer




The paucity of answers show that the industry hasn't settled on a term yet, but my personal preference is Long-Page Scrolling Design. This has been around for at at least a couple of years, being identified as a trend by Usability101.net as early as June 2012.


What could conceivably have started out as a way to facilitate super trendy (and overdone) parallax scrolling features has evolved into a design pattern that's proven to be quite sticky. Here are a couple of reasons:


A Step Up and Away from Carousels



The major benefit I've seen from long-page design is that it frees the designer from having to use carousels or sliders. If the idea is to invite scrolling, then the concept of "the fold" (and the need to cram stuff above it) loses strength.


More Narrative-Friendly


Breaking the page into separate sections (or 'slides' as you've called them) makes it easier to tell a story. First this point, then that, then the other. It also makes it excellent for showing off product features. The example I generally use when describing this type of design is the Moz.com products page


--


As a potentially controversial side note, I think Apple's iPhone product feature page design has been the stand out leader when it comes to implementing this pattern. The latest version of the iPhone 6 design feature page is an superb example of long page scrolling design. Utilizing understated HTML5 animations to further invite and encourage the user to scroll their way through an expertly crafted narrative.


Some Links to Check Out



design - Dropping the UX title in a fully mature organisation




I have not worked in a fully mature organisation (feel free to rate yours using any type of UX maturity model), but I want to know whether the designers and developers are simply called designers and developers rather than having the title UX designer. I would assume that in a completely user-centred organisation there would be no need to make this distinction, but I am interested to know if this is actually the case.


In fact, I know that some people consciously make the choice of removing the term 'UX' from their job title because they feel that design should be focused on solving the problem for the people that require the solution and that 'UX' is simply one of many philosophies or approaches that can be used to tackle the problem.


I would like to know what the design job titles are in a fully mature user-centric organisation.





svg - Inkscape: reusable components / objects?


We used Adobe Flash for SCADA visualization in the past, but we want to move towards SVG for new web-based SCADA projects.


SCADA often uses the same, interactive symbols (like pumps, valves, ...) within the same document and with Flash I used to create a "Movie Clip" for such symbols/objects. Whenever I needed to modify a symbol I could simply modify it's Movie Clip and all instances of it automatically updated themselves in the same way. This was very handy.


Is something similar possible with Inkscape (or any comparable SVG drawing program)? I'm talking about drawing a symbol and create several clones (not simple, independent copies).



Answer




You can do something similar within in a single document, by using the clone tool.


You could for example draw all the originals shapes, put them in an area of the drawing (maybe on a separate layer, that you can show/hide),and then clone each object to use elsewhere (Edit > Clone > Create clone). When you edit the original element, all clones will be updated.


It's a workaround of not having a real "library" or "palet" of symbols like in Illustrator.


I'm not sure if it's possible to make clones work accross different documents though.


Wednesday, January 28, 2015

What types of resources and primary sources are helpful for getting into historical character?


When you are developing characters for fiction, and particularly historical fiction, what kinds of resources do you find most helpful in establishing a distinctive voice?


Two suggestions I've heard have been:




  • looking for personal correspondence and diaries of real people who are substantially similar to your character (date, age, gender, place of origin, social status)

  • reading books, particularly fiction, published in the time period you wish to write about


What types of resources and primary sources are helpful for getting into historical character, and why?


I am particularly looking for sources to facilitate making characters' voices (in their direct speech, as well as their writing and thoughts) both distinctive and authentic to their historical context.




Save buttons that don't save


Generally there are two kinds of windows I make: windows with Ok/Cancel buttons, and windows with just a Close button. The implied understanding is that Ok/Cancel windows don't save anything until you press Ok, and that Close windows either don't save anything at all, or else what they save is saved the moment you activate it.


For Close windows that save things immediately, a request I often get from clients is to make the Close button say "Save" or "Save and Exit" rather than "Close". If they want it, I do it, but this forever irritates me since I have made a button that says that it does something that it doesn't do. Should I refuse to rename these buttons this way, or should I just "suck it up"?


(I've even once used a status bar to say "Saved." every time something is saved, but that still wasn't good enough. They still wanted the Close button to say "Save and Close".)


EDIT: To clarify a little, since there was some confusion, as per my comment below: the particular forms with the problem update to the DB whenever anything on the form is changed. (i.e. on LostFocus events, or CheckedChanged events, etc.) The users want to "Save" the data by pressing a button, even though the data is already saved. Even when I explain it to them they still want a button that says "Save" even when the button doesn't do any saving.



Answer




If I understand you correctly, you have a window that automatically saves changes for the user as they adjust items. Currently you have a button that say "Close" on this window. Your clients are requesting you to rename this to "Save and Exit". But since the save action has already happened while they're making the changes, the button really just closes the window. So it's mislabelling it if you rename it to "Save and Exit".


In this case, it's unclear to the user when the saving is happening. If you put in a in progress save indicator (e.g. a little toast message or inline save notifications) this will make it much clearer their changes are saved right away.


Edit: Here's one way to show inline saves


mockup


download bmml source – Wireframes created with Balsamiq Mockups


As to the close button, consider renaming it to "Done" or "Finish with Changes". A lot of times, users associate "Close" with "just close the window, I'm not touching anything." This change will make it clear to users that this is the next step when they're done editing.


creative writing - How to make "Joffrey like" characters for a "kick that son of a bitch " moment


We know what I'm talking about. The feeling when the legal side of a story doesn't bothers us too much because we want to see Joffrey getting strangled with a string of sausages.


So basically we want to see a character killing a hated one in the most brutal fashion possible. And all of this can freely happen because they were such a terrible persons to my birds in general, and the reader wanted him to be not just only merely but really most insanely deaaad.


However, there is a large pitfall, namely: strawmans and cartoon villains. After all, they must be easy to hate. And it's kinda hard to pull-off without damaging their personalities, as people rarely tend to be evil for no purpose.


For instance: Mao Zedong killed millions of innocent people and birds, but he also wanted to make China great again. Too bad that his massive ego, uneducatedness, and delusions ruined everything, but mostly the birds. (and 50 million people, but who cares about them, there are still like, 7 billion of us here, so we are really disposable.)



TL; DR - I'm interested in general tips to make a villain "Joffrey like" so the main anti-hero can smear them over a brick wall without regrets.



Answer



Someone who deserves to be smeared over a brick wall doesn't have reedeming features.


That's not to say the villain is stupid, or one-dimensional, or his/her only motive is "I like to be eeeeeeevil." But if you are trying to create a character "who needs killin'," then don't give him or her any good characteristics. Your villain shouldn't be physically attractive, or a sharp dresser. (Military uniforms are more imposing than sharp.) S/he shouldn't get off darkly funny one-liners, or have a pet which is treated well, or spare anyone from harsh treatment.


This should be a person who always puts his/her own interests first — even further, someone who always puts his/her pleasures first, above anyone else’s consideration, above anyone else’s life.


Tyrion gave Joffrey a beautiful book of history (in a society which doesn’t appear to have the printing press, so every book is hand-lettered). Joffrey immediately chopped it into pieces with his sword because he wasn’t interested in learning anything. He killed the prostitute Roz because he was bored and wanted to use his new crossbow. He displayed many instances of violence in which he took great glee, and was then cowardly in the face of danger (or Tyrion slapping him). We were happy to see Joffrey die because every choice he made, every action, every word, was only about putting himself and his wants first.


Ramsay Snow/Bolton, another all-out GoT villain, skinned people alive, chopped off bits of his prisoners, tortured them mentally and physically, sent his dogs to hunt people down and tear them apart, committed rape, et cetera. (He’s even worse in the books. On the show he at least has the actor’s physical charms.) Again, it was for his own gleeful pleasure — in fact, his father, a more cold-blooded pragmatist, scolded him for being tactically stupid with his excesses.


Petyr “Littlefinger” Baelish, on the other hand, is certainly out for himself, but he also can speak kindly and give gifts. He’s a good-looking man, dresses handsomely, and does favors for his allies. While those favors are always with an eye to what the ally can do for him later, and while he is entirely capable of murder, planning murder, selling someone into slavery, running a rough brothel, castigating a woman whose child was just killed, and other ills, we the audience can appreciate his schemes, his bons mots, and his chemistry with other characters like Varys.


Your villain’s wants can be just about him/herself, or they can be about a nation or empire etc., or a religion/deity, but someone due for chunky salsa karma will have nothing for the audience to appreciate or identify with.


ETA armatita makes a good point in the comments, which I'll append: If you want your audience not just to hate your villain but actively cheer for his/her demise, the villain's evil has to be personal. Ramsay raping a random woman is terrible. Ramsay raping Sansa (a character we've watched grow up, who has gone from innocent and airheaded to experienced, smart, and capable), on their forced wedding night, in Winterfell, is a personal horror. We identify with Sansa, so now we want Ramsay to die. We as the audience want revenge.



mobile web - Which share icon is the right one? Or should it adapt?



this is not a question regarding a particular problem, it's rather asking for your opinion. Let's say we have a website. It is not visited significantly more often by users of any of the fractions, so statistical argument should be left aside. Which share icon to use when grouping share options? Or maybe should it adapt to the OS user visits the site from? And can we transfer it anyhow to the desktop, so that users who got used to particular representation on mobile can see it also on desktop?



Answer




Which share icon to use when grouping share options?




If sharing is important for your business, then use the sharing icons users will recognize. The faster a user finds her favorite social network icon, the likelier she will post the link. Any cognitive load, as in using unfamiliar icons, will decrease the willingness to share content.


That means that you should use the icons recommended on each social media. Share, tweet and pin it as long as the user gets what she expects while clicking the buttons. One example of how this could work, and be nicely grouped is Mashables' articles where sharing activities comes just below the headline but before content:


enter image description here



Or maybe should it adapt to the OS user visits the site from?



That is of course an option, but having real icons instead of the anonymous iOS share or an Android share icons are preumably better. And since this is mobile web, users more familiar with their own mobile web browser sharing buttons will use those instead. An exact duplicate icon on the web page could be confusing.



And can we transfer it anyhow to the desktop, so that users who got used to particular representation on mobile can see it also on desktop?




That's the tricky part, and what is the real argument for using the social medias recommended icons instead of iOS or Android icons. You will not be wrong using standard social media icons, but you could go wrong using iOS or Android icons. Safety first.


interest rates - Historical calibration of Hull-White model


I have a question concerning 1-factor Hull-White model. For my master project I need to calibrate it to compute Counterparty credit risk metrics. I know that the model might be calibrated either for risk-neutral measure (in CVA applications) using market-traded swaptions or caps or for historical measure. This is where I am stuck at the moment. Can anyone offer a good paper / or some idea how to calibrate mean reversion parameter a and variance sigma to the historical data? What historical data do I have to use? And how to perform the calibration step-by-step?


If anyone also has also a solution in Matlab and could share it - that would be also highly appreciated =))


Thanks in advance





Tuesday, January 27, 2015

organization - Organizing your Universe?


When writing, I always have tons of ideas about the universe I'm creating as a whole: People, Places, Timelines.


I'm just struggling to organize it. I'd like to avoid inconsistencies in later stories, requiring the need for a retcon or embarrassing reactions from your audience.


Should I try a Wiki like MediaWiki? That requires a Web Server and database and is just very "heavy". Should I use the Master Catalog in Celtx? That keeps everything in once place and I can easily share it and take it with me on my laptop, but it's not exactly a great interface. Should I just have a ton of Word Documents? That is even worse, now I can't really link between them properly. One big Word Document? Really hard to keep a good overview.


What do YOU use to keep track of your world?



Answer



Tools like Scrivener help me out a lot. It lets you build one workspace that contains character profiles, scene descriptions, notes (and of course, your story).


Using Clipping masks in Illustrator


Im new to Illustrator and have found the clipping mask is not so easy compared to Phtoshop. Could any one tell me how i can make this line texture a clipping mask over the circle? enter image description here




forward - Characteristic functions for options on futures


Using simple delta-probability decomposition, the price European call options a non- dividend paying asset can be computed as



\begin{equation} C(T,K) = {S_0}{\rm{ }}{\Pi _1} - {e^{ - rT}}K{\rm{ }}{\Pi _2}, \end{equation}


with


\begin{equation} {\Pi _1} = \frac{1}{2} + \frac{1}{\pi }\int_0^\infty {{\mathop{\rm Re}\nolimits} \left[ {\frac{{{e^{ - iw\ln (K)}}{\psi _{\ln {S_T}}}(w - i)}}{{iw{\psi _{\ln {S_T}}}( - i)}}} \right]} \;dw, \end{equation}


\begin{equation}\label{pi2} {\Pi _2} = \frac{1}{2} + \frac{1}{\pi }\int_0^\infty {{\mathop{\rm Re}\nolimits} \left[ {\frac{{{e^{ - iw\ln (K)}}{\psi _{\ln {S_T}}}(w)}}{{iw}}} \right]} \;dw, \end{equation}


and where ${\psi _{\ln {S_T}}}$ is the characteristic function of the log-asset price. For instance, for the Heston and Variance Gamma models, the corresponding $\psi^{H}_{\ln {S_T}}$ and $\psi^{VG}_{\ln {S_T}}$ are given by:



  • Variance Gamma


\begin{equation} \psi _{\ln ({S_t})}^{VG}(w) = {\left( {\frac{1}{{1 - i\theta vw + ({\sigma ^2}v/2){w^2}}}} \right)^{t/v}} \end{equation}




\begin{equation} \psi_{\ln(S_t)}^{H} (w) = e^{ C(t,w) \overline{V}+ D(t,w) V_0 +iw \ln(S_0 e^{rt})}, \end{equation} where \begin{eqnarray*} C(t,w) &=& a \left[ r_{-} \cdot t - \frac{2}{\eta^2} \ln \left( \frac{1-g e^{-ht}}{1-g} \right) \right], \\ D(t,w) &=& r_{-} \frac{1-e^{-ht}}{1-g e^{-ht}}, \\ \alpha &=& - \frac{w^2}{2}- \frac{iw}{2}, \quad \beta = a - \rho \eta i w , \quad \gamma = \frac{\eta^2}{^2}, \\ r_{\pm} &=& \frac{ \beta \pm h}{\eta^2}, \quad h= \sqrt{ \beta^2- 4 \alpha \gamma}, \quad g= \frac{r_{-}}{r_{+}}. \end{eqnarray*}


These equations, however, are intended for options on spot prices. If I were interested in options on futures, which modifications should be made to the formulas above?(because it is not as straightforward as simply using $F_0$ instead of $S_0$ and removing the effects of $r$, right?)



Answer



I generally agree with Quantuple's comment.


I explicitly discuss the case of the variance gamma model, though most of this also applies to Heston. First note that in case of the variance gamma model, the characteristic function that you presented is not the one of the logarithmic stock price under the risk-neutral probability measure. Let $X$ be a variance gamma process as in Madan et al. (1998). The characteristic function of $X_t$ is


\begin{equation} \phi_{X_t}(\omega) = \left( 1 - \mathrm{i} \theta \nu \omega + \frac{1}{2} \sigma^2 \nu \omega^2 \right)^{-t / v}; \end{equation}


see Equation (7) in the original paper (note that there was originally a typo in your question). We now look for a drift term $\gamma$, such that the process


\begin{equation} Y_t = \exp \left\{ \gamma t + X_t \right\} \end{equation}


is a martingale. You find that


\begin{equation} \gamma = -\ln \left( \phi_{X_t}(-\mathrm{i}) \right). \end{equation}



Your model for the stock and forward prices respectively is then


\begin{eqnarray} S_t & = & S_0 \exp \left\{ (r + \gamma) t + X_t \right\}\\ F_t(T) & = & F_0(T) \exp \left\{ \gamma t + X_t \right\} \end{eqnarray}


with characteristic functions


\begin{eqnarray} \phi_{\ln \left( S_t \right)}(\omega) & = & \exp \left\{ \mathrm{i} \left( \ln \left( S_0 \right) + r + \gamma \right) \omega t \right\} \phi_{X_t}(\omega)\\ \phi_{\ln \left( F_t(T) \right)}(\omega) & = & \exp \left\{ \mathrm{i} \left( \ln \left( F_0(T) \right) + \gamma \right) \omega t \right\} \phi_{X_t}(\omega) \end{eqnarray}


You can now re-use your general expressions for $\Pi_1$ and $\Pi_2$ in terms terms of the appropriate characteristic function as these are just the corresponding exercise probabilities under the respective measure. Your pricing formula then becomes


\begin{equation} C_0 = e^{-r T} \left( F_0(T) \Pi_1 - K \Pi_2 \right). \end{equation}


If you want to convince yourself that this is correct, then you could work through the detailed steps given e.g. in Schmelzle (2010).


References


Madan, Dilip B, Peter P. Carr and Eric C. Chang (1998) "The Variance Gamma Process and Option Pricing", European Finance Review, Vol. 2, pp. 79-105


Schmelzle, Martin (2010) "Option Pricing Formulae Using Fourier Transform: Theory and Application", Technical Report



Why do I get this dialog when I open the pattern editor in Illustrator CC?


I created a pattern and dragged it to the swatches panel. Now I keep getting this dialog every time I double click the pattern in the swatches panel to open the pattern editor mode.



A clipping mask was created around the pattern tile bounds to preserve legacy pattern appearance.


For best results, release the clipping mask when changing the tile size or editing art that overlaps the tile edge.



enter image description here



Answer




You probably created the pattern and have a clipping mask around it, meaning that it clips (cut's off) surrounding artwork to fit into a shape:


You can undo (release) this by: Right click→Release Clipping Mask




How clipping masks work:


Left side: Pattern + shape I want to crop it into


Right side: Clipping result


enter image description here


Read more about clipping masks at Adobe


programming - Option trading API other than Interactive Brokers



I'm looking for an options broker that provides an execution API.
I'd like to ideally test on a papertrading version of it before connecting to a real execution engine. I know IB offers that, but they require a funded account with 10K min balance. I was hoping for no more than 2-3K.


I would appreciate your suggestions



Answer




My research so far:


OptionsXPress - with commissions of about USD 1.25/contract. USD 1K minimum account opening.


Interactive Brokers (IB) - with commissions of about USD 0.70-1.00/contract. USD 10K minimum account opening.


TradeStation - with commissions of about USD 1/contract. One point to note is that TradeStation's EasyLanguage platform is NOT a true API and orders can only be executed via EasyLanguage and it's not a full API as per the sales rep. So, if you want to execute more complicated trading strategies (e.g. if front month call IV exceeds) you won't be able to execute it there. USD 1K minimum account opening.


Lightspeed - with commissions of about USD 0.60/contract. USD 30K Minimum account opening for using APIs.


vector - Space between 2 paths in Illustrator


How can I align 2 paths perfectly? No matter what I do I get a little space (gap between the 2 paths I create, and they are straight lines not as I saw in other questions with pixel problems)



An example:


Example of gaps between paths


Between every triangle is a little space, like in the example. It isn't obvious and it doesn't bother, but if I use the image (as an SVG or something) it is really obvious.



Answer



You can not really affect the way your SVG renderer will draw the image. Its possible that it will outline to white even if there is no gap. This said, you can make the triangles underlap each other, so that each succeeding triangle is behind the other, this should give the SVG engine the hint.


Compare:


SVG Preview in Firefox


Image 1: Preview in Firefox. Source: http://imgh.us/tris.svgz


with:


SVG Preview in Firefox with path underlap



Image 2: Preview in Firefox with underlap. Source: http://imgh.us/tris2.svgz


The gap is visible in the screen capture of image 1 between red and orange triangles. But is not in place in the second example as the triangles overlap giving the rendering engine the hint it needs to resolve the issue.


Utility to download historical Implied Volatility data from Interactive Brokers?


Does anyone know of a utility that can download historical Implied Volatility (IV) data from Interactive Brokers' Trader Workstation?



Answer



check out max dama: http://www.maxdama.com/


usability - Editing related text groups


Consider an application which allows an administrator to enter information about cities which could be viewed by others. There are only three groups (continent, country, city) which they can (but not must) add content to. When adding a city, the application magically knows the continent and country of the city, and the continent and country text will be used. If a city is edited and the continent text is changed, all cities which are located on that continent will have their continent text changed. Please assume users will only be directly viewing "cities", and will view continents and countries only as they are associated with a city. While the administrator must be aware that changing continent or country text changes other cities, the front-end viewers should not be aware that there are three distinct groups.


How should an administrator add/edit the continent, country, and city text for a given city?




San Francisco (backend)

Continent:


North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.


Country:



The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.


The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.


City:


San Francisco, officially the City and County of San Francisco, is the cultural, commercial, and financial center of Northern California and the only consolidated city-county in California. San Francisco encompasses a land area of about 46.9 square miles on the northern end of the San Francisco Peninsula, which makes it the smallest county in the state.




San Francisco (frontend)

North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.


The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.


The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.


San Francisco, officially the City and County of San Francisco, is the cultural, commercial, and financial center of Northern California and the only consolidated city-county in California. San Francisco encompasses a land area of about 46.9 square miles on the northern end of the San Francisco Peninsula, which makes it the smallest county in the state.



San Diego (frontend)


North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.


The United States of America, is a federal republic composed of 50 states, a federal district, five major territories, and various possessions.


The 48 contiguous states and Washington, D.C., are in central North America between Canada and Mexico. The state of Alaska is in the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific.


San Diego (Spanish for "Saint Didacus") is a major city in California, on the coast of the Pacific Ocean in Southern California, approximately 120 miles (190 km) south of Los Angeles and immediately adjacent to the border with Mexico.


Mexico City (frontend)


North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.


Mexico, officially the United Mexican States is a federal republic and sovereign nation located in North America. The country is bordered to the north by the United States; to the south and west by the Pacific Ocean; to the southeast by Belize, Guatemala and the Caribbean Sea; and to the east by the Gulf of Mexico.[13] Covering almost two million square kilometres (over 760,000 sq mi), Mexico is the fifth largest country in the Americas by total area and the 13th largest independent nation in the world.


Mexico City, or the City of Mexico, is the capital of Mexico. As an "alpha" global city, Mexico City is one of the most important financial centers in the Americas. It is located in the Valley of Mexico (Valle de México), a large valley in the high plateaus at the center of Mexico, at an altitude of 2,240 metres (7,350 ft).


Vancouver (frontend)



North America is a continent entirely within the Northern Hemisphere and almost all within the Western Hemisphere. It can also be considered a northern subcontinent of the Americas. It is bordered to the north by the Arctic Ocean, to the east by the Atlantic Ocean, to the west and south by the Pacific Ocean, and to the southeast by South America and the Caribbean Sea.


Vancouver officially the City of Vancouver, is a coastal seaport city on the mainland of British Columbia, Canada. The 2011 census recorded 603,502 people in the city, making it the eighth largest Canadian municipality. The Greater Vancouver area of around 2.4 million inhabitants is the third most populous metropolitan area in the country, the second largest city on the United States–Canada border, and the most populous in Western Canada.




How do I set eyedropper settings using Photoshop ExtendScript (Javascript)?


Is there a way to set Photoshop's eyedropper settings (sample size, sample, show sample ring) in a script? Or, failing that, use the script to find out what the current settings are? Thanks.


Eyedropper settings in photoshop



Answer



Based on some googling, it sure doesn't seem like it's directly possible. However, you can use scripting listener/action manager to change the tool preset.


So... maybe you could make a tool preset for each sample size you need and change the tool preset instead.


This method does have a few major drawbacks:



  • One downside is that it saves all tool settings for the eyedropper, so if you need different sample layer settings too, you'd need to create even more presets...

  • Not to mention the tool preset file .tpl would need to travel with the script, or you'd get issues down the line.


  • A little bit of a drawback is that unless your tool preset list is showing presets for all tools, which it likely isn't or you can't assume it is, you can select a preset only if the correct tool is first selected.


Here's code that selects the eyedropper tool and activates a preset that I named 3 by 3 Average (All Layers).


selectTool("eyedropperTool");
selectToolPreset("3 by 3 Average (All Layers)");

function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };

function selectTool( toolName ) {


var desc78 = new ActionDescriptor();
var ref38 = new ActionReference();
ref38.putClass( sTID( toolName ) );
desc78.putReference( cTID('null'), ref38 );
desc78.putBoolean( sTID('dontRecord'), true );
desc78.putBoolean( sTID('forceNotify'), true );
executeAction( cTID('slct'), desc78, DialogModes.NO );

};


function selectToolPreset( toolPresetName ) {

var desc75 = new ActionDescriptor();
var ref36 = new ActionReference();
ref36.putName( sTID('toolPreset'), toolPresetName );
desc75.putReference( cTID('null'), ref36 );
executeAction( cTID('slct'), desc75, DialogModes.NO );

};


I used the Xtools script: LastLogEntry.jsx to get the last Scripting Listener entry and clean it up a little.


How to create a decreasing stippling or halftone effect?



For lack of a better name, I'm trying to create a decreasing stippling effect like this: Decreasing Stippling


My first inclination was that this could be created in Photoshop with some sort of filter effect. I was thinking along the lines of creating a smart object, applying a filter effect, then using a gradient on the filter mask to decrease the effect. This would allow for the possibility of a curved edged like you see in the image. No dice though, there doesn't seem to be an effect that quite does this.



The problem with searching for this effect is that I don't know what it would even be called. I've seen it implemented all types of posters though, so it seems to be generally used.



Answer



To be honest, the easiest way to pull this off is via the Phantasm Plug-in from AstuteGraphics.com for use with Adobe Illustrator. There is a free 30-day trial which would allow you to use it a while without having to pay anything.


It's a simple effect you can apply to a gradient filled shape, any shape, and then adjust the halftone effect.


Phantasm


For halftone effects, I've not seen anything as versatile or powerful as the Phantasm plug in in any application.


You could try the Pixelate > Color Halftone... filter in Photoshop then desaturate or use one channel from the output. However, I find controlling Photoshop's color halftone filter a bit frustrating. It generally takes a lot of trial and error to get only close to what you really want.


You could also find a printed halftone pattern and scan that and then mask and distort to fit a shape. Your sample appears quite distorted and that may have been the method used there.


Another option is to create a series of paths, then either set them to dotted paths in Illustrator and use a width profile to control the size of the dots. Or stroke a series of paths in Photoshop then scale portions. None of these comes anywhere close to what the Phantasm plug in can do in 30 seconds.


Monday, January 26, 2015

volatility - Why is the VIX futures market usually in a state of contango?


I'm a VIX newbie and I'm trying to understand why the VIX futures market is usually in a state of contango.


All I can figure is that the sellers of VIX futures contracts demand high "prices" (because the seller is the holder of the short position and makes money when the price falls), and since there are willing buyers, namely ETNs and ETFs that are trying to track the S&P 500 VIX SHORT-TERM FUTURES INDEX (SPVIXSTR) through the purchase and sale of VIX futures, the contracts get sold.


Also, the farther out the futures contract expires, the less certain the seller is about what the value of the VIX and the SPVIXSTR will be at the future's expiration date. The greater uncertainty over a longer term results in the seller demanding higher premiums over a longer term than he would demand over a shorter term.



It seems like a prudent buyer of VIX futures wouldn't buy contracts that are priced so high.


It seems like the VIX futures market should be in a state of contango about as frequently as it is in a state of backwardation.


What causes contango in the VIX futures market, and why is it the usual state of the market?



Answer





  • Your questions about contango in VIX futures have close analogies in options too. The Black & Scholes model suggests that all time frames and all strikes should have the same implied volatility, but they don't. I think one of the reasons is that the B&S model assumes that stock returns are distributed in a normal (gaussian) distribution, but the actual returns don't match a gaussian distribution all that well. For example the actual occurrence of big crashes / gains is much more likely than a normal distribution would predict. Since crashes do occur people are willing to pay what the B&S considers a premium to have some insurance against downswings. I view it as being an insurance cost, so the longer youwant the insurance for, the more it will cost you. If you look at the term structure of SPX options you'll see a term structure that looks a lot like the VIX futures curve. The VIX futures on settlement will use the SPX options expiring one month later as the prices for settlement (e.g., Nov VIX futures will settle to Dec SPX options).




  • The VIX futures tend to go no higher than around 9% above their equivalent SPX option VIX style implied volatility value , so I suspect above that some sort of arbitrage gets attractive, and the price difference is limited.





  • One other thought about VIX futures. They are attractive because you don't have to place your bets as specifically as you do if you are buying out of the money puts for insurance against crashes. If you buy puts and the market rallies your puts are left very out of the money, whereas the VIX can spike up regardless of where the value of the SPX index is. Clearly people are willing to pay a premium for VIX futures, and I don't think they are stupid. At lot of them lived through the 2000 and 2008 bear markets--that leaves an impression on you.




plot - What if neither the protagonist nor antagonist wins?


This may seem like an awkward scenario for a story's ending. My plot revolves around a constant struggle of the protagonist against the antagonist's forces, and eventually the antagonist himself. I've had some trouble finding an appropriate ending - I've already theorized about having the antagonist succeed over the protagonist, subverting a common trope of the "hero always wins" dilemma. However, recently another proposition had also crossed my mind.


What if neither the protagonist nor the antagonist is successful? Is this realistic, as a general idea? Would it be possible for neither side's goals to be accomplished, and in their attempt to fulfill their ambition, they sacrifice themselves and fail as a result? It is indeed partly to give a sense of "unfinished scrutiny" as victory is given to nobody, and failure is awarded to both sides. While the antagonist is no longer a threat, the protagonist is no longer a hero.


I understand that this is only plausible if the two opposing side's motives are not solely to eliminate each other as individuals, in which case both would be the winners. Rather, their influence is what has been left damaged - the protagonist's positive influence has been destroyed, while the antagonist's negative influence has been destroyed as well. Overall, I see this as creating a sort of "neutral" effect - neither good nor bad has come out of the final climactic ending, because of the two ideological opposites that collide with each other and eventually collapse.


Is this kind of scenario technically impossible, because the concept of defeat for either the protagonist or antagonist is dependent on the other's victory?


This kind of concluding effect may seem quite vague and hard to grasp, as I'm not sure as to whether the ending to any story is meant to be based on a black and white perspective of success vs. failure on either side.




website design - Is it ok to add content when the users selects and "copies" something on the page?


Some websites (using tools like tynt) have started to add something a little surprising at first : When the reader copies part of the article or blog post, something, say the url of the piece, is added to the copied text.


Is this ok ? I see what they are trying to do, but I've always removed this additional info when pasting, and I feel that it is a way to force the user, akin to opening links in new windows.



Answer



In a marketing and publisher point of view what Tynt is providing seems very beneficial for their needs. On a UX point of view it's a double edged sword in my meaning.


You could argue that the user experience benefits from the auto generated addition to copied content since it seamlessly enables the receiver or "copier" of the content to keep track of its source. Thereby providing a shortcut that the user doesn't even have to initiate.


However, one could also argue that it is dangerously close to breaking the seventh Schneiderman rule of interface design, Support internal locus of control. I mean this because if there's no way to disable the feature, the system will format copied content in a way that may not meet the requirements of the user.


This is a hard question to get give a definite answer to, at least I find it so. It would be interesting to hear what other users have to say in this matter.


Sunday, January 25, 2015

fonts - Why do some letters look odd at 100% but not 200%?


I'm looking at a document both in InDesign and, after exporting to PDF, in Acrobat, and the strangest thing is happening to my font; some letters are looking different than they should when shown at 100% but look normal at 200%.


Look at the example below on some select words from the document: the m, n, i and l all look like they have a few pixels of a descender when viewed at 100%. When I zoom into 200%, the problem corrects itself. Any idea what's causing this? I'd like to get it fixed, because this PDF will likely be viewed on computer and not printed.


Screenshots of the two zooms


If it means anything, the font is ITC Stone Sans.




forms - Is it a good/acceptable practice to combine checkboxes with radio buttons for one question?


I work on a form, in which there are questions allowing either multiple choices or selecting just one. An example:



Which of the sweeties do you like:



  • [ ] chocolate

  • [ ] lollipops

  • [ ] cookies

  • ( ) none


In the above, [ ] represent checkboxes and ( ) represents radiobuttons. User can select multiple sweeties, but upon selecting "none" all the checkbox fields should be cleared, and vice versa: when "none" is selected, selecting any of the checkboxes should clear the radio in "none".


From UX perspective, is it ok to follow this way?


Edit:



Just to clarify: "None" does not mean "none of the above". Instead, it means that user does not like sweeties at all. In other words: the options included as checkboxes are just a subset of all possible sweeties. User can choose one/multiple of the sweeties or select "none". One conclusion is that the form does not cover a situation when user likes other sweeties than the ones listed as options, so definitely the form should also include "Other, please specify:" field as well.


Edit:


Ha! After 2 years I found it here:


User Experience Research Studies registration form


So at least I am not alone in my belief that this is the right way to do it.



Answer



There should never be just one radio button, as it breaks the user's expectations on how they work. Radio buttons are meant to allow selection of one and only one item from a set of several radio buttons.


If you really want to use radio buttons, you could either go with this approach:


() I like the following sweeties:
[] chocolate

[] lollipops
[] cookies
() I don't like sweeties.

Or you can change the "none" radio button to a "clear selections" button.


gui design - Importance of colors in a mobile application?


I am software + hardware engineer who possibly does a same common job as others with a similar qualification.


I am under the process of designing, developing and publishing a mobile application where a user can manage their money related data (precisely a finance related application). I aim to target all mobile devices (phones, tablets and whatever might come up next).


Currently I plan to make the design as simple as possible and as far as I have developed mobile apps in past, I prefer to avoid more colors from the app.


Hence, should it be a good idea to make use of only black and white (of course with some shades of the both, plus a few colors to show errors, warning etc) in my application?



Answer



I'm not sure why you have this hesitance against using accent colors in your app, especially in an app which I assume will display data records of different categories (expenses/income) in a timeline. The use of color coding to visually differentiate between the records sounds like a slam dunk for me.


Don't get me wrong, I'm not encouraging you to use a blue-ish/red-ish background with dark green text on top of it, not at all. Stick with a light white background with dark text for content, but please introduce some accent colors for CTA's/charts(which I think a financial app should have)/category titles/buttons/etc... Both for making interactive elements pop but also to make it visually appealing.



You say you want to use white and different shades of gray for your palette and then use red and yellow for errors and warnings. But unless you expect the user to trigger these errors and warnings regularly (which will probably make them abandon the app anyway) I think the app will be a visually bland experience. It can still be useful in the sense that it tells the user what they need to know, but a flat uninviting UI will not entice the user to explore the app whatsoever and any features you introduce in the future may therefore go unnoticed because the app tells the user in its visual representation "I'm uninteresting, I probably have nothing more to give you. Please, stop looking at me...".


To make the app successful you need to capture the aesthetic elements for your app.


Besides pantone colors, is there any refrence database for equally distributed fashion colors?


I'm trying to divide color space into 150-200 colors. I'm looking for Hex code/ RGB values and corresponding color name that is simple, well known & understandable by normal people. Is there any reference database I can use ?




charts - Best way to display users by location


I'm trying to find out which is the best way to display amount of users by location. In my application, you can create locations and sub-locations without limit. Then, you can assign users to each location. The thing here is that you can assign users in every level of your tree. For example, if you have Argentina > Buenos Aires, you can add users to Argentina and even to Buenos Aires.


Now, I need to represent in a chart how many users you have in each location, so I thought that a Pie could be a good idea in order to understand the percentage that each location has about the amount of users. The challenge is that you have a tree of locations, and you can assign users in every level.


I tried creating a graph in Highcharts but I think it's not too representative. If you take a look, South Park has 5 users and Brasil 40. The size of the piece of South Park it's similar to Brasil because of the hierarchy drawn, and that's not intuitive in a first sight.


Here's my example: http://jsfiddle.net/94y7z5ro/5/



Any ideas?



Answer



What about making the chart interactive, i.e. first you show all entry levels indicating that they are clickable. And all of the diameter of all 3 circles now.


Once you click on Argentina, it shrinks adding a new slice of a circle, now divided into Cordoba and Buenos Aires, while Brasil remains the same size. Of course Cordoba and Buenos Aires show they are expandable. Now, clicking on Buenos Aires makes a new slice appear, divided respectively.


See the picture below: enter image description here


login - How many atempts should you give a user before invalidating his password?



What I am trying to avoid here is brute force attacks on a user's password. And I am thinking about doing that by invalidating his password when too many attempts are made in the same minute, hour, day or something similar. The user credentials are for company employees on the road in an Android app.


But, at the same time, I do not want the user to make a few mistakes while inserting it and have it invalidated without any need.


How much is enough? Or, in alternative, how do I determine how much is enough?


Asking in another way, what is the maximum of mistakes a human can possibly do while inserting his password before contacting helpdesk?


Edit: The authentication mechanism is done through the network. The app gets updated information from a company server after the right user logs in.



Answer



This question has been asked multiple times throughout the StackExchange network over the years. Here's a summary of answers:



  • There's no clear research on the subject.

  • If you're in the financial industry and have to be PCI compliant, the limit is 6 attempts.


  • A brute force attack can be recognized using an algorithm. Follow this guide to create an algorithm detecting automated password attempts.

  • Account lock-outs and password attempts limits are put in place to prevent human attackers guessing passwords based on their knowledge of the victim.


Recommendations



  • Microsoft recommends at least 4 attempts and no more than 10.

  • Don't count duplicate password attempts (they probably thought they mistyped it)

  • Make the password hint about the primary password, and don't have a (weak) secondary

  • Allow a trusted party to vouch for the user, so he can change his password.

  • Lock the account in increasing time increments


  • Remind the user of password rules.

  • Lock accounts out for 30 minutes instead of disabling them completely.

  • Instead of locking accounts, present the user with additional security questions.

  • Check for CAPS lock being on (not an issue on mobile though).


See the complete discussion Why do sites implement locking after 3 failed password attempts? on Security.SE.


My personal recommendations


I deal a lot with a poorly-designed system where people frequently forget their credentials because they don't use the system often enough to remember them. The system automatically locks user accounts after (I believe) 5 unsuccessful attempts. The lock requires a member of my team to go to the management console, reset the user password manually, and send them an email also manually with the temporary password. The amount of time wasted is horrible, but the system is provided by a vendor and we can't change it.


Whichever system, protocol, and workflow you use, you have to make sure that your users in the field don't have the luxury to wait even 15 minutes to restore access to their account. Thus, you have to create some self-service reactivation process. It could be as simple as sending an email to the user with a password reset link.


Also, keep track of all system status indicators:




  1. Credentials have not been accepted

  2. Email with password reset instructions has been sent.

  3. The number of attempts left until the account is locked.

  4. Account locking notification and a brief descriptions of what to expect next.


Saturday, January 24, 2015

shapes - Photoshop CS5 Polygon Tool smooth corners "too smooth"


I'm trying to create an 8-sided shape with the polygon tool. This is not a problem, but if I want smooth corners for my shape and I check the option "smooth corners" its too smooth - its basical a circle.



Is there an "smoothness" option which I have to adjust?



Answer



Here's a simple workaround.


1) Create your polygon


2) Select it, and create a layer mask


3) Select the layer mask and smooth it.


4) Adjust the layer mask to include the smooth.


This way you maintain the actual polygon, you just mask the corners to make it seem rounded. This way is easily adjustable by further smoothing the mask or erasing the mask.


My result:


enter image description here



technique - How credible is wikipedia?

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