HNHacker News
TopNewBestAskShowJobs

subwindow

930 karma · joined March 28, 2008

https://github.com/erik-megarad
submissionscomments
subwindow··on Yammer CEO won't hire anyone from Yahoo who doesn't quit in next 60 days
I wouldn't want to hire the person you describe.

This is simply a more visible indicator that a person doesn't care about the company they work for. That's fine for giant corporations, but amazingly deadly for startups.

subwindow··on Sad, Tired, and Alone: My Ongoing Battle With Startup Depression
I don't want to be pedantic, but this is not depression. Depression is 6 months without a single high point. Depression is not a roller coaster- there are no ups. Just down. For a long fucking time. I've been depressed off and on for the past 10 years- about 5 depressive periods, each 6-18 months.

I don't want to minimize the OP's struggles- he most certainly has some kind of mood disorder (possibly rapid-cycling bipolar disorder or RBD). There may be depressive episodes involved, but I don't think the word "depression" should be used unless it's referring to Major Depressive Disorder or one of its close siblings.

Again, I'm trying hard to not be pedantic. It just frustrates me when people think that depression is something you can get over, or that will get better in a day or a week. That's just not the case.

subwindow··on Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript
Hadn't seen Isolate before- looks awesome. I'll try it out. Autorequire is one of my biggest complaints against bundler.
subwindow··on Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript
The problem is that there's no third option- something to manage dependencies that's not bundler. We all want and need dependency management, but bundler should not be the One True Solution.
subwindow··on Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript
I don't know where you got that from. Struts was my first proper web framework- the kind where adding a column was an all-day affair.

The simplicity of Rails, even now, is that you'd only need to put it in two places- the migration and the view. You don't need to mess around with Hibernate XML configurations all day. Just add the damned column and get on with your life.

subwindow··on Chrome connects to three random domains at startup
This has some interesting ramifications- some network security appliances (I work for a company that makes one) look for suspicious sets of DNS requests that match the Domain Generation Algorithms that malware like Conficker use to find a command and control server.

These "random" requests look almost exactly the DGA for Murofet- a Zeus variant. This has caused some problems for us (and other vendors, I would assume) in the form of massive numbers of false positives. In short, it's been kind of a PITA.

I wish they wouldn't do this, but it is definitely a tough problem to solve and I can't think of a better approach off of the top of my head. The ultimate culprit is the ISPs that return an A record for a DNS request that really should return NXDOMAIN. These ISPs are essentially breaking the Internet, and we're all just scrambling to put band-aids in place to get it to work again.

subwindow··on Ruby Frameworks? Which one? Bye bye Rails.
Huh. Thanks. I looked for a long time and didn't see that. The closest I got was an extremely old lighthouse ticket where Aaron Patterson suggested that they change the behavior to raise errors, but there was no followup.
subwindow··on Ruby Frameworks? Which one? Bye bye Rails.
About a week ago I had a problem with after_commit callbacks not being called. It turns out (after diving into the AR source) that they indiscriminately swallow errors from after_commit callbacks. If you're testing a newly-created callback it is difficult to determine whether it's actually been called or merely just raised an error.

I couldn't have figured that out without reading the source- it's not documented. From the developer level that behavior is indistinguishable from magic, and the callback code in AR tries to act like magic as well. It's extremely difficult to follow, let alone understand.

subwindow··on Ruby Frameworks? Which one? Bye bye Rails.
I disagree. The main reason I dislike Rails is that it is too complicated. When working with it every day, I regularly come across issues with it that require that I delve into the source code. More often than not that is a depressing venture.

I would love something more simple, that operated with less magic, and had code that was easier to understand. I'm not sure if Padrino is the answer, but it certainly merits a second look.

subwindow··on Why I switched from Ruby back to C++
I wonder if switching to JRuby wouldn't have solved some of his problems? I'd imagine that distribution is much easier on JRuby. I suppose the issue is with libraries, but I'm not familiar with the libraries he mentioned.
subwindow··on Never create Ruby strings longer than 23 characters
+= is not append

  str += append_str
is the equivalent to:

  str.dup << append_str
That is, it copies the string and then appends to the copy. Benchmarking the speed of a true append is difficult because in order to preserve the original string in the benchmark you must dup it anyhow (done here outside of the bench.report block). However, the bigger the strings get, the more pronounced the advantage of appending is.

                user     system      total        real
  add  2      0.260000   0.000000   0.260000 (  0.263414)
  join 2      0.320000   0.000000   0.320000 (  0.325341)
  append 2    0.230000   0.010000   0.240000 (  0.235669)

  add  3      0.500000   0.000000   0.500000 (  0.497219)
  join 3      0.840000   0.020000   0.860000 (  0.866401)
  append 3    0.260000   0.010000   0.270000 (  0.268676)

  add  4      0.360000   0.040000   0.400000 (  0.397778)
  join 4      0.970000   0.030000   1.000000 (  0.997321)
  append 4    0.280000   0.000000   0.280000 (  0.281020)

  add  5      0.460000   0.000000   0.460000 (  0.454780)
  join 5      0.910000   0.030000   0.940000 (  0.946600)
  append 5    0.330000   0.000000   0.330000 (  0.336214)
Code: https://gist.github.com/1563290
subwindow··on Design to accommodate change: Table-driven programming [pdf]
I think the argument is that the end users wouldn't be able to manipulate the table in ways other than flipping bits, and that the system should be able to support any combination of bits.

In reality (and I think this is your point) the consequence is that just because a system can support a particular combination doesn't mean it makes any sense for the problem domain. Therefore by exposing this to users without tests, they can screw themselves over, even if the system continues to "work."

subwindow··on Design to accommodate change: Table-driven programming [pdf]
I've used decision tables before and I don't particularly like them. The only good use for them is if the end-user both understands the rules and has the ability to change them. Otherwise, you're just covering up a code smell (nested if-else blocks) with a different representation without fixing the underlying problem.
subwindow··on Supercolliding a PHP array (inserting 65536 elements takes 30 seconds)
It only solves the exploit path, not the vulnerability.

The true issue is that their hashing algorithm sucks. Any patch that doesn't fix the hashing algorithm is a band-aid and not a true fix.

subwindow··on Supercolliding a PHP array (inserting 65536 elements takes 30 seconds)
I think the most obvious exploit path is using thousands of query parameters, which are inserted into an "array" in PHP.

An ini setting seems like a terrible and incomplete fix to the problem.

subwindow··on Supercolliding a PHP array (inserting 65536 elements takes 30 seconds)
Yes it is, and it has been for at least a year.
subwindow··on Supercolliding a PHP array (inserting 65536 elements takes 30 seconds)
Yes that is just one way in which PHP is annoying. I think they actually refer to it as an "associative array", which as far as I can tell is exactly a hash, but they never refer to it as one.

On a side note, Ruby does not appear to have that same problem as similar code executes in .02 seconds. I think it is probably because Ruby's hash function is superior.

subwindow··on Time to end the war on drugs
There seems to be a lot of confusion on this thread about exactly what Portugal did, and the ramifications for the U.S. in terms of time-frame and difficulty.

What Portugal did was decriminalize the possession of small amounts of drugs. They did not legalize them. There is a huge difference. Decriminalization essentially means that possession of small amounts of drugs is no longer an offense that warrants an arrest and jail time. In a decriminalized system an officer can still stop someone for drugs, but they can only write them a ticket- similar to speeding, jaywalking or illegal parking.

This makes a huge difference for a number of reasons. First, it's easier to implement politically because the substances are still illegal. Second, it's less costly because people caught with small amounts are not caught up in the justice system for years, and only pay a small fine. Third, it decreases the adversarial nature of the "war on drugs" because being caught with drugs is no longer a life-changing event.

Marijuana possession is already decriminalized in many states in the U.S. (California, Colorado, New York and Oregon off the top of my head). It is clearly not an impossibility to implement politically, and in fact the trend in the U.S. is already on its way. An important hurdle is that we do not have any states that have yet decriminalized "harder" drugs like heroin and cocaine, but it is simply a matter of time. Pressure on lawmakers in the form of education, money and votes will in fact work. It just takes time.

subwindow··on I Saw An Extremely Subtle Bug Today And I Just Have To Tell Someone
You can't log any arbitrary out of their sessions. It only resets your session, as in the session cookie is reset.
subwindow··on A shuffled deck of cards is unique in all human history
The first 10 or so shuffles of a new deck of cards may be relatively common, but after you put a deck of cards away you are not going to reorder it. Most aged decks are therefore going to be completely unique in their ordering.

The only people who use new decks frequently are casinos, and they have very good shuffling machines. It is likely that every deck dealt in a casino is unique.

subwindow··on Apple and the Kindle
So far I've had a pretty frustrating experience with the Kindle (Kindle 4 no keyboard, no touchscreen) from the get-go. Sure, the box was nice, but as soon as I powered it on it was frustrating.

Since the Kindle was a gift, I had to enter in my Amazon account information before I could do anything else. Total buzzkill. I wanted to flip through a book and see what the screen was like and how it worked, but instead I have to laboriously type in my 35-character password like I'm using an NES controller.

After that, there's no sample books on there- you'd think they could put a public domain book on there for free. Every MP3 player I've ever bought comes with a few sample songs. Ok, fine. Now I have to hook it up to my computer via USB. Put an epub file on there. It doesn't support epub? Ok, fine. Put an RTF file on there. That doesn't work. Ok, fine.

Finally put a .txt file on there of a book I'm halfway through the paper version of. Apparently the Kindle has a weird concept of pages for txt documents, so I have to hit the "Next Page" button 97 times, or guess what "location" I'm at (1456 out of 4452 I guess?) and enter that in.

All of that frustration, in the first 30 minutes, just to get an idea of what it is like to read on it and page through a book. Never had that kind of experience with an Apple product. "Unboxing" experiences with Apple products have become a religious experience for a reason. Amazon is still far short of that.

subwindow··on Tech recruitment: how not to do it
Actually in the US it is not illegal to discriminate based on sexual orientation. There may be laws in New York state prohibiting it, I don't know. But in most of the US it is totally legal to post a job listing saying "Programmers wanted. No fags allowed."

It is pretty despicable.

subwindow··on The Best Science Fiction Books (According to Reddit)
I would mark Diamond Age as "OK" at best. Interesting ideas, terrible and rushed ending. If Anathem is worse than Diamond Age, it most definitely does not belong on the list.
subwindow··on Java's Comb-Over
Backwards compatibility is great and all, but at what cost? One of the main reasons why Windows eventually started to collapse under its own weight was backwards compatibility.

If a piece of software is so tied to backwards compatibility that it cannot change it will, necessarily, die.

That said, statements like "Once added, you can't ever make any changes to lambdas" are obviously bullshit. Programming languages can and do successfully undergo significant changes. Ruby 1.9.2 is a completely different beast than 1.8.0 (including significant changes to lambda sytax), and I'd expect there are few (if any) applications that could be upgraded without significant changes. The same could be said for PHP 4 -> PHP 5, Perl 5 -> Perl 6, and Python 2 -> 3. Contrast those languages to Java, which is largely the same since 2001.

Sure, there's a cost to everybody when you have to upgrade your app, but there's a much greater benefit when it is all said and done.

subwindow··on The Best Science Fiction Books (According to Reddit)
Obviously with any list there's going to be quite a lot of nits to pick... At any rate, here are mine.

Sad to see Stanislaw Lem completely left out in favor of some obviously inferior books (Anathem!?). Also a curious choice for the obligatory Atwood novel. Surprised that Gravity's Rainbow was not on there- I'd put it near the top (maybe it wasn't "Sci-Fi" enough?)

Good to see Canticle for Leibowitz as well as a fair amount of Asimov and Dick.

subwindow··on Shuush
A nice idea, but it needs a few tweaks. The vertical height doesn't change between a 3 and an 11, so they both occupy the same eye space. It'd be nice if the avatar, text and the entire block were scaled according to the size. Also, there's not much of a size difference (as far as I can tell) between 6 and 11.
subwindow··on Poll: What database does your company use?
Almost all of the above. Because my company ships an appliance, we've got Postgres, Tokyo, Redis and several other semi-databases (Judy, Memcached, etc) on the appliances, and Postgres, Couch and HDFS/HBase on our side.

Much of the reason for the large number is for legacy code that is quickly being replaced. We're settling into Postgres, Redis and Couch.

subwindow··on Why cigarette packs matter
Somehow I doubt that the packaging really influences what someone smokes and how much they smoke of it. People make decisions based on taste, strength and habit more than they do on marketing and especially pack design.

If someone's smoking, they've already made the decision to do it, health consequences be damned. I doubt that warning labels, gross pictures or any other kind of package manipulation has a significant effect.

subwindow··on 2000 as Seen in 1910 (23 pics)
A lot of the concepts are correct, but the surprising thing is the lack of advancements in materials. The images use cloth, soft metals, wood and canvas for everything. It's almost impossible to state how big an impact plastics and high quality metals have made on our day-to-day lives.
subwindow··on WakeMates are ready
I preordered for a WakeMate way back when I was a BlackBerry user. Wow.

Regardless, I'm glad they're finally shipping (for real this time?). I hope it is worth the wait.

← PreviousPage 2 of 8Next →