Monday, June 4, 2018

feedback - Standardized (web) application error messages?



I'm in the middle of coding a bespoke CMS for a company and if there is one thing I hate it's coming up with good copy for "flash" messages (short messages that provide user feedback.)


I know how important it is to provide good feedback to the user when a system breaks but as a programmer it's a right pain because I think in technical terms and it's very hard to effectively communicate what I want to say in layman's terms whilst simultaneously keeping it short, concise and polite.


Of course, there are a myriad of ways an application can go wrong, it's different for almost every project and internationalization/localization are also big issues.


So I was wondering if are there any resources out there that attempt to provide a standard library of feedback messages? Or if not would you be interested in a community driven project such as this?



Answer



I don't think you need specialized language for different server errors. 404 errors should be unique, sure.



But this is the best thing I've ever done with server errors:


enter image description here


An error is the best way to a lose a customer. But with this method you're giving the customer a very easy way to report the error and feel like they're being taken care of.


I'd spend extra time with your error reporting mechanism too. If you can gather the stack trace and error message that'll help. But it's going to help even more if you can put the error into context. So gather things like form post data at the time of the error, or session variables, or anything else that'll help you diagnose the problem. Ideally you shouldn't have to ask what this person was doing before the error.


This is also very effective at lighting a fire under your butt, so to speak. When customers request that you fix the problem and notify them when it's resolved, then suddenly these errors have an even greater sense of urgency. You will naturally then spend more time making sure these errors don't happen in the first place. At least that's the effect it had on me.


fiction - What is meant by "purposeful, habitual, and gratuitous" actions?


In his "Characters" essay, Samuel R. Delany purports there are three types of actions to characters: "purposeful, habitual, and gratuitous." He also defends that, in a novel, if "a character [is] involved in a number of all three types of actions, the character will probably seem more real." However, save for a very shallow example, he doesn't state what is meant by each type of action nor how they can be combined to give a character more depth.


I was wondering what is meant by each type of action as well as what examples would motivate having all three for a character. (A Google search did not get me very far other than references to the quote itself...)




Answer



The essay is from a 1971 symposium on women in science fiction. The 3 actions are defined in relation to the plot, not the character's psychology.



  • Purposeful Actions are what we'd call "character agency" today. It is the character's actions that directly or indirectly effect the plot.

  • Habitual Actions show the character's normal state or routine.

  • Gratuitous Actions are gratuitous only to the plot. They show the character is more than just what is required by the story. This is not about the character "acting crazy on a whim" – it's actually the opposite. This is about the character's normal life which exists outside the story.


The quote comes after Delany explains that his wife Marilyn, who edited fiction, had a chronic complaint about the women characters. She said they were restricted to 2 types, which he calls Vicious Evil Bitches and Simps (who are useless and need to be rescued – also hilariously, Evil Bitches who are transformed into Simps upon meeting the hero). He admits he'd only managed to break the stereotypes in his first novel, not avoid them, so together they came up with the 3 actions as a template for "better, more varied, more believable women characters".


Here's the full excerpt on the 3 necessary actions


I have added paragraph breaks, bold emphasis, and added clarifying text in square brackets:




Action is the clearest (and most commercial) way to present character. A good character of either sex must be shown performing purposeful actions (that further the plot), habitual actions (that particularly define her or him), and gratuitous actions (actions that imply a life beyond the limit of the fiction).


Simply because the way most books are plotted, the male characters regularly get to indulge in all three types of actions, however, if [the female character is an] evil bitch, [her actions] are all purpose but no habit or gratuitous; if [the female character is a] simp she is all gratuitous but no purpose or habit.


So the first task, after finding a plot that just does not require women in either of these ugly, banal, and boringly cliché grooves, is to make sure you portray your women characters clearly performing all three types of actions. (And, re: the purposeful actions, performing them successfully!)



Women have interesting economics if you bother to notice, Philip K Dick


