Author Archive

Automate Common Tasks and Save Time with OSX Automator

As avid computer users we all know how many tedious tasks we have to deal with on a daily basis. However, we tend to ignore an important fact: we’re using a computer. We shouldn’t do any of these tasks by hand. Everything that sounds repeatative should be accomplished by a computer, not by hand. Let’s see how we can achieve this on a Mac Utilizing Automator.

Automator is a utility hidden in every Mac. If you’re a web designer needing more and more time to accomplish your tasks, you should begin to use it now. Automator lets you perform a series of actions on your Mac which can save you a great deal of time.

Automator Workflows

When you create a new workflow in Automator, it will ask you which type of workflow you want to create. The standard workflow is a workflow that can be run inside automator. It’s useful for testing purposes, but you should convert it to something more usable when you’re ready to run it. The application workflow is very interesting because it will convert your workflow to a standalone application.

You’ll be enabled to run it outside Automator, like a normal application. It also supports drag and drop, so if you drag an element on the application icon it will be treated as the application’s input. The service workflow will let you run your workflow using a menu item accessible in the services menu.

This means that you can run it in every external application. The print plugin, ical alarm and image capture plugin are pretty self explanatory and are outside the scope of this article.

Our focus in this case will be on the Folder Action Workflow. Why this is so important? Well, it’s really simple and powerful. You create a folder, assign your workflow to that folder and that folder will be always monitored. Every time you drag an item in that folder, the workflow will be launched. Let’s take a look at our first workflow example to understand how it works:

Simple Unzip Workflow

Let’s start by creating a folder on our desktop and name it Unzip. Then we’re going to create our first workflow in Automator, as a folder action. On the left side we have all our actions and on the right we have our empty workflow. The first thing to do is telling our workflow to which folder it should be connected. Select the Unzip folder from the drop down menu on the top of the workflow view.

Now the workflow is linked to our folder. Let’s describe the scope of our first folder’s action. We want to create an action that unzips an archive and deletes the original zip file. How many times we do this by hand every day? This action will save us a lot of time. The first action that we have to drag in the workflow is “Filter Finder Items”. This is necessary because we want to target only zip files in our directory.

So we can create a rule that checks if the file extension contains zip. Now that we filtered items in the folder we can unzip the archive. We can use the action “Open Finder Items” and the zip file will be automatically opened with the OSX unarchiver.

Now we have the original zip file and the contents of the zip file in our folder. We can delete the original zip file by “Get Folder Contents” targeting zip files and “Move Finder Items to Trash”. To test the workflow just drag a zip file in the Unzip folder. It will be extracted and deleted.

Rename by Pattern

This is another common tasks that we repeat every day. We download a file from the Internet and we have to rename it. We can create an automator workflow to understand the pattern used in the filename and rename it following our personal pattern.

In this case we’ll need a really useful automator action, “Rename Finder Items by Pattern”, that can be downloaded for free. Let’s create a new folder named Rename and add a new folder action linked to this folder.

The first action that we have to use is “Get Folder Contents”, which will retrieve all the elements in the folder. Now we can add the “Rename Finder Items by Pattern” previously downloaded. This action works using pattern matching. In this case we have files that are named filename-otherstuffs.txt. We want to rename our files just using the filename part and removing the dash and the words after the dash.

The action that we’re using takes a pattern as input. In this case we have to use the *-* pattern. This means that we’ll have a different variable for every asterisk. Variables are named $1, $2, etc. In this case we’ll have a $1 variable that will be “filename” and a $2 variable that will be “otherstuffs”. So in the field “Replace With” we can just use $1. Every file having this pattern that we’ll drag in the folder will be renamed to filename.txt.

Image Size and Save for Web

This is the most important action for a web designer. We receive images from a client, we have to resize them and save for web. Then we’ll be able to use these images in our web project.

Let’s do it automatically. First of all, let’s download a great actions collection. In this collection there’s a great “Save for web” action that will be perfect for our workflow. Let’s start by filtering finder items in our folder, selecting only jpg images. We have to add another important rule to our filtering action: select images that have not been already resized.

