// Richard Hart / Hates_

Archive
computing

Move fast and break things

computing, life

I was thinking about the “Move fast and break things” approach to projects this morning. A few projects I’m currently working have been moving at a snails pace and the longer projects go on and the bigger they get before being launched fills me a certain kind of dread. I feel really comfortable launching with a few half baked features rather than everything in one big bang. When there are so many moving parts in a launch, no matter how much you test, real users are going to find problems, and trying to keep on top of them can drive you insane. It’s the difference between trying to steer a small sail boat vs a cruise liner. If you start small you can probably respond quickly to change and get to where you want to go than if you launch big and try and change course later on.

Now I don’t condone breaking things, but I do agree with the idea of moving fast and staying agile. So just “Move fast”, that’s all you have to do. Accept that things will break and things will need improving.

“A good plan violently executed now is better than a perfect plan executed next week.” – George S. Patton

Read More

Generate a random email address in TextExpander

apple, computing, osx

Made this short snippet to help generate random email addresses using TextExpander. Set the snippet content type to “Shell Script” and paste in the following. You’ll need Ruby installed which comes with most modern versions of OSX.

The snippet will generate a different address every minute and copy it to your local clipboard incase you want to paste it in again. It also uses YOPMail which you can check for emails too.


#!/usr/bin/env ruby -U
email = "#{Time.now.strftime("%m%d%H%M")}@yopmail.com"
IO.popen('pbcopy', 'w') {|io| io.write(email)}
print email
Read More

Hackintosh phantom wake from sleep

computing, mac

For some reason since updating Mountain Lion on my hackintosh my computer would mysteriously wake up in the middle of the night. As sleeping and waking had never been 100% I figured that it was just down to a quirk of having a hackintosh. But I did some digging and after some searching and log investigation I found the following entries:


[~]$ syslog | grep -i "Wake"
May 19 00:55:57 <Notice>: Next maintenance wake [Backup Interval]: <date: 0x7fe4899038b0> Sun May 19 01:38:25 2013 BST (approx)
May 19 00:55:57 <Notice>: Requesting maintenance wake [Backup Interval]: <date: 0x7fe4899038b0> Sun May 19 01:38:25 2013 BST (approx)
May 19 00:56:03 <Debug>: Wake reason: ?
May 19 00:56:03 <Debug>: The USB device 4-Port USB 3.0 Hub (Port 3 of Hub at 0x14800000) may have caused a wake by issuing a remote wakeup (3)

Which lead me to believe it was a config issue, and a quick look through the preferences un-earthed the following:

Energy Preferences

Disabling “Wake for ethernet internet access” has solved my problems and there haven’t been any phantom wake from sleeps since.

Read More

It’s my data

computing, spree

Recently I’ve been working on migrating an existing e-commerce site from InstanteStore to Spree and have been having a nightmare of a time trying to get the client’s data out so that I can start the job of importing it all. The trouble is a lot of the information is not exportable, and whatever data is available is only half of what you would expect. It’s starting to make me angry because as far as I’m concerned that data belongs to my client, and to add insult to injury, to get access to certain parts of the data they want to charge extra money to “build an interface” to it.

I can understand on free to use sites like Facebook/Instagram/Tumblr/Whatever-Startup that the price of usage might be my data and that I might not be able to take it and go elsewhere with it, but when you’re paying for a service I expect to have full ownership and access to my information.

Read More

Adding a custom Spree payment Gateway outside a Rails Engine

computing, programming, rails, spree

Adding a new Payment Gateway to Spree through a Rails Engine is pretty straight forward as you can hook in your new gateway after the initial payment gateway array has been created. This is how the spree_gateway gem does it:


initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app|
    app.config.spree.payment_methods << Spree::Gateway::AnotherGateway
end

If you want to do the same thing for your own project contained gateway it’s a little different. If you try to just directly edit the payment_methods array in an initializer it will get wiped out when the Spree core engine sets the initial bogus and simple methods. I got around the problem by hooking my gateway in using the after_initialize method. Here I’m hooking in after SpreeGateway:


Spree::Gateway::Engine.config.after_initialize do
  Your::Application.config.spree.payment_methods << Spree::Gateway::YourGateway
end
Read More