Friday, September 30, 2016

usability testing - How to test a website for visually impaired users?


What techniques should I be using when testing of a website for visually impaired users that commonly occur due to aging such as macular degeneration, needing reading glasses, possible loss of contrast ranges, etc.?



Answer



Note: The reason I wrote this answer highlighting the different checkpoints a person must do to ensure his site is accessible to people with limited vision is because I believe an understanding of the faults or design issues in the site will help define what the problems users might face while accessing the site


For starters, I strongly recommend considering testing your website to see how it handles screen readers as that is one potential user base you cannot avoid and also you cannot always assume that people might use magnifying tools to read content in case of low vision and screen readers are an expected accessibility tool not only for "blind" people but also people with limited vision. So by avoiding them you are technically alienating your own user group.


That said, there are some recommended practices about what should be done for ensuring visually impaired users can access your website.





Reduced visual acuity is probably the best-known aging problem, and yet websites with tiny type are legion. Sites that target seniors should use at least 12-point fonts as the default. And all sites, whether or not they specifically target seniors, should let users increase text size as desired—especially if the site’s default is a small font size.




  • Ensure design consistency: Most senior citizens are generally aware of the standard colors for links and would usually assume an item with that color is a link. Avoid trying to implement new design colors for links and other active interaction elements. To quote the same Norman Neilson report referenced before



Hypertext links are essential design components; using large text for them is especially important for two reasons: 1) to ensure readability, and 2) to make them more prominent targets for clicking. Also, you should avoid tightly clustered links; using white space to separate links decreases erroneous clicks and increases the speed at which users hit the correct link. This rule also applies to command buttons and other interaction objects, all of which should be reasonably large to facilitate easy clicking.




I also recommend having a look at this article from Mashable



Often times, simply making text larger is all that a user requires. Consider offering alternate stylesheets with larger font sizes and make sure your layout doesn't break when text-only zoom is enabled in the browser. Many visually impaired users will want to zoom in on the text without changing the scale of the entire site layout, which can lead to difficulties scrolling and tracking text over long lines.


Depending on your site's target market, you may also want to consider making the default font a few points larger, and if you're publishing articles or large quantities of text, it's a good idea to offer text-only versions, so the user can then manipulate the text however he likes.





Use a sans serif typeface, such as Helvetica, that is not condensed. Avoid the use of serif, novelty, and display typefaces.





  • Usage of color : Certain colors can be difficult for people with limited vision to precieve. There are also different types of colorblindness and you need to ensure that the colors you select can be understood by people with limited vision or even color blindness. You can also use a color blind simulator to see how your designs stack up such as http://colorfilter.wickline.org/ .Also ensure the color contrast is significantly high so that users can read the content without having to strain To quote the this article from color combos



Use of appropriate colors can be an important part of the ease-of-use for those people with special vision needs. Not all monitors reproduce accurately the colors you may have chosen for your web design. By staying within the recognized 216 “browser-safe color selections,” you can be assured that the colors you choose will be passed on without change. This is important because certain color combinations lose their effectiveness when the level of contrast is diminished to vision-impaired viewers. Degrees of hue, lightness and saturation can be less distinguishable, which can be a significant problem, especially if the colors are being used as primary indicators.


By exaggerating the contrasts or light differences between foreground and background screen space, the person with a vision-impairment can more easily differentiate the colors. For the same reason, never use colors of similar lightness next to each other. Lighten the lights, blue-green, green, yellow and orange and darken the dark colors, blue, violet, purple and red for the most effective use of contrast. The more dramatically different you can make each area, the more clarity your web page will have.


Removing extraneous graphics and “busy-work” can un-clutter your website. A clean and simple layout is much easier to read and navigate. Designing in black and white with minimal added colors for emphasis is the best approach. Yellow, blue, white and black are the least confusing colors for people with vision problems. In fact, while it may not be the most attractive, 24-point white or light yellow text on a black background is considered the most readable color scheme for online users.




  • Allow users to access your site by using the keyboard: While I know you mentioned you didnt want to support screen readers and I strongly dissuade you against taking such a step, also ensure your site can be navigated by keyboard as that would allow users to quickly navigate to content using the keyboard shortcuts while also allowing screen readers to scan the content. To quote this article from mashable




In addition to being useful to persons with screen readers, keyboard shortcuts can make site navigation for the visually impaired user far easier. With the addition of keyboard commands, it's possible to navigate a site with the use of arrow keys and a few quick keystrokes, eliminating the need to follow a mouse cursor across a screen — and the associated need to keep shifting visual focus. This can go a long way toward reducing eye strain and frustration. Many users with visual impairments surf the web on large monitors (23" or bigger), which can lead to a lot of head and eye movement, particularly at shorter focal distances. The less time the user has to spend following the cursor (which can easily become lost) around the screen, the better.



In closing here are some links worth checking out


Make Your Pages Accessible to the Visually Impaired


WebAim : understanding blindness


5 Web Accessibility Improvement Tools


research - How to write a character that knows a lot about explosives?


I'm writing a story where the main character makes and detonates bombs. The character could be considered a terrorist. I want to portray the character as an expert, but I don't know a way to obtain more information in the art of explosives without it ending up with the FBI or something monitoring my searching.


Pairing terrorist, bomb, and how to, or instructions in the search bar seems to be a bad idea.


Any help on where to get info would be appreciated.




business - What price should I charge for design services?


I was hoping I would find some people in the industry that could help me decide what's the best price to charge to design (in this case) business cards.


What are standard prices for professional designers?


From a firm point of view? From a freelancer?


I don't want to overcharge clients but I don't want to ruin the industry by underselling my services.




options - Setting the r in put-call parity?


Put-call parity is given by $C + Ke^{-r(T-t)} = P + S$.


The variables $C$, $P$ and $S$ are directly observable in the market place. $T-t$ follows by the contract specification.


The variable $r$ is the risk-free interest rate -- the theoretical rate of return of an investment with zero risk.



In theory that's all very simple. But in practice there is no one objective risk-free interest rate.


So in reality, how would you go about setting $r$? Why?



Answer



If your trades are collateralized/margined, you should use the rate paid on your collateral/margin.


What‘s the definition of static arbitrage?


Could someone give the strict definition of static arbitrage? I know what the arbitrage means but have no idea about the term "Static".


Thanks in advance!



Answer




A static arbitrage is an arbitrage that does not require any re-balancing of the portfolio. For example, the CME offers a mini euro future for 62,500 euros and a big euro future worth 125,000 euros. You could sell 1 big future and buy 2 mini futures and this would be a static arbitrage. Another example would be the forward price arbitrage.


A dynamic arbitrage is one in which you have to re-balance your portfolio. An example of this would be buying an under priced option in the perfect black-scholes world while continuously delta hedging.


Thursday, September 29, 2016

finance - Convergence of Spot and Futures prices


Any explanation I've found explaining why future and spot prices converge over time seem to only focus the explanation on why the spot and future price must be equal at maturity.


I understand that if the prices aren't the same at maturity, then an arbitrage opportunity will exist. But what's the explanation for the trend of convergence prior to maturity? I originally thought that this might be because the cost of carry decreases as time to maturity decreases, but doesn't this price behaviour hold true for non-commodity futures as well?


Thanks!





copyright - Can my character's name match someone in real life?


Is it legally OK that my character's name by coincidence matches someone's in real life, famous or not? (For example I am naming a character Aaron Hale.) The character's appearance and everything else is completely different. Probably a silly question but I can't find the answer anywhere so I'm kinda stuck.




Answer



I have a friend whose name is Michael Jackson--to make things worse, he is African-American--and no one has sued him so far. But that is real life. When you a writing a story everyone would expect you to name your characters deliberately and expect no coincidences.


While legal implications of the problem are beyond my expertise, I would steer clear of the possible matches of such sort, because they will be perceived as intentional, but since it is virtually impossible to create a modern day name which is unused, a standard disclaimer "this is a work of fiction and all resemblances to real people, live of deceased, are purely coincidental." might be all you need.


characters - Why do Popular Fantasy Novels of Today Feature Teenagers?


This could be a misconception of mine, but I've noticed that the popular fantasy novels of today seem to nearly all have main characters who are children or teenagers. I have a list of some off the top of my head below.


