Smashing Magazine

coding.smashingmagazine.com · Group blog · on HN since 2011

Smashing Magazine's coding section publishes tutorials on JavaScript, CSS, and front-end practice from many contributing authors.

What HN saysHN commenters cite its articles as references, such as the JavaScript MVC overview, jQuery plugin patterns, and the jelly navigation menu writeup.
126HN people shared it
26linked it in comments
138stories submitted
1.8Kstory points
13 years agolast shared
2011people per year2026

Most-shared posts

  1. 1
    Journey Through The JavaScript MVC Jungle
    6 people · 79 points · first shared 2012 · 7 comments on HN
  2. 2
    Absolute Horizontal And Vertical Centering In CSS
    4 people · 117 points · first shared 2013 · 60 comments on HN
  3. 3
    Beercamp: An Experiment With CSS 3D
    3 people · 44 points · first shared 2012 · 16 comments on HN
  4. 4
  5. 5
    An Introduction To Full-Stack JavaScript
    3 people · 13 points · first shared 2013 · 2 comments on HN
  6. 6
    Designing JavaScript APIs For Usability
    3 people · 10 points · first shared 2012 · discussion on HN
  7. 7
    Challenging CSS Best Practices
    3 people · 5 points · first shared 2013 · discussion on HN
  8. 8
    Getting The Best Out Of Eclipse For Android Development
    3 people · 4 points · first shared 2011 · discussion on HN
  9. 9
    An In-Depth Introduction To Ember.js
    2 people · 73 points · first shared 2013 · 12 comments on HN
  10. 10
  11. 11
  12. 12
  13. 13
    Yahoo’s Doug Crockford On JavaScript
    2 people · 17 points · first shared 2012 · 1 comments on HN
  14. 14
    Starting An Open-Source Project
    2 people · 8 points · first shared 2013 · discussion on HN
  15. 15
    Favorite php programming mistakes
    2 people · 7 points · first shared 2011 · discussion on HN

What HN people wrote when they linked it

