6 ms·
Technologies used for a static list (!): react redux reselect aphrodite material-ui stylz redux-form react-helmet webpack faker lodash moment
by 10dpd 10y ago
Technologies used for a static list (!):
react
redux
reselect
aphrodite
material-ui
stylz
redux-form
react-helmet
webpack
faker
lodash
moment
- ColCh 10y agoIt's a modern javascript broh
- andybak 10y agoI've done similar with my Django stack - used way more code than needed for something simple. The reason is - if you've got a good boilerplate it's quicker and easier to use it than to start again - even if you don't need half the pieces.
- taejo 10y agoIt's not a static list, though: mouse over or click on the entries.
- acqq 10y agoI just get another element when I click but the question remains the same. Is there anything more? Looking at the source, I guess, for example, that the questions "How old is X" are all where X is "Adam Sandler", "Adele", "Akon", "Alec Baldwin" "Alicia Keys", "Alyssa Milano", "Angelina Jolie", "Ashton Kutcher", "Avril Lavigne", "Barack Obama", "Barbra Streisand", "Ben Stiller", "Beyonce", "Bill Gates", "Bob Marley", "Brad Pitt", "Britney Spears", "Cameron Diaz", "Carmen Electra", "Catherine Zeta Jones", "Charlie Sheen", "Chris Brown", "Christina Aguilera", "Cindy Crawford", "Daniel Radcliffe", "David Beckham", "David Duchovny", "Demi Moore", "Dr House", "Drake", "Drew Barrymore", "Eddie Murphy", "Eminem", "George Clooney", "Gwen Stefani", "Halle Berry", "Hugh Grant", "Jack Nicholson", "James Cameron", "Jason Statham", "Jay Z", "Jennifer Aniston", "Jennifer Lopez", "Jennifer Love Hewitt", "Jessica Alba", "Johnny Depp", "Julia Roberts", "Justin Bieber", "Justin Timberlake", "Katherine Heigl", "Katy Perry", "Kelli Williams", "Kesha", "Kevin Costner", "Kim Kardashian", "Kristen Stewart", "Lady Gaga", "Leonardo DiCaprio", "Lil Wayne", "Lionel Messi", "Madonna", "Marilyn Manson", "Marilyn Monroe", "Megan Fox", "Michael Douglas", "Michael Jackson", "Michael Jordan", "Michelle Obama", "Mike Tyson", "Miley Cyrus", "Muhammad Ali", "Nicki Minaj", "Nicolas Cage", "Nicole Kidman", "Oprah Winfrey", "Paris Hilton", "Pink", "Reese Witherspoon", "Rihanna", "Robert De Niro", "Robert Pattinson", "Roger Federer", "Ronaldo", "Sandra Bullock", "Sarah Jessica Parker", "Scarlett Johansson", "Selena Gomez", "Shakira", "Stephenie Meyer", "Steve Jobs", "Steven Spielberg", "Taylor Swift", "Tiger Woods", "Tom Cruise", "Tom Hanks", "Tyler Perry", "Uma Thurman", "Whoopi Goldberg", "Will Smith", "Woody Allen", It's easier to look at the list than to click every time for one random item from it. Interestingly, the first person Google recommends to me when I type "how old is" is not on the list.
- asp2insp 10y agoMy guess is that the list is a representative sample, and the dynamic nature is to indicate that it's variable. Google will correctly answer that question for anyone who has their own Wikipedia page with a birthdate (Try 'how old is Richard Stallman') so seeing the "full list" is not a useful piece of information
- ericflo 10y agoAlso: html, css, js, tcp, ip, electricity, and language.
- ivanca 10y agoAlso DNS, Apache, CloudFlare, Linux, images, Fail2Ban, Ethernet, the server's CPU/Memory/Motherboard, the phone network. All this for a static list, he could have just faxed us all this list instead like in the good old times.
- cousin_it 10y agoYou're right, css and js aren't needed either.
- TeMPOraL 10y ago> electricity Since we're going there - bloating your website for no reason whatsoever wastes electricity. Not just for the mobile users who may be annoyed by fast-draining battery; also in general, you're literally wasting coal. It's worth at least keeping in mind when deciding to include that another JS framework to save yourself 10 minutes of typing.
- ivanca 10y agoI know, people should use IPs instead of fancy domain names, DNS is just electricity wasting.
- 10y ago
- wolfwyrd 10y agoIt's ok - it's made with <3
- fixermark 10y agoAnd depending on the toolchain the author chose, it may also be made in less time than it'd take to hand-roll <li> and <ul> tags into a list.
- zeveb 10y agoWith a decent editor, hand-rolling <li> and <ul> tags ain't too bad. With a good scriptable editor, hand-unrolling the different options is also surprisingly easy.
- TeMPOraL 10y agoI agree. In this specific case, assuming the author had to type-out (or paste) the actual contents of the list, then "hand-rolling" it into a HTML list using a decent editor will be less (probably much less) work than plugging in all that JS cruft. And, it only happens once, instead of wasting a tiny bit of electricity for computing the exact same thing for every visitor.
- Klathmon 10y agoDo you actually have a problem that any of those are causing? I mean the site comes in at around 500kb transferred. That's not small, but it's also not obscenely large. A single large-ish image can easily blow that out of the water. Yeah, it could afford to lose some weight in the javascript (although looking at it now, i'm not sure they can. much of the size of the javascript is string literals for all of the options for each phrase), but for a one-off website that doesn't have any ads or source of income, i think it's great. The author clearly wanted to make something cool, and doesn't want to spend a significant amount of time or effort optimizing it perfectly since he probably won't make a dime from it.
- kps 10y ago> Do you actually have a problem that any of those are causing? Inability to select the text.
- Klathmon 10y agoThat's because the author set the css property `user-select` to `none`. Why? I'm not sure, but that has nothing to do with any of the libraries listed, or even javascript at all.
- chain18 10y agoI assume it is because you can click on the commands to cycle through the examples. If you didn't have this css property set you would end up selecting text.
- zeveb 10y ago> Do you actually have a problem that any of those are causing? With JavaScript turned off (an essential security precaution), no text is visible at all, which is a bit of a problem. > I mean the site comes in at around 500kb transferred. That's not small, but it's also not obscenely large. The actual content on the page really isn't that large. I got too bored to actually complete this, but you can see an example of what it could have looked like at http://pastebin.com/DBgK4Tv9 http://pastebin.com/DBgK4Tv9 It could have progressively enhanced itself, taking the plain-text HTML page, parsing out the choices in the em tags (which could of course have had classes attached to mark them as choices, or even to indicate classes of choices, e.g. 'day-name'). It would have been a perfectly useful tool for people without JavaScript; it would have been perfectly useful printed on a page. And, frankly, it would almost certainly have been a lot smaller than 500K. That doesn't take away from how cool it is: the author did a nice, exhaustive job (so exhausted I got exhausted trying to recreate it). He should be commended for it. But we should all reflect on how we got into a situation in which the easiest thing for him to do was the wrong thing, and how we can instead get into a situation where the easy thing is the right thing.
- paradite 10y agoIt also features a toggleable sidebar, an inline interactive search/filter bar and a modern UI with good visual feedback. Not as trivial as plain li and ul.
- 10dpd 10y agoInteractive search/filter bar: Alt+F
- fixermark 10y ago... which doesn't hide the uninteresting context around the commands in question, and doesn't cluster the commands with the same text together for convenient viewing.
- paradite 10y agoWhy not curl | grep?
- TeMPOraL 10y agoFrankly, a lot of websites would be infinitely more useful if they were curl | grep friendly. It's like current generation doesn't realize that it is technically possible to fetch valuable information you need efficiently from the Internet - one just has to not make it insanely difficult on purpose.