His following point (it's so good I think it deserves to be included) is that every character in realistic fiction must have "economic anchors" that are clearly shown or heavily implied. He uses an example of 2 housewives, and differentiates them only through their relationship to money – one is a kept woman with a regular spending allowance, the other manages expenses and pays bills through a joint bank account. Their husbands are close in economic tier but Delany suggests the women would be completely different types (immediately recognizable by the reader) based on their approach to money.


He takes a potshot at masculinity tropes saying James Bond and all westerns become fantasies the instant characters are no longer tied to economic reality. This was 1971. In the essay he details how his wife was treated at her publishing job – it's off-topic but strangely compelling. He show-not-tells how an average female character has a fascinatingly complex story behind her economics, complete with petty villains and strategic trade-offs. Every. Woman.


Part of the essay is a rant against male sci-fi authors for petty sexist attacks in women's lib run amok plots, specifically a Philip K Dick pro-life story about frivolous women having abortions until the "fetus" is old enough to learn algebra. A heroic man saves all the babies from tyrannical straw-gina, with algebra.


I have to admit, the algebra-abortion story sounds idiotic compared to the real life intrigue at his wife's job – I actually wanted to know how that turned out.



Like Bechdel, but for writers


He then defines a kind of proto- Bechdel test where he says:



Women characters must have central-to-the-plot, strong, developing, positive relations with other women characters. The commercial/art novel would be impossible without such relationships between men…"



The source is a re-print of the essay from 1991. It can be found (in part) here: https://books.google.com/books?id=5G1XAgAAQBAJ


Sunday, June 3, 2018

gui design - Tag-like UI element


There is a UI element that I have seen in several places, but in trying to find an implementation for it, I realized I don't know how to correctly refer to it. The element that I am thinking of is a modified autocomplete text field, such as in Evernote's tags field on iOS or Gmails email address fields.


Here's an example:


enter image description here


Specifically, these appear as simple autocomplete text fields. However, when an element autocompletes, or a delimiter like a comma is typed, the element becomes an atomic 'bubble' which can no longer individually be modified, but the user can continue to enter a new autocomplete terms in the same field.


Any idea what these are kinds of fields are called?




adobe illustrator - How to keep the text in vector in Photoshop without rasterizing it or flattening the layers when exporting to PDF?


After many tests in all kind of PDF presets, I couldn't figure out how to keep the text layers as vector and still have the quality of InDesign without using it. Everything I tried was rasterizing the texts. It seems like PDF/x rasterizes the layers too.



The layout needs to be created in Adobe Photoshop unfortunately, and all I have on hand is a Photoshop file with layers.


Is it possible to keep the vector quality of Photoshop text layers and objects when exporting to PDF, and get the quality of an Illustrator or InDesign file easily?



Answer



Yes.


A simple trick is to prepare your Photoshop as you always do, and save a .psd file.


Then open this file in Adobe Illustrator.


You will be asked if you want to convert the layers to objects or to flatten them in a single layer. Select "convert objects".


If it doesn't work, verify if the .psd file is in 8bits.


How to convert a Photoshop to PDF with vector texts


Your text is now editable in Illustrator and appears as vectors. You can now simply do a "create outline" to make sure the fonts don't move for your print-ready or save it as a standard .PDF that you can easily optmize.



(see how to optimize PDF here)


With this trick, even you get files from a friend who can only afford the Photography Plan from Adobe (Photoshop and Lightroom), you can still open the .PSD files without losing too much quality. Don't forget to ask for the fonts if the text layers are not using fonts from the TypeKit!


equities - Which brokers offer a .NET stock trading API?



I'm trying to make up my mind and choose a broker, however much of my choice depends on the trading API offered. I'm definitely not interested in FIX solutions and I'd very much like a .NET implementation of the client interface.



So far I've looked at MBTrading (poorly implemented, not compatible with modern software stacks), IB (complicated, not .NET, requires their TWS software to be running as a proxy), Thinkorswim (little documentation, not .NET).


I also have some experience with Lime Brokerage's API, which is very nice indeed, however I'm afraid the operation I intend on starting might not meet their minimums.


Are there any good alternatives?


Of course an API is worthless without an efficient broker, so speed of execution and a decent fee structure would be appreciated.


Thanks in advance.



Answer



Interactive Brokers does have a .NET API, albeit a free (as in speach) one written by Karl Schulze, not IB themselves.


http://www.dinosaurtech.com/utilities/


It's written in C# (and IMHO well written). I've examined both it and the Java API and find the .NET version more to my liking. That's probably just because I'm more familiar with .NET than I am with Java.


You're right about TWS, the API talks to a TWS or IB Gateway instance. As far as I can tell, IB Gateway is produced for no other reason than to allow API clients to execute.



The IB API may indeed by overly complicated compared to other APIs -- I've read as much elsewhere. But it's the first trading API I've worked with personally, so I can't say for sure.


sharing - Which share icon is most appropriate for web?


Now days there are multiple viable share icons available, but they are mostly mobile OS specific (iOS, WP, Android...). I wonder which icon should I use for the web that most of the users would recognize?


Multiple share icons


Image source: https://bold.pixelapse.com/minming/share-the-icon-no-one-agrees-on



Has anyone done any A/B tests on how users respond to different ones?


Its a simple album page where you can get links for each album/image and then share it with a friend, nothing special, just popup on click of an icon.




Saturday, June 2, 2018

scrolling - How to handle very long accordions?


I have condensed a rather long list of items into an accordion so that only the titles are initially visible and the accordion expands to show the details. The list contains the main content of the page, not navigation.


I think this works well because users will be looking for the heading that applies to them, and there is no reason for them to care about the details of the other ones, so hiding it works well, and allows them to find the one they need sooner.



Here is an example of the type of interface I'm talking about. Difference is on mine only one can be open at a time, they animate open and closed, and some [really only one] of the content sections on mine are pretty tall)


The tricky thing is there are some categories with 25+ items, and when there is an item near the bottom with significantly more content than the currently opened one (or even worse when none are open), when opened it just extends most of its content off the bottom of the page.


My question is twofold:




  1. Is it in general a bad or questionable decision to have an accordion with many many options that requires scrolling to see all of? (I don't think so, but not sure if it threatens the pattern)




  2. How to handle opening accordion sections with lots of content that are near the bottom of a page (this accordion has varying height internal sections). My initial idea would be to scroll the page up so that the clicked section moves up to the top of the viewport, showing as much of the opened section as it can but not going off the top. I just worry that this might feel twitchy or strange to the user.






Answer



When to use an accordion


What problem does an accordion solve? It solves the problem of not having enough space to show all items, so instead, you collapse all but one of them and allow the user to toggle between them. The downside is that the toggle controls are dependent on the length of the contained content. In your case, it sounds like the contained content may make an accordion impractical.


Here's what UI-patterns.com has to say about the accordion pattern:



Usage



  • Use when you want the benefits of a normal sidebar menu, but do not have the space to list all options.

  • Use when there are more than 2 main sections on a website each with 2 or more subsections.


  • Use when you have less than 10 main sections

  • Use when you only have two levels to show in the main navigation.



Some of those numbers seem a bit arbitrary, but they're good rules of thumb to follow. Essentially what they indicate is that if you have too much data, you may not want the accordion pattern.


Alternatives


UI-patterns.com actually offers a compelling alternative, the vertical dropdown menu. It's a good approach for your situation because it opens up a lot of vertical space for longer lists of items (since the list will appear on top of other content). If you need to fit the control into a sidebar, consider the horizontal dropdown menu on the same site.


Using an accordion anyway


If you're still forced to apply the accordion pattern, consider the accordion on the right hand menu on UI-patterns.com. Some of the headings there contain around 25 items, and even though the bottom headings disappear from view when you're looking at it, it's not confusing. That's because the accordion animates its transition from its open to its closed state. This is important because it tells the user what is happening to the headings as they click on them. If they were to just jump open and shut, the headings would be gone and it may be unclear where they went. So if you implement an accordion anyway, consider using an animation to make the transition extra clear.


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