Thursday, March 21, 2019

Why aren't HTML5 typed number inputs right aligned, and should they be?



As you may know, with HTML5 when an input has type="number" the field is "customized". Two little arrows are added to the field (w3school example) but the numbers are still left aligned.


I saw that numbers should be right aligned (as discussed in this question).


Is it applying to input fields too? If so, why it's not implemented by default?



Answer



Number fields should not always be right-aligned




  1. It often makes sense to right-align numbers when they are being compared to other number fields (e.g. in financial statements). This can help comparability and scannability.





  2. However, sometimes number fields are unrelated or are mixed with text fields in a form, so left-alignment may promote better visual flow.




  3. Given #1 and #2, plus the fact that HTML controls tend to be left-aligned by default, it makes sense to also keep the HTML5 number control left-aligned by default.




Note that you can always change the text-alignment of the input through CSS or inline styles (e.g. or ).


Here are some examples of why right alignment doesn't always make sense:


right alignment can be disruptive when fields are mixed with text


Wednesday, March 20, 2019

How to get all securities in an asset class from IBPy (Interactive Brokers python API)


Would like to know how to request all securities in an asset class using IBpy, the python wrapper for the Interactive Brokers API.



For example getting all currency pairs in the class forex ('CASH'), or all stocks in the class equity ('STK').


Current efforts: Searched QF stack, stackoverflow and IBPy's google discussion groups. Ongoing efforts: Trawling through IBPy's "ibConection" class.


Thanks!




typography - What are best practices for choosing and pairing fonts?


I've always found font selection to be a little bit of a mystery. What factors should be considered when choosing a font? How does one successfully incorporate two fonts into a design?



I realize that some factors will include things like:



  • Legibility

  • Scalability

  • Appropriateness/Mood/Emotion


However, how does one objectively judge legibility or appropriateness? Are there objective principles that can be applied for font selection? If possible, please list resources or examples in your answers. Studies focused on the effectiveness of different fonts would also be extremely useful.



Answer



Smashing Magazine has a really good article on combining typefaces:




  • Try matching a Sans-Serif title type with a Serif body type

  • Avoid similar classifications (don't use 2 slab typefaces or 2 condensed typefaces)

  • Assign distinct roles to each typeface/font

  • Contrast font weights

  • Create a variety of typographic colors

  • Don't mix moods

  • Contrast distinct with neutral (rather than with another distinctive font)

  • Avoid combinations that are too disparate (e.g. narrow & expanded)

  • Keep things simple (try just 2 typefaces)

  • Vary point sizes



creative cloud - Emoji typing support in Illustrator or Photoshop?


Is there any support for emoji in illustrator or photoshop, and if so how do I access it? If not, why and when can we make this happen.




editing - 2nd Draft- Fix spelling/grammar or plot first?


I just finished the first draft of my novel, and Im going to put it away for at least a month.



The book has a lot of spelling / grammatical errors, as in true Nanowrimo style, I kept typing without fixing anything.


When I return, what should I focus on: Fixing the spelling and grammar first?


Or, should I read through the whole book, and look for plot/characterisation holes?


I know there is this question, but it focusses more on editing other peoples work, not your own.



Answer



There's no point in polishing work that you're not going to keep for the final product. I'd work through at the macro level first, cutting/adding/moving big chunks, and then I'd go back and look at the medium level stuff (style and flow, etc.), and then polish up whatever's left.


That said, my first drafts are pretty clean. If your spelling and grammatical errors get in the way of your critical reading, you may need to fix them first just so you can see what you've got for the bigger issues.


Are form progress bars when each section has multiple subsections a good idea?


I'm trying to redesign the progress bar of a long application process. It is currently designed with a "top level" progress bar with 6 steps. As the user goes through each step, a separate "sub-level" progress bar appears for multiple steps within each part in the "top level" progress bar.


The way it's currently designed today, the "sub-level" progress bar isn't always there. Each step just appears as you get to it, so it doesn't do a good job setting expectation the user for how much work they actually have to do.



I think it's also relevant to mention that with this application form, the user cannot jump around. It's important that they fill out the form in order because they need to go through multiple "checks" during the process.


Anyway, I want to redesign this progress bar. I'm wondering if providing this "dual level" progress indicator for a long application/form is a good idea. For example I'm thinking something like Turbo Tax might be a good example, but is this a good approach to take?


enter image description here



Answer



I think having sub-steps within a wizard with a progress tracker is not desirable but achievable as long as the pattern used to depict progress is different for main steps and sub-steps. That being said, you could reduce form complexity and increase ease of use by:



  • Capturing information about users in a profile section before they are asked to go through the process.

  • Provide users with option to save progress or automatically save progress for them (inform them when this is done).

  • Give users early notice within the form workflow about documents they need to prepare; for example, if references from official documentation is needed in step 3 of section 2 then at the beginning of section 2 tell them about it.



Below is an idea of a progress indicator:


enter image description here


Tuesday, March 19, 2019

Grid-based design in Illustrator -- need help setting up a grid!


I'm trying to explore grid-based layout design in Illustrator to help me create mockups for prototypes. I was wondering if anybody here could help me set up a grid based layout easily in Illustrator CS6? I was hoping to find step-by-step directions but I can't seem to find anything when I look online!



Answer



Just use objects


Guides are fine but I prefer lines and rectangles. I keep them isolated on their own layer for easy activation/deactivation. Smart guides will make it extra simple to snap to these objects.


I set up my basic grid unit and position it in one corner of the layout. Then I use a Transform each to tile it out to a full grid. That is, if you're using a uniform grid.


enter image description here


It also works well for grids with complicated geometry. Here's one I used recently for a branding project. Switch your smart guide angles to match your grid and you'll be loving Illustrator ;)


enter image description here




This is a really cool solution (if you're not on CS6). It generates your baseline grid as well as columns based on variables you fill in.


enter image description here


Preview mode by layer


Also keep in mind the fact that you can change between Preview mode and Outline mode in Illustrator at the layer level. This means, if you build your grid as shapes on a dedicated layer as described above you can switch to outline mode to make the objects more guide-like. Then you can switch back to a color coded or solid shape view just as easily. I often find this helpful on grids like the complicated example above.


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