This is important because if we don’t add it, our workflow will run in a loop, resizing the image infinitely. Now we can add the “Save for web” action previously downloaded.

You can see in the picture how we configured it. It’s really simple, but the important thing in our case is to “Delete original files”, to prevent looping. The we have to add the action “Add text to finder item names” using the _resized suffix. When you drag an image in the folder, the image will be resized to 800 pixels, saved for web and renamed with a _resized suffix.

Conclusion

As you can see, it’s very simple to create and use Automator workflows to save time. The previous examples show you all the basic knowledge to create your own workflow as a folder action. There’s just one important thing you need to know before working in Automator: it doesn’t have an undo function.

Therefore if you create an automator action that moves all your hard disk to trash and you click run, you can’t go back. This is virtually the only drawback of this wonderful utility. Always make sure you test your workflows inside a sandbox folder and on dummy files. When you’re absolutely sure that everything is functioning as needed, you can then use it in the finder.


Tips to Finding More Clientele Quickly

In the freelancing industry, we often find ourselves at the top with so many potential clients requesting us rather than the other way around. However, there is also many times where we find ourselves in a struggle to pay our bills at the end of the month. In such situations, we usually tend to contract with anyone who we can nab. With that all said, we discuss several key points or strategies to be able to quickly find contracts and begin working again.

Partner Up

The freelancing industry is definitely a stressful option in the web industry that we choose to take upon. This includes every ups and downs that we have to go through, and every night and weekend we spend up working. A great way to better divide up work is to collaborate with other businesses or freelancers. By using such a collaboration method, you can monetize on many benefits such as better work security, easier workloads, and others.

First and foremost, when you collaborate or partner up with others, you increase the chances of finding work during the times of need. The reason for this is, the freelancer or business you may be partnered up with might have quite a few clients they do not have time to work with, and transfer them to you. The same applies when you are at the peak of your freelancing career where you have way to many client requests than you can handle, you can easily transfer them to your partner who can help take the load off for you until you finish up some projects. This method also relates to a saying “you scratch my back, I scratch yours”.

Secondly, by collaborating or partnering up with someone or an entity, you gain more exposure, decreasing the chances of a fall for you and your partner. Which means you can feel more secure with your freelancing career than any other sole freelancer out there.

Consider your partner as your backup plan, when your primary plan fails, you have something to fall back upon and vice versa.

Contact Former Clients

A quick and easy way to gain work again is to contact former clientele who you have done work for once before, and offer them a limited time discount that they cannot resist. This usually tends to work, as former clientele know they cannot get work done for as inexpensive as you are offering them with the discount, and they usually tend to find work for you to do for them. Even if your former clientele offer you small paying jobs, accepting them is better than declining them and not receiving any income.

Freelance Job Boards

This option has to be one of the more obvious routes to choose as we often resort to freelance job boards to find new jobs and clientele. However, because the freelance job board you may often frequent to find work may not be sufficing for a certain month, it is always good to branch out and locate other freelance job boards similar to those you use.

This helps expand on your portfolio as well as increase your chances to locating clientele quicker, and often, when you search for new freelance job boards, you may find a job board that suits you better than the previous ones you may have frequented.

Refer a Friend Program

An addition to contacting former clientele, you can also setup a refer a friend program where former clientele can refer clientele to you and receive a discount on work they need done next. This often helps increase your clientele base rather quickly, and causes a bit of a chain reaction or domino affect client after client. It is also a great method to be using whether you are in a “drought” or not as it helps decreases the chances of falling again.

Local Business Listings

When in need, it is a great opportunity to search through your local classified job boards to find locals in your area who may need some freelance work done. This not only helps boost your image within your local community, but it often guarantees quick income as you can work with the client directly without hassle.

Do note however, many may condone this method of finding quick clientele, as often many seem to find themselves with clientele that they want to get rid of, as they may have been a nuisance. Therefore, it is a great resource to tackle, but leaving it as one of your last options could be more ideal for you, depending on your situation.

Advertising

One unique method to get yourself known to the world is to use advertising networks on sites such as Google, LinkedIn, StumbleUpon, and others. This helps provide you quick exposure to the global market you may have not touched. It also additionally allows you to focus on other mediums in search for clientele while clientele come to you via this method.

