8 ms·
Today Apple redesigned the homepage of the online Apple Store. I was having a look at their code and I found out some interesting code smells that apparently ev
by kaelig 13y ago
Today Apple redesigned the homepage of the online Apple Store. I was having a look at their code and I found out some interesting code smells that apparently even the most skilled developers will commit.
If one of their developers is reading this I am happy to help with Sass architecture and best practices.
- coldtea 13y ago>I was having a look at their code and I found out some interesting code smells that apparently even the most skilled developers will commit. Your use case is not Apple's use case. They're not designing Flickr, some blogging service or some news site. The smells are there for a reason. The pages and styles are not to be reusable -- they are meant to be easily replaceable on a per page / section basis.
- jonknee 13y ago> The smells are there for a reason. What reason is there for CSS that is commented out? Or for redundant prefixes? Or for debug to be left on and to have a bunch of comments and paths from the build structure?
- richardwhiuk 13y ago>>> Or for debug to be left on and to have a bunch of comments and paths from the build structure? So you can debug problems being seen only in the production version?
- jonknee 13y agoLet's hope Apple's not that lazy.
- kaelig 13y agoThen they may want to use Sourcemaps in Sass 3.3 alpha. But production assets should be minified for better performance.
- coldtea 13y ago>But production assets should be minified for better performance. Only if you have measured both, and found that minifying makes a difference on the scale you care about. Which might very well NOT be the case with Apple's site. They have tons of images, a lot of them very high quality and size (even retina). So a difference of a few K in the CSS would not even register in the assets transfer time. E.g you should now sweat 10K vs 20K CSS, when you have 2MB of images to serve in the same page. Oh, and it would only matter if they are not transferring assets as gzip in the first place -- in which case minifying is mostly redundant.
- eridius 13y agoWhat redundant prefixes? The article asks if they're really targeting users on iOS 3.2. And I would have to assume the answer is yes, of course they are. For a tiny amount of extra CSS they allow people using old devices and browsers to still give them money. It's a no brainer that they would leave the prefixes in!