Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
amcgregor
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
amcgregor
14y ago
Disk, flash, or RAM are concerns any time you have many copies of the files. One large file or millions of small ones, it adds up either way! I picked tab-based indentation because of the flexibility it gives me and anyone else reading the
2.
▲
by
amcgregor
14y ago
With no downsides to using tabs over spaces, and wanting to preserve readable SCM diffs, saving 20% of the space for such diffs just happens to be a nice side benefit, not the primary one. (The primary one being flexibility in presentation
3.
▲
by
amcgregor
14y ago
Oh, forgot to mention: you can embed in source files editor instructions (between -*- for emacs, something I can't remember for vim) that specify a default presentation format.
4.
▲
by
amcgregor
14y ago
But not disk, flash, or RAM. And network transfers are not always compressed, say, if synchronizing with a WebDAV back-end with naive client software. (The vast majority of iOS WebDAV implementations suck badly in this regard.)
5.
▲
by
amcgregor
14y ago
How often? Daily; I use my phone and iPad while I'm mobile, out having a smoke, or whatever. At home I use my iPad more than my laptop. You don't keep your source code in a minified state, nor do you keep it gzipped; the storage/bandwidth
6.
▲
by
amcgregor
14y ago
The design of the blog is not under my control; if it was, it'd be a lot more flexible. (Responsive design FTW.) The lines that are 81 characters long benefit greatly from the increase to 120 characters. That was the primary reason for in
7.
▲
by
amcgregor
14y ago
Python is one-statement-per-line, which is already a pretty good limiter of line length. Just don't go crazy with ternary operators (which are hard to read anyway and thus against the Zen for more than the trivial cases) or literal definit
8.
▲
by
amcgregor
14y ago
I use an alternate form that doesn't require alignment to an arbitrary column and works with tab indentation without needing to mix: thing = { [→][→]some_key_1: some_var_1, [→][→]some_key_2: some_var_2, [→][→]some_key_3: some_var_
9.
▲
by
amcgregor
14y ago
I often use splits on my editors, and with 329 columns in my editor (with side-bar open) there is plenty of room. Fairly recently I was working with five simultaneous vertical splits and had no difficulty; my editor soft wrapped the few pa
10.
▲
by
amcgregor
14y ago
Tabs not simply because it "looks better", but because it offers me the choice. Unfortunately, like most arguments on this subject, you have brought no logical counter-arguments to the table… just personal attacks (I never feel bad ;) and
11.
▲
by
amcgregor
14y ago
Automation is a very nice thing. We, too, use Git hooks to run a wide array of checks and cleanup routines. The base that we use is from my hooks collection: https://github.com/amcgregor/snippits/blob/hooks/pre-commit-...
12.
▲
by
amcgregor
14y ago
If your developers are pressing space four times instead of the tab (key), and the editors aren't capable of reasonable wrapping policies, you should probably replace either the editors they are using… or them. The key point of my article
13.
▲
Your code style guide is crap, but still better than nothing.
(tech.matchfwd.com)
16 points
by
amcgregor
14y ago
|
48 comments
14.
▲
by
amcgregor
14y ago
Convienently, the solution I wrote allows you to utilize two or as many templates as you want, add and remove to the directory as you wish. For us, setting off a handful of template options for two weeks then seeing which one has higher co
15.
▲
Poor Man's Template A/B Testing (in Django)
(tech.matchfwd.com)
11 points
by
amcgregor
14y ago
|
2 comments
16.
▲
by
amcgregor
14y ago
Celery natively pickles the arguments to the background callable. Discussion of why we didn't just pass numerical IDs around is covered in the original article's discussion threads.
17.
▲
by
amcgregor
14y ago
promiscuous |prəˈmiskyo͞oəs| 2. demonstrating or implying an undiscriminating or unselective approach; indiscriminate or casual: "the city fathers were promiscuous with their honours." • consisting of a wide range of different things: Ameri