Javascript News

Syndicate content
Pipes Output
Updated: 6 min 35 sec ago

Creating Rich Video Experiences with Popcorn.js

Mi, 2014-04-23 19:00

Considering just how easy it is to embed videos in websites it's a marvel that developers often stop at just that: plain old embedded videos. What if you could create an entire experience for your user that's directed by the video itself? With Popcorn.js you can do just that - and this article will teach you how. Popcorn.js Fundamentals Let's start small. We'll get Popcorn.js installed, and then get a "Hello World" example up and running in no time. 1. Create a Simple HTML Page We'll start off by creating an index.html file with the following content. The .video div is, unsurprisingly, where our video will eventually appear. [html] < !doctype html> [/html] 2. Include Our Custom Styles Next, let's include some basic styles for our project. The updated head section of the previous HTML page is shown below. [html] .video, #map { width:300px;height:200px;float:left;} [/html] 3. Include Popcorn.js Next, we need to include the Popcorn.js library itself. There are a number of options to choose from on the Popcorn.js download page. We're going to use the 'complete' version, which includes all of the official Popcorn.js plugins. We'll use the minified version in this tutorial, but you can use the development version if you'd like to have a poke around the source. Note the additional imports in the following code sample. [html] [/html] 4. Create and Include app.js Next, let's create the main JavaScript file for our app. This is where we'll initialize our Popcorn.js instance. Create app.js and include it in your index.html file. The contents of app.js are shown below. [js] // Wait for the DOM to load window.onload = function() { // Create popcorn instance from the YouTube video and insert it into the .video div var pop =".video", "http//"); // Play the video automatically; }; [/js] And, the updated index.html head section as shown here. [html] [/html] In app.js we've used the Popcorn object's youtube() method to create a video instance from a YouTube URL. The first parameter is a selector for our .video div. This is where Popcorn.js will insert our video. The second parameter is the YouTube URL. At the end of the file, we call which does exactly what it says - it plays our video.

Continue reading %Creating Rich Video Experiences with Popcorn.js%

Quick Browser Screenshot Testing at Modern.IE

Mi, 2014-04-23 18:00

This article was sponsored by modern.IE. Thank you for supporting the sponsors who make SitePoint possible! Web developers understand the importance of rigorous testing on multiple mobile, tablet, and desktop browsers. We do. Honestly. It's simply that it takes too long! There are only so many hours in a day and testing often falls far down our list of priorities. We'll do it once we've implemented one more essential feature, read the latest SitePoint HTML5 article, grabbed a coffee and -- oh -- it's 5pm. Testing across multiple devices may be tedious but, the longer you leave it, the more difficult it becomes to fix the inevitable problems. You may have a great device lab or use Virtual Machines from modern.IE but the psychological jump from developer into tester mode is daunting. Easy Multi-Device Testing Fortunately, modern.IE has another solution for quick and dirty testing. The free screenshot automation tool powered by BrowserStack loads your site on a range of mobile and desktop devices and presents captured screens within a matter of minutes. The process is simple and painless… Open in your browser: Enter the address of a page you want to test and hit enter: The results are generated and presented -- click any thumbnail to view the full-size image. Option buttons allow you to:

  • download a PDF containing all screenshots;
  • share the results via email, Facebook or Twitter; and
  • generate a poster of your site!
There are also links to further tools and help resources should you need them.

Continue reading %Quick Browser Screenshot Testing at Modern.IE%

PHP News You May Have Missed

Mi, 2014-04-23 16:00

The last month or two have been chock full of small news and releases not warranting a full story in their own right but still interesting, I’ve decided to make a small compilation and direct your attention to the interesting developments around us. Just because we don’t cover something immediately, doesn’t mean we don’t notice or care :)

Ubuntu 14.04. LTS

Not so much PHP related, but still fairly important for our channel and future development purposes, the release of Ubuntu Server 14.04 LTS kind of flew by most people. This release will be supported by Canonical until 2019, which is a big deal as we can now all switch to this newest version as soon as it’s vetted by hardcore users. Stay tuned for upcoming Vagrant boxes predefined for 14.04. soon - we’ll be custom building and publishing some soon.

You can download the server version here and there’s a default Vagrant box available here.

GAE 1.9.1 - 1.9.3

Google App Engine has reached minor version 1.9.3., adding some more features and upgrades since the last time we talked about it:

  • bug fixes regarding Zend Framework, null characters in URLFetch, failed file uploads to Cloud Storage, long POST data, unlimited upload sizes and the fnmatch() function
  • ability to embed images in emails via the Content-Id header was added
  • the zip module is included by default now

The SDK has been updated and you can take it for a spin immediately. To see how you can do that, check out my previous article on GAE.

Continue reading %PHP News You May Have Missed%

Reading Ruby for Professional Development

Mi, 2014-04-23 14:00

Peter Seibel recently blogged to challenge the idea of reading code for reading’s sake. “Code is not literature and we are not readers,” he concluded. “Rather, interesting pieces of code are specimens and we are naturalists.”

That’s partially true. Interesting pieces of code are specimens. Yanked from their context in programs or frameworks, lines of code become like dead bugs on pins in boxes.

It might be nice to sit around with a snifter of brandy and discuss a dozen lines of code as though they were some exotic insect or even poetry, but few developers can afford that luxury. Developers have jobs to do and problems to solve that are embedded in thousands of lines of supporting code. Often, these lines are built by numerous developers attempting to address a set of problems that evolve unpredictably over time.

But that’s not to say that developers don’t read source code. Reading is actually the first thing that goes into solving most problems. Sometimes it might be necessary to, first, pick apart a stack trace or grep through any log files that might be on hand. But then it’s on to reading the suspect portions of the source code, and the detective work begins.

Continue reading %Reading Ruby for Professional Development%

Proven: Great Copywriters Wield Great Power

Mi, 2014-04-23 09:32

You can convince anyone.

Scroll down to the second point in this article to find what you need the most to become a powerful copywriter.

In this article, I will show you how persuasive copywriting can be one of the most powerful tools to draw your customers into your website, and convince them to make a choice -- preferably, a decision to do business with you.

Once they have landed on your website, the design and copy take over. It is now the magic of words and visuals that will keep them exploring. Conversion-centered design (as opposed to user-centered design) aims to reduce the number of leaks from your site and help the customer complete a task.

We'll talk about visuals in another post, but for now, let's look at the power of a talented copywriter. 1. They Can Control Your Mind

Research has shown that the top five words that grab attention are:

You or your name - People are becoming wary of these words because annoying spam e-mails have overused these.

Nevertheless, if used carefully, your name is still very persuasive. It is human nature to respond to your name. Sometimes it makes you suspicious how they got to know you; sometimes it makes you curious; sometimes it gives you the feeling that it is personal - only for you.

Continue reading %Proven: Great Copywriters Wield Great Power%

An Introduction to the Web Notifications API

Di, 2014-04-22 19:00

The time of the 56kb connections has faded out of memory for a lot of people (mobile users not withstanding). It was a time when browsers that could open a single page where enough, and no one could even predict a future with multi-tabbed browsing. Today, we're overwhelmed by social networks, posts, replies, comments, photos, videos, and much more. Several systems have been created to overcome the need to look at every single tab to check for new activities. One of these methods are notifications, which are very widespread on different websites. Until not too long ago, every developer had to implement notifications on their own, resulting in a whole set of different solutions. The W3C has defined an API to solve this problem in a standard way called the Web Notifications API. On mobile devices we're very familiar with the concept of notifications. Try to be offline for a couple of hours and, as soon as you connect to the Internet, you'll be overwhelmed by notifications from the different apps installed on your device. It'd be great to have the same mechanism, like the Web Notifications API, for our web pages that work seamlessly on desktop and mobile devices. Image shamelessly stolen from the presentation of Brad Frost, Death to Bullshit What is the Web Notifications API The Web Notifications API is defined as an API for end-user notifications. A notification allows alerting the user outside the context of a web page of an occurrence, such as the delivery of email. The specifications don't describe how and where a UA should display these notifications. Therefore, we'll see different styles on different browsers and, based on the device we're using, we'll see the notifications in different places (for example on mobile we may see them in the notifications bar). It's worth noting that before you can show a notification, the browser shows an alert to the the user, who must explicitly give his/her consensus. An example of a notification using the Web Notifications API on Firefox This API has been around for a while, to the point that the specifications have changed several times. The specification has known two major versions. The first version was implemented in older versions of Chrome and Firefox. Now, the specification seem stable, although as of April, 19th 2014 it's still a W3C Working Draft. Thinking of some use cases for such an API isn't very hard. For example, you may want to receive a notification as soon as you receive an email. You may also want to be notified if someone mentions you in a Tweet, or posts a photo of you on Facebook or Google+. Now that we know what this API is, and what it's good for, let's delve into the description of its methods, properties, and events. Methods, Properties, and Events The Web Notifications API is exposed through the Notification property of the window object. This is a constructor that allows us to create a notification instance. It accepts two parameters - a string containing the title of the notification, and an optional object of settings. Before we see how we can create an instance, let's look at the settings we can specify:

  • body: A string used to further specify the purpose of the notification.
  • lang: Specifies the language of the notification. Its value must be compliant with the BCP 47 standard. Examples of valid strings are en-US and it-IT.
  • dir: Defines the direction of the message's text. Its value can be auto meaning that the direction is based on the browser's settings, ltr to specify a left-to-right direction (for European languages), or rtl to specify a right-to-left direction (for some Asian languages).
  • tag: A string that is used as an ID that can be employed to retrieve, replace, or remove the notification.
  • icon: Specifies the URL of an image that will be used as the notification's icon.
To create an instance of a Notification object, we should write a statement like the following: [js] var notification = new Notification('Email received', { body: 'You have a total of 3 unread emails' }); [/js] Pretty easy, isn't it? It turns out that the settings we've just learned are also available as read-only properties of a notification instance. In addition, the Notification object exposes a property called permission. permission contains a string representing the current permission to display notifications. Its value can be one of the followings: denied, which means that the user has denied notifications, granted, which means the user has given permission, or default, which means the user choice is unknown. This API exposes two methods: requestPermission() and close(). As the names suggest, the former is used to request the permission to show notifications to the user, while the latter programmatically closes a notification. requestPermission() is a method of the Notification object and accepts an optional callback that is executed when the user accepts or denies permission. The choice is passed to the callback as a parameter, and the value can be granted, denied, or default. close() is an instance method and doesn't accept any parameters. Sometimes we may need to perform an action as soon as the status of the notification changes. For example, we may want to know if the user has clicked the notification, or when it is closed. To do that, we can attach a handler to one of the four events exposed:
  • onclick: Fired when the user clicks on the notification.
  • onclose: Fired as soon as the user or the brower closes the notification.
  • onerror: Fired if an error occurs with the notification.
  • onshow: Fired when the notification is shown.
A basic example of using these events is shown below. [js] var notification = new Notification('Email received', { body: 'You have a total of 3 unread emails' }); notification.onshow = function() { console.log('Notification shown'); }; [/js]

Continue reading %An Introduction to the Web Notifications API%

My Favorite Sass Tools

Di, 2014-04-22 18:00

Sass was introduced about 7 years ago as a workaround for CSS flaws and has come a long way since then. It has played a major role in popularizing CSS preprocessing, to the point where the question is no longer if you should use a preprocessor, but which one you should use. It turns out, the answer to that question is very often Sass — because the syntax is better (and closer to CSS), because it’s permissive, and because it can do a lot of stuff and works well.

Since being introduced, Sass has become arguably the most important CSS preprocessor available today. It has a whole ecosystem growing around it (starting with Compass) — Playgrounds, applications, grid systems, libraries, and so on… But it’s not always that easy to dig up interesting stuff about Sass. The more there is, the more you have to look in order to find the thing you want.

Hence this blog post. What if I tried to enlighten the path by showing you what I think are the most valuable Sass tools? Sounds cool right? Let’s go.


Getting started with Sass is not easy. Mostly because it is written in Ruby. And while Ruby is a popular language, front-end developers usually do not know Ruby. This is the main thing that leads beginners to use LESS or Stylus, which are written in JavaScript (Node, actually). People usually don’t want to add Ruby to their stack just to see what Sass is worth.

Fortunately, you can try Sass online. There are playgrounds, or online tools, that allow you to write Sass and see the compiled CSS and (sometimes) the way the code will render. As of writing this, there are two major playgrounds to play with Sass:


CodePen, by Chris Coyier, Alex Vasquez, and Tim Sabat, is by far the best playground you can use. It offers everything you need and beyond for front-end testing. Regarding Sass, it supports the stable version (version 3.3.4 as of writing) and you can use either the old indented syntax or the SCSS one.

You can also pick between Compass and Bourbon (or none). It also shows you syntax errors. It’s really awesome so if you don’t know about it yet, have a tour and give the Sass features a try.


SassMeister, by Jed Foster, is a playground that specializes only in Sass-related stuff. Obviously then, it does the job better than CodePen. You can use either stable, or Sass 3.2.14, or even LibSass, the C port of Sass (still running on Sass 3.1.x as of this writing).

Of course, SassMeister lets you choose the syntax you feel more comfortable with and you even can choose the output style (expanded, compressed, and so on). Most importantly, because SassMeister is specific to Sass, it allows you to import Sass libraries (Compass extensions actually). You can even propose your own extensions if you think they should be added.

Continue reading %My Favorite Sass Tools%

Version Control Software in 2014: What are Your Options?

Di, 2014-04-22 15:00

Imagine software that creates checkpoints in your work and allows you to go back to those checkpoints when you want. This essentially means revisiting your work back in time. Once you are back to such a checkpoint, you can also deviate from the original path that you chose. This is exactly what version control systems do for you!

When using version control, the main code is present on one central repository or distributed over many repositories. Everyone working on the code has a local copy of what they are working on in their local or remote systems. This local copy may be a file, some files and directories or the whole repository, depending on the software. Version control system software helps in the management of this code. Besides that, non programmers can also use such software, for example, to manage documents.

In this post, I will offer a quick review of version control software options that we currently have at our disposal. Version control software is broadly divided into two categories — centralized and distributed. Centralized systems have a single central copy of the code on a server and developers commit changes to this central copy only. In distributed systems, every user has a copy of the code, with full history of the project.


Git, which which is a distributed version control system, is arguably the most popular version control system today. It was developed by Linus Torvalds to address the issue of speed with existing version control systems. A wide range of organizations worldwide prefer Git to manage their code, as Git provides a huge range of features.

With the emergence of popular websites like GitHub, GitLab, and BitBucket, code review using git has become very easy. That is why new organizations are choosing git over others.

Notable internet giants who use Git for version control are Twitter and Quora. In fact, Twitter’s open source work is on GitHub. As of March 2014, their Bootstrap project is the most popular repository on GitHub with about 67,000 stars and over 24,000 forks!

In case you’re interested in the philosophy behind the development of Git, here is a video of Linus Torvalds’ Google tech talk on Git. He talks of the issues with CVS and SVN and how Git solves these.

Continue reading %Version Control Software in 2014: What are Your Options?%

Video: An Introduction to

Mo, 2014-04-21 18:15

Have you ever wanted to try Rails or play with Python? Ever wanted to have a go with Go, but been unable — or just unwilling — to go through another convoluted set up? Then you will really like We certainly do! Thom Parkin does too. He'll tell you all about it.

Continue reading %Video: An Introduction to

The Art & Science of Great Website Color Selection

Mo, 2014-04-21 16:30

Website designers often struggle over the selection of colors. With roughly ten million discernible colors to choose from, it’s no surprise that the decision comes with a lot of angst.

While some designers have formal training in art and graphics and are comfortable with decisions about color, the rest of us are forced to struggle with it. We look for rules and guidance and are met with opinions and platitudes.

