Tuesday, February 7, 2017

Global Social Media Statistics for 2017

Social media is an ever-evolving set of skills, best practices, and platforms. The social networking platform companies are continually rolling out new features as they compete for an ever-dwindling commodity—our time. But if you take a look at social media statistics, you can get an idea of how...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Guest Author via Digital Information World

Learning HTML, CSS and SVG, and Facing Fears, with Joni Trythall

In this episode, David and Tim are joined by Joni Trythall, a web designer, author, teacher and conference co-founder. They discuss learning HTML, CSS and SVG in non-traditional ways, the value of sharing code, teaching and writing about what you’re learning, doing stuff you’re uncomfortable with, not taking yourself too seriously, and blending web technology with adorable things.

Continue reading %Learning HTML, CSS and SVG, and Facing Fears, with Joni Trythall%


by M. David Green via SitePoint

21 Steps to Becoming a Successful Web Developer

Tips for becoming a successful developer

With the web development industry booming, many are asking the question: How do I become a web developer? I think that's the wrong question to ask. It should rather be: How do I become a successful web developer?

This is important to ask, because so many people around the world are web developers, but how many of them are successful at it?

My goal for this article is to equip you with the mindset, knowledge and skills to stand out from the crowd and make a success of your web development career --- whether that's at a company or freelancing for yourself.

This article is intended for aspiring web developers and web developers who are struggling to break through the "barrier of mediocrity".

These 21 steps will help you succeed in web development and beyond.

1. Is This Something You're Truly Passionate About?

"Passion" is a word so commonly used that the actual meaning gets distorted. It actually means "a strong and barely controllable emotion."

Passion is not passive: it's a pursuit to act. Most people hate their 9–5 jobs, but few do jobs they love and are passionate about.

It's important to ask yourself these three questions:

  1. Does the thought of creating websites and web apps excite me?
  2. Would this be an exciting career for me to do?
  3. Would becoming a web developer be in line with the lifestyle I'd like to have for myself (and my family)?

If you answered yes to the above questions, you're on the right path to becoming a web developer.


For more on becoming a successful developer, check out the Versioning Show episode on "What Makes a Good Engineer"…


2. What's Your "Why?"

This is one of the most important questions to ask yourself. Why would you like to become a (successful) web developer?

  • To make a difference and change the lives of others?
  • To build projects for others?
  • To build your own projects?
  • To earn a good income?

One of my "Whys" is to empower and equip others to make a positive difference in their lives as a whole, so that they can do the same for others.

When you're tired, distracted, upset or not motivated, your "Why" will get you to act if you really want to fulfill it.

3. What Interests You?

Do you prefer logic and problem solving or design and visual?

If you prefer logic and problem solving, you'll enjoy back-end web development.

If you prefer design and visual, you'll enjoy front-end web development.

Backend programming is everything you can't see on a website. Think of a server (a big hard drive with all the site's information) in a location somewhere in the world, processing all the website data and then sending it to the browser.

Front-end programming is everything you can see, click and interact with on a website.

Maybe you prefer both?

Continue reading %21 Steps to Becoming a Successful Web Developer%


by Kyle Prinsloo via SitePoint

Building a Microblog Using Node.js, Git and Markdown

A writer asleep on her desk, surrounded by components of her microblog

The word micro gets thrown around a lot in modern programming: micro-frameworks, micro-services, etc. To me, this means solving the problem at hand with no bloat. All while solving for a clean-cut single concern. This means focusing on the problem at hand and cutting unnecessary dependencies.

I feel Node follows the Goldilocks principle when it comes to the web. The set of APIs you get from low-level libraries is useful for building micro websites. These APIs are not too complex, nor too simple, but just right for building web solutions.

In this article, let’s explore building a microblog with Node, Git, and a few dependencies. The purpose of this app will be to serve static content from files committed to a repository. You will learn how to build and test an app, and gain insight into the process of delivering a solution. By the end, you will have a minimalist working blog app that you can build on.

The Main Ingredients for a Microblog

To build an awesome blog, first, you need a few ingredients:

  • A library to send HTTP messages
  • A repository to store blog posts
  • A unit test runner or library
  • A Markdown parser

To send an HTTP message, I choose Node, as this gives me just what I need to send a hypertext message from a server. The two modules of particular interest are http and fs.

The http module will create a Node HTTP server. The fs module will read a file. Node has the library to build a micro-blog using HTTP.

To store a repository of blog posts, I’ll pick Git instead of a full-fledged database. The reason for this, Git is already a repository of text documents with version control. This is just what I need to store blog post data. Freedom from adding a database as a dependency frees me from coding for a ton of problems.

I choose to store blog posts in Markdown format and parse them using marked. This gives me freedom towards the progressive enhancement of raw content if I decide to do this later. Markdown is a nice, lightweight alternative to plain HTML.

For unit tests, I choose the excellent test runner called roast.it. I’ll pick this alternative because it has no dependencies and solves my unit test needs. You could pick another test runner like taper, but it has about eight dependencies. What I like about roast.it is that it has no dependencies.

With this list of ingredients, I have all the dependencies I need to build a micro-blog.

Picking dependencies is not a trivial matter. I think the key is anything that is outside the immediate problem can become a dependency. For example, I am not building a test runner nor a data repository, so that gets appended to the list. Any given dependency must not swallow the solution and hold the code hostage. So, it makes sense to pick out lightweight components only.

This article assumes some familiarity with Node, npm and Git, as well as with various testing methodologies. I won't walk through every step involved in building the micro-blog, rather I'll focus on and discuss specific areas of the code. If you'd like to follow along at home, the code is up on GitHub and you can try out each code snippet as it’s shown.

Testing

Testing gives you confidence in your code and tightens the feedback loop. A feedback loop in programming is the time it takes between writing any new code and running it. In any web solution, this means jumping through many layers to get any feedback. For example, a browser, a web server, and even a database. As complexity increases, this can mean minutes or even an hour to get feedback. With unit tests, we drop those layers and get fast feedback. This keeps the focus on the problem at hand.

I like to start any solution by writing a quick unit test. This gets me in the mindset of writing tests for any new code. This is how you'd get up and running with roast.it.

Inside the package.json file, add:

"scripts": {
  "test": "node test/test.js"
},
"devDependencies": {
  "roast.it": "1.0.4"
}

The test.js file is where you bring in all unit tests and run them. For example, one can do:

var roast = require('roast.it');

roast.it('Is array empty', function isArrayEmpty() {
  var mock = [];

  return mock.length === 0;
});

roast.run();
roast.exit();

To run the test do npm install && npm test. What makes me happy is I no longer need to jump through hoops to test new code. This is what testing is all about: a happy coder gaining confidence and staying focused on the solution.

As you can see, the test runner expects a call to roast.it(strNameOfTest, callbackWithTest). The return at the end of each test must resolve to true for the test to pass. In a real-world app, you wouldn’t want to write all tests in a single file. To get around this, you can require unit tests in Node and put them in a different file. If you have a look at test.js in the micro-blog, you'll see this is exactly what I have done.

Tip: you run the tests using npm run test. This can be abbreviated to npm test or even npm t.

The Skeleton

The micro-blog will respond to client requests using Node. One effective way of doing this is through the http.CreateServer() Node API. This can be seen in the following excerpt from app.js:

/* app.js */
var http = require('http');
var port = process.env.port || 1337;

var app = http.createServer(function requestListener(req, res) {
  res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8'});
  res.end('A simple micro blog website with no frills nor nonsense.');
});

app.listen(port);

console.log('Listening on http://localhost:' + port);

Run this via an npm script in package.json:

"scripts": {
  "start": "node app.js"
}

Now, http://localhost:1337/ becomes the default route and responds with a message back to the client. The idea is to add more routes that return other responses, like responding with blog post content.

Folder Structure

To frame the structure of the app, I’ve decided on these main sections:

The Micro-Blog Skeleton

I’ll use these folders to organize the code. Here's an overview of what each folder is for:

Continue reading %Building a Microblog Using Node.js, Git and Markdown%


by Camilo Reyes via SitePoint

Using Fontello to Only Load Icon Fonts That You Need

Fontello in newspaper clipping letters

It is commonplace to see icon fonts used for a range of simple graphical elements around the web, from the display of social media icons inside sharing buttons on a website to a speech bubble icon that tells readers about the number of comments on an article.

There are a number of features that make icon fonts so useful. Firstly, unlike regular images, font icons have no pixelation on high-resolution screens. They can scale up as much as needed without blurriness. Secondly, a lot of their properties can be controlled directly using CSS. You can change their size and color, or apply text-shadows with a few lines of CSS. They are also much easier to use than image sprites.

Before getting too deep into icon fonts, if you are starting a new web design from scratch, keep in mind that using SVG images might be a better approach. We've explored a comparison of the two approaches here at SitePoint in the past. SVG images have some clear advantages, for example, you can create multi-color icons and your SVG images can also look sharper than icon fonts. On the other hand, if your project needs to support legacy browsers or your team has not yet taken the step of changing its workflow to accommodate SVG icons, it is worth looking into ways in which it's possible to optimize the use of icon fonts at least.

If you have worked with icon fonts before, you have most probably used or heard about Font Awesome. In version 4.7, Font Awesome provides 675 different icons for users to use in their projects. The icons provided by this font range from Facebook and Twitter icons to objects like a bathtub and thermometer. The only problem? You won't probably use all 675 icons in a single project. Loading the whole font file just to use about 10 or 20 icons increases the page load time unnecessarily. This issue is not specific to just Font Awesome but most icon fonts in general.

In this tutorial, you will learn about Fontello. It is a great service that is free to use and allows you to create icon fonts from vector images. You can also combine icons from multiple open source projects like Font Awesome, Entypo and Typicons in a single file.

Creating a Font Using Built-in Icons

The first step in creating your own font is selecting all the icons that you need from the Fontello homepage. Let's say you want to use font icons with social media buttons. You can start by selecting icons for Facebook, Twitter, Pinterest and LinkedIn.

Once you have selected all the icons, you can click on the "Customize Names" tab to change the name of icons. For example, the Facebook icon has the name icon-facebook but you can change it to icon-fb if you wish.

Continue reading %Using Fontello to Only Load Icon Fonts That You Need%


by Asha Laxmi via SitePoint

Android App Accessibility Checklist

Developers and designers of mobile applications must always focus on ensuring accessibility for vision and hearing impaired users. This article will offer some checklists you should complete to ensure your application is more accessible.

While working on any app, users rely on touchable controls. The controls should have appropriate size and be easily visible. Your app should have controls with a minimum of 48dp in length as well as width. It is approximately equal to 9mm and recommended for controls for which a user can select or take an action.

In the below figures, you can see the correct and incorrect ways of sizing buttons.

EditText is a control which configures itself to be editable. For ensuring accessibility, add an android:hint attribute for EditText fields. Adding the attribute will help users in understanding what content is written when the text field is empty. The content of the android:hint attribute can be spoken.

Continue reading %Android App Accessibility Checklist%


by Amit Diwan via SitePoint

QArt.js – Generate Artistic QR Code

QArt.js is a javascript library that merges pictures and QR codes for artistic QR codes. It can be used as React component, Angular.js directive and Vue.js directive.


by via jQuery-Plugins.net RSS Feed