Why is this? Is there a drawback to writing a fantasy novel with an adult as the main character?





List of Fantasy Novels:



  • Fablehaven - main characters are two kids.

  • Harry Potter - urban fantasy but features a kid.

  • Inheritence Cycle - Features a teenager

  • Twilight - probably more romance than fantasy, but still features vampires and the like. Features teenagers.

  • I'm sure there are plenty of other examples.



Answer




It's somewhat of a misconception, and a crossing of borders in audience as well.


Those you've listed all fall into the bounds of Young Adult books - the target audience are teenagers and/or casual readers. The only possible exception are the latter Harry Potter books (but that is by deliberate design).


All these stories are 'coming of age' stories, and are designed to resonate with their intended audiences (often teenagers). Having the main, focal characters be teenagers automatically allows the vast majority of the intended audience to draw a connection with the story. They are mostly about the growth of the character and them discovering who they really are, something most teens (and young adults) resonate with.


The Inheritance Cycle and Twilight are also very simple books. Very simple concepts, no real depth and really, really simple writing. There's nothing challenging or confronting in them, they don't ask questions of the author and frankly aren't that memorable. They were successful because they were well marketed and written to a predictable formula and the popularity only really took off when movies where made of them. They were also relatively short-lived phenomena (anecdotally, I don't know anyone personally who finished reading the Inheritance Cycle - I personally lost interest partway through the third book). The same can be said of The Hunger Games and Mazerunner They are quick reads where you don't have to invest a great deal of time, effort or thought.


They are, in short, popular because they sell. They sell because they are marketable and they're marketable because they're light, easy reads that have no real depth but just enough sprinkling to make them "edgy" but not controversial. They are also aimed at and developed for a specific target market and the success is often dependent on feature films and associated merchandising.


Stephen King has this to say about them, and I think he sums it up quite well:



"I read Twilight and didn't feel any urge to go on with her. I read The Hunger Games and didn't feel an urge to go on. It's not unlike [my novel] The Running Man, which is about a game where people are actually killed and people are watching: a satire on reality TV. I read Fifty Shades of Grey and felt no urge to go on. They call it mommy porn, but it's not really mommy porn. It is highly charged, sexually driven fiction for women who are, say, between 18 and 25."



Harry Potter, and is a somewhat different beast and done so by deliberate design. The story grew up as the character and the audience grew up. It's still a coming of age story, but there is a depth to the latter books that simply doesn't exist in the other series. Many comparisons have also been made regarding the abilities and motivations of the authors themselves, but that's getting wildly off-topic.



In short though, the "Popular" Fantasy novels (that is to say the main-stream media reported ones at any rate) feature Teens because they are Teen/YA Stories.


As for Fantasy itself - that depends entirely on the story itself, and as many examples you can provide where teens are the focus, there are many, many more where they aren't:




  • Steven Errikson's and Ian C Esslemonts Malazan books (and all their offshoots) certainly don't.




  • Brandon Sanderson's Stormlight Archive





  • David Gemmell's Drenai series




  • Steven King's Dark Tower




  • Scott Lynch's Gentleman Bastards series




  • Brian McClellan's Powder Mage trilogy





The list goes on


labels - Toggle Buttons "Turn On" vs "Enable"



For about a year now, we've used toggle buttons on a couple of segments of our site. We try to be very consistent in our user interfaces, always using the same blue button styles for every clickable button.



On/Off Toggle


However, I've become paranoid of the intuitiveness of this button, realizing that there are two possible trains of thought.



"On is highlighted so it must be turned on"



Which is the default expectation.



"On is clickable, which means I must click it to turn it on"



A fair thought, because to perform an action, one usually clicks a blue button labeled with the action they'll be performing.





This lead to a concept, which addressed by two primary concerns. It removed the fact that the both states had the appearance of buttons, and made the blue button consistent with all our other uses.


Confusing Status Toggle


It was then suggested to me that "On" and "Off" are more likely to make sense from a non-technical user standpoint. However to label "Off" does not describe an action, making me think it should be prefixed as "Turn Off" and "Turn On" respectively. That is, until I realized the negative connotations to those phrases.




So my question comes down to, what should I put on the button and it's counterpart?


Am I going backwards with this entire thought process by deviating from what is becoming a standard with On/Off toggles?





Based on the chosen answer bellow, plus a large number of iterations, the following is what I settled on for this use case.



Status Toggle



  1. It maintained consistency with other action buttons.

  2. Color identification on the state helps quickly determine the status.

  3. Strong (active) wording "Running" and "Not Running" help people understand this is the current state over "Enabled" "Disabled" in our testing.

  4. Being verbose and explicit on the action button was necessary, some people still assumed "Disable Cron" on a button meant that cron was disabled, even when it said "Running" in green lettering next to it.



Answer



I think the major issue is having a single colour for action buttons and nothing explicitly indicating status. Colour is a very strong visual indicator and is more likely to be linked to status than a call to action.


The toggle button is definitely ambiguous. You could use an Apple-style slider



mockup


download bmml source – Wireframes created with Balsamiq Mockups


or some other visual indicator with a button in your house colour.


mockup


download bmml source


(First attempt with mockups. Hope that's intelligible)


Hotel Finder by name - should it take you directly to a hotel page if it matches the search, or to the search results page?


Here's the dilemma. To help users quickly find a hotel (the same could be true for a shop finder, pub finder etc) there is a search field on the homepage where they can type the search query. This could be postcode, hotel name, street name etc.


Once the search is submitted should the user be taken directly to the matching hotel page if one is found, or taken to the search results screen with the most likely result displayed as the first result so the user can see the other possibilities?


The problem with taking them direct to the specific hotel page is that they may have mistyped the address, or there may be multiple ones matching the result. Is it better for the user to see the list of posibilites so they can choose the one they actually want, or should they be presented with the actual hotel page so there is no need to view the full list?


I'm thinking that if there is a single clear result found then that page should be displayed, at other times the list of results should be shown. However, is this not an inconsistent method? - What if the user wants to see which hotels there are in and around Brighton, so they type in 'Brighton' and are not given a list of results but are taken to a specific page instead?



Answer



Taking the user straight to the 'single result' page could be detrimental in several ways in my opinion - not least of all it feels like the search isn't very powerful or adaptable.


What are the chances that the user only wants to see one result. Its Hobson's choice - but people like to feel that they have a choice.



If there is one result, then it's a perfect opportunity to also give the user other options by increasing the scope, such as suggesting that they widen the search to include a larger area, and giving them a direct link to do so. Or even something along the lines of 'we found one result within your search parameters, but we found another 5 results nearby'.It feels smarter and more friendly and you keep the consistency. It's much more desirable than the surprise effect of going directly to the page which bypasses a communication/confirmation step and takes control away from the user.


typesetting - InDesign: how to edit table text, cells and rows all at once?


My client created his book using Microsoft Word. He's sent me the file and I've placed it into InDesign in order to make it look beautiful and more pleasing to read. Everything went on well, except for the tables.



Since it's a book with a lot of pages and tables, I was wondering if there's a way to work around this issue without having to set every row, cell size, and font manually. All the errors below are from overset text in the tables.


enter image description here




Illustrator: Rotate list round each center


There is ideas, how to rotate a lot of objects around their each center?


rotate each of this number 90 deg now 1 by 1



Answer



This is actually quite easy:




  1. Select all the objects you want to rotate.

  2. Right click, and select Transform > Transform each....

  3. Enter the wanted Angle and click OK.



Wednesday, September 28, 2016

Photoshop - adjustment layer to change colors of multiple layers?


I remember I opened a PSD file which did this.


It had like 4 hidden "adjustment" layers, each for a specific color, and all the elements that used a certain color were being changed depending on which adjustment layer was visible.


Something like this:


enter image description here


Notice the visible "pink" layer. That layer should make a part of the graphic on the left pink.


And when you make the blue layer visible, that part of the graphic graphic should turn blue:


enter image description here


Does anyone know how can I achieve this?



Answer




ONE (of many possibilities) way to do this is as follows:



  • make the layer which you want to alternate the color of: rounded rectangle tool (U); pick 'shape layer' in tool settings, pick a solid color; draw shape.

  • set layer blending option: pick gradient, and set the shape to a grayscale gradient.

  • make a new adjustment layer, and pick 'color fill', pick color; set layer blending to 'Color'

  • repeat the previous step using a different color.


To control this more carefully, you can apply a layer mask, such as the shape of the base item so that the colorization only applies to the item itself...


adobe photoshop - Shrinking or expanding object with retaining it's original shape


First of all, I am sorry, but I don't even know how to address this question properly. It's best illustrated by pictures below. So question is: Is there some way, in any graphic program (both vector, or raster), how to resize an object, so it keeps it's original position and retain it's original shape, meanwhile it can be fit inside or outside of itself's original? (I know it's hard to understand, but hopefully the picture will tell more)