Some decisions may seem obvious.

For example, you probably wouldn’t use blue for a Halloween-themed site. On the other hand, what color would you choose for a site dedicated to JavaScript programming?

In this article, we’ll break down the color selection topic into three parts.

We’ll begin by looking at some colors that indeed are hard-wired into our psyche (there’s not many of them) and then move on to discuss cultural and historical influences of color.

Finally, we’ll see how easy it is to create analogous and complementary colors once we’ve selected a baseline color. Hard-Wired Colors

Let’s begin by reviewing a few truths about us humans: Our bodies are the result of a billion+ years of engineering. The sole purpose of all this engineering is to help individuals survive long enough to perpetuate the species.

Our base instincts are therefore hard-wired into our psyche as a means to ensure our survival. While our egos and sexual drive are the physical manifestations of this hard-wiring at work, more subtle qualities like our refined vision and associated ability to recognize patterns are used to help us gather all-important food.

Continue reading %The Art & Science of Great Website Color Selection%

Database Versioning with Ladder Migrations

Mo, 2014-04-21 16:00

Version control systems are invaluable for tracking changes in your code, particularly when you’re working in a team. However, most applications don’t consist solely of application code. Managing changes to the database has always been a little more challenging, particularly when you’re adding new features which require changes to the schema.

Suppose you’re working on a module and realize one of the database tables needs an additional column. You might be tempted to open up a database query tool or the command line and simply add the column. However, this doesn’t leave a record of the change in the same way as version-controlled application code would. This gets exacerbated when working in a team - if a colleague pulls your code changes without running those same database updates, then it’s entirely possible their version of the application will break. This becomes even more problematic when you’re releasing a product update, when it could break the application not just for your fellow developers, but for your users.

One solution is to move responsibility for creating and modifying the database schema into code, using migrations. That way, changes can be managed along with the rest of your application, and features we take for granted in version control - such as being able to compare versions and keep an audit trail - can be used for database changes. It also allows these changes to be seamlessly incorporated into releases, since they can be made part of the same branch or tag.

Many major frameworks have their own migration implementation, but for those that don’t - and if you’re not using any framework - there’s Ladder.

Continue reading %Database Versioning with Ladder Migrations%

BDD: Think Like an Actor

Mo, 2014-04-21 14:00

Make no bones about it, BDD ain't easy! It's actually darn-right difficult and takes time to master and do it right. Luckily, the benefits far outweigh the initial costs. If you've decided to practice BDD then you've already made a conscious decision to break the 'burn-and-scrape' cycle, a wise choice indeed!

Still, good intentions alone are not always enough. Many developers become disillusioned and frustrated with a process that doesn't seem to work for them. In this article, I'd like to explore some of the most common obstacles and pitfalls that fresh BDD adopters encounter and offer some tips to help overcome them.

Continue reading %BDD: Think Like an Actor%

Database Versioning with DBV

Sa, 2014-04-19 16:00

It’s good practice to always use a version control system in any of your projects. Be it a side-project in which you are the only developer, or a team project where five or more people are working on it together. But the idea of putting your database into version control isn’t really that widespread. Often times we take the database for granted.

But like the source files in our project, the database is constantly changing too. That’s why we also need a way to track the changes that we have made and easily share it to other members of our team.

In this article we will take a look at DBV, a database version control system written in PHP for MySQL databases so you need to have PHP and MySQL installed before you can use it, along with a web server like Apache or Nginx.

An important note about this software is that it is not a stand-alone database version control system, because it needs a version control system such as Git, Mercurial or SVN for syncing changes with your team.

Installing DBV

To start working with DBV, first you have to download the installer from their website, extract it into your project directory then rename the resulting folder to dbv. This will give you the following path:


An alternative approach is just cloning from Github.

DBV Configuration

You can start configuring the options for DBV by creating a copy of the config.php.sample file and renaming it to config.php.

The most important things to update here are the first two sections. Just substitute the values for my_username, my_password, my_database for the values in your current database configuration:

Continue reading %Database Versioning with DBV%

Simple Ergonomics Tips for Desk Jockeys

Sa, 2014-04-19 00:55

Human bodies are an ingenious but strange design solution. Not fast by animal standards, but we cover the ground well. We have above-average vision, good climbing abilities and excellent fine motor skills.

One thing we're actually not very well designed for is sitting.

In fact, one 2012 study suggests sitting for extended periods is more damaging to your health than smoking.

A hundred years ago, this wasn't so much of a problem. Most of us spent our days rivetting ships, toiling in fields or striding a delivery route.

Unfortunately, as desk jockeys and code monkeys, we spend most of our waking hours in front of a computer by necessity.

Comfortability is very subjective, but there are some more or less universal ergonomics rules how to arrange your work environment to reduce trauma and increase productivity. Firstly, what is Ergonomics?

Ergonomics is a relatively modern term – it was first used in 1949. It comes from the Green "ergon," (work) and "nomoi" (natural laws). Ergonomics is essentially usability, so it should naturally resonate with designers.

According to the definition in the Merriam Webster dictionary:

  • ergonomics: a science that deals with designing and arranging things so that people can use them easily and safely
  • ergonomics: the parts or qualities of something's design that make it easy to use

The purpose of ergonomics is to increase your productivity and to keep your health. In some countries, legislation makes it mandatory for employers to ensure ergonomics in the workplace, but this isn't the case everywhere.

Continue reading %Simple Ergonomics Tips for Desk Jockeys%

jQuery 1.11.1 RC2 and 2.1.1 RC2 Released

Fr, 2014-04-18 19:30

Spring has sprung, and these release candidates for jQuery 1.11.1 and 2.1.1 are in full bloom. You know what that means? It’s time to get serious about testing! We really want our next release to be solid and reliable, and to do that we need your help. Please try out these files in your projects and pages, just a quick test would be appreciated. If you unearth any problems, let us know at

The beta files are located on the jQuery CDN, you can include them directly from the CDN if you like (but don’t use them in production!). As always, the 1.x branch includes support for IE 6/7/8 and the 2.x branch does not:

Here are the bugs fixed since the last official release (1.11.0 and 2.1.0):

Common to jQuery 1.11.1 RC2 and 2.1.1 RC2 Ajax Attributes Build Core Css Dimensions Event Misc jQuery 1.11.1 RC2 Css jQuery 2.1.1 RC2 Ajax Attributes Core Css Event Manipulation Selector

A Review of the Brackets Editor

Fr, 2014-04-18 19:00

This article is going to take a look at Brackets, an open-sourced editor originally developed by Adobe. It may not have had quite the same level of publicity and hype as Atom, GitHub's new lightweight editor, but it's a promising option for the front end developer. Target Audience It's worth pointing out that Brackets is primarily aimed at front end developers and web designers. Although it's essentially a text editor and therefore suitable for coding pretty much anything, it's optimized for HTML, CSS, and JS (as well as derivatives such as SASS, Less, CoffeeScript, and so on). Ruby, Python, PHP developers, and the like might be better served looking elsewhere, whether that be for a fully-fledged IDE or something more lightweight such as Sublime or, indeed, Atom. What Makes Brackets Different? Brackets makes a big deal of the fact that it's written using a combination of HTML, CSS, and JavaScript. While this may mean little for the casual user, those who wish to extend - or even hack it - have the opportunity to do so using technologies they're probably already familiar with. The fact that it's open-sourced also makes it stand out from the crowd. Sublime, for example, is a commercial product, while Atom is closed-source and won't be free forever. Getting Brackets Brackets can be downloaded from the website, and is available for Mac OSX, Windows, and Linux (32 or 64-bit). For the purposes of this review, I'm running the 37th "sprint", on Mac OSX. First Steps When you open Brackets for the first time, you're thrown straight into an HTML-based tutorial file with accompanying CSS, which is a great way to start exploring. The left-hand column lists the working files, and beneath that is a folder view. It's like Sublime in that you can view a file with one click without actually opening it. A double-click opens the file for editing, adding it to the working files list. The right-hand column contains icons for opening Live Preview (which we'll look at shortly) and for the Extension Manager. Many third-party extensions create their own icons and place them in this bar, so it can quickly become an invaluable launchpad. A Quick Feature Tour Let's look at some of the key features of Brackets. Live Preview The Live Preview feature launches a new Chrome window showing the current page that not only doesn't require a manual refresh when you change a file, but also as you type. It's essentially Chrome's Web Inspector, but with all the benefits of a self-contained editor. It's a truly great feature, particularly if you have a splt-screen setup. It doesn't just work with HTML files, either. If you make a change to a linked CSS file which impacts the current page, that too gets reflected immediately in the browser. If you're editing a CSS file used by the currently visible page, highlighting rules causes the preview to highlight elements which are affected by them. Quick Edit The Quick Edit feature is context-specific. Let's look at a few of its uses. CSS When you're editing HTML, if you click a tag with a corresponding CSS declaration situated in a linked file and hit Ctrl / Command + E, an inline editor appears allowing you to quickly edit that rule. This is probably best illustrated with the following screenshot.

Continue reading %A Review of the Brackets Editor%

6 Online Document and Text Editors Reviewed

Fr, 2014-04-18 18:00

Who wants to limit himself to one computer nowadays? Say hello to online editors, where you can login in anywhere you want and start (or continue where you left off) right away. And some of these editors come pretty close to advanced text editors like MS Word. In this article I will show you what’s around.


This is the one I am using right now. StackEdit is a very easy to work with editor (the tool) for making documents in Markdown format, which my editor (the person) prefers. Markdown separates style and content, and with the right plugin allows for effortless copying into your favorite CMS.

You can connect StackEdit to Google Drive or Dropbox, and use auto-sync as a backup. And, you can publish from within StackEdit to WordPress, Tumblr, Github etc. You can also use it for making PDFs, which is a nice addition.

It uses shortcuts via a GUI, offers advanced settings for templating, and (very important) is really convenient when you have an unreliable connection because of its offline functionality. Also, you don’t need to register and you can start working right away.

The only downside of StackEdit is that it doesn’t have an integrated spell checker that works properly. It underlines misspelled words, but relies on your browser for correcting. But this is a known issue they are working on so we may see an improvement some day.

In the end it’s a great product, not only for the Markdown format but for general use as well. And I love the way it displays the final article on the right and if you scroll either of the two views, the other view will follow to scroll to the correct place as well.


Markable is another MarkDown editor, but this one is more suited for those who still prefer to code in Notepad. It offers a very clean interface, but there are no shortcuts, so unless you are familiar with the Markdown syntax you might want to use their cheat sheet or have another cheat sheet handy. It does allow you to see the results of your work on the right of your screen.

Continue reading %6 Online Document and Text Editors Reviewed%

A Look at Valentina

Fr, 2014-04-18 16:00

Valentina is a set of tools including: Valentina DB (a new SQL database server), Valentina Studio (a database management tool), Valentina Report (a GUI to create reports to be used in an application like PHP) and a related development toolkit (called ADK).

In this article, we will take a look at:

  • How to use Valentina Studio to manage our MySQL database;
  • How to use Valentina Report to create a presentable report.

We will not, however, discuss the the Valentina Database as it is impossible to grasp a new database server and cover its underlying mechanisms in such a short article.

Valentina Studio

Valentina Studio, the database management tool, has two versions. One is free and can be downloaded here. Another is the Pro version, with more features, priced at $200 per unit. Both versions support Windows, Mac and Linux platforms, making it a cross-platform tool.

In this article, I will use Valentina Studio Pro. Thanks to Valentina for providing me with a key for my installation and evaluation.

The startup speed of Valentina Studio is fast, faster than another tool that I am using. Its main interface has 3 panes:

Fig. 1 The welcoming window

  • Servers: Provides CS based database management. It supports four types of “servers”: MySQL, PostgreSQL, Valentina and ODBC. It supports both local server and remote server connections. In my case, we can see there are two remote MySQL connections and one local connection. A red dot before the connection (or “Bookmark” in Valentina’s term) means the server is currently down. A green dot means it is up and running.
  • Database: Supports files based database management. Currently it supports Valentina DB and SQLite.
  • Projects: This is mainly used in report generation. A “report” generated by Valentina can reside locally and remotely. But it must have Valentina Report Server support (bundled with Valentina Server) to be called from an application. The report project manages the source, query and design of a report. We will cover this later.

After selecting a server, the databases in that server will be displayed in the following cascading column view:

This is my favorite view in Valentina Studio. In this view, different levels of entities (database, table, fields, links, indexes, etc) are displayed in columns in a cascading style. Selecting a database in column one, we can choose to display tables, links, views in column two; and for tables, view its fields, indexes, etc in column three. And the final level of details will be displayed in the right most pane. We can also create and modify an entity accordingly.

Another view, less used in my case, is the tree view:

When a table is selected, it displays the table data in a grid view; when a field is selected, only the column data is displayed. In the grid, we can right click on a record to export that record into CSV or SQL.

Continue reading %A Look at Valentina%

Watir-Webdriver: Control the Browser

Fr, 2014-04-18 13:51

Watir-WebDriver (Watir is short for Web Application Testing in Ruby) is a Ruby gem which allows you to automate your browser (make it click a button, submit a form, wait for some text to appear before continuing, and so on). With its help, a real user can be simulated, allowing you to automate the full stack testing of your web application.

Watir-WebDriver syntax is very clean and inspired by similar frameworks in other languages (Watij for Java and Watin for C#). It is also a well-maintened gem with over 68 releases.

Continue reading %Watir-Webdriver: Control the Browser%

Getting Started with Go

Do, 2014-04-17 22:24

Unless you’ve been living under a rock these last few years, you’ll have heard of Go (sometimes referred to as Golang), a language originating from Google, some years ago.

Go is slated as:

…an open source programming language that makes it easy to build simple, reliable, and efficient software.

Quoting another source, Go

is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library.

Available for most modern operating systems, including Mac OS X, Linux, BSD and Microsoft Windows, it was conceived and initially created at Google, back in 2007, by Robert Griesemer, Rob Pike, and Ken Thompson. Each of these three developers have quite impressive pedigrees.

Robert Griesemer was involved in Google’s V8 JavaScript engine and the Java HotSpot virtual machine; Rob Pike and Ken Thompson both worked at Bell Labs implementing the original UNIX operating system.

Most programming languages, especially one with such a strong C heritage, can be difficult to get started with. Go on the other hand, is quite the opposite. And in today’s tutorial, I’m going to show you how to get started developing with Google Go, right from installation to a running application.


Whether you’re on Mac OS X, Linux and FreeBSD, or Windows, Go is easy to install and configure. I’m assuming in this tutorial that you have a UNIX/Linux operating system. When I first installed Go, being on a Mac, I used the latest package file.

But you can just as easily install, from source, using the following commands:

tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin

If you’re not familiar, these will extract a copy of the go files, from go1.2.1.linux-amd64.tar.gz, to /usr/local/go in your filesystem, and add the bin directory within it to your profile path.

Alternatively, if you’re on Windows, download and run the MSI Installer.

When the installer’s complete, you’ll find the installed files under c:\Go; and the installer should have added c:\Go\bin to your PATH environment variable. You may want to check, just to be sure though.

Configuring Your Environment

With that done, we have the binaries required to begin. But we need to ensure that our environment’s also ready, which requires one more step and a bit of background.

Go development uses the concept of a workspace, which contains the source files (src), compiled binary files (bin) and packages (pkg).

The source file directory structure, generally, models open source code repositories, such as Github. So a typical source directory could look as follows:

src settermjd sitepoint hello-world.go

You can see that under src, I’ve linked to my Github repository, called sitepoint, and in it is one file, hello-world.go.

I could have multiple repositories, and link to multiple hosts, including Bitbucket and Codebase. By taking this approach, I believe that Go inherently keeps code very well structured and organized.

Continue reading %Getting Started with Go%