Best practices is one thing. Overkill is another.
Most of the stuff I'm talking about is the default. There are a million and one tools to handle this stuff for you...there's a couple switches to flip in your server config, etc. It's not like you have to go out of the way to do these things, you almost have to go out of the way not to.
I mean, this is a pretty simple page...and it has a loading screen that takes a couple seconds? Maybe implementing some of these best practices could take care of that.
Little effort, good payoff.
>I also find it to be very inelegant.
HTTP requests cost. Putting the images together and then selecting them with CSS is a very elegant solution to that problem IMHO. It's also very simple to do.
You're entitled to your opinion of course.
Anyway, if you want to impress a prospective employer, I think it's a good idea to try and impress instead of just doing the absolute minimum. (not saying that Loren didn't impress or slacked off..this thing is beautiful looking and well written, but I mean hypothetically if I was doing something like this I'd want to know I did the best possible job for the effort spent)
Sure, the lasers and shark-pit might be overkill for any normal home's security needs, but if they're being used as evidence of talent in the field where you're looking for work, their purpose isn't to be practical for your everyday needs, but to demonstrate applicable skills.
I'd recommend exactly the same things M1573RMU74710N did. If you want performant web site you should minimize the number of HTTP requests (hence concatenating .js and .css files, using image sprites and setting expires and cache-control headers to avoid 304 Not Modified), make sure that resources don't block while loading (hence move JS to the bottom), make sure resources are small (hence image optimization and gzipping).
This should not be "best-practices" these should be "that's-how-things-are-done". And the guy's page is an application for the front-end engineer positions — if I were him I'd make sure that my application page shows my best skills.
However, considering the whole point is to apply for a front-end dev job, and the stuff I describe is SUPER easy to do. I think it's relevant. I'd think I'd want to "put up" so to speak, and say "check it out, I follow best practices".
This is really really low-hanging fruit, the sort of thing you should be doing by default basically.
Sure, it might not be 100% optimized...but does it matter, really ? He showed initiative, gumption, and creativity.
If I were looking for a front-end engineer and AirBnB doesn't want him, I would definitely hire him.
Also, adding that you are available for work, does NOT help your case.
Just makes the sign on your back even bigger. The sign that reads "I'm THAT guy".
My comment is made in 100% good faith, and is in no way intended to put down or detract from Loren. I'm a web developer, and I'm passionate about it. I enjoy talking to other web developers and trading knowledge. My intention here is only to share some knowledge.
>Sure, it might not be 100% optimized...but does it matter, really ?
I believe it does.
This isn't a case where "You could have tweaked this for 2% more foo"...this is a case of multiple lapses in standard and basic best practices.
I'm not prepared to extrapolate this one failure into a generalization about Loren or anything, I think this in no way speaks about his ability except to say that he doesn't always follow best practices. That's something he maybe needs to work on, and there's nothing wrong with that. We all need to work on something.
The whole idea here is to really shine...this is supposed to be a bid for the attention of a possible employer...and that is not the time to skip some really really basic steps. t's like if you were applying for a job as an automotive painter, and you didn't sand the body first. Or if you applied for a job as an editor with a resume riddled with spelling errors. That's fine if you're working on a personal project, but it's not up to professional par.
Even disregarding that, I would feel inclined to point it out, just as I would hope someone would inform me of ways I can improve my work.
> He showed initiative, gumption, and creativity.
Sure, and I applaud it wholeheartedly. However, we're talking about an engineering position here...If I was hiring a front-end engineer and they didn't follow the simplest, first-day, default, standard practice stuff...that would be a couple points off.
>Also, adding that you are available for work, does NOT help your case.
That was said mostly tounge in cheek. The point was not "hey you should hire me instead of this guy, I'm way better"
That's the whole point; this stuff is so basic I don't expect anyone would be impressed by it.
The idea is I imagine some Airbnbers (or maybe others) will read this thread at some point, and since we're all asking for jobs on HN I thought I'd make a playful remark about it. If that playful remark gets me a lead on a job, so much the better.
Just as someone may see his initiative and graphical ability and want to hire him... so may they see my devotion to sharing knowledge, having open and frank discussions about web development, and following best practices and want to hire me.
Yea, I thought about that, but It doesn't seem to be the case. A lot of the scripts have credits that indicate they weren't written by Loren.
...did two failed searches looking for the xkcd where one guy get's 100s of comments more than other on a post because he crafted a spelling mistake. So, picture it in your mind to close the joke.
I realize a lot of people have taken this as an attempt to tear down Loren or something, but that's just not the case.
I took time out of my day to go through this guy's site and offer some helpful advice. I didn't just run his page through ySlow or something, I actually went through to see what he was doing and how he could improve it.
I did it in a respectful way, and made a point of complimenting him because I think he did a nice job, and I wanted to make clear I wasn't tearing that down.
If you knew me, you'd know I spend a lot of time in the web development community in IRC and various message boards helping people improve what they are doing, and getting help myself occasionally when I'm stuck on a contract.
It didn't occur to me that so many people would just assume bad faith, personally I try to give people the befit of the doubt...and I never assume that I know exactly what they are saying because text is such a difficult medium to convey these things. In retrospect I could have really hammered in that point, but hindsight is 20/20, and I suspect there still would have been a bunch of people bristling.
This tendency to project things on to other people and then get all offended about what you think they are saying is my biggest issue with some geeks.
Relax, seriously. Try to give people the benefit of the doubt instead of just projecting whatever you want onto them. When you read what someone has written on the Internet, sometimes you will misunderstand them...and you need to understand and appreciate that.
BTW, the job thing was a joke about how we're all asking for jobs on HN now. I would think the lol-cat would be an obvious clue that it was intended in jest.
For the record, I am more or less always available for work beause I'm a freelancer.
However, M1573RMU74710N makes a good point - engineers are tested on their code.
M1573RMU74710N just gave Loren the answers to the interview questions "how would you optimize this site?"
- You're loading scripts in your head tag, and a crap-ton of them. At least some of these could be concat'd together. HTTP request carry a lot of overhead, so fewer is better. I bet at least some could be moved to the bottom as well, with some CSS/JS to avoid the dreaded Flash Of UnBehavioured Content.
- In a similar vein, you're loading a lot of images, more overhead again. At least some of these (like the clouds) could probably be combined into one file and then separated out with CSS.
- You're not setting long expire headers on your resources, bad for caching.
- You don't seem to be serving up gzipped resources.
- Some of the scripts aren't even minified.
Take clouds.js for example, you use a whole HTTP request on this one file, and it's small. It's also not very DRY, you have a bunch of repeats of basically the same code, it probably could have been re-written to something like:
I realize some of this stuff is not entirely necessarily on a site like this, but considering how easy it is and the fact that you're applying for a front-end engineering job, I'd think you'd want to follow best practices.Overall it's a cool idea, very fun and nice looking. Good job.
(BTW, I'm available for work. If anyone from Airbnb is reading this, I can haz Job plz? )