Below are two images - one on the left was made by selection contraction, however, it doesn't solve the problem, cause some part of the object are lost, when shrinking too much. The one on the right was made by moving path points, which was done by moving all the points accordingly one by one... The goal is to achieve something like image on the right but of course by some automatic process.


Thank you


enter image description here enter image description here




equities - How to get/estimate ask/bid price for backtesting for OHLC data?



As you know, most of the EOD data available have only OHLC price. I used to do back-testing using the Close price as both bid and ask. however, in real world, the bid and ask spread is huge and the bid/ask quantity is also never constant. Above that, the bid/ask price changes with every shares sold/bought. Therefore, my earlier back-test could never be implement in the real world. What approach should i do to get/estimate ask/bid price for backtesting for OHLC data?



Answer



If you want to backtest with closing prices, the best bet is to add a slippage to the trade price. Note, however, that transaction cost modeling is a large field within quantitative finance and there is no simple solution to estimate this.


characters - Is straight-up writing someone's opinions telling?


When I first learned about the "show don't tell" guideline, I believe it applied to everything. I have now learned there are many grey areas, like for example exposition, and that the most important thing to remember is that emotions must be shown, not told.


So, what about opinions? Attitudes people have, etc.? I'd say opinions and attitudes to certain things are integral parts of someone's personality, and if you're telling someone's personality, instead of showing it through their actions or conveying it through dialogue, then that's bad writing.


Here's the sentence in question that I am currently critiquing:



He [Visa] squared his shoulders, Reino respected confidence.




There is a conflict, between Visa and Reino. Now, I reacted to the fact that it says, straight-up "Reino respected confidence". I believed in such cases, one would show his respect and acknowledgement as Visa portrayed confidence. I.e.:



He squared his shoulders. Reino's forehead wrinkled as his eyebrows rose, looking at his apprentice's new posture.



Now, this writing is pretty terrible, but at least I'm showing his respect and acknowledgement. And another way I believe to do it, whilst still staying within the "show don't tell" guideline is to convey the information through dialogue/monologue/thought.



He squared his shoulders. This'll get him to listen to me. He respects confidence.



Not only is the fact that Reino respects confidence conveyed, but a little of Visa's personality is illuminated as well. Now, I probably did it a bit too on the nose, so that it is practically still "telling", but it is the concept I'm talking about.


Though, I honestly don't know. Perhaps it is completely acceptable and good writing to just write "...Reino respected confidence."? Perhaps that is even better than my options?





Photoshop plugin to export visual hints on spacing, margins, width & height



Is it possible to produce such design hints (on elements padding, spacing, width, height) automatically in photoshop? Is there any plugin that can potentially do this?


enter image description here



Answer



You can't do that in pure Photoshop. But PNG Express extension can help you. PNG Express extension can layout your design specifications onto your design.


transparency - Save Illustrator as PDF with transparent background


Is there a way to export my artwork as PDF so that it has a transparent background? Something like exporting objects only... whenever I try to save my .ai as pdf, it always comes with a full white background. If I try to save as eps, I get a chunky white background (where it has white rectangles behind the artwork only where the artwork exists, so there are transparent chunks).


If I export as png, I get an image like what I'm looking for. Is there any way to do that in a vector format?



Answer



Long story short, .eps is the slow cousin of .pdf. Use .pdf.


Your .pdf problem is, I think, no problem at all.. As long as you save your file as Pdf 1.4 or higher, you should be good to go. Pdf 1.4 is the earliest pdf version to support transparency.


Since you said that "it always comes with a full white background", I'm assuming that you tried viewing the .pdf in acrobat ( or any other preview thingie you might have used ), which showed you a white background. I'd say that pretty much every .pdf capable viewing application has a default setting that shows a white background for convenience.


You can just try opening the .pdf in some editing application like Illustrator or Indesign or Photoshop to make sure, or In Acrobat settings Cmd+K > Page display > Transparency grid, you can turn on the view that shows you the transparency grid that is much like the one Photoshop has.


Photoshop CS6 export to RGB 565 format


I googled this a bit and found an older post on the Adobe forums but that's for Photoshop CS3.


Photoshop BMP RGB 565


I was looking for the Advanced Mode option but couldn't find it. Is it still possible to save a bitmap in RGB 565 format from Photoshop CS6 (even with scripting) ? If so, how ?



Answer



First off, your image must be in RGB mode, then File > Save As...


Change the 'Format:' to BMP (*.BMP;*.RLE;*.DIB) and click the Save button.


In the "BMP Options dialog the comes up, click the Advanced Modes button.


Voila! There is your R5 G8 B5 option.


enter image description here



Tuesday, September 27, 2016

typography - Building hand-written fonts for lettering


I am looking to build a custom font from my handwriting for lettering a comic.



enter image description here


what professional tools exist to build such a font and export it into one of the mainstream formats (TTF, OpenType, or Type1)?


I am not a typography expert, but I imagine there are two approaches to this - a vector-based and a bitmap-based one. While I'm open for both ways, vectorizing the handwriting would surely be a very attractive option.


WYSIWYG kerning/pairing functions (with previews for each pair) would be much appreciated.


I can use Windows or Linux. Open Source is preferable, but I'd be prepared to cough up for a commercial solution too.


Tutorials on the process are most welcome as well, as I have never done this before.



Answer



I can assure you that FontForge can do everything that FontLab can, with the exception of two things (that come to mind right now): fancy visual Truetype hinting tools, and support of the UFO format that's widely used by script collections like RoboFab, Superpolator etc. That said, FontForge has a fine and useful Python API itself, which could be used for the same purpose. FontForge does, however, have a much more intuitive interface for writing OT Features and editing things like gasp tables.


FontForge's GUI is, well, special, because George Williams happens to have a dislike for both GTK and Qt. At first it may seem a bit unintuitive, but once you have the keyboard shortcuts down working with FontForge actually becomes very fast.


Also make sure you get the lastest version from SVN and compile it yourself. The binary releases were outdated and buggy (at least last time I checked).



business - What are some good ways to gain practical experience to add to my portfolio?


I passed the ACE exams for InDesign and Photoshop a few months ago, but I am stumbling on how to get practical experience.


I have a couple of years of news page design, and a very small number of non-newspaper work samples. I'm a mid-career professional and have spent most of my time editing.



I'd be very happy to do some jobs for free to beef up my portfolio, but I've had lousy luck finding any. Unfortunately, most of my editing clients are not design-friendly so I'm not having much luck with referrals that way.


Any suggestions would be very welcome!


How can I gain practical graphic design experience, without an existing network of clients?




color - Is it a bad idea to use grey buttons?


Our design team is thinking of using grey secondary buttons on our site. I'm concerned they may appear to be disabled to our users (especially when used with the primary orange buttons). There is a hover state on them so users would know they are not disabled when mousing-over.


enter image description here



Answer



Grey buttons can still be used, provided you can give enough indication that the button is indeed not disabled. You could have a darker font color, like this:


Grey (non-disabled) Buttons


Even then, this approach is not recommended. Seconding Pasha's thoughts, such an attempt to make grey buttons seem "non-disabled" might still not be convincing to all users. Unless you're bent on retaining the grey, you could try the following options:


(A)


Make your secondary buttons align with your website color palette. You could try coloring the buttons the same blue you have on your header:


Blue Secondary Buttons



Having buttons that match your color palette will help blend the buttons in with the rest of your theme, reassure users to the integrity of the site, and yet not create confusion about the secondary nature of the button since it lies alongside a vibrant orange button.


