4 ms·
I remember bikeshedding with my coworkers about this topic a few years back while coming up with lint settings. We ended up analyzing all current line widths an
by juanbyrge 6y ago
I remember bikeshedding with my coworkers about this topic a few years back while coming up with lint settings. We ended up analyzing all current line widths and realized that something like 98% of lines were under 110 characters, so that is what we ended up using.
- krferriter 6y agoI think a lot of terminals just set that as the default window width. No real reason for it, I usually snap to half the screen width immediately anyways. That turns out to about 105-120 characters width. Some people might just not resize it most of the time. Especially on Mac where efficient window management just isn't a thing.
- winrid 6y agoA note on your last sentence. Once I used my Win10 laptop at an interview at Apple. The interviewer saw me drag one window the the side, snap it, and then select another window to fill in the space. He said, wow, Windows is really nice! :)
- JoshTriplett 6y agoI use keyboard shortcuts for that: Win+left and Win+right will maximize a window on that half of the screen. That makes it easy to quickly have a terminal or editor on one half and something else (like a browser or PDF) on the other half, using only the keyboard.
- kstrauser 6y agoThe #3 productivity app on the Mac App Store is a $2 app that enables this on Apples: https://apps.apple.com/us/app/magnet/id441258766?mt=12 https://apps.apple.com/us/app/magnet/id441258766?mt=12
- thedirt0115 6y agoHammerspoon can do this (and way more!) for free :) https://www.hammerspoon.org/go/#winresize https://www.hammerspoon.org/go/#winresize
- winrid 6y agoI'll have to try this.
- cpeterso 6y agoI recommend the open-source macOS window manager "Rectangles". You can install it using Homebrew or download it from their website: https://github.com/rxhanson/Rectangle https://github.com/rxhanson/Rectangle
- sorum 6y agoIt’s _literally_ the first app that gets installed on a fresh machine for me.
- _jal 6y agoI actually really hate that behavior. I arrange windows to provide the information I need. That's usually a strip on the left to show the mailbox pane of my mail window, a strip below that for slack channels, and a finder window on a scratch directory. To the right are my work windows. Window snapping makes that impossible, about the only thing you can do is pretend you're using a tiling WM and cmd-tab any time you need to see anything, or waste an inflexible chunk of screen on it.
- _ZeD_ 6y agohttps://pureinfotech.com/how-resize-two-snapped-windows-at-the-same-time-windows-10/ https://pureinfotech.com/how-resize-two-snapped-windows-at-t...
- ObsoleteNerd 6y agoHave you seen Powertoys[0] FancyZones? It’s honestly in my top 5 Windows 10 apps of all time and it’s free. Fully customisable window zone manager allowing different zone layouts on each monitor and with hot key support. This should be standard in Windows IMO. It has absolutely transformed how I work and noticeably increased my productivity. [0] https://github.com/microsoft/PowerToys https://github.com/microsoft/PowerToys
- ken 6y agomacOS has supported left-and-right snapping ("Split View") since 10.14. Maybe your accidental demo was the inspiration!
- chipotle_coyote 6y agoI've gotten used to doing that not with the mouse but keyboard shortcuts, using an, um, let's call it venerable third-party Mac program called Moom. Moom has a drag-to-snap feature similar to Windows' functionality, but whenever I enable it, I find myself constantly resizing windows by accident. This is funny to me only in that it seems really ironic that as a long-time Mac user who's been known to argue with the "only use the keyboard" crew over the relative virtues of pointing devices, this is something I do way better with the keyboard.
- rbanffy 6y agoMacs have been doing that for ages.
- RHSeeger 6y agoBut the thing to remember is that you don't need to have a rule of "lines must be no longer than this". Instead, it should be "aim for lines no longer than this", and then sometimes, you need longer because it makes sense in that specific case.
- _ZeD_ 6y agoHow can you make a linter for this?
- alanbernstein 6y agoUse warnings for long lines instead of errors?
- erik_seaberg 6y agoIf the author thinks it's okay, and the reviewer thinks it's okay, a robot that can't actually understand code doesn't need a vote.
- SenHeng 6y agoThe reason for the robot is to have an impartial judge where neither author nor reviewer are okay with the opposing judgement. At the end of the day, a human’s judgement cycle is better reserved for something of a higher priority/use.
- erik_seaberg 6y agoBoth parties should be able to cede style arguments graciously. You can't really win the argument by quoting policy, only postpone the argument and burn team goodwill.
- pas 6y agoAnnotate the long line to ignore that particular linter rule. This makes it clear that it's not because the coder was lazy, ignorant, etc.