Remix.run Logo
▲ beej71 a day ago

While I'm on board with having good html structure that prints well, and I'm on board with hiding navigation elements, etc., I'm not so on board with changing the default font size or fonts in the print version.

I just made a simple site that didn't set any font sizes anywhere, and a friend of mine complained that the font was too small on mobile. Do I detect a lo-res screen and increase the font size?

I know a lot of sites do exactly that, but I feel it's wrong. The user controls their default font size on their platform. What if they'd already increased it, and now I'm just making it bigger?

What if they'd decreased their default print font size and then I shrink it again?

I think it's best to leave those to the user entirely.

▲ximm a day ago | parent | next [-]

Absolutely, this is accessibility 101.

The one counter argument to this that I would accept is that users don't know about font settings. But the proper solution if for browsers to make it easier those settings rather than every single website having to add font controls.

▲cycomachead 20 hours ago | parent | prev | next [-]

While everyone probably should learn something about their devices, the defaults you provide to users should be good ones.

Drawing a line can be hard, but clearly the basic font should be contrast-y enough so that most people can read it, no? The user can control the defaults of many things on their devices, but we shouldn't require them to change settings to have a good experience. We already customize websites a lot.

I think it depends on the goals of the print version, but people spend a lot of time picking fonts and styles so things look good on a screen. I take this as saying you should supply the same type of attention to your print style sheet.

▲robinpie 7 hours ago | parent | prev | next [-]

This is why I don't use max-width and it gets on my nerves when websites do. You control the size of your window

▲wombat-man a day ago | parent | prev | next [-]

I had a professor who asked us to print source code for our projects for him to read. Looks like he's still at it. I'm sure he's being driven insane in these AI times.

▲batperson a day ago | parent | next [-]

Wild, did he ask you to use a colored printer for syntax highlighting?

▲lelanthran 15 hours ago | parent | next [-]

I program almost daily with only bold, italics and grey (for comments) in my vim rules for highlighting.

I can read my code just fine.

▲unrented7977 a day ago | parent | prev | next [-]

If your beard is long and gray enough you can do syntax highlighting on the fly

▲tourmalinetaco 10 hours ago | parent [-]

A well maintained beard is a pathway to many abilities some consider to be unnatural.

▲wombat-man a day ago | parent | prev | next [-]

we only had a black and white printer, I don't think they would spring for color. Also, iirc he had a script he had us run to print it, so it' not like we were printing straight from the editor.

▲jamesmiller5 16 hours ago | parent [-]

RIP vim `:hardcopy` :( .

For some harder C code (implementing `malloc` for example) my preferred debugging method was printing out the code and debugging it with a pen between classes.

I eventually realized being inside an editor gave me too much attraction to thrash with "just one more quick iteration & debug run..." and could actually end up more time consuming than being forced to reconcile my mental model with what I had already written by me double checking my assumptions.

Interestingly, some of my peers started picking up the habit for their own projects and we ended up having small "debugging" sessions by trading print-outs .

▲abhgh 16 hours ago | parent [-]

This is interesting. For a while I used to print out code and debug too - more due to resource constraints: didn't own a computer, and my high school's computers were available only for limited hours per day. I used to code my first iteration also on paper - so that in the limited computer use time, I could type in the code quickly and actually see it run. Wild times but I think it made me good at programming. My friend (who did have a computer at home, but lived far away) and I co-wrote a program called "graph generator" that could plot math functions, with me doing my share on paper and giving to him to type in :) This was in the Turbo C++ IDE and since GUI based programs were unusual (at least as a project in highschool - India, 1999) it temporarily made us popular. Well, wow, that was fun to reminisce!

▲sampullman 8 hours ago | parent [-]

Even in 2010 at Berkeley I was doing a fair amount of paper coding. Some of the professors gave paper-only tests, and we'd practice a bit since you didn't want a midterm to be the first time you had to do it.

Though I also remember sketching programs on paper as a teenager for my TI-83, since it was annoying to type everything out and then have to make a bunch of edits.

▲what 17 hours ago | parent | prev [-]

Why would you need color to read and understand code?

▲aaronbrethorst 15 hours ago | parent | next [-]

Source code has a structure, and some parts are more important to the reader than others. Good syntax highlighting makes the important parts easier to see; bad highlighting gives all parts the same emphasis. Notionally you could use font weight to convey this in a black and white medium, but color makes this easier.

▲crabbone 9 hours ago | parent | prev | next [-]

After working as a programmer for about a decade, I went back to college to try to complete my education. This was when I first encountered code printed in a textbook. And it was just black monospace font on white paper. No color, not even bold / italic etc. It was Java.

Initially, it was much harder to read, both because of the habit I've developed and because, I think, the author also didn't use a "fancy" editor to write their code, so it wasn't formatted properly, didn't observe naming conventions. Well, your typical college professor writing. My first reaction was to type the code into the editor so I can explore it easier. This, of course, also provided syntax highlighting.

Of course, it took extra time. So, eventually, for shorter snippets, I'd just suffer, skipping all the typing part. I later discovered it to be somewhat helpful exercise when using Git diff or other Git commands that displayed code snippets in terminal w/o highlighting. But then the industry caught up to it, and now I don't have to read unadulterated Git output like that.

So, my conclusion so far: highlighting helps to discern the structure, to process larger blocks of code and to navigate it more efficiently. You can get better at reading code that's not highlighted, but it's never going to be as good as reading the highlighted code. It just seems like the struggle to even get to the level where it's palatable not worth it as there are very few situations where it would come in handy.

▲dalmo3 11 hours ago | parent | prev [-]

Yes. People complain about AI but the downfall of human cognition began when syntax highlighting, formatting and indentation were introduced. /s

▲ a day ago | parent | prev [-]
[deleted]
▲danadam a day ago | parent | prev | next [-]

> I just made a simple site that didn't set any font sizes anywhere, and a friend of mine complained that the font was too small on mobile. Do I detect a lo-res screen and increase the font size?

Did you use

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
That would probably be enough to look good on mobile too.
▲beej71 a day ago | parent [-]

Yes, I did. :)

▲kccqzy a day ago | parent | prev | next [-]

You were right and your friend was wrong for not knowing how to increase font sizes on mobile. It’s actually an opportunity to teach them how to change page zoom levels in a browser. (I actually have the opposite problem: many sites make font sizes way too large and I often need to decrease zoom level.)

The only exception is that the layout of your website requires multiple columns so increasing either font size or page zoom doesn’t work well. For example gcc.gnu.org is challenging for a mobile browser if one prefers larger font sizes. You are fine if you aren’t doing that.

▲phoghed a day ago | parent [-]

Yeah lemme just fuck up my entire experience on the rest of the web and my phone in general to read my friend’s blog

▲kccqzy a day ago | parent | next [-]

Browsers remember your zoom settings on a per-site basis. Try using it before claiming it will fuck up the entire experience.

▲phoghed a day ago | parent | next [-]

> The user controls their default font size on their platform. What if they'd already increased it, and now I'm just making it bigger?

The person making the site however wanted someone to change their default font size

We have to also consider that the person in question is most likely not having a bad experience on every app and website, and that this guy just had a tiny font size on his site

Even this famously tiny fonted site is readable on mobile

▲kccqzy a day ago | parent [-]

Most websites regardless of whether they change the browser default font size or not, do not have my preferred font size. It is my responsibility to change my own browser settings to make me have a good experience. Browser makers have made this so easy, it even remembers the setting across visits now.

▲hahn-kev 12 hours ago | parent | prev [-]

Looks like in Chrome on mobile you can set it per site, but you need to dig into accessibility for that. I don't see a way to do that in FF, so you would have to set the default which would effect all sites.

▲hluska 9 hours ago | parent [-]

Firefox remembers your zoom settings on each site:

https://support.mozilla.org/en-US/kb/font-size-and-zoom-incr...

So no, you don’t have to set the default.

▲hluska 9 hours ago | parent | prev [-]

Its funny that you have such strong opinions yet seemingly zero experience using actual browsers.

▲ a day ago | parent | prev [-]
[deleted]