HNHacker News
TopNewBestAskShowJobs

tgpc

35 karma · joined February 18, 2012

software engineer

ex-google, ex-banking, ex-Apple

tgpc.at.hn

submissionscomments
tgpc··on What future for BT and the UK's broadband?
Anecdata: I live in central london and the best connection I can get is a 12mbit ADSL2+ line :-(
tgpc··on Why Not Insider Trade on Every Company?
I believe if you become a member of the US Congress you are explicitly excluded from insider trading laws. So you could always stand for office.

Sigh.

tgpc··on The Man Behind the Curtain: Commercial games with source code releases
I loved that game - thanks for sharing the code :-)
tgpc··on UK inflation rate turns negative
Agreed. I think what the government meant to say was 'we ignored the thing that is going up in price, so there is no inflation'.
tgpc··on Show HN: Wget-finder
such a cool idea :-)
tgpc··on Will the UK's gas holders be missed?
+1

(I also agree with the points below about the housing shortage being localised. We should do what Silicon Valley did a long time ago and move some firms to a new area.)

tgpc··on OpenELEC 5.0
another one: any chromebox (and use the EZ Setup script for OpenELEC) (I have the hp one and am very happy with it)
tgpc··on Even Silicon Valley Tilts Republican
paywall :-(
tgpc··on Domoticz – Open source Home Automation System
Cool :-)

I have one of these: http://www.uk-automation.co.uk/products/RFXCOM-RFXtrx433.htm...

Plugged into the RPi that is running Domoticz.

Domoticz provides URLs that trigger scenes when hit.

tgpc··on Domoticz – Open source Home Automation System
Domoticz works well for me. 433mhz lightswitches and a home cinema happily controlled from Roomie Remote.
tgpc··on Google Reports Better-Than-Seen Revenue Growth
interpretive dance for robots?

(I'd really like to see that...)

tgpc··on Android's Hugo Barra leaves Google
Oh come on. Both Dave Burke and Hugo Barra are hugely talented people and great to work with.
tgpc··on Ask HN: How much more is there to Google the company than meets the eye?
(ex-googler here)

google is pretty good about this. if you're a googler, you'll find out about most of the other things going on. there were a few exceptions during my time there (Android, Wave), but the teams involved always came clean to Googlers before they told the world. The culture is definitely very open.

my suggestion: join and find out :-)

tgpc··on Intel’s Profit Falls 27% as PC Sales Drop
re 1: free windows for personal use? the OS market is more competitive now, that should have an effect on price
tgpc··on Ask HN: What is the unit in unit testing?
Choose units that have clear interfaces between each other.

Say you have (in this example, Java) classes A, B and C. A is public, B is public, C is package local to B.

It might make sense to test A independently, possibly with a mock B.

Then look to see if B and C can be tested together - the package local relationship suggests they may be the same unit.

There are no hard and fast rules, IMHO. If your tests are a world of pain, consider breaking things down in different ways.

Checking for a 500 sounds like it might be an acceptance test. Only hit the interface your program exposes for these!

As a worked example:

class PageGenerator { Page generate() throws ServerException { ... } }

class HttpProtocolHandler { HttpResponse handleRequest(HttpRequest req) { myPageGenerator.generate(); } }

Unit test PageGenerator. Assert that it throws a ServerException on error.

Unit test HttpProtocolHandler. Assert that if a mock PageGenerator throws an exception, the HttpResponse from handleRequest has status 500.

Acceptance test both together. Start the web server and make an actual HTTP request you know will fail. Assert that the response code is 500.

Happy to help more if you would like.

tgpc··on Ask HN: Looking for a Quiet Windows Desktop
Might be useful:

http://www.tranquilpc.co.uk/ http://www.quietpc.com/

← PreviousPage 2 of 2