If you have heard of the saying “two birds one stone”, it exactly applies to this method, as it is running in the background for you automatically while you do something else to double up on the effort of reaching potential clientele. However, do not just solely rely on this medium or method to reach clientele quickly, as money is constantly being put out to a medium that cannot relatively guarantee that you will receive clientele from, so it is a costly hit or miss.

To conclude, when you are in a time of need, use creative methods that work for you, and try out new methods to receive clientele when you have contracts and projects going. This allows you to experiment with many different great methods at no cost or affect to you or your business. Additionally, always work on new methods and apply them in times you are not desperately in need, so that you can constantly keep clientele moving in, rather than fall hard when times become tough. This is usually a great idea to put together, as a backup plan is better than no plan at all.


Best Techniques for Gradient Map Color Toning

In this post we’ll analyze a variety of useful techniques that will allow us to tone map an image for future print or web design projects.

You probably have your own way to color correct and alter the tone of an image in your preferred application, but there’s a huge reason why you should know more about gradient mapping: it’s cross compatible between applications and operating systems. If you understand the basic principle, you can use it in Photoshop, Gimp, Pixelmator and all other applications on Mac OSX, Windows or Linux. It’s a powerful technique also in video editing systems and generally where you want to alter the colors of an image.

Our Original Image

Original Image

This is the image that we’ll use for our gradient map toning examples. One thing is important: if you want to use the gradient map tool, and generally any tool that implies altering colors, avoid tweaking the exposure and brightness/contrast of the original image. Try to shoot the image as best as you can because you’ll be able to work on real pixel information. If you alter the exposure after the shooting a whole lot, you’ll loose a lot of details that will compromise the toning.

As you can see, it’s a simple shooting at Park Guell, in Barcelona, on a rainy day. Before you begin to go into Photoshop, let’s analyze the image. The important thing here is to understand three color zones that will make our tone mapping a breeze. You have to focus on highlights (areas that are brighter, getting to white), shadows (areas that are darker, getting to black) and midtones (areas that are between brighter and darker areas, getting to gray). It’s important to train the eye to understand differences between these areas so that you can target them easily with the gradient map tool.

The gradient map tool works in a really simple way: you choose a gradient and Photoshop will map the image with the gradient. The left color of the gradient will be mapped to shadows, the right color will be mapped to highlights and the middle area of the gradient will be mapped to midtones.

Let’s start with a self explanatory example.

Black & White Tone Mapping

Black And White

Extreme Black And White

Let’s add a gradient map adjustment layer in Photoshop, by clicking on the little circle icon in the bottom area of the layers panel, and selecting “Gradient Map”. This action will automatically add a Gradient Map Adjustment Layer with a predefined black to white gradient. As you can see, you get a black and white conversion of your image, since highlights are mapped with white and shadows are mapped with black. It’s a pretty boring black and white image. But let’s add a white color stop in the middle of the gradient and assign black to the left and right stops.

Now the effect is extreme, but useful to understand how the gradient map works. As you can see the subject of the photo is highlighted. Why? Because we pushed to the white all the midtones in the image, and since the monument in the original photo was having a lot of midtones areas, it’s entirely white now. The sky is black because the areas that in the original image were near white have been mapped to black. This is the power of the gradient tool. It’s intuitive and after a little bit practice you’ll be able to achieve a really professional color correction. The HEX color codes for this effect are #000000 to #ffffff to #000000.

X-Ray Tone Mapping

XRay

Now we can start experimenting with some colored gradients to give the image a distinctive and creative look. Obtaining a pseudo x-ray style with a gradient map is very simple. Just add a new gradient map layer with a gradient that starts at #020144 and ends at #95a2ce. With this gradient the image turned to blue, but you’re not actually seeing the x-ray effect. The secret is in the “reverse” option. By checking this option you reflect your gradient, and the tone mapping is reversed so dark areas will turn to light blue and bright areas will turn to dark blue. The final result is an x-ray color corrected image.

Warm Tone Mapping

Warm

