Blog

  • On Productivity and Looking Into One’s Self

    I remember a talk I had with Jayce during a cab ride to MRT, I was telling her about a difficulty I am having with my team about managing projects and deliverables and mostly about their productivity which is greatly dependent on my plans to develop and further each of our careers.

    I realized in the process that I have my own inadequacies especially my own productivity, the way I am not focused on their individual projects because most of the time I leave them to plan their own day and I plan my own. Which resulted in a vague sense of accomplishment. What did we finish this week? Can it be improved? Should be do something better than having lots of free time?

    So I resolved in resolving my management style first before taking it on other people in my team.

    This week, I am being hands-on and aware that I am not micromanaging anyone. Because nobody likes even the worst or best micro-manager in the world.

  • Chikka – Since Year 2000

    Chikka - Since Year 2000

    Chikka created the world’s first instant messenger for online chat to integrate mobile features via SMS. In 2000 the very first version of Chikka Text Messenger™ was tested for launch by its very first mobile operator partner Smart Communications.
    ~ Source

    ~ Source

    It’s Chikka’s 14th anniversary today. Just a mere 2 years after its inception, I was jamming with Luna – simply unaware that one day I would be part of this solidly Filipino company.

    (more…)
  • The Guadalupe Bridge of News Sites

    Do you read the news? I bet you do on Twitter and thru Facebook News Feed.

    Some news sites are cleaner than others (especially foreign news sites) wherein the reader could focus on the article.

    Have you passed by Guadalupe Bridge? I’m sure you’ve already seen the billboard capital of Metro Manila.

    It looks like this on a sunny day:

    The Real Guadalupe Bridge
    Source

    And this morning, I saw it on a news website:

    Guadalupe Bridge Website

    Might as well:

    Guadalupe Bridge Website Billboards


    I have no unsolicited advice for cluttered news sites since revenue maybe booming from advertisements (heck, you only need a linkbait or a scary headline). But local news sites have been this way since a decade ago.

    This is what we need. A breath of fresh air.

    Rappler

  • Recreating The Verge’s Article Preview Boxes

    The Verge has some colorful boxes that contain a preview of their articles. Basically, they look like this (RIP Robin Williams):

    The Verge's Article Titles

    We’ll recreate one of those boxes using the following:

    Disclaimers

    • I didn’t view the HTML or CSS source of The Verge
    • I recreated it using the visible information with emphasis on the content structure
    • the semantics could be improved by ARIA
    • no information on browser compatibility

    TL;DR

    This is the final result of the recreation.

    [codepen_embed height=”395″ theme_id=”1820″ slug_hash=”tJdGn” default_tab=”result”]See the Pen Recreating The Verge’s Article Preview Boxes by Brian Dys Sahagun (@BrianSahagun) on CodePen.[/codepen_embed]

    (more…)

  • The Separation of HTML and CSS

    The Separation of HTML & CSS
    An illustration of HTML on the left and CSS on the right.

    In its basic sense, HTML is standalone. It is independent from CSS especially from the perspective of screenreaders and search engine crawlers. This goes to show about the importance of semantics and content structure in the HTML markup.

    In this regard, I strongly advocate for the manipulation of the style sheet instead of the manipulation of the HTML markup.

    Consider the scenario wherein you, as the front-end designer, have only 3 chances in having control over the HTML markup and on the other hand, an unlimited number of revisions and updates on the visual design aspect of the project.

    This indeed is a far-fetched situation – but it definitely will get us creative in setting up the HTML markup or in planning ahead. This scenario encourages us to use semantic names in the class attribute of the HTML markup as opposed to peppering it with presentational class names which are heavily tied up with the style sheet.


    In this basic HTML and CSS tutorial, we are going to demonstrate the following:

    • the separation of HTML (content structure) and CSS (visual design)
    • how to position a secondary element (like a graphic element or a label) thru CSS position: absolute and padding

    And some disclaimers:

    • while it discusses semantics, it does not tackle accessibility attributes (say, ARIA)
    • it does not show any SEO / screenreader test results regarding the benefits of an HTML markup with intentions on content structure or semantic HTML markup
    • it only translates into HTML and CSS a specific component (from a much complicated whole), although the HTML and CSS process remains the same if applied to a whole

    Separation of HTML and CSS

    HTML markup is intended for chunks of text content to have meaning for web browsers (screenreaders and search engine crawlers too, among others that I am not aware of) so that they could very well translate the content into something that people would understand easily.

    The text content along with its HTML markup must stand alone without the CSS layer. The content structure must remain intact and must be established before fully considering the visual design. Imagine writing a document in rich text format wherein you could create headings, lists, etc.

    This separation prevents the compromise of the content structure. For example, in a visual design mock-up it is shown that the navigation is located on top of the brand logo – in the HTML, should the author be putting the navigation markup first before the brand name markup or vice versa?

    In web design, it is not our ultimate goal to only replicate the visual design mock-up using HTML and CSS. While it is important to achieve visual quality, there’s an optimal approach in doing it while adhering to HTML’s semantic intentions. And semantics is the way to properly communicate with search engine crawlers and screenreaders. And of course, ultimately the people to whom the information is served.

    The Example

    The “Next Post” and “Previous Post” links are common in blog websites. Sometimes they also contain the article titles. Here’s a sample screenshot from PetaPixel.

    The Next & Previous post links in blog websites

    Step 1: Establish the content structure

    Let’s say we want to show the article titles along with their respective labels; the raw content would follow this structure:

    Previous Post: Previous article title
    Next Post: Next article title

    We give importance to the previous article that’s why it’s on top. But if our intention is for the reader to read forward to newer posts, we put the next article on top.

    Step 2: Markup using HTML

    <label>Previous Post:</label> <a>Previous article title</a>
    <label>Next Post:</label> <a>Next article title</a>

    Marking up in HTML involves semantics – meaning, assign the HTML element that conveys the meaning of that content. Sometimes it is objective and sometimes it depends on the HTML author’s intention.

    In our example, the objective nature of “Previous Post:” is that it is a label and it is also our intention – for it to be a simple text label that’s why we marked it up by the HTML label tag. For the article title, our intention is for it to be a link, so we marked it up by the HTML a tag.

    But since the label tag is intended for form elements, we choose another HTML tag that could convey the label meaning. Unfortunately, there isn’t any other HTML element intended for labels outside of forms. Here will come in handy, the generic inline tag which is span. Only use it as a last resort if you can’t match the content with its semantic HTML tag.

    <span>Previous Post:</span> <a>Previous article title</a>
    <span>Next Post:</span> <a>Next article title</a>

    Step 3: Put the proper HTML attributes

    <span class="label">Previous Post:</span> <a href="#">Previous article title</a>
    <span class="label">Next Post:</span> <a href="#">Next article title</a>

    Since span is a generic element, we must put a class attribute with a class name to make it semantic.

    Step 4: Label the component

    <span class="label">Post Navigation</span>
    <span class="label">Previous Post:</span> <a href="#">Previous article title</a>
    <span class="label">Next Post:</span> <a href="#">Next article title</a>

    Consider these links as one control – a type of navigation that aids the reader to navigate through old and new articles. In this regard, we could label it “Post Navigation”.

    Step 5: Check the HTML document in a web browser

    Remember about the separation of HTML and CSS? Apart from giving importance to the content structure (the arrangement of content according to its importance from top to bottom), we should also give importance to the bare HTML document that is displayed in the web browser.

    Does the content displayed conveys the content structure? Does it show hierarchy of information? Or the very least, is it readable? One could argue that it is readable – although we could further improve its readability by further improving its sematics.

    Step 5: Level up the semantics

    We will be adding several HTML tags not to “fix” the layout of what the browser displays but to be more semantic which in turn, positively affects the way the content is displayed and laid out in the web browser.

    <div class="post-navigation">
        <span class="label">Post Navigation</span>
        <ul>
            <li><span class="label">Previous Post:</span> <a href="#">Previous article title</a></li>
            <li><span class="label">Next Post:</span> <a href="#">Next article title</a></li>
        </ul>
    </div>

    Here comes the importance of knowing if an HTML element is block-level element or an inline-level element. To simply put, block-level elements simply block off the entire width of the space it occupies while inline-level elements could be joined together on a line – just like in our example on Step 5.

    So, basically, span is an inline-level element, as well as a that’s why they are displayed all on one line.

    On using <div>

    Use div to contain components or content when there’s no appropriate HTML elements that match. Another thing is div provide for the flexibility to nest or contain any kind of HTML element unlike p, HTML standards does not allow it to contain a div, for example.

    On using <p>

    Personally, I would use p or the paragraph tag as a substitute for div as a block-level element. This is OK for simple text content.

    On using <ul>

    ul stands for unordered list. I intend to treat the previous and next content to be a list of actions. Though one could also simply intend to treat them as they are, like:

    <div class="post-navigation">
        <p class="label title">Post Navigation</p>
        <p class="previous-action"><span class="label">Previous Post:</span> <a href="#">Previous article title</a></p>
        <p class="next-action"><span class="label">Next Post:</span> <a href="#">Next article title</a></p>
    </div>

    But I prefer using ul as it conveys structure.

    Step 6: Check the HTML document in a web browser

    That’s more readable, right? While its underlying markup wasn’t constructed to convey layout but meaning.

    Step 7: Pre-CSS – classify HTML elements

    Now that we got it going for us in terms of readability, we can now proceed to setting-up our HTML markup for CSS considerations.

    While the HTML markup of the example above is OK on its own, we must remember that working with CSS requires us to easily pinpoint or target HTML elements directly or at least using fewer selectors, otherwise it would be very difficult to style such elements. We could achieve this by naming HTML elements thru the class attribute. And these attribute values we will use as selectors to pinpoint the HTML element.

    <div class="post-navigation">
        <p class="label title">Post Navigation:</p>
        <ul class="action-list">
            <li class="previous-action"><span class="label">Previous Post:</span> <a href="#">Previous article title</a></li>
            <li class="next-action"><span class="label">Next Post:</span> <a href="#">Next article title</a></li>
        </ul>
    </div>

    Here, we specifically classified “previous-action” and “next-action” so that we could easily pinpoint it during the CSS phase. Of course, apart from CSS considerations, this approach is an added semantics to our HTML document because apart from marking up the content as a list, we specified what type of content are contained within each list item.

    At this point, I wouldn’t say that classifying each HTML element is purely for semantic purposes only because we are already transitioning towards the CSS phase, thus pre-CSS.


    Watch our for the second and last part of this tutorial tomorrow wherein we will demonstrate that CSS could simply transform the content displayed top to be laid out at the bottom (or anywhere else).

  • Seeds and Fruits

    Plant seeds in the neighborhood, grow fruits in your yard

    Plant seeds in the neighborhood, grow fruits in your yard.
    ~ BS

    Developing one’s turf must be a priority before developing others. It is my patriotic principle why I am proud to be one of the workforces in our country. I, alone, am contributing a meager amount of help but I won’t feel the same contributing any help from a faraway land.

    I might be speaking in tongues but I’m talking about my awareness of living in Manila, Philippines and my constant struggle in finding the balance between my personal hopes & dreams and this land’s baby steps into a better future.

  • Seeds

    2014-08-07 - Seeds

    Plant seeds in the neighborhood; grow fruits in your yard

    Brian Dys Sahagun

  • Movie Premiere or Graduation?

    From the Podcast, Unfinished Business Episode 76: Two old farts Googling

    I’ve always wanted to be the guy that has the best barbecue that you walk away from and you go, “We gotta go back to that guy’s place – it was a laugh and there was plenty of food and it was all good fun.”
    ~ John Davey

  • Plateauing and Bodybuilding

    From the Podcast, Unfinished Business Episode 77: Dirty, filthy, paid ads

    I’ve decided that I’m going out on my own. Like I’m gonna write my own products, I’m gonna get my qualifications. I’m going out. I’m ready to put the money, the financial investment into it and everything else. I’m ready.
    ~ Ashley Baxter

    That means you’re leaving your plateau.
    ~ Andy Clarke

  • Go Back or Go Home

    From the Podcast, Unfinished Business Episode 80: I wonder why he trusts us?

    If you want to make a big difference to an industry or a big change in your own life, you’re never gonna do it playing it safe.
    ~ Ashley Baxter

    You can’t achieve anything just sitting back and watching other people do it.
    ~ Laura Kalbag