(B)


As an alternative, you could also try having the orange color scheme for all the buttons, but differentiate secondary buttons from primary ones by inverting the color scheme, as Koen said.


Orange on White Secondary Buttons


The story does not end here. Further to this, you'd need to work out the color schemes for the hover state, depressed state and disabled (if needed) state of these buttons. Good luck with that!


calibration - Breeden-Litzenberger formula for risk-neutral densities


Based on this topic: How to derive the implied probability distribution from B-S volatilities?


I am trying to implement the Breeden-Litzenberger formula to compute the market implied risk-neutral densities for the S&P 500 for some quoting dates. The steps that I take are as follows:


Step 1: Extract the call_strikes c_strikes for a given maturity T and the corresponding market prices css.


Step 2: Once I have the strikes and market prices, I compute the implied volatilities via the function ImplieVolatilities.m I'm 100% sure that this function works.


Step 3: Next, I interpolate the implied volatility curve by making use of the Matlab command interp1. Now, the vector xq is the strikes grid and the vector vqthe corresponding interpolated implied volatilities.


Step 4: Since I have to volatility curve, I can compute the market implied density: \begin{align} f(K) &= e^{rT} \frac{\partial^2 C(K,T)}{\partial K^2} \\ &\approx e^{rT} \frac{C(K+\Delta_K,T)-2C(K,T)+C(K-\Delta_K, T)}{(\Delta_K)^2} \end{align} where $\Delta_K = 0.2$ is the strike grid size. I only show the core part of the Matlab program:


c_strikes = Call_r_strikes(find(imp_vols > 0));

css = Call_r_prices(find(imp_vols > 0));

impvolss = ImpliedVolatilities(S,c_strikes,r,q,Time,0,css); %implied volatilities
xq = (min(c_strikes):0.2:max(c_strikes)); %grid of strikes
vq = interp1(c_strikes,impvolss,xq); %interpolatd values %interpolated implied volatilities

f = zeros(1,length(xq)); %risk-neutral density
function [f] = secondDerivativeNonUniformMesh(x, y)
dx = diff(x); %grid size (uniform)
dxp = dx(2:end);

d2k = dxp.^2; %squared grid size
f = (1./d2k).*(y(1:end-2)-2*y(2:end-1)+y(3:end));
end

figure(2)
plot(xq,f);

Note: blsprice is an intern Matlab function so that one should definitely work. This is the risk-neutral pdf for the interior points:


enter image description here


The data The following table shows the option data (left column: strikes, middle: market prices and right column: implied volatilities):



                   650                     387.5                  0.337024
700 346.45 0.325662
750 306.8 0.313846
800 268.95 0.302428
850 232.85 0.290759
900 199.15 0.279979
950 168.1 0.270041
975 153.7 0.265506
1000 139.9 0.260885
1025 126.15 0.255063

1050 112.9 0.248928
1075 100.7 0.243514
1100 89.45 0.238585
1125 79.25 0.234326
1150 69.7 0.229944
1175 60.8 0.22543
1200 52.8 0.221322
1225 45.8 0.21791
1250 39.6 0.21486
1275 33.9 0.21154

1300 28.85 0.208372
1325 24.4 0.205328
1350 20.6 0.202698
1375 17.3 0.200198
1400 13.35 0.193611
1450 9.25 0.190194
1500 6.55 0.188604
1550 4.2 0.184105
1600 2.65 0.180255
1650 1.675 0.177356

1700 1.125 0.176491
1800 0.575 0.177828

$T = 1.6329$ is the time to maturity, $r = 0.009779$ the risk-free rate and $q = 0.02208$ the dividend yield. The spot price $S = 1036.2$.


Computation of the risk-free rate and dividend yield via Put-Call parity $r$ is the risk-free rate corresponding to maturity $T$ and $q$ is the dividend yield. In the numerical implementation, we derive $r$ and $q$ by again making use of the Put-Call parity. To that end, we assume the following linear relationship: $$f(K) = \alpha K-\beta,$$ where $\alpha = e^{-rT}$ and $-e^{-qT}S(0) = \beta$, and $f(K) = P(K,T)-C(K,T)$. The constants $\alpha$ and $\beta$ are then computed by carrying out a linear regression. Consequently, the risk-free rate $r$ and dividend yield $q$ are then given by \begin{align} r &= \frac{1}{T}\ln\left(\frac{1}{\alpha}\right), \nonumber \\ q &= \frac{1}{T} \ln \left(\frac{-S(0)}{\beta}\right). \nonumber \end{align}



Answer



I assume that for approximating the second derivative of the call price $C (K,T) $ at the bounds of the strike domain (see first 2 "if" cases of the last for loop of your code) you tried to set up boundary conditions.


On the right bound, your approximation $C(K+\Delta K, T) \approx 0$ could make sense for $K \to \infty$ or at least big enough.


On the left bound however, $C(K-\Delta K, T)$ cannot be approximated by zero, since call price is almost only intrinsic value for low strikes. Instead of zero, you could use the discounted difference of the forward price minus the strike, $C(K-\Delta K, T) \approx B(0,T)(F (0,T)-K)$, if $K \to 0$ or at least small enough.


This explains why you observe a strange behaviour on the LHS (with a negative pdf), while I guess that if you zoom in or remove that outlier you should be OK.



As a first step, you could simply compute the pdf for interior points xq(2:end-1) (i.e. last case of your for loop) and check what it gives.


[Edit]


Looking more closely, it seems like your input prices allow for static arbitrage opportunities, more specifically butterfly arbitrage. As such you cannot expect to obtain a reasonable pdf.


Although it is far from perfect, maybe the script below will help. In it, I try to look for the strikes leading to arbitrage, and discard the corresponding inputs to obtain what a so-called "clean" pdf. This is a non-parametric approach. As discussed in the comments, using a parametric approach (e.g. fitting the vol smile using an arb free representation), will produce an even smoother pdf.


function [ ] = someBreedenLitzenbergerCode( )

% Get data and interpolate
[K, C, ~] = getData();
dk = 0.5;
k = min(K):dk:max(K);

c = interp1(K, C, k, 'spline');

% Notifying vertical arbitrage opportunities
dC = diff(C);
if any(dC > 0)
warning('Input call prices allow for arbtirage (vert. spread)');
end

% Notifying and dealing with butterfly arbitrage opportunities
f = secondDerivativeNonUniformMesh(k, c);

idxkArb = find(f<0)+1;
if ~isempty(idxkArb)
warning('Input call prices allow for arbitrage (butterfly)');
end

% Finding indices of input strikes/prices leading to arb
idxKArb = [];
for i = 1:length(idxkArb)
idxHi = find(K>=k(idxkArb(i)),1,'first');
idxLo = find(K<=k(idxkArb(i)),1,'last');

idxKArb = [idxKArb, idxHi, idxLo];
end
idxKArb = unique(idxKArb);
disp('Strikes leading to butterfly arbitrages');
disp(K(idxKArb));

% Cleaning inputs and calculating pdf
K_clean = K; K_clean(idxKArb) = [];
C_clean = C; C_clean(idxKArb) = [];
k_clean = min(K_clean):dk:max(K_clean);

c_clean = interp1(K_clean, C_clean, k_clean, 'spline');
f_clean = secondDerivativeNonUniformMesh(k_clean, c_clean);

% Plotting results
if ishandle(1), clf(1); end;
figure(1);
subplot(221);
plot(K, C, 'x'); hold on;
plot(k, c, 'r-');
plot(k(idxkArb), c(idxkArb), 'rd');

grid on;
title('Original call prices, C(K)');
subplot(222);
plot(k(2:end-1), f); hold on;
plot(k(idxkArb),f(idxkArb-1), 'rd');
grid on;
title('Pdf, \phi(K)');
subplot(223);
plot(k_clean, c_clean); hold on;
lh.Box = 'off';

grid on;
title('Clean call prices, C(K)');
subplot(224);
plot(k_clean(2:end-1), f_clean); hold on;
a = ksr(k_clean(2:end-1), f_clean, 60); % Available at Matlab Central
plot(a.x, a.f, 'k-');
lh = legend('FD','FD + Smoothing');
lh.Box = 'Off';
grid on;
title('Pdf, \phi(K)');


end

function d2y_dx2 = secondDerivativeNonUniformMesh(x, y)

dx = diff(x);
dxp = dx(2:end);
dxm = dx(1:end-1);
d2k = dxp.*dxm;
d2kp = dxp.*(dxm+dxp);

d2km = dxm.*(dxm+dxp);
d2y_dx2 = 2./d2km .* y(1:end-2) - 2./d2k .*y(2:end-1) + 2./d2kp .*y(3:end);

end

function [strikes, prices, volatilities] = getData()

mat = [650 387.5 0.33702
700 346.45 0.32566
750 306.8 0.31385

800 268.95 0.30243
850 232.85 0.29076
900 199.15 0.27998
950 168.1 0.27004
975 153.7 0.26551
1000 139.9 0.26088
1025 126.15 0.25506
1050 112.9 0.24893
1075 100.7 0.24351
1100 89.45 0.23858

1125 79.25 0.23433
1150 69.7 0.22994
1175 60.8 0.22543
1200 52.8 0.22132
1225 45.8 0.21791
1250 39.6 0.21486
1275 33.9 0.21154
1300 28.85 0.20837
1325 24.4 0.20533
1350 20.6 0.2027

1375 17.3 0.2002
1400 13.35 0.19361
1450 9.25 0.19019
1500 6.55 0.1886
1550 4.2 0.1841
1600 2.65 0.18025
1650 1.675 0.17736
1700 1.125 0.17649
1800 0.575 0.17783];
strikes = mat(:,1);

prices = mat(:,2);
volatilities = mat(:,3);

end

enter image description here


website design - Critique: Scrollable flyout nav menu


I'm working on a new nav menu for my company's web app. I took loose inspiration from Google's material design tabs where, upon page overflow, arrows appear and the tab section is horizontally scrollable:



Nav menu screenshot


After coming up with this solution, I had to make a decision about how to handle submenu content. While I do believe that not having submenus would be the best solution, that's not on the table at the moment. So, I'm left with either traditional dropdown menus (that would have to be worked out with JavaScript due to overflow: hidden issues pertaining to how I built the tab area), or the idea that I came up with:


Flyout screenshot


Here's a Codepen to play with.


I'm calling it a flyout menu, though the term does exist to describe patterns that are similar but different.


Technically, it's a simpler solution. And because tab overflow is handled, it's not going to break the layout by working the way it does. However, because it is relatively novel (correct me if I'm wrong; I can't recall using a menu designed like this before), I'm concerned that it will be confusing to less technical users.


I'm asking for a critique of my flyout menu from a design perspective (as opposed to a technical one; there are some Codepen quirks and some beta quirks as welll). Is it relatively intuitive to use? When clicked, does the design provide enough feedback for a user to notice that the flyout happened? Does it mess with the convention that 'submenus are vertical lists' too much?


Any critiquing is much appreciated.


UPDATE:


Thanks to all for your feedback! I left out some details that feel important after reading the answers and comments.



First, not everyone gets the full menu here. Teachers might only get the first two, while an admin would get all of the modules. Someone in admissions could theoretically only get students, admissions, and alumni. So, the people who get more options have a better chance of being a power user who can grasp this stuff pretty easily.


As it was mentioned, horizontal menus can get wrecked when feature creep happens. Rather than fight that battle which I didn't think I could win, I thought it'd be more prudent to account for the situation. Also, as it stands, the scroll doesn't trigger on the top-level nav until the screen is under 1000px wide. There are not a lot of desktop monitors left that are under 1024. Plenty of touch browsers could be, but people are more comfortable with the idea of scrolling as well as swiping to scroll there.


This could rightfully attract some 'graceful degredation' complaints, but I didn't think the experience was irreparably degraded. If a flyout menu causes arrows to appear, that should be a pretty solid hint that you need to scroll.




interaction design - Having the register and login options on same page - Best practices


Sorry for the making this a lengthy question, but I needed to make all info available.



So I'm trying to design the home page of a web application.


The home page will have the following elements



  1. Logo

  2. A short copy about the product

  3. Three to Four bullet points about the features of the product

  4. Options to login / register


i have figured out placement of all most all the elements except for "Options for login / signup".


I wish to address the following concerns





  1. Keep the number of clicks as low as possible




  2. Keep the overall layout uncluttered, especially because I will be adding social login buttons at a later time.




  3. Make it clear that all I need for registration is an Email ID and password





Here are some of the options that initially came to mind


1. Provide two buttons - "Login" & "Resigter"


enter image description here Example - Twitter


While this makes the layout very clean, it forces the user to necessarily click on one of the button before doing anything. For existing users it can get annoying as they need to click login and then enter credentials every time they wish to login while for new users it adds a step to the process and also hides what info will be needed for registration.


2. Focus on one - Login form with [submit] to login & separate [link] to sign up or vice versa


enter image description here


Example - Evernote


While this sounds comparatively better, I can't help but think of it as some sort of trade off. I either force users to click on the "login" link before logging in or add a step and hide required fields for registration.


3. Provide two forms - Seperate forms for each



enter image description here


Example - Facebook


As stated before, I fear this will make the layout too cluttered and confusing. Even more so when I add the social login buttons.


4. Merge both forms


Given I wasn't entirely satisfied with any of the options above. I was thinking of merging the two forms. Something like this


enter image description here


Basically, the user sees a version of the first form with "Register / Login" along with some cue to clear the confusion, something like "Existing IDs will be logged in, new ones will be registered". Then based on where the entered ID is new or existing, the form will change to the appropriate one.


I have only noticed something similar only on Amazon, thanks to this similar question, however I have my apprehensions about this method as it might make users a little skeptical before entering any field.


So the question is





  1. Has there been research comparing the above methods or a standard best practice among the four




  2. Is there a reason the fourth option is not as popular as compared to the first three (Like failure case studies etc)




I have gone through the following options, but they didn't seem as contextual to my circumstance



  1. Best way to register and login within the same form


  2. Best way to combine sign in and sign up in the same form?

  3. Pros and Cons for having same form for login, register and forgotten password



Answer



Great to include those options, because I think you'll notice why each site uses a particular choice. Let's break it down.


Twitter is notoriously up against a "What is twitter? How do I use it? Why should I use it?" problem. You'll notice that their design pretty much represents this. Your screenshot didn't include it, but I know below that header they have a bunch of grid-like stories laid out to try to communicate what Twitter is all about. That's great for them, and they're using their real estate most likely in the best way possible. I think you're right though, still requiring a click for either sign up or log in is harsh. They might have laid out the login fields for users who already have accounts and save them the grief.


Evernote. Chances are that if a user made it to this page, they have heard about evernote somehow and what Evernote needs to do is sign users up. They are in total "grow the base" mode and would love your email more than anything so they can continue to send you email campaigns and explain the power of Evernote to you. Defaulting to "Sign up" is a business reason, but they are going to annoy their users who have accounts, which is why I understand your desire to the merged form.


Facebook. Such a good example. Most of the online world has an account these days, so they cannot play any games with making it hard for their users to login. That all makes sense, users can use the top login fields without any extra clicks. If not, new users can create an account in the prominent and very visually different UI.


I would recommend something like this for your case. Use Facebook's template and the room on the left-hand side as a way to include your product highlights/features. There have actually been studies to indicate that following Facebook's design, overwhelmingly, because it is just so familiar to people actually makes for better usability.


Monday, September 26, 2016

FX Option pricing on Forward vs. Spot


In a GBM world with riskless domestic and foreign interest rates, what would be the correct model for a FX plain vanilla option given the statement that this option is priced on the forward? I guess it would be the Garman Kohlhagen model or the Black (76) model but I'm a bit confused between the two in the context of pricing on spot vs. pricing on forward. I would appreciate an answer that scetches the main differences.




usability - How to force user to select a location and not simply type it?


Let's suppose this simple form:


enter image description here


So, the user is expected to enter the keywords of the meeting's full address.
While typing, suggestions are displayed (autocomplete feature).

Here's an example:


enter image description here


As the user only selects some keywords, in 99% of cases, the user would select the right address in the list.
That's fine, but what about other 1% that would just valid the form without selecting an item in the list, since they might have typed a complete address in one shot.


