HNHacker News
TopNewBestAskShowJobs

clarkdave

164 karma · joined November 18, 2011

https://clarkdave.net/about

contact@clarkdave.net

co-founder of LoyaltyLion (https://loyaltylion.com)

[ my public key: https://keybase.io/clarkdave; my proof: https://keybase.io/clarkdave/sigs/88m6iucm3wCPGSzi7ZwJNBlrIImo9rhh-6hKs7B0Kj0 ]

submissionscomments
clarkdave··on How CircleCI Processes 4.5M Builds per Month
Yes, it works very well. Earlier this year AWS automated the process of setting up a cluster backed by a spot fleet[0]. It's a very cost effective way to run lots of containers.

We actually use a combination of on-demand and spot container instances in production to keep costs down; we have some logic to provision more on-demand instances in case of multiple spot outages.

[0] https://aws.amazon.com/blogs/compute/powering-your-amazon-ec...

clarkdave··on How CircleCI Processes 4.5M Builds per Month
If you don't mind tinkering, I highly recommend Buildkite. They provide the management & cloud UI and you run the actual build agents on your own infrastructure.

When you get it going it blows everything else away in value for money. We routinely have hundreds of containers on-the-go and as many concurrent builds as we need; this all runs on a large AWS spot instance at a cost of about $50 a month. Added bonus: our docker cache is always available.

Buildkite provide a CloudFormation stack, but we just opted to run the agents as containers via ECS to make the setup quicker and managing them easier.

clarkdave··on I returned my 2016 MacBook Pro with Touch Bar
Agreed! The bar is incredibly sensitive. I run it in customised mode and often when hitting backspace I'll brush against the bar and activate something.

It got so frustrating that I gave up and added loads of whitespace to the far right side of the bar. It looks weird having a big chunk of empty space there, but it has dramatically reduced my accidental activations.

At this point though, almost two months in, I'm just apathetic towards the bar. I tried to get used to the 'app contexts' but it felt too forced for me. So now it's just a function bar with a bad UX. I rebound Caps to escape and got used to it because the touch escape, even with the extended hitbox, feels extremely unpleasant to use.

I'm hoping someone figures out a way to run an app that takes over the bar even when not in focus. I'd quite like, for example, to have a mini version of iStat Menus on it, the currently playing track, or some other cute widget.

I know the above is not how Apple intend the touch bar to be used (as a second screen), but I'd sure find it more useful than what it does now!

clarkdave··on Time-travel queries in CockroachDB
There's an extension to add partial support of this to Postgres: https://github.com/arkhipov/temporal_tables

I have used it in production for years and it works great, but does indeed use a lot of disk space if you enable it for all tables and have many updates.

It's not a full implementation (it lacks the new syntax like `AS OF SYSTEM TIME`) but you can work around that with `UNION` queries and the containment (`@>`) operator.

clarkdave··on Even the LastPass Will Be Stolen
A really cool feature I love about 1Password is that you can open up the `agilekeychain` file in a web browser and unlock it to view your passwords right there without the application. [0]

One of the few unique passwords I remember myself is that of Dropbox, so I'm always able to access my passwords this way from anywhere that has a web browser.

I don't know if this would have helped your particular situation (not sure if you can export from this stripped down interface), but it gives me peace of mind that if the software itself ceased to function, my passwords would still be accessible.

[0] https://support.1password.com/guides/mac/1passwordanywhere.h...

clarkdave··on How we built the new BBC Homepage
It's not just the blog - news.bbc.co.uk also intercepts middle clicks to external sites. Middle clicks on links to other bbc.co.uk pages work fine though.

Is it an accident or intentional? Anyone know?

clarkdave··on New Tube for London
I asked a PSA why it's slow and she told me that when under manual operation the train is "off the grid", so to speak, and is speed limited for safety reasons (other trains no longer know where it is)

The door closing works well for the DLR -- the PSA checks all the doors are clear and then shuts them all at once. This probably isn't viable for a tube because platforms are smaller and more congested.

clarkdave··on Amazon Takes a Big Step Toward Making Its Own Deliveries
I'm getting Logistics more often and haven't had any problems yet. It seems to be evolving fairly quickly - they now send me emails when a delivery has been signed for which they didn't do a few months ago. I hope that one-hour delivery windows (like DPD and a few others offer) will be the next step.

I have asked a few Logistics drivers what the deal is and they seem to just be contracting with their own unbranded van, so mileage probably varies a lot.

clarkdave··on Terraform
Thanks everyone at Hashicorp! This tool looks awesome. I wish it had been around years ago so I might have a nice version-controlled set of configuration files instead of a bunch of wiki articles and post-it notes ;)

I have a quick question I didn't see covered in the docs. Is there a best practise way to organise Terraform configuration files? Specifically when using it to manage different environments (e.g. staging, prod, qa). I'm thinking of some sort of folder structure like this:

  /
    production/
      web.tf
    staging/
      web.tf
    qa/
      web.tf
      test-servers.tf
So, `terraform apply production` would then plan and apply changes for production servers, `terraform apply staging` the same for staging, etc.

Would be interested to know if you have any thoughts on this, or if there's some sort of paradigm you folks are using internally.

clarkdave··on For $10,000, your car can drive itself – Cruise (YC W14)
I have this too in Chrome 35 on Windows 7.

Here's how it looks: http://imgur.com/SSMV8j6

clarkdave··on Numeral.js – A JavaScript library for formatting and manipulating numbers
Intl is rather excellent, and if you do want to use it there's an nice shim for it here: https://github.com/andyearnshaw/Intl.js

I've been using this with great results so far. It works well with a loader (e.g. yepnope) as Chrome and Firefox support it natively, as does IE11.

clarkdave··on GitHub Pages with a custom root domain is slow
It's not hard work to skip the "www" these days. DNS providers like Cloudflare support CNAME-like functionality on the apex domain, and if you're using AWS then Route 53 provides special "alias" records which let you hook the zone apex on to an ELB, for example. I'm sure other providers have similar functionality.

As for why, well, personally I prefer the look of a domain without the "www". It looks cleaner to me.

clarkdave··on Android betrays tethering data
I can't find an official word from Three about this, but I think this doesn't apply to existing plan holders.

I've done about 50GB/mo tethering last month and this with no ill effects yet. I'll be holding on tight to this plan for as long as possible, although as I'm on the rolling, 1-month contract version I suppose there's nothing stopping them from shifting me to a different plan apart from good will.

clarkdave··on Amazon, in Threat to UPS, Tries Its Own Deliveries
I've recently had a few of my Prime deliveries come via "Amazon Logistics" and it's lacking compared to DPD who used to do most of them.

Amazon Logistics has no depots (that I can see - they don't tell you who the courier is), no real time tracking, no delivery windows... If this is their attempt at doing it on their own it's a terrible start.

clarkdave··on A Better Way to Track JavaScript Errors
I'm a fan of Sentry, and their hosted service is very affordable. The fact you can push data to it on your own terms is great. I use it in combination with Logstash as an output, so any logged errors reaching Logstash are automatically piped to Sentry.

As a bonus, should you wind up deploying Sentry internally, you need only update the API host in Logstash.

clarkdave··on 'Fastest ever' broadband passes speed test
I live in Bethnal Green (just down the road from "Tech City") and our entire apartment block can't get fibre, just a measly 4Mb/s. I don't know if BT is to blame, or the building itself, but it sure makes finding a flat to rent a bit of a lottery...
clarkdave··on Why I Dumped Heroku for Ninefold
Maybe you need 3 dynos to match the performance of Ninefold's starter tier? I wouldn't have thought so though... 2 dynos will be plenty responsive and won't need to be kept alive with New Relic/Pingdom etc either.
clarkdave··on Sublime Text 3 Build 3059
There's a pretty neat Sublime plugin[0] which shows the base64 string of any image you open in the editor. This has saved me time on a lot of occasions.

[0] https://github.com/tm-minty/sublime-text-2-image2base64

clarkdave··on Rails 4.1.0 beta1 released
Native "enums" (types) in PostgreSQL are a mixed bag. They do have some advantages:

- you can treat them like strings (e.g. `SET status = 'approved'`, but they are a fixed size (four bytes)

- when queried they appear as strings too. Nice for debugging

- if you enter an invalid value (anywhere, not just in Rails) PG will throw a wibbly

But the biggest problem with enum types is if/when you want to add a new value to an enum type, it's annoyingly non-trivial. You can't run `ALTER TYPE ... ADD` because it doesn't work in a transaction. [0]

Instead you need to drop the type, recreate it (with the new value) and then alter all the tables that use this type. If you have a huge DB this can get a bit silly, although you can at least do it all in a transaction.

It is fairly trivial to add support for real Postgres enum types - https://gist.github.com/clarkdave/5936375 - but it's not as elegant as having it properly supported by ActiveRecord.

As other posters have mentioned here, it'd be useful if Rails' enum support used text instead of integers. You could then set up a Check constraint in PG to enforce the correct values and stop invalid data slipping into your database from other sources, whilst keeping the nice sugar in ActiveRecord.

[0] http://www.postgresql.org/message-id/3543.1317224437@sss.pgh...

clarkdave··on Everpix is Shutting Down
I really liked Everpix as a "fire and forget" method for backing up my photos. It's a shame they're shutting down.

As an alternative I'll probably switch to Dropbox, who have been improving their 'photo upload' features, one of which is the ability to automatically upload from iPhoto (similar to how Everpix did it).

One of my favourite features in Everpix was the "1 year ago today" emails they sent, which picked a few random photos from a year ago and dropped them in my inbox. That was a really nice touch.

clarkdave··on Amazon's minimum order size for free shipping is now $35
I can't speak for streaming or free books, but I'm a secondary on a Prime account and I can rent books through the Kindle Owner's Library (in the UK).
clarkdave··on Cockroach farms multiplying in China
I set up a mini cockroach farm to feed my lizard (a bearded dragon). They're easy to look after, very low maintenance, never bite and don't make much noise. I can't say I've ever wanted to eat one, but I can see why they'd be an excellent creature to farm if people are willing.
clarkdave··on JavaScript Testing Tactics [video]
I tried switching to (Iced)CoffeeScript to write tests (using Mocha and Sinon) for a Node app (written in JS). It went something like:

Week one: this is awesome. It's so clean!

Week two: asynchronous stuff is still an utter pain though. Hey, what's this IcedCoffeeScript...?

Week three: Wow, ICS is great. My tests look like Ruby & rspec now!

Week four: ICS produces unholy Javascript and unintelligible stacktraces. I've lost count of how many hours I've lost trying to figure out which line triggered a test to fail. Let's switch back to CoffeeScript and use async.

Week five: Still fed up not being able to identify which line failed at a glance, and have been bitten more than once by CoffeeScript's indentation causing subtle errors, which is easy to confuse if you do any copypasting within `describe` blocks.

Week six: I'm just going back to straight JavaScript. It's a pain but it does the job.

I've since given up on being able to write tests in Node.js with the same elegance/ease as I can with Ruby & rspec.

I still dig CoffeeScript, but now I only use it for client-side stuff. And as for IcedCoffeeScript, that has found a place in my toolbelt for small scripts, where its speed to write and lack of noise are worth the trade off in maintainability.

clarkdave··on Logstash joins Elasticsearch
Logstash, Elasticsearch and Kibana are just fantastic. After being unsatisfied with a whole bunch of Logging As A Service providers (I tried loggly.com, logentries.com and splunkstorm.com) I spent an afternoon setting up Logstash and co and couldn't be happier.

There's a neat demo of Kibana here: http://demo.kibana.org/#/dashboard/elasticsearch/Logstash%20...

The only thing that isn't fully baked in with this stack is alerts (e.g. sending an email if a certain error log message comes in), but you can do that using Logstash filters and outputs, although there's no pretty UI.

There are some excellent Chef cookbooks for setting up Logstash and friends too:

- Logstash: https://github.com/lusis/chef-logstash

- Elasticsearch: https://github.com/elasticsearch/cookbook-elasticsearch

- Kibana: https://github.com/lusis/chef-kibana

clarkdave··on HTML.js – Befriend the DOM
Reqwest (https://github.com/ded/reqwest) has worked well for me, and has EnderJS support too. The API is similar, but not identical, to jQuery.ajax.
clarkdave··on Opera Mail – standalone mail client
Looks interesting. I've been a Thunderbird user for a long time but the fact it appears to have been practically abandoned[0] by Mozilla is a shame.

The 'Import from Thunderbird' wizard appears to be a bit broken, though. It tried to import all my Thunderbird accounts but seems to have just munged them all into one account in Opera Mail. It would be nice if I could selectively import single Thunderbird accounts.

Also, as others have mentioned, it seems to be lacking compared to Thunderbird in auto configuration (in TB, I can enter a Google Apps email address and it'll figure out it's Google for me).

[0] https://blog.lizardwrangler.com/2012/07/06/thunderbird-stabi...

clarkdave··on Linode hacked, CCs and passwords leaked
Two alternatives often mentioned on here are DigitalOcean and RamNode.

I've only used DigitalOcean. My anecdotal experience from running a Chef Server on a 1GB instance has been pretty mixed. The price is good, but network and CPU performance feels very variable to me. A month ago their Amsterdam servers were unable to be resized, and there was nothing about it on their status page. I tweeted and was told they'd be working "some time later today". Doesn't fill me with much confidence in general.

I'd still choose Linode for anything of importance - their long reputation is well earned in my opinion. But, if this breach is true, I hope they handle it well.

clarkdave··on Google Reader shutting down
I believe it does - I use Cloudflare with my blog and every file, including *.html files, appears to be served by them.
clarkdave··on EA Apologizes For SimCity Disaster, Says It Was “Dumb”..
Previous discussion: http://news.ycombinator.com/item?id=5347289
clarkdave··on Firefox, I Just Can't Quit You
I use Chrome and often have ~100 tabs open. I spread them across multiple windows and try to keep related tabs together in their own window.

I use the excellent Session Buddy[0] extension to make this easier. With that, I can save windows ('tab groups') and restore them easily, and it also has a nice list view showing all windows I have open and the tabs in each (which is usually the best way to find a single tab).

[0] http://www.sessionbuddy.com

← PreviousPage 2 of 3Next →