HNHacker News
TopNewBestAskShowJobs

brainlock

70 karma · joined January 20, 2010

submissionscomments
brainlock··on Why The Clock is Ticking for MongoDB
Thanks for spelling that out, I see that it can be a useful exploration tool.

For me though, the act of thinking about a problem in terms of data and relationships helps a lot in exploring and understanding what I'm dealing with. Even more so in an agile setting, where things can and will be changed often - the schema is no exception, it can be changed. No need to cast in stone the first schema you came up with.

But that's just my preferred way of approaching the problem :-)

brainlock··on Why The Clock is Ticking for MongoDB
> Relational databases are great, but they're almost an optimization -- they're way more useful after the problem set has been well defined and you have a much better sense of data access patterns and how you should lay out your tables and so on. But a lot of times that information isn't obvious upfront, and mongo is great in that context.

I think it's exactly the other way around. I prefer to lay out tables in a way that reflects the meaning and the relationship in the data. Only later, if there is a bottleneck somewhere, I might add a cache (i.e. de-normalize) to better fit the specific data access patterns that were causing trouble.

brainlock··on Debug UIWebView in your iOS app
If you absolutely need to debug something on the device in iOS 5, I wrote this a few weeks ago: https://github.com/brainlock/ios-remote-inspector

I had a rendering bug that only happened on the device, not in the simulator.

This opens the web inspector locally, and exposes a proxy on port 55555 for you to access from your working machine.

Not really useful on iOS 6 anymore :-) but still, useful on iOS 5.

brainlock··on Amazon Unveils $199 Kindle Fire Tablet
And again, all of this is US only. I don't understand this, they are able to ship a standard Kindle to Europe, why not a Kindle Touch?
brainlock··on The Best Science Fiction Books (According to Reddit)
I just finished the Commonwealth Saga + The Void Trilogy by Peter F. Hamilton, loved it. Both set in the same universe, the first two in the relatively near future (about 300 years from now), the trilogy in the far future (about 1500 years from now).

The trilogy can get a bit abstract, verging on the fantasy genre at times, but in the end the author manages to give an explanation that "makes sense" for everything, which is the thing I really like about his stories. Highly entertaining.

brainlock··on TimeHub. Create invoices from Github commits
The pollution comes IMHO not only from having the timestamps in the commit (and to fix that the idea of using git-notes that came up in a sibling comment seems to be a perfect fit), but more from trying to put too much in a single commit.

This could easily be fixed by using a feature branch, do nice self-contained and easy to read commits in the branch, then attach the time-logging and billing information to the merge commit (using git-notes).

brainlock··on Microsoft confirms 1.5 million Windows Phone 7 handsets sold since launch
I wholeheartedly agree and share the frustration. This only detracts from web apps in favor of native apps.

At this point a solution (or a way to mitigate the problem) would be something like phonegap. You still have to endure the pain of deploying the app (app stores, customers that don't upgrade, etc.) but at least you have to only support the browser that phonegap integrates (webkit, if I recall).

brainlock··on Why are we limited to JS in browsers - would a bytecode standard help?
Why do you find it depressing?

I'm not saying that there aren't better programming languages than Javascript. I'm just saying that there is a subset of Javascript which is really expressive and elegant.

brainlock··on Why are we limited to JS in browsers - would a bytecode standard help?
I'd add that it has functions as first-class citizens and closures. Javascript has for sure some crappy parts, but there is also a lot of good in it.
brainlock··on CVS's problems resurface in Git
If you use git submodules, what you do is exactly like tagging. An example from a project I'm working on:

at some point I want to add a submodule for a dependency I need

  $ git submodule add http://github.com/fictorial/redis-node-client.git deps/redis-node-client
this produces a commit with the following diff:

  diff --git a/.gitmodules b/.gitmodules
  new file mode 100644
  index 0000000..1695499
  --- /dev/null
  +++ b/.gitmodules
  @@ -0,0 +1,3 @@
  +[submodule "deps/redis-node-client"]
  +       path = deps/redis-node-client
  +       url = http://github.com/fictorial/redis-node-client.git
  diff --git a/deps/redis-node-client b/deps/redis-node-client
  new file mode 160000
  index 0000000..5050251
  --- /dev/null
  +++ b/deps/redis-node-client
  @@ -0,0 +1 @@
  +Subproject commit 505025187faf3cf7a211f5e6bfd261e45bd0b1dc
Later, when I want to update the subproject to a new revision, i just

  $ cd deps/redis-node-client
  $ git checkout v2.0 # or whatever
  $ cd ../..
  $ git diff

    diff --git a/deps/redis-node-client b/deps/redis-node-client
    index bdbfb96..a98a74b 160000
    --- a/deps/redis-node-client
    +++ b/deps/redis-node-client
    @@ -1 +1 @@
    -Subproject commit bdbfb96293f868dc01917a38af2dc4b66dd86157
    +Subproject commit a98a74b71c1ad90f15c58bb904d17906689c85f5
From the point of view of the parent git repository it only updated the pointer to point to another commit.
brainlock··on This was a triumph.
GLaD to see they're still alive ;-)
brainlock··on ADAM - An iPad-like device from NotionInk, India
Does anybody know about a release date?
brainlock··on Ubuntu 10.04 Released
You can download a Chrome extension/theme to match the Ubuntu one (it's called Ambiance if I recall) and have Chrome use the system window decoration (right click on a free spot in the tabs area). This way Chrome integrates perfectly.
brainlock··on Ask HN: How many have learned a language they hated just to get a job?
Maybe a bit late, but here is my experience.

At the end of the job search I had to choose among two companies. One was developing in python, the other in php. At first I felt inclined towards the python-based one, mainly because of my taste in programming languages. I had sweared to myself I wouldn't do java, asp or php, and like you I was disappointed at the fact that the vast majority of job offers required those languages.

After getting to know both, however, I ended up going to the php-based company.

I realised that what I actually dislike of java & co., more than the languages themselves, is the mindset that the people pushing them _often_ have. Mind you, often, not always. And that was the key.

The people at my company started this project about 10 years ago, and at the time php was the natural choice. They're not the old-aged, process oriented, boring, enterprise-y. They're agile, quick, creative, curious. We use git, introduced and extremely cool release management strategy, started a new project in python, moved a lot of the functionality on the client (on the browser), and so far even the work on the php backend has been a lot of fun (~1 year into this job).

I'd say the key factor is: do they have a hacking mindset or a process-enterprise mindset? With the right people php can be fun too :-)