Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint.com:
Best Practice for Code Examples
Aug 14, 2013 @ 15:29:55

If you've ever thought about including code examples in your (blog/site/etc) posts and were wondering how to least frustrate your site's visitors, check out these suggestions from one of SitePoint's UX authors, James Edwards.

The majority of articles about web development include code examples, and across the web we see great variation in how they're formatted and presented. But a lot of them are not very good - because the code is badly formatted, hard to read, or can't be copied-and-pasted without unwanted junk. So in this article I'd like to take a hard look at code examples, to investigate the common problems they have, and try to establish some best practice for how they should be done.

He talks first about the whole point of including code examples in a post and five basic principles for what they should be like:

  • Code examples should use good semantic markup.
  • Tabs in code should not be converted to spaces.
  • Code should have basic syntax highlighting.
  • Code examples can have horizontal scrolling, but shouldn't have vertical scrolling.
  • Code examples should have line numbers, which are not included in text selection.

There's some examples of code markup included as well as some CSS rules you can drop in to help follow his suggestions.

tagged: bestpractice code sample ux example

Link: http://www.sitepoint.com/best-practice-for-code-examples

Ibuildings techPortal:
DPC Radio: The Art of the User Experience (Keynote, Aral Balkan)
Apr 30, 2012 @ 16:08:14

The Ibuildings techPortal has published the latest episode of their DPCRadio series (as recorded at the Dutch PHP Conference 2011) - Aral Balkan's keynote session The Art of the User Experience: making beautiful, delightful, fun things.

In this session, Aral Balkan will outline the important role that user experience design plays in the making of virtual products and inspire you to see that it is your job - regardless of whether you make web sites, mobile apps, intranet systems, or ticket machines - to make this new world that we are crafting together not only usable and accessible but beautiful, fun, inspiring, pleasurable, delightful, and - dare I say - magical.

You can listen to this latest episode either via the in-page player, by downloading the mp3 or by subscribing to their feed.

tagged: dpc11 dutchphpconference dpcradio aralbalkan userexperience ux

Link:


Trending Topics: