HNHacker News
TopNewBestAskShowJobs

cirwin

1,249 karma · joined April 12, 2012

submissionscomments
cirwin··on A safer git checkout
I know :). See https://github.com/ConradIrwin/git-aliae#faq.
cirwin··on A safer git checkout
Git stash solves a different problem, which is "I want to save these changes, and get them back". git-cof is optimized for the use-case of "I want to get rid of these changes, and I'll probably never use them again".

The most obvious difference is that commits made with git-cof never show up in git log --oneline --graph; but also they get garbage collected automatically, you don't have to manually go through "git stash list".

cirwin··on Ampex - concise readable Ruby blocks
It's certainly not "free", but as the method_missing calls are all outside of the loop ((0...1000).map(&X.to_s) calls method_missing only once) the impact on code is minimal.

I've also found using perftools.rb that it's pretty easy to spot ampex — there was one place where we were using it in a tight nested loop and removing that made a measurable difference over tens of thousands of iterations (just as converting &block parameters to implicit yields makes a measurable difference); but mostly the causes of slowness in our app have not been this.

cirwin··on Ampex - concise readable Ruby blocks
Consider you have two of these things close together:

  [10, 11, 12].map{|x| x.to_s(16)}
  [:baz, :bam, :bar].map{|x| x.to_s(16)}
At least for me, I tie the 'x's together in my head; so I have to concentrate to realise that there are two different 'x's.

I've not done any formal research into this, it would be interesting to see whether there's actually a perceivable difference between the two styles.

cirwin··on Start sending dates the right way (aka The ISO8601 101)
Very good advice! ISO8601 is a perfect tradeoff between the machine readable Unix timestamp, and the human readable mess used in http.

The only thing libraries often get wrong is that the timestamp should always be present and default to 'Z'. It's pretty rare to want timestamps in local time except during debugging, but that's often the default. It catches a lot of people out.

cirwin··on Show HN: My 1-year project, iPad IDE with GitHub and Heroku integration
As someone who uses both iPads and vim a lot, I'd disagree with this.

The iPad screen should be ideal for making selections with your fingers directly because the keyboard and the code are so close together.

It currently doesn't feel ideal, I agree, because text boxes are designed to prevent you shooting yourself in the foot when you touch the screen by accident. A power-user tool could remove a lot of the safety and slowness from making selections.

cirwin··on Tossing Out IRB for Pry
One of the coolest things about pry is how it doesn't need to monkey-patch Object in order to add custom functionality. The command-system stands above the ruby level.
cirwin··on How the Professor Who Fooled Wikipedia Got Caught by Reddit
I agree that this behaviour is quite objectionable, though for a subtly different reason.

In particular it's not a case of malicious spreading of misinformation, it seems that in the case that the hoax worked the lies were deleted.

Rather it's a case of abusing a public resource. It feels to me somewhat like training a group of school-children to play Rugby on a village bowling green. Sure the damage to the grass will be undone over time, and sure the chance of knocking over any real old ladies is very small; but it's still an irreverent gesture that shows a dangerous lack of respect.

In the real world we have checks to make sure this kind of behaviour doesn't get too out of hand; on the internet we've so far managed to avoid the need. I hope that continues.

← PreviousPage 3 of 3