ekidd · 2013-11-07
I'm really loving the new Promises/A+ support in Ember—lots of weird corner cases just got a lot cleaner, and it's much easier to bypass Ember-Data when the need arises. See this section of the original post for an example: http://coding.smashingmagazine.com/2013/11/07/an-in-depth-introduction… The first rule of Ember.js happiness is "Don't fight with Ember Data." When Ember Data does what you want, it's amazing. When you want to do something that it doesn't support, just fall back to jQuery and promises at the model layer, as shown above.
kilian · 2013-08-22
For those interested in how it's made, there's a great writeup here on Smashing Magazine: http://coding.smashingmagazine.com/2013/08/15/jelly-navigation-menu-ca…
ivanca · 2013-05-21
Search any jQuery plugin, many insert DOM and listeners that are not slightly configurable, most of them don't follow simple rules: http://coding.smashingmagazine.com/2011/10/11/essential-jquery-plugin-…
LAMike · 2013-03-09
"Journey Through The JavaScript MVC Jungle" http://coding.smashingmagazine.com/2012/07/27/journey-through-the-java… An open source Backbone book: https://github.com/addyosmani/backbone-fundamentals And a free lesson in Backbone from Code School after signing up for Coderbits... (usually $30) https://coderwall.com/p/dwqwvw Addy Osmani also has a great site that does the same todo list app in many different MV*'s: https://github.com/addyosmani/todomvc That should be a good start!
imjared · 2012-08-16
I worked with the guys who built this (we're a DC design studio) and can tell you that it doesn't gracefully degrade simply because it's not supposed to. As some people grasped, this was for a frontend conference where everyone would be expected to be running the latest and greatest browser. There's no guarantee it will work on your setup but when it does, it's a cool experience. Followup on how it was built here: http://coding.smashingmagazine.com/2012/04/17/beercamp-an-experiment-w… Full repo here: https://github.com/nclud/2012.beercamp.com
program247365 · 2013-05-29
The reasons for this are a couple I can think of: 1. Large web applications will eventually demand this of you to break the large solution into smaller chunks (components/modules). See this methodology: http://coding.smashingmagazine.com/2012/04/16/a-new-front-end-methodol… SASS will help you follow whatever standard/methodology your team may be following. 2. And having multiple files will ease development on a large team. Having multiple frontend developers checking in code, it helps to organize, and alleviate one developer stepping on another when checking in SASS files into source control. No conflicts, if developer A is working on the footer, and developer B is working on the header, which are separate SASS files. I don't agree that it slows down refactoring, and would argue it speeds it up. In the end, the multiple SASS files will probably (depending on how you do it, and your situation), compile down into one file. SASS also has options that allow you to say what the output looks like too (nested, expanded, compressed).
ekpyrotic · 2013-05-24
Thanks Chris, it's great to see people (pre-)launch. I think you deserve some honest feedback. You absolutely must learn to code. If you're running a start-up out the back of your bedroom, you need to push down costs -- and push them down hard. That means cracking open a jar of coffee and doing everything yourself -- including the coding. Thankfully, at this point you only need a professional(-ish) looking front-end. As it's a hardware product there's no obvious/pressing/necessary need for interactivity. So you need to learn the basics of HTML, CSS and JS. This isn't as difficult as it may first seem/appear -- a good week/fortnight should get you up to speed on the basics. Or, even a productive night. Then you should deploy and customize a pre-existing framework, i.e., Bootstrap. There's a tonne of interesting content hanging around about how to adapt Bootstrap to your needs.[1] These days there are many tools for novices to get to grips with contemporary trends quickly and easily. Why do you need to do this? One, because at the moment no-one will take you seriously -- at all. And I mean that in the nicest way possible. There's no use getting on the phone/networking/reaching out if your product is effectively pre-Internet. A non-website sets off serious, serious alarm bells. You're wasting your time. Second, as no-one will take you seriously, you're funneling your ad revenue down the drain. It's time get your head down, learn and crack on. Don't hesitate to reach…
ville · 2014-02-02
This article nicely shows all the alternatives with a list of caveats for each: http://coding.smashingmagazine.com/2013/08/09/absolute-horizontal-vert…
jasonlotito · 2014-02-02
A bit more comprehensive article can be found here: http://coding.smashingmagazine.com/2014/01/23/understanding-javascript…
rralian · 2014-02-01
FWIW, I was on a jQuery-hating kick before I read this article, which explains some of the beauty behind the jQuery api. http://coding.smashingmagazine.com/2012/10/09/designing-javascript-api… I agree that you probably only want to use a small subset of jQuery (e.g., none of the UI, none of the transitions), and zeptojs is actually a really good alternative. But it really does provide some convenience.
thoughtpalette · 2014-01-14
Absolute Horizontal And Vertical Centering In CSS http://coding.smashingmagazine.com/2013/08/09/absolute-horizontal-vert…
jasper_07 · 2013-12-12
Seeing lots of comparisons to ExtJS, in many ways it is similar, but it is also a lot like Dojo and even Backbone. Would hope in time we see a proper comparision like in http://coding.smashingmagazine.com/2012/07/27/journey-through-the-java… Where SAPUI5 excels is in providing an easy and consistent way to interact with SAP based backends. Anyone who has tried to do this with other frameworks will appreciate the complexity, SAP themselves have used and are using SAPUI5 for developing many application across the globe. It has been used in anger and been proven to be very extensible and scalable, the kind of things you look for as a Enterprise Developer.
willurd · 2013-07-15
I've come to accept that HN is the place I go to satisfy my "intellectual curiosity" and more focused lists are where I go to get my learn on. For example, for JavaScript stuff: * http://reddit.com/r/javascript (yeah it's on reddit, but it's a great resource) * http://javascriptweekly.com/ ( https://twitter.com/JavaScriptDaily ) * http://coding.smashingmagazine.com/tag/javascript/ * http://dailyjs.com/ * http://javascriptshow.com/ (been a while since the last episode) * http://javascriptjabber.com/ (I haven't listened to any episodes yet, but I plan on it soon)
diiiimaaaa · 2013-05-02
Yep there is a list of unique features on plugin homepage: http://dimsemenov.com/plugins/magnific-popup/ Also, be sure to check my article on the Smashing Magazine that explains how this plugin was made - http://coding.smashingmagazine.com/2013/05/02/truly-responsive-lightbo…
dbushell · 2013-03-31
jQuery animate is terrible for performance. The demo lags at a few frames per second (and I'm testing on a Nexus 4). CSS transitions are the method for this. Not without their own caveats, but usable. I've written extensively on the subject with this exact implementation of an off-canvas menu: http://coding.smashingmagazine.com/2013/01/15/off-canvas-navigation-fo…
tbassetto · 2013-03-01
I knew I saw this design somewhere else: http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layou… Granted, it's not "complicated" but it's also the same colors... Edit: Smashing Mag is mentioned on Pelican blog: http://blog.getpelican.com
papsosouid · 2012-10-31
>Regardless of whether you use bootstrap or not you are always going to be specifying CSS classes which describe the presentation of elements, not sure how else it can be done? http://coding.smashingmagazine.com/2012/06/19/classes-where-were-going… >Screen reader software will generally ignore anything that it doesn't understand or deem irrelevant. Yes, that's the problem. Putting useful information in places where software has no way to understand it. >Whenever I have tried screen readers they will say "ok, there's 3 divs with content here. Let's read them out one at a time or just read the headings and wait for the user to select one". And if you had the appropriate tag instead of a meaningless div, it would know what to do. That's the point. Google for semantic html.
gburt · 2012-08-16
[1] http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-y… This is a feature, not a bug. Its called CSS specificity. Although, the link[1] seems to suggest it should be 100, not 256... that might be a bug.
doomslice · 2012-05-01
http://coding.smashingmagazine.com/2012/04/27/yahoos-doug-crockford-on… "One interesting story about leaving things out: as we got closer to releasing JSON I decided to take out the ability to do comments. When translating JSON into other languages, often times the commenting piece was the most complicated part. By taking the commenting out we reduced the complexity of the parsers by half—everything else was just too simple."
bartech · 2011-07-29
What about adaptive / responsive design? http://www.alistapart.com/articles/responsive-web-design/ http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsiv… http://webdesignledger.com/inspiration/30-creative-examples-of-respons… I know it's easier to throw the same page no matter what screen size it is. First you say that there is no single solution: "You can not have one magic solution for all." and then: "Well, very simple. The iPhone is capable of rendering and interacting with the full page. It was the first browser to do so - it don't require a lite version. You could tap, zoom, pinch, drag and get the full depth of the page." You just defend your ugly design by "it's not doable" and by "we know better"
jkjeldgaard · 2011-07-16
I don't think there is a wealth of FOSS programs when in comes to designing. Hence, I tend to use of various web-apps for design tasks: http://layerstyles.org/ - Css generator http://0to255.com/ - Color/gradient chooser http://coding.smashingmagazine.com/2011/06/10/useful-html-css-and-java… - Link collection
ryanwhitney · 2014-03-04
A separate font file is required for every style and weight of a typeface that you want to use. For example, to use four unique styles of a typeface on a site (say Regular, Italic, Bold, and Bold Italic), you would need to import four font files (ClearSans-Regular, ClearSans-Italic, ClearSans-Bold, ClearSans-BoldItalic). If you give a chunk of type a style or weight that you haven't loaded the appropriate font file for, browsers will add weight to or slant the text themselves. ("faux-bold", "faux-italic"). This gives you ugly, rough, less readable text that counteracts the primary reasons to use a web font in the first place. Default CSS styles (H1 automatically adding font-weight: bold;) can also cause this in some cases. [See link] There's two main (maybe three) approaches to implementing them correctly, Laura Franz does a good job of describing them here: http://coding.smashingmagazine.com/2013/02/14/setting-weights-and-styl…
kellros · 2014-01-15
There's numerous reasons why this is a bad idea. There's a difference between a fixed width layout and an absolute positioned layout - the fixed width layout can adapt. The biggest issue with absolute positioned layouts (as with design for print) is they can only scale, but not adapt to the various resolutions and pixel densities we encounter on clients viewing websites. Web design is first most the design of a pattern of design in order to achieve consistency via reuse. If everything has fixed dimensions; it wouldn't be very reusable. On the topic of using JavaScript to perform the layout: 1. JavaScript performance in newer browsers are pretty good, but ranging from extremely to pretty bad on older browsers (don't forget the mobiles!) 2. You'll have to resort to using CSS anyway for specific layouts (ex. keeping an element always visible) as repositioning an element on streaming events using JavaScript tends to be really slow. 3. The amount of reuse you'll get from even writing a decent interface for layout functions will be pretty low. 4. Behavior of CSS using a reset is more consistent than JavaScript implementations. You'll probably need to normalize between different browser versions - that means using something like jQuery, Moo Tools etc. which adds a hefty payload. 5. Waiting for your JavaScript to be downloaded and interpreted to reposition elements (after the DOM has already rendered) will be an ugly sight. You should invest time in pre-processors such as…
stickhandle · 2013-02-16
From Addy @ - http://coding.smashingmagazine.com/2012/07/27/journey-through-the-java… :: I want something flexible which offers a minimalist solution to separating concerns in my application. It should support a persistence layer and RESTful sync, models, views (with controllers), event-driven communication, templating and routing. It should be imperative, allowing one to update the View when a model changes. I’d like some decisions about the architecture left up to me. Ideally, many large companies have used the solution to build non-trivial applications. As I may be building something complex, I’d like there to be an active extension community around the framework that have already tried addressing larger problems (Marionette, Chaplin, Aura, Thorax). Ideally, there are also scaffolding tools (grunt-bbb, brunch) available for the solution. Use Backbone.js. I want something declarative that uses the View to derive behavior. It focuses on achieving this through custom HTML tags and components that specify your application intentions. It should support being easily testable, URL management (routing) and a separation of concerns through a variation of MVC. It takes a different approach to most frameworks, providing a HTML compiler for creating your own DSL in HTML. It may be inspired by upcoming Web platform features such as Web Components and also has its own scaffolding tools available (angular-seed). Use AngularJS.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close