In this section we’ll take the gradient map tool to another level by introducing the overlay blend mode and the opacity adjustment. As you can see from the image, the result is fairly better that previous effects. Let’s start from the gradient. In this case is a simple two stops gradient, from #ff0015 to #fff800. If you apply it before the effect you will soften the image and you’ll loose a lot of details.

The trick is, whenever you see that the gradient map is too visible, select the overlay blend mode for the current gradient map layer. This way the layer will be applied with the low contrast/high contrast method and the result will be more real and consistent. If it’s still too heavy, just decrease the opacity a bit (in this particular case 70% is fine) and the image will be warmed.

Cold Tone Mapping

Cold

As you can see from the image, in this case we have to choose some cold colors to achieve the opposite effect. A cold image is an image that has a color space defined by cold blue colors. In this particular case a simple two stops gradient will not work since the midtones of the monument would be too dark.

After experimenting with colors and stops, a good solution could be a gradient from #004170 to #9dd4fb to #bde9fa, with a middle color stop at 28%. This gradient will cool down the sky and the ceramic parts of the monument, while lighting up dark areas. The final result is a more dramatic image, that presents itself better than the original image due to the weather conditions of that particular rainy day.


Slideshow Patterns in Modern Web Design

In this modern era you can very well stumble across quality animated slideshow scripts, but how can we design a good slideshow interface to use these scripts on?

In this article we’ll analyze the current design trend when it comes to slideshows. We’ll start by taking a look at common uses of slideshows but also alternative and creative solutions. As you probably know, we can define a slideshow as a collection of items that can slide within a container. The content of every slide will be revealed for a fixed amount of time within the container.

A slideshow is a great solution to save space in a web layout and to catch the user’s eye with animations. Since slideshow scripts for popular javascript libraries are everywhere, this technique is becoming a little bit overused. This is the reason why, we would like to show you how you can still use a slideshow to make your website stand out without falling into mediocrity.

The Standard Slideshow

Slideshow

The first example is dedicated to the standard slideshow pattern. As you can see from the picture, it’s an animated slideshow with a non numbered navigation. Although this is the most utilized slideshow pattern of all, let’s try to understand why this example stands above the rest. First off, the animation is not a common fade or slide. It’s a slide with a subtle easing, that gives to the animation a personal look.

There’s a lot of space around the slideshow and the controls that creates a very elegant and subtle feel. The last important detail is the number of slides. By using a small amount of slides you’ll be able to ensure that all the slides will be viewed. If you use too many slides the user will be probably be repelled.

The Left/Right Slideshow

Slideshow

This is another very common slideshow pattern in web design. The container shows a fixed number of slides and the left and right controls make it possible to scroll left or right and reveal the next slides. Apart from the websites great design, there’s a detail in this example that makes this slideshow uncommon: the image at the center will never slide.

Your users are not expecting it and it’s a detail that you’ll never forget. Basically when you scroll left or right, in a normal slideshow all the three images will scroll in the selected direction. In this case the featured project in the center will remain in the same position, and the three slides will scroll behind it. If you take a look at the website you can delve into it and understand why it’s so different.

Another stand-alone detail is the slide up effect that every project name has. If you click on a project name, the description will slide up, without the necessity to go to the actual project page. It’s a slideshow with a different approach and an internal slide up effect. This is a great example of how it’s possible to use a common design pattern and take it to another level.

Different Location Slideshow

Slideshow

This pattern was very common when the first version of Flash became readily available. When you click on an element, something changes in another part of the website. In these days it seems to be less popular, but it could be useful in some cases. If you take a look at our example, when you click on the thumbnail images at the bottom of the page, the main image will be revealed in the iPhone illustration.

This is a clever slideshow example. The designer probably needed to show some screenshots of the iPhone app, and instead of using an overused lightbox effect (that is what the user probably expects) found the solution to show the screenshots directly in the iPhone illustration.

This approach has two main goals: avoiding images overlay and showing the screenshots in their real environment, an iPhone. When you click on the thumbnails you get the feeling that you’re currently seeing the real application on the iPhone, and you can better understand how the application works. When you use a screenshot outside the context (the iPhone in this case), it’s not so immediate for the user to understand it.

