HNHacker News
TopNewBestAskShowJobs

ehsanul

926 karma · joined July 13, 2009

Email: meh 5 (at) njit.edu

What I'm working on: http://jellly.com/

submissionscomments
ehsanul··on The Type of Employee You Really Want: Porn Star
Well, this really depends on the startup and what stage they're at. At the early stages, where it's just the founders, it's probably for the best if the founders are generalists and can handle almost anything. Once someone lands the funding/revenues to actually hire, then of course it makes more sense to get specialists at some point.

But even then, making your first couple employees generalists doesn't sound like a bad idea to me at all. Of course, this is all speculation: I've never hired anyone, hence everyone should ignore whatever I say here. But it's definitely easier to work with people who can pick up new stuff quickly, and a generalist is usually that type of person in my experience.

ehsanul··on PyPy faster than C (on a carefully crafted example)
Please elaborate on what the correct flags would be, for those of use who wouldn't know.
ehsanul··on A Beautiful Race Condition
Anyone else got any good strategies for concurrency analysis?

Probably not what you're really looking for but, maybe you could try to eschew shared state when at all possible?

I, myself, am absolutely no good with threaded code. Message-passing between multiple processes is just such a nicer way to reason about things, without worrying about race conditions. I've been using 0MQ recently, and it's really great for this, since it's easy to get it working across machines even, as well as having common messaging patterns "just work". Try it out sometime.

ehsanul··on Why PostgreSQL doesn't have query hints
The PostgreSQL planner has always done a flawless job for me in terms of choosing between indexes and tablescans - on reasonable queries.

While that has been my general experience as well, things can break down at the edges sometimes. I sometimes have to join 200m-row tables that don't fit into RAM (though individual partitions of the table do), against 1-10m-row tables of new data. This task is probably something more suited to Hadoop, but we're using PostgreSQL for it as that's where the data is.

With a plain vanilla join using indexed columns for the join, the smaller table is scanned while an index is used for larger table on the joined column. This is reasonable except for the fact that this results in a lot of random IO, so if you don't have an SSD or something, this will be slow. Of course, you can just increase the random_io_cost or whatever it's called, to adjust costs estimated by the query planner. I believe that results in a sorting operation for the tables before the join. Sorting can be better compared to a thrashing disk, but still slow.

The core issue is random IO here, so how about just warming up the cache for that particular partition's index/table with a big sequential read of the entire index/table, and letting it use the index-based query plan as usual? The sequential read takes a minute in the worst case for a single partition, but then when everything's cached.. BAM. The join query runs in 2-20 seconds (for a single partition, one of 26). If Postgres were psychic, it could have done this itself instead of making me force caching with an otherwise pointless extra query. But I suppose that behavior would usually not be desired, as it would destroy the existing cache. In this case, destroying the older cache was the right thing to do, but Postgres can't know that.

The whole point of this comment being: DBAs matter and you can't rely fully on the query planner to do what you may expect. Even a scrappy one like me (I'm mostly a programmer, the DBA stuff just comes with the territory for me). This is partly in response to a comment elsewhere on this page, mentioning how the query-planner is better trusted than a DBA - I wish it were always so.

ehsanul··on What can you do in 2k LOC of C?
On a related note, reading J's getting started guide has been pretty interesting so far: http://www.jsoftware.com/help/primer/contents.htm
ehsanul··on What can you do in 2k LOC of C?
I upvoted you, but as mentioned earlier in this thread by silentbicycle, this was written by one APLer to be read by another. I suppose even knowing APL makes it still difficult to follow, but only as difficult as APL itself is to follow right? :)
ehsanul··on What can you do in 2k LOC of C?
Wow, thanks for that clue. Will have to take a closer look at that source now. I don't feel too bad for not really getting it, given the creator of J saying this about it:

My immediate reaction on seeing the page was recoil and puzzlement: it looked nothing like any C code I had ever seen. (“Is it even C?”) However, Ken counselled that I should reserve judgment. As recounted in An Implementation of J, it then happened that:

I studied this interpreter for about a week for its organization and programming style; and on Sunday, August 27, 1989, at about four o’clock in the afternoon, wrote the first line of code that became the implementation described in this document.

The name “J” was chosen a few minutes later, when it became necessary to save the interpreter source file for the first time.

ehsanul··on 'Don’t ignore your stupid ideas.'
http://en.wikipedia.org/wiki/Humour
ehsanul··on What can you do in 2k LOC of C?
Yeah, I realized that fact a little late. Relevant snippet from the link about that initial bit of code for J:

I showed this fragment to others in the hope of interesting someone competent in both C and APL to take up the work, and soon recruited Roger Hui, who was attracted in part by the unusual style of C programming used by Arthur, a style that made heavy use of preprocessing facilities to permit writing further C in a distinctly APL style.

ehsanul··on What can you do in 2k LOC of C?
Nevermind the comment about it being slightly obfuscated. Have to realize that this is the creator of J we're talking about. He probably saw it as highly expressive code (much meaning in as few characters as possible). Though I can't agree, it is definitely amazing that something so small could be the start of something like J.
ehsanul··on What can you do in 2k LOC of C?
That's interesting, but damn is that some ugly code. Slightly obfuscated on purpose? Though of course it wouldn't win the IOCCC.

On the other hand, it's notable that many IOCCC submissions happen to pack a lot of functionality in often less than 2k. I remember reading a few descriptions of some the winning entries, but I can't find that now. Here's a glimpse though: http://cboard.cprogramming.com/brief-history-cprogramming-co...

ehsanul··on How to Disagree
Can you think of any way in which intelligent design might not be mutually exclusive with evolution?
ehsanul··on How to Disagree
Great set of questions!

Also like your last bit of advice - think about the person's point of view before evaluating what they've said. And by doing this, I see how one could also get to the root of a disagreement, rather than just the surface, and address that instead. Everything becomes philosophical from there I'm guessing.

ehsanul··on How to Disagree
I've read that book already and even have alerts on it for new chapters, but thanks for mentioning it. It's thoroughly entertaining!

Well, in my case, it's not that I make fallacious counter-arguments. My arguments are generally quite sound, and simple logic/rationality serves my need for something fundamental.

My issue is that, when something looks illogical on the face of it, rather than giving it the benefit of the doubt and try to imagine how it might work, I just shoot it down. And I shoot it down quite harshly usually, though almost always with a well-reasoned argument.

I have to be arrogant here and say that most of these arguments/ideas/statements I shoot down seem to really deserve it, which I know because I do sometimes restrain myself and just shut up and listen. However, sometimes my response is really undeserved, and I'd do better if I tried to understand where others may be coming from. Even if it's deserved, I could be much less harsh and argumentative, so as to better foster a good discussion.

ehsanul··on How to Disagree
That's an enlightening comment.

How can I stop being a "faker", as you call it? I, and probably some other HNers, are often pretty critical or take things people say more literally than they meant often, rather than giving them the benefit of the doubt with a more liberal interpretation.

I realize this is usually not conducive to "profound and productive interactions", but it is almost second nature for me, something of a gut reaction and I'm not entirely sure how to go about fixing this problem. Behavior change is difficult, just seeking advice.

ehsanul··on Ask HN: I am having a competation from bigger player. Please advice?
You can try to direct some of that attention to yourself, since you're in the same space. You can't compete on prizes, but you'll have a different offering - you have to distinguish your product from Yahoo's product in other ways.
ehsanul··on Ask HN: I am having a competation from bigger player. Please advice?
It will probably do you more good than harm. First of all, a competitor should spur you on to work hard on your product, lest everyone picks your competition instead.

Secondly, you can use it as a real marketing opportunity. What I mean is, with a product from Yahoo, there's going to be all sorts of press and many cricket fans talking about their product. That's your cue to show up (without being spammy), and get the word out about yourself. You could get some media attention at the very least, as well as word of mouth (people talking about Predictopus will be told by their friends about doosracricket).

ehsanul··on Periodic Table of Google APIs
That would also be missing the point. Simply ordering the cells by code weight doesn't give you "periods", which is the main point of a periodic table.
ehsanul··on PhantomJS is a minimalistic, headless, WebKit-based, JavaScript-driven tool
Also note these other headless javascript testing frameworks:

Zombie.js: http://news.ycombinator.com/item?id=2038663

HTMLUnit: http://htmlunit.sourceforge.net/

Celerity (JRuby wrapper around HTMLUnit): http://celerity.rubyforge.org/

ehsanul··on Poll: Have you ever applied to work at Google?
I absolutely love that analogy, especially as an amateur self-taught guitarist + programmer. I'd still not be too inclined to apply anywhere with a heavy CS slant, even though all the theoretical stuff interests me a lot.
ehsanul··on Hypertable vs. HBase Performance Evaluation
These results demonstrate that implementation language matters, and that C++ delivers a significant performance advantage.

What a strange thing to say, given that it's probably very likely that the implementations probably work pretty differently internally. You'd probably see similar differences with such a different implementation no matter the language, assuming it isn't something ridiculous like Ruby (I'm a Ruby programmer, don't bite).

Secondly, isn't the overhead for a database mostly disk IO? I realize a finely tuned DB/server is probably CPU-bound instead, but that's generally assuming that the working set fits snugly into RAM and gets cached. Which may not quite be the case when you operate the scale at which you'd resort to HBase/HyperTable.

ehsanul··on Ask HN: How do you track schema changes to your db?
You were probably thinking of this: http://news.ycombinator.com/item?id=1984325
ehsanul··on Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and Yahoo
This is actually just what I'm starting to use for inter-process communication with node.js, for a realtime MMO game. I'm dividing the (2d) world into squares, each handled by a node.js process which will each be responsible for all the game logic and computations within that square, with some extra logic for handling objects that span two or more adjacent squares.

All IPC goes through a single (per machine) routing server which handles routing messages to the various node.js processes, which may or may not be on the same physical server. Only communications are for objects around the edges of the squares, for collision detection etc. and for transferring websocket connections to another node.js process.

After a lot of thought, that seems to me to be the best way to work out a scalable solution. Have yet to see if it'll work well, but I see no reason why it shouldn't. Now if only I had enough users to test it..

Oh, and thanks for the great 0MQ library! :)

ehsanul··on Why was this "Review my startup" post killed?
It was xuland.com. If you want to see the text of the post, you have to turn on showdead in your profile settings.
ehsanul··on Why was this "Review my startup" post killed?
For the record, it was not my post, I just found it odd to see a perfectly fine Ask HN post being killed like that.
ehsanul··on "I think that djb redo will turn out to be the Git of build systems."
I urge you to look at the link to djb redo posted in the beginning of the article. It's quite a teaser: http://apenwarr.ca/log/?m=201012#14
ehsanul··on Secrets of BackType's (YC S08) Data Engineers
This reminds me of that post by the ex-Facebook manager, who said that tools are top priority. This article really brings it home for me.

However, despite their purported effectiveness as engineers, I'm not sure what Backtype is really doing. I generally see them just below an article, in place of comments, with a long list of useless tweets referring to the article (usually of the form "article title - bit.ly/shortened". That's probably not doing them too much good for marketing, unless you think any publicity is good publicity.

ehsanul··on [dead]
Interesting, wouldn't have expected the viral coefficient to go so high with such a minimal change. Did you just say that if you invite your friends, you'll get in sooner?

Care to share the exact copy you used? When I check your website, it redirects to http://sanfrancisco.usehipster.com/ and just says "Enter your email and we'll put you on our invite list." A/B test?

Also, I wonder how one might inch that viral coefficient up and above 1.0, making it a truly viral feedback loop.

ehsanul··on Ask HN: How to start creating stuff with Arduino?
Concise electronics for geeks: http://lcamtuf.coredump.cx/electronics/
ehsanul··on Which one will execute faster, if(flag==0) or if(0==flag)?
I can't tell whether you're just being tongue-in-cheek, or perfectly serious. I hope the former.
← PreviousPage 2 of 8Next →