HNHacker News
TopNewBestAskShowJobs

dhruvbird

838 karma · joined April 2, 2010

Copy this into your address bar and press "enter" to visit my home page:

javascript:window.location="http://"+window.location.search.match(/id=(\S+)/)[1]+".com"

submissionscomments
dhruvbird··on Why you should use talloc for your next C project
On the whole, I think talloc() is targetting a very specific use-case and if you have that it would be great to use (just like obstack).
dhruvbird··on Why you should use talloc for your next C project
How does this work for a case like DOM nodes? Where each child is constantly re-assigned parents? Is there any way to reset the parent?
dhruvbird··on Median of Medians Algorithm for finding the median of an array of numbers
Actually, the median of the medians is used to find the real median
dhruvbird··on Median of Medians Algorithm for finding the median of an array of numbers
I haven't worked out the recurrence myself, but considering 3 as the partition size, we get the recurrence [1] (below).

T(n) = T(n/3) + 4n/6 + O(n) __[1]

It seems as if this doesn't workout to O(n) whereas if the middle term is 7n/10 (parition size = 5), it does work out.

dhruvbird··on An Introduction to Compassionate Screen Scraping
I can't help but mention that you should probably be using node.js with the jsdom module for such a task these days. You can get the complete power of jQuery with jsdom, making screen scraping child's play
dhruvbird··on The unofficial Google shell
I've made something like this for DuckDuckGo, but haven't released it since I want tab-completion (uses a static list for now). Will release as an official UI once DDG gets search suggestions.

http://dhruvbird.com/tty.html

Edit: There is no GA tracking on this page even though I use to for my site (other pages) - to keep with the general privacy experience of DDG

dhruvbird··on Ubuntu Unity usability testing results and analysis
wow! this is how usability tests should really be done! :-)
dhruvbird··on Why Recessions Suck More Than Expansions Rock
It's simple really. If you increase the value of 100 by 10% and then decrease the resultant by 10%, you get an overall reduction in value (even if you do it the other way around) ;)
dhruvbird··on Numbers everyone should know
The scalability you get really depends on the type of queries you fire, which depends on the kind of schema you have. A good schema designed for read (assuming that read is much more frequent than a write for some use-case) rather than write would definietly work out well with a SQL db.
dhruvbird··on Want to write some code? Get away from your computer
+1. I've found that thinking hard and long about most problems before coding them results in less buggy (sometimes even no bugs!) code. I remember my friend telling me that his dad had to stand in line and wait literally days to execute code on a computer (using punch cards) and they had all the time in the world to write the code, but very little to execute it. One mistake during execution and they would have to wait a few days for their turn, delaying the results that they were seeking.

I try to emulate this environment (by not compiling/running code) and trying to tell myself that I really should get a large chunk of thought (followed by relatively bug-free code) down before I let the compiler/interpreter in. This discipline has helped me a lot imho.

dhruvbird··on Web developer will work for you for free
I like this "hackers in need idea". Though there needs to be a way to keep out the leechers/time wasters. A turing test of sorts or captcha for programmers?? Dunno...
dhruvbird··on Web developer will work for you for free
While I agree that you shouldn't sell yourself short, I think it is also interesting that somone is taking the first step in letting their potential employer validate a potential employee's potential (too much potential there).

Also, it lets the employee validate the quality of the work.

I think it;s okay if done for a couple weeks (short project/assignment). If the employer likes him, he/she can pay him for the work done - out of goodwill.

Everyone wins (only in a perfect world).

dhruvbird··on Introducing NowJS or "How to make a chat server in 12 lines of code"
Great stuff!! So, do you open up 2 channels? One for the client to make calls to the server (this could just be normal HTTP) and one for the server to make client calls?
dhruvbird··on DuckDuckGo chat bot: imddg.gg
I would be interested in knowing the results of your findings. So, from my brief understanding of node.js, it's well suited for such stuff. There's special handling in node for binary data. The answer probably depends on whether you want to blindly shuffle data (piping) or do something smart like interpret it, etc...

A small experiment (profiled) which emulates your use-case would surely throw some light on the question.

dhruvbird··on DuckDuckGo chat bot: imddg.gg
On a side note, if you are looking to develop a bot using a standard HTTP service hosted anywhere using any language (not just Python and Java) with a better domain name (@bot.im as compared to @appspot.com), you could try http://www.imified.com/

The good thing about appengine though is that everything is so well integrated that you don't really have to look to piecing together the parts.

dhruvbird··on Wikipedia's Notability Requirements And The Slash
c'mon so when do you draw the line?
dhruvbird··on Announcing Soulmate, a Redis-backed service for fast autocompleting
How many phrases of length 30 could you handle with 1GB of RAM?

Or do you have numbers on the mean length of a phrase you handle currently, the number of such phrases and how much memory it takes?

dhruvbird··on Google 2000 vs. Google 2011
Well, how do you know what it does? Have you seen the code? Do you know what exactly it does? Making claims such as these without knowing the facts is certainly not professional behaviour.
dhruvbird··on Google search and search engine spam
+1 and my perfectly non-spammy blog was rejected by them. They didn't mention the reason but I have a hunch that it was because it isn't about any one or two things. It's about a bunch of things I find interesting - both personally as well as professionally. Now, google must have found it difficult to determine what ads to show, so they just black-listed my blog for ad-puposes. Period.
dhruvbird··on Google search and search engine spam
I don't believe no one has created a FF plugin for expert sex change (yet)!!

Edit: Even a GM script to remove all the leading spammy divs would do...

dhruvbird··on Karma Widget
Linked doesn't seem to be working. I created the URL after I noticed that none existed. Maybe the server has cached the negative entry.
dhruvbird··on Code icebergs
Hey it's great you got a name for them now!

You won't believe how many times I've been in a discussion about something and the other person has said "oh that's easy to do" or "it can be done in a few hours" when in fact if they were to go into the details, they would see the hiding devil...

dhruvbird··on Testing A Proxy In Python
This automation was a much meeded one!!
dhruvbird··on An OSS scalable distributed message queue with automatic failover. It kicks ass
Beanstalkd is a workqueue service not a message queue service. It's use case is some what more in tune with CRON rather than pymq.
dhruvbird··on An OSS scalable distributed message queue with automatic failover. It kicks ass
I mostly agree with you taming of the problem statement. However, clients being clients shouldn't be taken as nodes which can handle more than what the programmer provisioned for, Having a queue library sitting on them means some more load as far as that machine goes.

Besides, there are cases where you would want to continue operating even if your clients went down.

dhruvbird··on An OSS scalable distributed message queue with automatic failover. It kicks ass
The assumption is that the master isn't flaky. You can achieve this in multiple ways. One of them you mention.

If the software is bad, you can't help it.

As far as network failures are concerned, I think those are handled. If your network fails, you basically won't be able to send a message or won't get confirmation of it being sent. Either ways, if the queuing system works in at least once mode, you are guaranteed message delivery. If there is an error, the library reports an error and the application must re-try.

dhruvbird··on An OSS scalable distributed message queue with automatic failover. It kicks ass
Celery is pretty cool in it's own way. It is like the appengine Task Queues rather than message queues in general.
← PreviousPage 5 of 5