The Hover Slideshow Effect

Slideshow

This is another really common slideshow pattern that uses a small amount of space withiin the area of design. It can also relay quite a bit of information if you hover over the labels. In this particular example from Threadless, hovering over the labels will show an image related to that specific label.

If you click on the label you’ll be redirected to the right section of the website. It’s like a navigation menu with more information associated to the menu item. There’s a big debate on the Internet these days on subject matter of hover effects and hiding information beneath hovering.

The reason why these techniques are so discussed is that in touchscreen devices like the iPad or the iPhone there are no hover states. If this is true, it’s also true when you tap on an element containing a hover effect, the information will be shown on devices such as the iPad. And at the second tap you’ll be taken to the link specified. Point being, you shouldn’t avoid hover effects because you believe mobile devices do not have the capability of supporting them, as this is untrue.

The Full Screen Slideshow

Slideshow

Now we’re entering to the top chart zone. This is an example of one of the best full screen slideshow ever designed. You have two arrows at the top right corner of the website and when you click on one of them, the entire product page will shift and slide, revealing yet another product. This is beautifully designed and it gives the feeling as though you’re purchasing the product from a live store.

If you don’t immediately warm to the slideshow idea, there’s always a normal menu at the top left corner that will let you navigate between products within the slideshow. The combination of a great slideshow and a menu fallback is a state of the art full screen slideshow.

Numbered Slideshows

Slideshow

We’re closing this article with a great example of all previous patterns combined in one slideshow. Take a look at the screenshot to understand the power and simplicity of this approach. The slideshow on this page is the entire website. You have multiple controls, the left/right arrows and the numbered controls at the bottom.

After the numbered controls you have the website menu items, that will show the content of every section directly in the slideshow viewport. It’s the perfect slideshow. You can’t miss a section of the website, the navigation is clear, you’ll be totally captured by the slideshow and after navigating through it you visited the entire website.


An Unofficial Guide to the HTML5 Boilerplate

The HTML5 Boilerplate describes itself as “A Rock-Solid Default for HTML5” this is why we thought it would be useful to dive right into it and look at just what makes it such a great “base HTML/CSS/JS template for a fast, robust and future-proof site“.

Getting The Code

The latest version of the code itself can be found at html5boilerplate.com, where you can download the latest commented or un-commented builds. If you scroll down a bit there’s also a well-highlighted version of the code which makes it really easy see just what it’s up to.

Getting Started – index.html

The first few lines the file will probably be a fairly common sight by now, the html5 doctype, the language defined on the html element and the new html5 charset declaration.

IE Comment – Fixing a performance issue

The first interesting snippet we come across is an empty html comment containing an if statement. This line of code simple checks if the browser is, in this case, any version of IE and if so executes whatever is inside the comments. That being, nothing.

<!--[if IE] >< ![endif]-->

This is simply to prevent a performance issue where a conditional comment would, in IE, cause the browser to download one file at a time rather than simultaneously, thus slowing page load times.

Making sure the latest version of IE is used

Versions 8 and 9 of Internet Explorer contain multiple rendering engines, this means that it’s possible to get stuck with a rendering engine other than the latest, so to fix this:

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

The meta tag simply tells the IE rending engine that; firstly, it should be using the latest, or edge, version of the IE rending enviroment, and that secondly, if already installed, it should use the Chrome frame’s rending engine. This just ensures that anyone browsing your site in IE is treated to the best possible user experience that their browser can offer.

Mobile Viewport – Creating a mobile version

The next key line that’s worth looking at is the Viewport meta tag:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

As the comments above it (see the commented and online versions of the boilerplate) explain there are a few different options that you can use with this meta tag, if you’re interested you can find out more at j.mp/mobileviewport (the Apple developer docs).

The two icons

The next few lines reference both the favicon and apple touch icon:

<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">

Both of these are used by multiple browsers and devices. The favicon.ico file is used on tabs, in title bars and bookmark menus of all the major browsers whilst the Apple Touch icon is used on all Apple’s iOS devices as well as by some, ironically enough, Android devices.

CSS Media and Caching