Why do I expect user to select the address even if he well typed it?
Because when selecting, I have a background process that associates the latitude/longitude with the chosen complete address.


I don't want user to bypass this mapping, otherwise the meeting couldn't be geolocalized.


How should I format the form so that the user understands that a selection is mandatory, in order to associate the latitude/longitude?


I could by default select the first selection (in case where the typed address matched), but there might be some cases where the typed address would not be fully complete, leading to few possible results.


UPDATE------ Actually, the real form is this: (on a mobile device since a native app)



enter image description here


What may you suggest to increase UX (despite the design, not made yet :))? I strictly don't want to let the user clicks on Next before selecting a valid address.


When clicking on the item "New York Times Plaza", the value is put in the input text, in background the latitude/longitude is set, and therefore the user should click on "Next":


enter image description here




photo editing - Photoshop: How to save only the masked area of an edited photograph?


Question


If you have a PSD file that consists of one main mask (masking all other layers), isn't there an easy way to save just the masked area as an image?


Background



So I have a photograph I've edited in photoshop, mostly cropping things and moving them around. As a final step, I created a rectangular mask to crop everything (while keeping all of my layers and edit history in tact). The end result is a picture of my wife standing in a different place and cropped smaller. That is, it looks like there's a photo in the middle of the canvas with about 2-3 inches of white all around it.


Now I want to save this picture in the simplest way possible. What I ended up doing was:



  1. Save PSD file

  2. Flatten image

  3. Magic Wand > tolerance 1 > select all white area

  4. Select Inverse

  5. Cut

  6. New File

  7. Paste


  8. Save For Web as JPG

  9. Close everything, without saving


Summary


When I choose, save for web, it saves the entire canvas. I don't want the extra white "padding" all around and I don't want to manually crop it again (the mask has already done that for me). Surely there's an easy way to save only the area within the rectangular mask. Any and all suggestions welcome...



Answer



You can also select the mask (open the Layers palette, hold down the apple key, and click on the mask icon next to the layer) and then select Image→Crop.


SAVE FOR WEB (NOT JUST SAVE) or Save As if you want to keep a copy of the original.


interest rates - Government bonds with negative yield


In the recent time-series of bonds issued by (for example) Germany, Austria and France we see an unfamiliar phenomenon: negative yields. This is mainly the issue on the short end of the yield curve. For a picture see: http://www.ecb.europa.eu/stats/money/yc/html/index.en.html


My question is, why banks or possibly other companies are willing to pay a government for holding their money?


Would it not make more sense to simply hold the cash instead? Stuffing cash under the mattress may be risky and costly for an individual but not for a financial institution. A bank may park money in an ECB account and get a minimal but positive overnight rate for doing so, right?




Answer



Taking the case of companies other than the bank, when you have a large amount of cash, you won't stock it in your backyard as there would be insurance and logistics costs that would cost you more than the negative government yield.


I believe the main reason why people are willing to accept the negative yield is essentially for counterparty risk diversification reasons. Putting your money in a single bank makes you vulnerable to the default risk of that bank (and don't even think it doesn't exist). So you can diversify through several banks but you're still exposed to the overall banking sector risk. So, the next step is to diversify using government bonds, which are likely to be safer than banks. I've seen it used for foreign exchange trades where you don't want to take the risk of a bank for example.


Sunday, September 25, 2016

creative writing - Should I make my prologue chapter 1?


My prologue is set 17 years before the main story arc. I am reflecting on the discussion here, which was asked by another SE contributor. I'm trying to decide what to do with my prologue. Building a website for my world with minor character sketches, short stories, mythologies, etc and additional supplemental is one possibility. It could go there. Or,




  1. I can delete it entirely, and put any necessary points into the rest of the book.





  2. I can leave it as the prologue, since that is my first instinct




  3. I can rename it chapter 1. In that scenario, Chapter 1 would have a different POV and be set 17 years before the rest of the story. A major plot point is set up in the prologue, and revealed about halfway through the story.




The main feedback on the other question has been to keep things as tight as possible. I am a little puzzled by this, though. We write for people who read. People who read presumably enjoy reading, especially things that are well written. I agree with making writing succinct, but the idea of cutting everything that is unnecessary does not sound right. The entire genre of poetry is arguably unnecessary.


Does renaming it chapter 1 make any sense? AS a reader I would just wonder "Why isn't this called the prologue?" But I am now skittish at the thought that an agent/publisher would throw it away once they see the word "prologue." It's a sci/fi-fantasy type story


(I finished the rough draft of the entire 110,000 word story last night, hurray, and will begin editing downwards, and revising, later today. I anticipate four rounds of edits to address all the details I want to solidify.)



Answer




Where prologues are concerned, it all comes down to one thing:


Contents


It all depends on what the prologue contains. You mention a major plot point, but you also say:



Building a website for my world with minor character sketches, short stories, mythologies, etc and additional supplemental is one possibility.



This seems to suggest that the majority of the content is in fact worldbuilding. That could be a problem.


Prologue


A prologue is part of the story. If you told the story without the prologue, things would be missing and the story would be incomplete. A prologue differs from the rest of the story in that it is introductory. That is, it introduces the story, usually the main conflict or characters. This doesn't mean it happens years before the events of the novel.


Some prologues happen years after the novel opens, or even in the middle of the novel, to show you how things are going to turn out. The rest of the novel is about figuring out how things got to where they are in the prologue. A difference in time is a side effect, not a determining factor of, a prologue.



A common type of prologue is the backstory. Backstory gets a bad rep, but there's nothing wrong with it if handled correctly. Backstory should be necessary information that would otherwise never come to light in the novel. The key word there is 'necessary'.


Consider Harry Potter. The first chapter is essentially a prologue. (Note that, even though it is a prologue, Rowling made it chapter one anyway. It works either way.) While at first it might seem that it imparts nothing necessary, it does show the reader that magic and wizards exist in the world. Without that information, it could seem quite far fetched when magic starts appearing in the other-wise painfully normal world of the Dursleys.


Worldbuilding


Worldbuilding is pure backstory. The difference here is that your story can do without it. Does this small part of your world change the story? No? Then it's pure worldbuilding.


Worldbuilding should not be put in a prologue. Remember: chances are the reader is there for a story, not your world. If you open with an enthusiastic description of a faraway place he's never heard of, he's likely to close the book. Especially in this day and age. Prologues should stick to the necessary information.


That being said, worldbuilding is not something to be avoided at all costs. It has its uses. Worldbuilding is the process by which you create the setting, and setting can have a profound effect on the story. It can set the mood. It can alter reality to move the plot forward, or even keep it from moving at all. It can have profound effects on your characters, often even causing them to perform actions they otherwise wouldn't.


Worldbuilding can definitely be a part of your story. The question is: does the reader need to know it first?


Integration


Let me go back to Harry Potter. The murder of Harry's parents by Voldemort is backstory. While not worldbuilding, it will illustrate my example. It has a profound effect on the story. So why didn't Rowling open with it?


There are two reasons. Firstly, the reader did not need to know it immediately. This is of course largely due to Harry not knowing it himself, but even if he had, I doubt Rowling would have opened with it. Why?



Because of the second reason: it's something that can be incorporated into later chapters. As major as Voldemort murdering Harry's parents was, it was easy to incorporate it later on, once it became relevant. The same can be said about virtually all relevant worldbuilding.


Do take note when I say 'relevant'. A seemingly unimportant detail of worldbuilding can still contribute to the overall feeling of the setting in a scene, and thus contribute to the actions of a character (or whatever the setting is designed to do in that instance).


Conclusion


Knowing these differences, it's easy to know what is and isn't a prologue. A prologue is something that has these characteristics:



  • Is necessary to the story

  • Must be known by the reader before anything else


You can of course simply make the prologue chapter one like Rowling did. There is literally no difference. If you know readers/publishers will cringe when they see 'prologue' in the table of contents, this might be a good option.


The only reason not to do this would be if the prologue is so separated from the story that it just doesn't fit. In that case, a prologue would be better. Don't sacrifice your story for anything. Even the publisher. Explain why you need a prologue. If they can't understand that, you might want to find a different publisher.



