|
Munkeymon posted:I had one of those online test technical screening things one time where the inevitable "where's the bug in this code" questions came up and the code 1) wasn't highlighted 2) wasn't fixed-width and 3) was a nested loop featuring i and j as indexes. When I went to highlight it to paste into an editor, I found it was in an image as well. "Fuuuuuck yooooouuuuuu" is what's wrong with this code but that wasn't an option for some reason?! Someday soon OCR will be as ubiquitous and powerful as, uh, the current state of our language translation software, and poo poo like this won't fly any more. And all the blind/illiterate people will be so much happier.
|
# ? Jun 1, 2017 19:30 |
|
|
# ? May 28, 2024 12:03 |
|
I used to debug code in a production system whose terminal had a 78 character limit. Let me tell you, it's not always more readable to split lines cleanly at 78 characters and add proper indenting on every split line. When you do that, you take up a *lot* more vertical screen space. When have a hard 78 character limit you'll also have a 40 character height, and that vertical screen estate matters a lot. I found it easier, sometimes, to read wrapped lines, even if they mess up the indentation. That's the problem with dogmatic 80-chars-or-die programmers. I've found that they've never actually worked in an environment where that limit matters, so they don't know what tradeoffs they're asking for.
|
# ? Jun 1, 2017 20:58 |
|
Arachnamus posted:I wish this was restricted to Go. Fuckin' vim xterm assholes. Buy a mouse. It gets better. Proper old-school System V vi will flat out refuse to run and just say 'Too wide' if your terminal has more than 80 columns.
|
# ? Jun 1, 2017 21:17 |
|
lifg posted:I used to debug code in a production system whose terminal had a 78 character limit. Let me tell you, it's not always more readable to split lines cleanly at 78 characters and add proper indenting on every split line. When you do that, you take up a *lot* more vertical screen space. When have a hard 78 character limit you'll also have a 40 character height, and that vertical screen estate matters a lot. I found it easier, sometimes, to read wrapped lines, even if they mess up the indentation. I work with parts that have a 72 char constraint. In general, I see nice clean indentation and a good use of space, but due to "more experienced" developers wanting to change minimal code I sometimes see 50 spaces before half a line of code and the beginning part of a block comment.
|
# ? Jun 1, 2017 21:30 |
|
Jabor posted:I use a proportional font for coding so talking about line length as a given number of characters always feels a bit silly. I too do all of my coding in Microsoft Word
|
# ? Jun 1, 2017 21:46 |
|
What's wrong with using a proportional font? That it doesn't fit with archaic traditions handed down from a time of punch cards and fixed-width terminals? I used a fixed-width for the the longest time. I put in a lot of effort finding the "most readable" fixed-width font to use (ended up settling on Consolas). Then I switched to a proportional font literally as a joke one April 1st, and then thought "holy hell, why aren't I doing this all the time?". Proportional fonts are ridiculously easier to read, hence why they're used for literally everything that doesn't have antiquated traditions stopping people from using them. The only thing I miss is ascii-art diagrams in comments.
|
# ? Jun 2, 2017 02:19 |
Jabor posted:What's wrong with using a proportional font? That it doesn't fit with archaic traditions handed down from a time of punch cards and fixed-width terminals?
|
|
# ? Jun 2, 2017 02:30 |
|
Jabor posted:Then I switched to a proportional font literally as a joke one April 1st, and then thought "holy hell, why aren't I doing this all the time?". Proportional fonts are ridiculously easier to read, hence why they're used for literally everything that doesn't have antiquated traditions stopping people from using them. What font are you using? Maybe I'll try a switch so that I feel like I'm reading a fine, airport page-turner instead of some lovely, over-engineered, 800 line class written by a consultant.
|
# ? Jun 2, 2017 02:31 |
|
I started with Verdana, but nowadays I'm using the Go font. (Stay away from the fixed-width version though, it's imo pretty bad)
|
# ? Jun 2, 2017 02:37 |
|
Some languages have indentation idioms that might break under a proportional font, but in general it's fine.
|
# ? Jun 2, 2017 02:38 |
|
Even if your language doesn't have semantic whitespace, it can be helpful to be able to horizontally-align related elements e.g. in function parameters, maps, documentation, etc.
|
# ? Jun 2, 2017 02:39 |
|
TooMuchAbstraction posted:Even if your language doesn't have semantic whitespace, it can be helpful to be able to horizontally-align related elements e.g. in function parameters, maps, documentation, etc. I'm the guy that does a Ctrl-A, Ctrl-K Ctrl-F in Visual Studio to auto-format your artisanal, hand-crafted whitespace to the language defaults.
|
# ? Jun 2, 2017 03:02 |
|
B-Nasty posted:I'm the guy that does a Ctrl-A, Ctrl-K Ctrl-F in Visual Studio to auto-format your artisanal, hand-crafted whitespace to the language defaults. I bet those are some great commits.
|
# ? Jun 2, 2017 03:15 |
|
Thermopyle posted:I bet those are some great commits. Pretty sure you can ignore whitespace on any service like Github or Bitbucket.
|
# ? Jun 2, 2017 03:50 |
|
TooMuchAbstraction posted:Even if your language doesn't have semantic whitespace, it can be helpful to be able to horizontally-align related elements e.g. in function parameters, maps, documentation, etc. Yeah, with a proportional-width font it's way harder to do something like code:
I also sort of feel like saying 'natural language doesn't use fixed-widths fonts so code shouldn't use it' is like saying 'natural language isn't syntax-highlighted so code shouldn't be either'. Natural-language documents can be typeset using things like Word or HTML or LaTeX that give you lots of control over how things are laid out. Code's just text. vOv fucked around with this message at 04:19 on Jun 2, 2017 |
# ? Jun 2, 2017 04:09 |
|
'Course, in cases like that, I prefer to do something likecode:
|
# ? Jun 2, 2017 04:16 |
|
Jabor posted:What's wrong with using a proportional font? That it doesn't fit with archaic traditions handed down from a time of punch cards and fixed-width terminals? As evidenced just now I'm all for throwing away archaic traditions if they don't still make sense, but there's still good reasons to go with fixed width. Alignment is one of them; though it's not going to make that much difference in most alignment circumstances, a font like that will typically have a narrower space character so your indent is going to be smaller than that of your colleagues even if you stick to the same standards, likely making it less scannable. A proportional font will also de-emphasise any narrow character by squeezing them between other characters, and narrow characters tend to be punctuation which while a literal afterthought in prose is pretty important in code. Up to you though, of course.
|
# ? Jun 2, 2017 04:20 |
|
Pollyanna posted:Pretty sure you can ignore whitespace on any service like Github or Bitbucket. Yes, you can.
|
# ? Jun 2, 2017 04:36 |
|
Thermopyle posted:Yes, you can. You add a query string to the url in a github pull request to do it. ?w=1 (Actually don't think it has to be 1, just truthy). But is this even possible through the UI? I don't know if it is, and I don't think it's an advertised feature? if not, why not?
|
# ? Jun 2, 2017 05:51 |
|
found this today in some toolingcode:
pre:DESCRIPTION The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
|
# ? Jun 2, 2017 06:03 |
|
vOv posted:Yeah, with a proportional-width font it's way harder to do something like This is an awful awful programming style that should never be used even in fixed-width-font-land, so there's no real loss there. Arachnamus posted:Alignment is one of them; though it's not going to make that much difference in most alignment circumstances, a font like that will typically have a narrower space character so your indent is going to be smaller than that of your colleagues even if you stick to the same standards, likely making it less scannable. A proportional font will also de-emphasise any narrow character by squeezing them between other characters, and narrow characters tend to be punctuation which while a literal afterthought in prose is pretty important in code. You need to pick the right font for sure. Like, obviously not Jokerman or Papyrus (Comic Sans turns out to be surprisingly readable, actually), but stuff like "how does punctuation look" is also something you need to consider. I'd disagree that punctuation is an afterthought in prose though - in my experience, prose with missing or rearranged letters is much more readable than prose without punctuation! I personally haven't had any issues with symbol legibility.
|
# ? Jun 2, 2017 06:12 |
|
vOv posted:Yeah, with a proportional-width font it's way harder to do something like The main problem here is that proportional width fonts expose the hypocrisy and web of lies that team spaces has been peddling for all these years. Don't let them destroy you with their lies!! First it's, "spaces look the same everywhere" and then it's "well yeah, of course fonts cause problems!" and then "why wouldn't you have to eat babies?". WAKE UP SHEEPLE! e: #TeamEBCDIC! Yeah, I know, gently caress it. RandomBlue fucked around with this message at 06:18 on Jun 2, 2017 |
# ? Jun 2, 2017 06:15 |
|
Editors could treat multiple spaces appropriately to line up function arguments if they wanted to.
|
# ? Jun 2, 2017 06:21 |
|
sarehu posted:Editors could treat multiple spaces appropriately to line up function arguments if they wanted to. Same with tabs but without infanticide, or worse, font fuckery, or worse, my posts.
|
# ? Jun 2, 2017 06:50 |
sarehu posted:Editors could treat multiple spaces appropriately to line up function arguments if they wanted to. LaTeX package Listings has some really neat whitespace handling even with proportional fonts. It makes for some very pretty printed code. I want an editor doing the same things.
|
|
# ? Jun 2, 2017 07:22 |
|
vOv posted:Yeah, with a proportional-width font it's way harder to do something like When the last survivors finally pulled themselves out of the rubble and watched the smoke clear, revealing the wasteland of destruction that was once their homes, not one of them recognized that fateful moment. Even vOv never dared to hope for even a fraction of his success. ... next time ... kerning ...
|
# ? Jun 2, 2017 07:59 |
|
While I'm sure it can be done right I'm going to discourage the proliferation of variable-width fonts if only because I have enough trouble switching between eight different editors and terminal prompts when pairing with a colleague without also having to squint at the latest part-serif display font Jerry from Data Platform downloaded from fonts.google.com this week.
Jaded Burnout fucked around with this message at 08:15 on Jun 2, 2017 |
# ? Jun 2, 2017 08:12 |
|
Arachnamus posted:While I'm sure it can be done right I'm going to discourage the proliferation of variable-width fonts if only because I have enough trouble switching between eight different editors and terminal prompts when pairing with a colleague without also having to squint at the latest part-serif display font Jerry from Data Platform downloaded from fonts.google.com this week. If there aren't thousands of other coding, design, implementation, platform or tooling concerns that would have an impact orders of magnitude beyond fonts then you must be working in the Olympus of dev teams and I envy you. You guys have openings?
|
# ? Jun 2, 2017 08:39 |
|
When I see a 6 foot pile of poo poo my first instinct isn't to take a dump on the top.
|
# ? Jun 2, 2017 08:43 |
|
Bongo Bill posted:'Course, in cases like that, I prefer to do something like
|
# ? Jun 2, 2017 09:06 |
|
evensevenone posted:found this today in some tooling I think it runs the command in a new pseudo-terminal, and I think git may produce different output based on if it has a terminal. Could be this tooling is run without a terminal and at some point git complained, or it previously just redirected /dev/null and git complained about that.
|
# ? Jun 2, 2017 09:06 |
|
Doom Mathematic posted:
|
# ? Jun 2, 2017 10:09 |
|
You're all wrong (depending on language features), as the correct answer iscode:
|
# ? Jun 2, 2017 10:49 |
|
Munkeymon posted:.Net sprang fully formed int being at version 3.5 (for no particular reas, uh, I mean, because that's a cool and good number is why) and I'll hear no more of this silliness about pre-generic data structures!
|
# ? Jun 2, 2017 13:29 |
|
Currently dealing with a front-end developer who is literally writing Javascript as if it were Java, inline @docs and all. I can tolerate that stuff, but the solution is also overly complicated and over-engineered, and the other developers (who aren't really Javascript or Java wizards) are flabbergasted. The engineer in question seems extremely picky and defensive about the way they wrote code, and it seems like they're actually a Java engineer who is just now getting into Javascript - which explains their style. Weird.
|
# ? Jun 2, 2017 15:14 |
|
Pollyanna posted:... a Java engineer who is just now getting into Javascript - which explains their style. Maybe weird, but I'd rather work with that guy than the usual shiny-framework-of-the-week chasing JS dev. Probably because I was that guy 10 years ago.
|
# ? Jun 2, 2017 15:25 |
|
5TonsOfFlax posted:Maybe weird, but I'd rather work with that guy than the usual shiny-framework-of-the-week chasing JS dev. Probably because I was that guy 10 years ago. Ehh, they're equally bad. Write code according to the idioms of your language and your team. Thermopyle fucked around with this message at 17:33 on Jun 2, 2017 |
# ? Jun 2, 2017 16:39 |
|
I usually code in vim and like 80 column limits with the rationalization that then I can fit more terminals with vim in them on the screen at the same time. I have a GUI editor set up somewhere with EVE Sans Neue as my proportional font, but I basically never use it.
|
# ? Jun 2, 2017 16:59 |
|
I have a 34" 21:9 monitor. There are no such things as line lengths in my reality.
|
# ? Jun 2, 2017 19:35 |
|
|
# ? May 28, 2024 12:03 |
|
Pixelboy posted:I have a 34" 21:9 monitor. There are no such things as line lengths in my reality. I have this at home and keeping to reasonable line lengths means I can go 3 up easy.
|
# ? Jun 2, 2017 19:40 |