Kind of strikes me as something the editor could do ad-hoc. Maybe the tab character could return to let programmers tell the editor to align the adjoining lines according to the tabs. Would work well at least in your example.
Yeah this is nice. All we need now is for this to be supported in all major text editors and we're set!
The only possible issue (not sure how it's handled, can't remember if/how gofmt handles it either) is when sometimes you actually want something to be misaligned because the width is so far out of the norm, e.g:
int const1 = 10; // There's lots of space here for a long comment
int const2 = 5; // Here too, unless the tabs get moved too far right
float const3 = ( const1 * 123.45 ) / MAGIC_CONSTANT; // Not here.
Normally when this happens I try to regroup the code so that "plain" constants are together and long formulas are in another group, but sometimes the order is important for some reason or doesn't make logical sense to regroup items, so the formatting has to suffer a bit.
As long as you rely on the tab character to signal the programmer's intent on inserting an elastic tabstop, that's not an issue. In this case, insert a \t in front of the comments on the first two, but not the third line. All three lines could have \t's in front of the equals character so align on it.
The other nice thing is that it degraces quite gracefully in non-supporting editors.
The problem with busy crossings is that if both cars and pedestrians have 'green' at the same time, and the traffic is busy (i.e., someone would be walking/driving for most part of the green light), then it's very inefficient for cars needing to make the right turn, that need to cross with the pedestrians. In some street plans (e.g., interleaving one-way streets w. no left crossings) the right-turn traffic is very heavy and has a separate lane; so delaying them is bad.
There are two okay solutions - either you desync the lights, so that there's some gap where the pedestrians have a red light but cars already/still have green, so that they can make that turn; or you make a 3-phase crossing; A-cars have green in one direction; B-cars have green in the other direction; C-all cars stop and pedestrians can cross across and diagonally. It works okay.
What's not a solution - 'right turn on red' doesn't solve it; this problem matters in heavy car/foot traffic, and in such traffic there aren't any safe opportunities to do so.
I don't think it's that common - I've only seen it a couple of places, but it happens. Most places in Europe I've been, there's car traffic going in parallel with the pedestrians.
The most "famous" example in Europe of all traffic being stopped at once, I suspect is Oxford Circus in London, where they changed to start doing this a few years ago.
The reason to do it there, though, was to allow pedestrians to walk in any direction (diagonally as well) across one of the busiest crossings in the country. This BBC article refers to it as a "Japanese-styled system":
Most sets of traffic lights in the UK allow diagonal crossing, as in all traffic stopped at once, it's just not that common to encourage pedestrians to cross diagonally. What you never get in the UK is the condition described above, where pedestrians and drivers are directed to use the same bit of road.
There are also plenty of junctions where some car drivers are allowed to proceed while on other bits of the road, pedestrians are allowed to cross. So (typically) each road into the junction has a central island and the pedestrian controls for each half of the road are separate. On those junctions, it's never safe to go across the middle as there will always be some traffic moving.
I thought it was a good collection of historic developments -- military involvement and spending, the history of the Internet, the history of (domestic) surveillance, the revolving door between government and corporations, somewhat obliquely advertising and changes in the financial system -- but it could have done a better job tying it together.
I already knew most of history and would have preferred to read a much more thorough treatment of the parallels and/or relationships between these topics and agents.
may be correct or it may not be, I can't really tell quickly because it's so oblique to me. Combining decimal and binary arithmetic like that is a bit too old school for me -- of course I still use it on occasion but I try to avoid it. I guess it's second nature to game devs.
What's wrong with
padded_size := ceil(size / 2048) * 2048
apart from the fact that it's much much slower but still really really fast in what I can only assume is a part of the source where performance doesn't matter, anyway.
The corrected version is more recognizable to me as "round"; I believe this is a fairly common pattern in code that needs to round or align to powers of two.
However, I'll agree that it is perhaps overly clever. I recently wrote some code that used this pattern, except I had remembered it wrong and wrote something like:
padded_size := (size + 2047) & ~2048
(2048 instead of 2047.) Luckily it was caught in code review, but it's worth being a bit more explicit; our solution (aside from fixing the number) was to add ASSERT(padded_size % 2048 == 0) so that it was clear what the code was trying to do.
That certainly explains why there are so many iOS exclusives. Here I was blaming the Android platform or foolish developers, when in fact Apple's aggressive business practices were -- at least partially -- to blame.
Also serves as a reminder what we, both as devs and users, gave up when we put ourselves at the mercy of approximately 2.5 app store operators. There's no need to remind me what we gained, I'm aware. The question is rather if we can get a system that combines the best of both worlds.
Basically it accesses your last.fm profile to get a list of songs you listened to one/two/etc years ago and assembles a corresponding Spotify playlist. I've been pretty diligent in tracking my played tracks on last.fm, and it's neat to jump back in time to see what I listened to back then. If you don't use last.fm, you can try it with my account (last.fm data is public): http://deja-entendu.zomg.zone/morsch/5y-ago
80% of the motivation is having an excuse to try out Scala's Play framework. :)