You can also draw some conclusions about worldbuilding:



  • Necessary worldbuilding contributes to setting and atmosphere. It is included when necessary, not before.

  • Unnecessary world-building adds nothing to either atmosphere, setting, or story. You make this easily accessible to fanatics of your work, but easily ignored by common readers just after a good story. This type of world-building is rarely found in the book, but is almost always found on your website.


Hopefully knowing these differences will help you in your writing endeavors. And congratulations on completing your first draft!



tl;dr


Determine first if the information is relevant to the story. If it is, determine if it needs to be known by the reader before anything else. If the answer to both questions is yes, you can make it a prologue. However - unless doing so would make it seem overly out of place - also consider simply naming it chapter one anyway. This could be the way to go if you fear readers/publishers will throw it out due to seeing 'prologue' in the table of contents. There is no difference between a prologue called a prologue, and one called 'chapter one'.


If the information is irrelevant to the story, do not include it. If the information is relevant to the story, but only in a setting/atmospheric context, include it only when you need to establish that setting/atmosphere. This should only be done to either give the story a particular feel, or cause the characters to do something they otherwise wouldn't.



Finally, if the information is relevant, but the reader does not need to know it first, include it later on in the story as it becomes relevant.



Saturday, September 24, 2016

text - Why are software EULAs typically displayed in a tiny non-adjustable box with lots of scrolling?


From my experience whenever I have to install a piece of software I'm presented an end-user license agreement (EULA) in the following way:


enter image description here


Specifically the EULA is a long text in legalese and I actually need to read that text - it governs under which conditions I can use the software. That long text is squeezed into a tiny textbox that is located on a windows with a non-adjustable border so I can't make the window larger and have a larger textbox - I have to either copy-paste the EULA into another program and read it there or read all the text through this tiny gun port.


Is there any reason behind this widely adopted and often replicated design?



Answer



Two words: Functional Obsolescence



That's usually a term used in Real Estate, but the general idea is that the Home (or in this case, the EULA box) is obsolete, but still functional.


For example, there are many better ways to provide an EULA interface, but over the years nobody wanted to take the time to enhance the EULA part of software registration or installation, especially since they know most people aren't going to take the time to read the entire thing. I mean, how many times do you read the iTunes EULA when you are updating to a new version?


Basically, it's become the defacto standard and nobody wants to put any effort into changing something people will only deal with one time.


How to rotate an object to make one of its side parallel to another object's side in Adobe Illustrator?


I have this red object and grey object.


the red and grey objects


I need to rotate the grey object around such that it fits perfectly well on red object's line.


How do I achieve that?





Layers to png with names in Photoshop


I am looking for a way to export all layers (nested too if possible) of a PSD file to png. But just the layer, with it's current size, not in the document size, with background or other layers.


I tried the script in this answer: Batch export Photoshop layers to individual PNG files


but it generates the png with background and the size of the document.


I need that if my file has buttons or small things, they export with the current layer size and name to png.


Thanks!



Answer




If you have Photoshop CC or CC 2014, you might be best off using the native Adobe Generator. In the future, it's going to have svg export too. Currently that's experimental feature.



List of "asset" export plugins:



I'm not very fond of Adobe Generator because sometimes, even if you haven't enabled it and you save a .psd document that has extensions in the layer names, such as mylayer.jpg, it'll try to save the assets ...and they come out corrupted or something. It can be fully disabled through the preferences though, so it's not an issue when I'm using Slicy instead.


The only ones I have used and would recommend are: Adobe Generator, Slicy and Cut & Slice Me. Although I'm not the biggest fan of the way you mark layers with Cut & Slice Me.


Friday, September 23, 2016

Recursively batch-resave Illustrator AI files to legacy format


I need to downsave a few hundred AI files from AI CC to CS6. They are scattered across dozens of folders and I need a way to recursively overwrite the AI CC files with CS6 compatible files.


I researched and tried a few solutions, but none of them fits the bill.


Optimally this should be a reusable .jsx script, but if there's another way to do this somehow through OS X's Finder (savedSearch), that would be good, too.


Thanks in advance for all your help.



PS: Two scripts I found which more or less do what I need. Tried to make a Frankenscript out of parts of both, but no success, yet.


Script one


Script two



Answer



Since it wasn't complicated, I decided to write it from scratch. I wouldn't expect the script to be very fast, due to the fact that it's opening, saving and closing files. It should highly depend on your computer and the .ai file(s) in question.


Make sure to check the first two variables: overwrite and targetVersion, before trying to run the script. You may also want to check the SaveOptions_ai function to further adjust the save settings


Illustrator convert to legacy.jsx


As always, use at your own risk. Especially with the overwrite option on, this is extremely destructive script and can render your files unusable, if you save it with low enough file version. If you want to use overwrite, I'd suggest you duplicate the parent folder before running the script.


// Illustrator convert to legacy.jsx
// https://gist.github.com/joonaspaakko/df2f9e31bdb365a6e5df


// Finds all .ai files from the input folder + its subfolders and converts them to the version given below in a variable called "targetVersion"

// Tested in Illustrator cc 2014 (Mac)
// Didn't bother to do a speed test with my macbook air...

#target illustrator

// If set to false, a new file will be written next to the original file.
// The new file will have (legacyFile) in the name.

// Files with (legacyFile) in the file name are always ignored.
var overwrite = true, // boolean
// Accepted values:
// 8, 9, 10, 11 (cs), 12 (cs2), 13 (cs3), 14 (cs4), 15 (cs5), 16 (cs6), 17 (cc)
targetVersion = 13;

if ( app.documents.length > 0 ) {

alert("ERROR: \n Close all documents before running this script." );


}
// Run the script
else {

var files,
folder = Folder.selectDialog("Input folder...");

// If folder variable return null, user most likely canceled the dialog or
// the input folder and it subfolders don't contain any .ai files.
if ( folder != null ) {


// returns an array of file paths in the selected folder.
files = GetFiles( folder );

// This is where things actually start happening...
process( files );

}

}



function process( files ) {

// Loop through the list of .ai files:
// Open > Save > Close > LOOP
for ( i = 0; i < files.length; i++ ) {

// Current file
var file = files[i]


// Open
app.open( file );

// If overwrite is false, create a new file, otherwise use "file" variable;
file = !overwrite ? new File( file.toString().replace(".ai", " (legacyFile).ai") ) : file;

// Save
app.activeDocument.saveAs( file, SaveOptions_ai() )


// Close
app.activeDocument.close( SaveOptions.DONOTSAVECHANGES );

}

// For better of for worse...
alert( "Script is done." );

}


function SaveOptions_ai() {

var saveOptions = new IllustratorSaveOptions();

saveOptions.compatibility = Compatibility[ "ILLUSTRATOR" + targetVersion ];
saveOptions.flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
saveOptions.compressed = true; // Version 10 or later
saveOptions.pdfCompatible = true; // Version 10 or later
saveOptions.embedICCProfile = true; // Version 9 or later
saveOptions.embedLinkedFiles = false; // Version 7 or later


return saveOptions

}

function GetFiles( folder ) {

var i, item,
// Array to store the files in...
files = [],

// Get files...
items = folder.getFiles();

// Loop through all files in the given folder
for ( i = 0; i < items.length; i++ ) {

item = items[i];

// Find .ai files
var fileformat = item.name.match(/\.ai$/i),

legacyFile = item.name.indexOf("(legacyFile)") > 0;

// If item is a folder, check the folder for files.
if ( item instanceof Folder ) {

// Combine existing array with files found in the folder
files = files.concat( GetFiles( item ) );


}

// If the item is a file, push it to the array.
else if ( item instanceof File && fileformat && !legacyFile ) {

// Push files to the array
files.push( item );

}
}

return files;

}

controls - Should I show first page when user sort the grid?


Consider this grid as an example. In grids, should I show the first page when user sort the grid by a column? I think logically I should. But I am not sure from UX point of view.



Answer



Yes you should. Let us say the user is in third page and sorts by "last post", he expects to see the first sorted record right away. This can be achieved only by showing the first page.


color - How do I simulate in Photoshop what a piece will look like when printed on non-white paper?


I'm designing a box in Photoshop that will be offset printed on unbleached paper. I haven't picked out a printer yet, so I don't know the exact kind of paper I'll be using and don't have access to it for proofs. For now I'm using a lightly-textured layer of tan color as a placeholder to mock it up.


What I'm trying to figure out is, how do I figure out how my design will look printed on natural paper rather than bleached white paper? I know that the brightness will be diminished and the hue will be altered, but I need to know how much so I can compensate for it as much as possible.


Is there a way to get at least a rough but reliably-simulated idea of how my prints will come out? Does it have to do with blend modes, or color separations? I'm at a bit of a loss here.




Thursday, September 22, 2016

comparison - How to quantitatively compare two interfaces?


I am in the process of building a tool to make some tasks easier than an existing application allows. Right now I am surveying users and receiving feedback but I want hard numbers.


The only quantitative measurement I know is number-of-actions to perform the same task. Are there any other measurements I can use?




Answer



There are many metrics you could use:



  • Completion time.

  • Divergence from ideal path for task completion, or how many steps does it take users on average to complete a task versus the optimal method.

  • Completion time of novice users vs. trained users (you would need two tests for each interface here). This would test the intuitiveness of your interface.

  • Quality of result - Does the task actually accomplish what the user wants to do?

  • Using eye-tracking, you could track the number of saccades (eye-movements, or the distance the eye travels) per task.

  • Demographic testing. If your target audience is broad, you should test the interfaces against the full spectrum of demographics and make adjustments accordingly.

  • Heat maps for eye-tracking, mouse movement, or clicks. This allows you to identify points of interest/attention.


  • Render/load speed of the interface.


There are also qualitative tests:



  • Post-test survey. This would be another candidate for testing trained vs. untrained users.

  • 5-second test. Show each interface for five seconds and ask the user to write down what they remember about it. This can help you make sure you're drawing their attention to the proper areas.

  • Record the users during their tasks and have them talk through their thought process as they go along. Get their expectations of what they think should happen when they perform an action and compare it to what actually does happen.


Other tests could include:




  • Color testing the design. Reduce it to grayscale and see if you're able to differentiate the different parts of the interface.

  • Accessibility testing. How does it work with a screen reader?

  • Depending on the application, you might also want to see how it performs on different screen sizes as well as touch interfaces.

  • How does it work in different locales/languages? Does the interface accommodate changing the language?


Strategy of Renaissance Technologies Medallion fund: Holy Grail or next Madoff?


Renaissance Technologies Medallion fund is one of the most successful hedge funds - ever! Yet it is very secretive.


Do you have information on the strategy used that is not yet mentioned in the Wikipedia article above?


Is there really something fundamental going on (the Holy Grail of investing) - or will this be the next Madoff?



Answer



There are a some information about Renaissance Technologies available in The Quants from Patterson.


Basically, and it's also what I heard in general, they are using intensively algorithmic trading, and from what I understood there are using Information Theory (they worked with Shannon if I remember well).



I'd say it'd be harsh to say it's the next Madoff given the background they have, I can easily see them being simply better than the rest...


It's just my opinion of course...


hierarchy - Grouped list with a lot of singletons -- how to present groups of size one?


We have a table with a large number of items (50-500+). Items are grouped -- basically, think of a list of folders each with at least one item in them. Actions need to be taken on each item, or possibly on sets of items.


We're using a tree list with disclosure triangles to show the folders and the items. The folders show summary info, and the items show details. Sometimes you need to open a folder, and take actions on individual items. Sometimes you can just take the same action on every item in a folder, so you click on the folder and do the action.


enter image description here


However, in one not uncommon case, almost every single folder has exactly one item in it. In the naive presentation, this doubles the number of rows, and makes the screen look very busy. It also shows double the number of controls, since you can affect either the folder or the item--with essentially identical results.


How would you recommend handling this case? We don't want to get rid of the groups--they add a lot of value. But the summaries don't contain all the information about the items, for screen real estate reasons. We could go with some third view for single-item-folders, but I'm worried it might break up the visual flow.



Ideas?



Answer



A few quick ideas:


Singleton at the Group Level When there is only one item in a group, replace the item count and group summary information with the item detail. This is most effective when the group controls and information are redundant with the singleton’s controls and information, which I think is the implicit problem with doubling the rows and controls. If there are a lot of details that don’t fit where the group stuff used to be, then put secondary item information and controls under the expander/disclosure triangle. The idea is that usually users will not have to open a disclosure region for tasks on a singleton.


Item Table with Merged Cells Have a single conventional table rather than the tree with disclosure triangles. Each item has both controls for itself and each group has its controls in a single vertically “merged” cell for all items in the group. Information for the group as a whole (e.g., Group ID) may be in merged cells too, but my impression is that most of this information reduendant with the item information display. This is best when group commands are different than item commands, and/or the number of command are few (which I don’t think is what you have). It’s also best when users work on a large number of items from different groups –a 500 item table means a lot of scrolling, but users make up for it by not having to open and close disclosure regions.


Item Table with Selection Same single conventional table as above, but rather than separate command controls for each item and group, provide controls to select (and multi-select) both individual items and all items in a group with a single click. A single set of command controls at the top or on the sidebar menu executes the actions on all selected items. Group ID is a field for every item. You may also want to support “expert” multi-selection through dragging and shift-clicking. This is especially useful when (a) users often execute the same command on multiple groups and items between groups, (b) there are a large number of commands (three or more) –a single control per command would free up a lot of real estate, (c) users sometimes need to see the data sorted by other criteria than group membership. You could have this conventional table be an alternative view from the tree, allowing users to toggle between the two.


Item Table with Filtering This is a conventional table of items again, but with filtering controls at the top, including controls for specifying one or more groups (e.g., a range of groups). There are command controls for each item, and a single set of controls for commands that operate on all displayed items at once. This is best when users often work on a single group or other set of items with specific criteria, rather than multiple arbitrary groups. Filtering tools, of course, could be combined with either of the above table designs to allow the user to narrow the search down from 500 items when advantageous.


Master-Detail Have separate group and item tables linked in a master-detail relation. When the user clicks on a group in the Group table, the Item table immediate populates with items of that group, replacing whatever items were there before. When the data are dominated by singletons, make the Item table short by default (showing only a couple items without scrolling) and expand the group table to show more groups. This is best when users tend to work primarily on groups as a whole (even with singletons) and secondarily on items within a group, but rarely back and forth on items between groups –with a master-detail, users don’t have to explicitly close the disclosure regions when they’re done with a group to keep the display from getting too cluttered.


adobe illustrator - Logo looking fuzzy on smaller sizes


I created my logo in Adobe Illustrator and i'm happy espect that when i need it smaller, it looks pretty ugly and fuzzy. Like pixels are getting squeezed.


Here is a screenshot of the original on the right and the smaller one on the left:


enter image description here


I am sure i am doing something wring in Illustrator since i don't have much experi



Answer



The 'fuzz' is called anti-aliasing. It's a raster image method to smooth lines that fall in between pixel boundaries.


But since this is Illustrator, it's likely not raster, but vector, and what you are seeing is simply Illustrator's on screen rendering. If you zoom in, the anti-aliasing will likely disappear.


The issue may return, however, if you try exporting your file as a raster image of some sorts. Given the simplicity of the logo form, however, I'd suggest just sizing it the way you want, export it, then open it in PhotoShop to tweak the pixels as you see fit.


Wednesday, September 21, 2016

Measuring/Quantifying Usability & User Experience


This morning i was looking online for articles that could lead me to a method that can be used to measure/quantify usability & user experience. The method i was interested in finding more information about, is about whether it is possible to have a set of good practices that can help in grading an overall system, both in it's prototype stage and even when creating mockups.


Obviously heuristic evaluation and user testing are key elements in developing a good user experience, but i was wondering if before these stages begin and testing is conducted there might possibly be a method for grading your mockups/prototypes internally before going forward to stakeholders and begin testing?


All answers and feedback are welcome as of yet i have been unable to find something that is similar to what i'm describing, i've read up about:


SUM (Single Usability Metric) - http://www.stefanwobben.com/usability/the-single-usability-metric/



System Usability Scale - http://www.measuringusability.com/blog/task-comp-sus.php




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