The CSS link is fairly straight-forward though it is worth mentioning that the media=”all” tag is implied simply by not including it. The interesting part of this link is the use of a query string ?v=1 on the end of the CSS url. This serves to force the browser to refresh its cache of the CSS each time this number is incremented as, so far as the browser can tell, a different file is being served.

This trick comes into its own when dealing with a site where regular updates to the CSS are commonplace and ensures that users are always seeing the latest version of the CSS, just be sure to increment the version number when you upload the new version of your stylesheet.

The second stylesheet reference is there for browsers, like Opera Mini (the lighter-weight younger brother of Opera Mobile), which aren’t as feature rich as the Mobile Safari and Android mobile browsers. This stylesheet is for anyone who’s still stuck on WAP, spare a thought.

Modernizr, Javascript and HTML class’

Modernizr is a Javascript library which hooks into the class attribute of the html tag (Line 2 in both versions of the boilerplate) and generates some useful classes as well as setting up all browsers to handle HTML5.

You would be forgiven for wondering why the HTML5 Shiv or Shim project hasn’t been included in this template, after all it uses Javascript to fix the issues IE and others have with rending HTML5. Actually the HTML5 Shiv is included, it’s a part of the Modernizr project, but that’s not all Modernizr does.

As well as improving HTML5 support, Modernizr also adds a series of class names to the html tag, where it initially says no-js, according to the browsers support for CSS3 and HTML5. This allows you to target parts of your CSS at only supporting browsers, leaving the rest to serve the plainer, albeit functional, version.

The Modernizr script is the only Javascript file loaded at the top of the document simply to keep page load times down, if a script is slow to load from an external server, it may cause the whole page to hang, this is avoided by calling any Javascript at the end of the page. That said, the Modernizr script needs to run before the browser begins rendering the page so that browsers lacking support for some of the new HTML5 elements are able to handle them properly.

After the Head Tag

IE body tag classes

The final part of the pre-content boilerplate is a series of ‘if’ statements detecting the IE browser version and applying the relevant class to the body tag. The benefit of this is that it allows CSS fixes for specific IE version without hacks such as:

div.this_element { float:right; margin-top: 10px; *margin-top: 5px; }

Which are commonly used to overcome bugs in the IE6 rendering engine and can be replaced, when using Modernizr, with:

div.this_element { float:right; margin-top: 10px; }
body.ie6 div.this_element { margin-top: 5px; }

The content of the boilerplate

The central part of the boilerplate template is pretty much empty. Paul Irish, one of the creators, explains that this is intentional in order to make the boilerplate suitable for both web page and web app development.

The Javascript

Towards the bottom of the page we find the final few lines of code, beginning with the jQuery library. Regardless of which Javascript library you make use of in your projects it is well worth the time and effort to look up and reference the Google CDN (Content Developer Network) version. In part because your users may already have this version cached in their browsers and also because the CDN will be far faster then your server could ever even dream of being.

The following line provides the page with a fallback should the CDN version of the jQuery library not be available, likely only if you are offline, this is one part you really can feel free to include or leave out at your leisure.

The next few line of code wrapped within the IE conditional statement:

<script src="js/dd_belatedpng.js?v=1">

Are a common fix for the IE6 issue with .png images, again if you aren’t bothered about supporting IE6 you can drop this part like a hot potato. If you do want so support IE6 then you can find more information on using this fix over at Diller Design.

Next up we get some code from Yahoo – we really are going round the houses today – which allows site profiling, like in Firebug or the Safari/Chrome developer panel, but which works cross-browser, including IE.

Finally we get the latest version of the Google Analytics tracking code, this latest version not only includes a few new handy tricks from an Analytics perspective but it also loads faster than the previous version. Google recommends that this script be placed at the top of the page, however it’s a matter of personal preference and whilst placing the script at the top will count users who don’t fully load the page, it does mean your page load time will take a slight hit, at least until anything shows on screen.

The End of Our Journey

That’s pretty much all there is to the index.html file in the boilerplate. If you head over to html5boilderplate.com there are numerous links to articles on each line of code, so if there’s something you really want to get stuck into it’s well worth the time.


  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress