web development advice needed (technical)

So, as I’ve said a bajillion times around here, I’m a web developer (front end). I believe in standards, but I also believe that you can stray from them and be all right. The satisfaction of the client is top priority. I’m not above doing a few things that might usually be frowned upon. My CSS is mostly organized by function - my ids and classes look like leftCol, rightCol, bold, content. I prefer to work with more images over less (and thus don’t use CSS sprites very often outside of menus). It’s just the way I like it organized.

I have a coworker who goes the other way. He drinks all the Koolaid. Must use certain frameworks, must put all images in a big CSS sprite, must organize your CSS a certain way, avoid clearing divs, avoid img tags, etc.

Normally, we’d just putter along on our own projects. Our bosses and clients love both our work and we’ve never had complaints. But now he’s been put into a position to head up QA. And this, my friends, is where we’re clashing.

For example: Links to social media. I just made them normal a tags with img tags inside of them, but he demanded I change them to be a tags with a CSS background image instead, because they aren’t part of the content.

I’m seeing it this way: the site is ready to launch. There’s nothing keeping it back but small things like the above. It’s just such an inconsequential thing. There’s no real reason to do it but nitpickiness. The client won’t care, and it isn’t a complicated piece of code no one will be able to figure out later. He’s being stubborn and thinking his way is right because Big Names on the internet say so.

But on the other hand, I can see that it may be my pride getting in the way. This - web stuff - is the one thing in my life I’ve been better at than all my peers. I don’t define it as simply a job. It hurts to be told you suck at what you’re doing. I used to be the person people came to when they needed help in class, and now someone else is telling me the way I do things is shit.

We had an argument over putting all the site images in a CSS sprite vs. having more images. He claimed that not doing that was as bad as using tables (which as all people know, are the devil :wink: ). I had to stop for a second. I don’t think they’re in the same league. But I’m 24 and an old lady in this profession, and maybe things have changed. Maybe I’m behind the times.

I just have this horrible feeling in my stomach that everything I’ve been doing is wrong and now I suck at what I do and it makes me feel sick. It’s like telling a filing clerk they aren’t filing right. This is my entire job, it’s not like one small thing to change.

Am I wrong, or is he wrong, or are we both a little bit wrong?

Benchmark the difference in load-and-render times between doing the entire site with sprites and the entire site with individual images, and another version with half-and-half. I’d be curious to see what’s actually the most efficient.

There’s a lot of network overheard with downloading multiple tiny images, but it’s not as much as most people think. (For example, each one does not require a new TCP session, because modern browsers will use keep-alive HTTP sessions. (Assuming your image fileserver is configured correctly.))

On the other hand, there’s client-side overhead in rendering a large image and calculating all the sprite offsets in multiple locations. And of course small images can be rendered while others are downloading, whereas a sprite must be downloaded in its entirety before rendering.

All of this makes a difference on a large scale website, but on sites with >10k visitors a month? 99% of our clients will never run into an issue with # of requests and size of images.

How big is the sprites file? Is it really ALL the sites images or just some oft-used stuff?

My biggest problem with sprites files is that inevitably someone wants something changed and that means changing the whole sprites file and often changing some CSS, possibly multiple lines of CSS because you had to move something over one pixel and that background is used for 4 different classes or whatever.

I personally prefer images as objects, not as backgrounds to objects. I’m also not against sprite files when used right. But when they are used for a menu and the client wants me to wedge one more menu item in there and now I have to change 50 lines of poorly-thought-out CSS as well as a PNG for which I don’t have the PSD (probably not your issue) well then I think sprites are the work of the devil.

If someone can work the way this other person is working and the site is SEO-compliant and easy to update and just as fast to render as your way, then just go with it.

Honestly, fighting against whatever is newest and hottest in Web development is very tiring. It’s as tiring as fighting with Creationists. If you can think of reasons why their way makes work less efficient then please speak up. Otherwise, just go with the flow.

Don’t feel bad about your skills, though. I’m 32 and I’ve been in the biz since about 1998 and I’m still entrenched in tables. I never get table-based designs submitted to me and I don’t do designing anymore so I just…know how to use DIVs now.

Funny thing - I got a last-minute design from someone the other day that required tables and it was the absolute worst table coding I have ever seen in my life. Like, so bad. It took some 40 lines of CSS and it ended up looking just awful. Me, I could make a 3D representation of EPCOT using tables in Notepad so I felt justified in laughing at their absolute lack of knowledge and it solidified their worthlessness as a designer to me :slight_smile:

The sprite file contained all the buttons, UI icons, menu backgrounds, that sort of thing.

It just makes me angry because his way doesn’t really save that much time and bandwidth. I have trouble conceptualizing parts of sprites -> CSS positioning. Why would he choose me making more small images over using one file as his hill to die on? From here, we’re at an impasse. He’s not willing to back down on making everything his way, and I’m not willing to change entirely (and thus relearn everything!) with no reason.

I’ve given so much ground to him. He’s more of a Javascript person than me, so he often takes the scripting. I ask him for one scripted thing, and all of a sudden he decides to literally take over the project and thank the gods we have interns right now to make all his changes. I told him that I would change whatever he wanted me to change so he could have it his way. I’ve moved towards a more steady grid system in my CSS, I’ve used more sprites than I ever have before and he has honestly taught me many things and kicked my ass into gear with regards to some obvious things.

BUT HE JUST WON’T GIVE AT ALL. I’ve met him more than halfway. I just don’t know if this is a battle to continue fighting. And I have no idea how to bring this up to our boss if he does keep on pushing. Sprites literally take me 2-3x the time to figure out than if I just do it my way! That’s the only defense I have.

You have to say that you’re not going to to <X> unless there’s a demonstrable and significant reason to do so, and “because that’s the right way to do it” isn’t a demonstrable and significant reason.

There are hundreds of large, high-traffic websites out there that use (gasp) tables and (OMG!) non-sprite images. No matter how many people want to say those things don’t scale well, the truth is that they’re wrong. Unless they’re written like total crap, they scale just fine, and if you take a look you can find the web sites to back you up.

This is the crux of the matter. If the site works, it’s maintainable, and the client doesn’t care, you need to stand your ground; doing it his way wastes time and money for no reason. And really, that’s what it will come down to if your boss has a lick of intelligence. He doesn’t want to waste time or money, and unless your coworker can demonstrate a reason to do it his way that doesn’t waste time and money, your boss should agree with you.

Another tack you can take for a more long-term solution is to approach your boss and tell him that you think the company needs to come up with their own coding/design guidelines. Once you have a “Kushiel’s Company’s Coding Standards Guide” then evil co-worker won’t have a leg to stand on. Of course, he’ll be a pain in the ass to work with while the company comes up with those guidelines, but it might be worth it.

I can give you the reason that I hate the new CSS thing: Not everyone views the web at the same font size, and while the image will usually resize with the font, if something jumps to two lines instead of one, you can wind up showing part of another glyph. Yuck. I thought it was neat for a bit, but running into that problem all the time has made me change my mind.

I’m not sure how it saves much, anyways. You can’t use JPEGs, so the compression is going to be about the same, and every decent web browser downloads all the images at once, anyways. Heck, if the browser doesn’t do partial downloads, it can be slower. All you are giving up is the HTTP and file headers, and then only the first time they ever view your page. And sometimes the file is bigger.

What am I missing/mistaken about?

Forgot to mention: this is the opposite of style/content separation when your page depends on a certain font/screensize. Good content has to work with traditional userstyling as well.

It’s bad enough I have to often reduce the page size on pages designed for over 1024x768, but to mess up when I also have to bump the font up so I can actually read it? Priceless. Oh for the simplicity of liquid page design. You know, like the SDMB uses.

Yay I was hoping you’d show up here! I always enjoy your presence in webby threads.

Coworker is taking a ‘why wouldn’t you want to learn it if it’s right’ sort of stance. And like I said, in future development, I’m willing to adapt to most of it. But ‘most’ isn’t good enough for him.

If you have 10 small images vs. 1 sprite with those 10 images in it then it’s 10 concurrent requests vs. 1 concurrent request. This is something to be mindful of on sites with lots of media and visitors.

Awww thanks!

It’s not “right.” There is no Web Design Bible that states “Thou shalt not use tables” or “Thou shalt use sprites” except in the minds of those people who have decided to adopt that philosophy.

I code/maintain/support a VERY large web site for a national company. Easily thousands of hits a day, well-known company, chances are everyone reading this thread has heard of it. Wanna know how many tables we use? At least 4 or 5 on every page, in some case many more. Very little CSS layout. How about sprites? Zero. Nada. None. And it works just fine. Company generates something like 90% of its revenue from the website.

So no, it’s not “right”, the guy has no leg to stand on, and your opinion counts as much as his. There’s a fine line between staying up-to-date and going over the top as far as learning/utilizing technologies, and as long as your code 1) works, 2) is maintainable and not a total mess, and 3) doesn’t take way longer to write than another method, you’re doing fine and your method is just as valid as his.