Live data from Hacker News

Breaking down Amazon's mega dropdown

bjk5.com

121–130 of 203 posts

Re: Breaking down Amazon's mega dropdown

#121

There is an important point to be made about the quote from the end of this article. "Thanks go to Ben Alpert for helping me understand the linear algebra / cross-product magic ...I ended up going w/ a cruder slope-based approach, mostly b/c I’ve lost all intuitive understanding of linear algebra" Let that be a wake up call to all of the programmers who continue to claim that you can "get away" with out knowing much…

I took away the exact opposite - this is yet another example of not needing to know the right math. In the end, he can study up a bit and/or seek out a friend who does know, but be got the hack done without it. This is how it works with my wife and I sometimes. I write a lot of code, and she either fixes or writes or advises me on the bit I need to work much better. I admit we can't run the world or write good code w…

When you don't know what you don't know, you end up wasting countless hours trying to rediscover the solution to an already-solved problem. I know I have.

Re: Breaking down Amazon's mega dropdown

#122
post #97
post #43

Hey all, I'm on the team that built this. We also built the redesign that launched last year. In fact, this was part of that. The article pretty much nails our implementation. Point of fact: Our team is recruiting. If you dig UX projects like this, shoot our manager Chad an email: chaddes at amazon dot com

Off-topic, but can't miss this opportunity: Please tell us why the Amazon homepage doesn't auto-focus into the search box. I think of this every single time I go to the site.

One of my favorite features of Chrome is that if you start to type "amazon.com" in the URL bar, and then hit Tab when it autocompletes, it switches the URL bar to an amazon.com search bar. I don't think I've typed anything in the actual search field of amazon.com in years.

Re: Breaking down Amazon's mega dropdown

#123
post #38

Earlier quoted context omitted.

It's not magic, it's just math. The cross product [1] between the vector of the mouse movement and the vector of the mouse's location to the menu's top left corner tells you the relative orientation of the two vectors. Compare that to cross product in regards to the menu's bottom left corner and you can easily figure out that the mouse must be moving towards the menu. This is much easier than figuring out the boundin…

Are you sure about that? The dot product gives a measure of the orientation between two vectors, the cross product gives perpendicularity and is vector valued (kind of, the distinction matters more for physics than graphics). It also only makes sense in 3 and 7 dimensions without generalizing the concept of vector.

No, the dot product won't work in this case. Take the two edges of the triangle as vectors. You want the mouse vector to fall in between. The dot product can't tell you which side of the two edge vectors your mouse vector falls on, but the cross product can if you look at the component of the cross product that points in/out of the screen.

Actually, you can make the dot product give you that answer, but you would need use the dot product of the mouse vector and two vectors normal to the edge vectors, which is really just a roundabout way of using the cross product.

Re: Breaking down Amazon's mega dropdown

#124
post #97
post #43

Hey all, I'm on the team that built this. We also built the redesign that launched last year. In fact, this was part of that. The article pretty much nails our implementation. Point of fact: Our team is recruiting. If you dig UX projects like this, shoot our manager Chad an email: chaddes at amazon dot com

Off-topic, but can't miss this opportunity: Please tell us why the Amazon homepage doesn't auto-focus into the search box. I think of this every single time I go to the site.

/rant

I loathe online store sites that auto-focus the search box. Worst are the ones that do it on every single page, including item detail pages. I use the space bar to scroll webpages down, especially on my laptop, which has a very small screen so that I almost always have to scroll down to get past header crap and get to the meat of the page. And no mouse, just a mediocre touchpad.

I can maybe accept auto-focusing search on the homepage, but there is no excuse for an item detail page. Even if I got here through a search engine, I probably want to see if this item is the item I wanted before I go searching the rest of your store, and that's going to require scrolling.

Definitely make the search box the first input in the tab-order though. Then if I do want to go straight to search, I can tap tab and then start typing. Otherwise, I usually want to scroll first and nothing is more frustrating than nothing happening when you hit space, only to realize that some tiny obscure search input buried in the corner of the page header that you didn't even realize was there is filled with spaces.

/less ranty

The best of both worlds would be to only auto-focus the search input if the user starts typing letters, and ignore space/arrow keys. We do this on Grooveshark actually.

Re: Breaking down Amazon's mega dropdown

#125
post #97
post #43

Hey all, I'm on the team that built this. We also built the redesign that launched last year. In fact, this was part of that. The article pretty much nails our implementation. Point of fact: Our team is recruiting. If you dig UX projects like this, shoot our manager Chad an email: chaddes at amazon dot com

Off-topic, but can't miss this opportunity: Please tell us why the Amazon homepage doesn't auto-focus into the search box. I think of this every single time I go to the site.

I don't want this as much as making / jump to the search box. I wish everything did this (I think only gmail and vim do). Although, that might interfere with Firefox (at one point it had an option to open the find dropdown when you type /).

Re: Breaking down Amazon's mega dropdown

#126
post #97

Earlier quoted context omitted.

Off-topic, but can't miss this opportunity: Please tell us why the Amazon homepage doesn't auto-focus into the search box. I think of this every single time I go to the site.

/rant I loathe online store sites that auto-focus the search box. Worst are the ones that do it on every single page, including item detail pages. I use the space bar to scroll webpages down, especially on my laptop, which has a very small screen so that I almost always have to scroll down to get past header crap and get to the meat of the page. And no mouse, just a mediocre touchpad. I can maybe accept auto-focusing…

You can always disable auto-focus on the client side if you don't like it. I have 'focuscontent' set in Vimperator which will "Focus the content after a page has loaded. [...] When on, it blurs any textbox which often is automatically focused on page load." I'm sure there are similar extensions for your browser of choice.

Re: Breaking down Amazon's mega dropdown

#127
post #125
post #97

Earlier quoted context omitted.

Off-topic, but can't miss this opportunity: Please tell us why the Amazon homepage doesn't auto-focus into the search box. I think of this every single time I go to the site.

I don't want this as much as making / jump to the search box. I wish everything did this (I think only gmail and vim do). Although, that might interfere with Firefox (at one point it had an option to open the find dropdown when you type /).

Facebook does too, at least if you have Graph Search enabled.

Re: Breaking down Amazon's mega dropdown

#128
post #116

Earlier quoted context omitted.

Sorry if this comes off as snarky, but I'm not sure of a better way to explain it. To me your comment sounds like: "I have been walking through mazes my whole life with my eyes closed, and I make progress by feeling the walls with my hands. In order to get through each maze I need to remember lots of facts about how the walls in the different mazes feel when I touch them. If I opened my eyes now, it would take too mu…

Is that really the best you can do? That analogy has absolutely nothing to do with baak's point. If you must reword and put his entire argument into a bad analogy, try this one: "I've been walking through mazes all my life. This one time, I had to recognize a particular brand of poison flower, but I didn't know my flowers very well because flowers are rare in the maze." And the answer? "I asked my friend who was also…

Pretty much this. Except you should also add that while he dedicated time to learning poisonous flowers that are encountered almost never, I spent that time getting in shape to move through the maze quicker, a skill/attribute used way more often.

Re: Breaking down Amazon's mega dropdown

#130

There is an important point to be made about the quote from the end of this article. "Thanks go to Ben Alpert for helping me understand the linear algebra / cross-product magic ...I ended up going w/ a cruder slope-based approach, mostly b/c I’ve lost all intuitive understanding of linear algebra" Let that be a wake up call to all of the programmers who continue to claim that you can "get away" with out knowing much…

In this case the slope method is better and simpler than the cross product method.

    def slope(p):
      return (p.y-oldMouse.y)/(p.x-oldMouse.x)

    isInRange = slope(menuBottom) 
Post reply on HN