Questions tagged [code]
In computer science, code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.
32
questions
3
votes
1
answer
147
views
Why is monospaced text often smaller than regular text?
I often see that monospaced text is smaller than regular text in the same context. Here are some examples:
Crafting Interpreters has the main font 16px large and the monospaced font 13px large.
...
2
votes
1
answer
233
views
Struggling to make an accessible data table with clickable rows!
We're currently working on making our data table accessible. Our main concern is the whole clickable row that triggers a side sheet. The entire row is clickable, and a part of its content may be ...
1
vote
1
answer
54
views
Do line numbers in a code theme need to meet WCAG AA contrast?
We're designing a custom code theme which displays line numbers, and we're having some internal debate whether these line numbers need to meet WCAG AA contrast guidelines? They're not the main body ...
2
votes
1
answer
144
views
How should non-monospace code listings be marked up in HTML? [closed]
For marking up source code beyond small fragments embedded in normal text, the official recommendation seems to be to use the code and pre elements. And this works fine if your listings should reflect ...
3
votes
3
answers
144
views
Differentiate Design Systems incl. code-snippets from repositories
I'm currently doing some research on design systems (hereafter DS) because we want build one.
Context
Requirements for a DS
guides our designers
when building something that needs to conform to our ...
1
vote
2
answers
673
views
Are most QR codes just used to encode URLs?
My understanding is that all of the QR codes being scanned by Chinese users in WeChat are actually just encoding plain old URLs. I'm not a WeChat user, but this suggests to me that if I (painfully) ...
1
vote
1
answer
75
views
What color scheme is this [closed]
I'd appreciate some info on (the exact, an underlying or a similar) color scheme used for styling code samples on this page:
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-...
34
votes
6
answers
23k
views
Telephone input (+ country code)
I am asked to improve the sign-up process of a double authentication system.
At one step there, we ask users to input their telephone number. Right now users have to click on the flag and choose ...
2
votes
1
answer
506
views
Why draw a grid behind text/code in the editor?
Two GNOME applications (Builder and Text Editor) have an option to draw a faint grid in the background of the text editing window. The grid does not map neatly onto the fixed-width font.
Does this ...
1
vote
1
answer
126
views
How to design configurable scripts for non-programmers [closed]
I have a python script that allows users to parse addresses when batch-editing a table.
The script allows the user to choose whether to return the house number or the street name to the field (by ...
0
votes
1
answer
50
views
If I need to show a list of http methods for selection, is there a recommended order in which to display them?
I'm working on an API management product, and someone has suggested that we present the methods in alpha order:
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
My hunch is that this is not the best order, ...
0
votes
1
answer
92
views
Writing other color spaces than RGB in hex
I'm working on an iphone application that is going to feature a custom color selection tool. The application supports various color spaces and I'd like to use hex because the codes are shorter and ...
0
votes
1
answer
59
views
Scaling relative size of nested parentheses in code editors
I was coding today and the thought occurred to me: why is dynamic scaling of the relative sizes of nested parentheses/brackets/curly braces not already a common feature of code editors?
One often has ...
4
votes
2
answers
554
views
How to make code examples accessible in a document?
I'm creating a MS Word document (and will probably convert it to PDF later on) for a visually impaired programming student.
I'm following all the guidelines about text semantics, like correctly using ...
9
votes
2
answers
1k
views
Why is stackoverflow and blog layout ignorant of screen width? [closed]
Take https://stackoverflow.com/questions/33131200/spring-ignores-property-file-in-current-directory-using-that-in-classpath-instea.
Most monitors I use these days are 1080p or atleast 900 anyway, yet ...
4
votes
1
answer
207
views
What's the best way to show multiple options for opening a codebase?
I'd like to give users of a desktop app I'm working on the option of accessing their local code either through the Windows Explorer/Mac Finder or through the command-line, what's the best way to do ...
0
votes
1
answer
2k
views
select date range in two inputs [closed]
So I was trying to add date picker to select my StartDate and EndDate. I have no problem when using the usual datepicker.
What I'm aiming for is something like this:
By clicking on the text input, ...
8
votes
3
answers
4k
views
Why is == the standard equality operator? [closed]
In all the programming languages I have ever used, the comparator for testing a mathematical equivalence is ==. For example, in python:
if 7 == 8 - 1:
Why are all, as far as I am aware, programming ...
25
votes
7
answers
13k
views
Best way to display code to non-programmers
I'm asked to analyze the program responsible for printing our invoices. (Via SAP script)
This program is pretty old and contains more than 4.000 lines of code. It sets a lot of different variables ...
2
votes
1
answer
103
views
Where I can put link to popup with input for promo code?
I am mocking up a very minimalistic user-account page, and I have a mockup:
This is mockup probably most important subpage. This page will be like "command center" for a user because he will do ...
6
votes
2
answers
3k
views
What's the best way to present variables in a WYSIWYG editor?
I'm working on a WYSIWYG editor, similar to medium.com. We need to support variables inside the editor. For example, you might want to add text: Hi, *|FNAME|* which would be replaced with Hi, Gustavs ...
7
votes
6
answers
1k
views
Better UI for exchanging blocks up and down
I have developed a UI as shown below:
Now I want to add a functionality to this UI that if user wants to exchange positions of if and else if blocks, he must be able to do that.
One option could be ...
5
votes
3
answers
234
views
Code reference site for developers
I'm looking for any UI / UX evidence for what makes a good code reference site. The information is a set of entries of classes (which contains properties and methods), subclasses, functions, and hooks ...
0
votes
1
answer
373
views
Best Practices for Code Editor and Auto-complete
I am working on a code editor application. The app will be web based and currently I am trying to investigate different best practices and value add to give the developers a reason to use the app.
...
5
votes
3
answers
2k
views
Ergonomics of computer code [closed]
Earlier I've asked similar question at StackOverflow and was ruthless downvoted. Yet I believe it to be absolutely viable and useful. At least for me as a software developer.
There are many holy war ...
4
votes
1
answer
877
views
Is there a definitive answer to the line length readability question in the context of programming code
Is there is any definitive research that attempts to answer what character counts make the most human readable line lengths for programming code (typically mono-spaced font, high liklihood of small ...
6
votes
6
answers
1k
views
How tech savvy a good UX Designer should be?
I am very new to UX and just trying to see whether I'm going to be a good fit to the field (obviously I'm going to find that out via hands on experience starting my internship next week). However if ...
0
votes
2
answers
109
views
How to make tags in email template editor clear to all users?
I'm working on a web application where users (of an organization) can edit email templates. For example, one template would be used to confirm an appointment (that a client has made with the ...
1
vote
2
answers
466
views
Saving a field as a preset
I have an entity (say, an event) the user needs to create periodically.
In its attributes, the user needs to enter a range in a text field that is a technical specification (complex). The user will ...
1
vote
1
answer
548
views
Best way to handle code wrapping on a narrow viewport [duplicate]
Note that this is not a duplicate of this question.
I reviewed it before asking the question and the accepted answer is stated as unacceptable in the "Solutions that won't work" section below.
My ...
2
votes
1
answer
86
views
Enable users to add parameters to integration code mindfully
I'm trying to design a screen that will allow our customers to generate integration code (to integrate to our application). I would like to demonstrate to the customers that they can add additional ...
10
votes
9
answers
4k
views
How should text wrap in a code block?
I am working on an application where code will be shown on a mobile device. This gives us a constrained width as horizontal scrolling isn't a desired choice for code with long lines. So we have to ...