Just a strange feeling: not even the simplest things like time and current weather (grade) we can obtain from our advanced technologies. So what good they serve?
It’s not a lie though, you are obtaining the time. It’s just rounded to the nearest second instead of rounded down, which is a pretty intuitive thing.
I hadn’t noticed until it was pointed out and it’s great. It always feels ‘wrong’ when you start a timer at (to use the example) 5s and the first thing you see is 4.something. I can imagine there were arguments about implementing this though.
There could be an argument in favour of rounding up too. Starts with a full second 5, then the very moment you see 0, it’s over. Very intuitive.
Yeah, I’m pretty sure this is how most people speak a countdown out loud. “Five…four…three…two…one…” and then “zero” or “time” or “go” means it’s over. You wouldn’t say “zero” if there was still any time left.
this makes the most sense to me, if they aren’t showing milliseconds, it ‘ending’ on zero seems far more reasonable, e.g. https://i.imgur.com/Y1AlKks.gif
I’ve always used this rounding up approach. The article touches on it but dismisses it as not useful when using it for hours and minutes. Of course, in a rounding up approach, you only want to ever round up the smallest unit you are displaying and continue to round down the others.
There is some philosophical argument about showing the rounded up time, however. If the timer shows 1s you might be inclined to believe there is at least a whole second left. With the rounding down approach, this holds true. For the rounding to nearest and rounding up approaches, however, the timer shows something different. Showing a value of 3s in those cases only indicates that you have no more than 3s left before the countdown expires.
My intuitive understanding of what a timer means is more inline with the presentation given by rounding down, but it is definitely strange to think that hitting 0 is not the end. I suppose that’s why I prefer the rounding up approach in the end even if I find it mildly misleading.
In fairness to GUIs, for a reasonable git IDE plugin, the first example would be click first deleted file, scroll, shift click last deleted file, right click, click checkout.
I prefer the shell, and probably would have done it the same way as the author simply because I don’t typically have any kind of git GUI open. But GUIs have their place.
My go-to example is mass renaming files. I will never in my entire life rename 200+ files manually. But I also don’t do anything like that often enough to have a dedicated GUI program capable of the task.
For renaming loads of files, vidir (often included in moreutils) is quite nice. It gives you a list of files in your $EDITOR and so you can use whatever power your editor provides to do mass renames.
I typically just use a bash for loop. The ${var#prefix}
and ${var%suffix}
variable substitutions usually do the trick. ${var/pattern/replace}
otherwise.
That said, I didn’t know about vidir
and it looks extremely powerful. Thanks for the tip!
zmv
is also quite nice for this: zmv '(*).jpg' '$1.jpeg'
. The globbing makes more complex substitutions easier IMO. But of course it’s less portable as it requires zsh.
There’s also rename (or prename) as (was) shipped with Perl. It might be a separate package nowadays.
Emacs also has similar functionality built in.
I assume the DC is based in the U.S. based on their rent-to-own shipping comment, but they do not explicitly state the location of the DC.
Are there plans to expand in future into other regions? I’d be good to hear some more details and plans, once out of BETA
make the long drive to our Sacramento co-location
It’s mentioned in the setup time section. I assume this means Sacramento, CA, which is indeed in the US.
We have commands that can cause harm require a captcha (i.e. “please type this random number and press enter”) when run in a production environment, but no captcha when run in a development environment.
The idea is that if devops are conditioned to enter the captcha in a development environment, they will be likely to enter the captcha without thinking when running the command in a production environment.
A similar argument can be made for --no-dry-run
; if it is required even in a development environment, devops will be conditioned to always provide it, and the added safety of --no-dry-run
will be negated.
The captcha provides additional safety: it prevents a potentially unsafe command from being saved in the history.
Do you also have a way to bypass the captcha in order to automate things? If not, this seems like a very poorly scaling solution.
Yes, there is a way to bypass the captcha for automated tools. This is particularly important when building tools on top of existing tools (in the spirit of the so-called “unix philosophy”).
Later in the article, the author mentions that it was running on a mac under xquartz, which may explain the latency.
Ludum Dare 48 is this weekend. It’s a game jam where you produce a game from scratch in 48 hours. I’ve been participating in these for several years now and it’s always a lot of fun.