Check all Checkboxes with jQuery

I was searching for a solution to this problem and came upon this post. Most Javascript functions that do this rely on the fact that the input checkboxes all have the same 'name' property.  This jQuery solution merely requires them to all be in the same FIELDSET.  Clean, simple and effective.  Brilliant solution.  Bravo Brian Cray!

SUMMARY

This code checks/unchecks all checkboxes within the same fieldset. A simple end elegant solution to a problem that would be much more involved in Javascript alone.

HTML

<fieldset>
	// these will be affected by check all
	<div><input type="checkbox" class="checkall"> Check all</div>
	<div><input type="checkbox"> Checkbox</div>
	<div><input type="checkbox"> Checkbox</div>
	<div><input type="checkbox"> Checkbox</div>
</fieldset>
<fieldset>
	// these won't be affected by check all; different fieldset
	<div><input type="checkbox"> Checkbox</div>
	<div><input type="checkbox"> Checkbox</div>
	<div><input type="checkbox"> Checkbox</div>
</fieldset>

The jQuery Piece

$(function () { // this line makes sure this code runs on page load
	$('.checkall').click(function () {
		$(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
	});
});

You can see it in action here in Brian's site:

http://briancray.com/tests/checkboxes/index.html

Top Ten Typography Tips

No matter if you are formatting your resume, designing a website, writing some copy to be handed off to an art director, or just writing a note to grandma, good typography is an art that can help you communicate more effectively to your reader.  Below is a list of 10 typography tips that are a good starting point for laying out your own "Crystal Goblet".

  1. Widows – Avoid leaving a single word alone at the end of a line. Try to either bring it up to the previous line, or force an extra word down to the last line to keep it company. You can do this either by playing with your character spacing settings or even simply editing the text to fit the canvas. Beware of your paragraph spacing when you are doing this!
  2. Orphans – Second to the widow, the orphan is a single line of a paragraph all alone at the top of a column of text. If at all possible you should try to stop paragraphs from breaking across columns or pages, but if it is absolutely necessary, you should keep at least 2-3 lines of text together on each side of the page/column break.
  3. Consistent Bullets – Check your bullet lists. The general formatting and indenting of a bullet list is debatable and relative to the individual, but always check that either ALL or NONE of them end in a period. Also make sure that they use consistent capitalization (see #5). Consistency is key to a clean and uniform design.
  4. Leading – Make sure that your leading (the space between your lines of type) is not too tight that the text looks like it is on top of itself, but not to loose so that you can drive a truck through it.
  5. Capitalization – When laying out page headlines, subheads, bullet lists, category topics, etc., make sure you have a consistency among your capitalization structure.  Generally, there are 4 ways to go:
    • Sentence Capitalization: Only capitalize the FIRST word. (e.g. "The story of my life")
    • Title Capitalization: Capitalize the first and the last word; Capitalize all nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions ("as", "because", "although"); Lowercase all articles, coordinate conjunctions ("and", "or", "nor"), and prepositions regardless of length, when they are other than the first or last word. Lastly, lowercase the "to" in an infinitive. (e.g. "The Story of My Life")
    • All Lowercase: Capitalize everything. (e.g. "THE STORY OF MY LIFE")
    • All Uppercase: Capitalize nothing. (e.g. "the story of my life")
  6. 2 Font Maximum – Try to keep your font usage down to as few as possible.  Quite often using 2 fonts that compliment each other is tastefully acceptable.  For example, newspapers often use a sans serif font like "Univers Ultra Condensed" for headlines and a serif font like "Garamond" for the main text body. It is also a good idea to stick with a font family for all additional variations. For example, use "Arial" for text and "Arial Bold"  for sub-heads.  This will make the typesetting tie itself together nicely since the font-family are related, hence the name, "family." Too many errant typefaces can make your piece look like a ransom note (If that is the look you are going for, then please ignore this rule).
  7. 3 Color Maximum – If you are working on a piece that is going to be displayed online or printed in color, it is a good idea to stick with 3 colors at a maximum.  You don't want your page to look like someone dumped a bag of skittles on it. It is often useful to use tints of a color to offer some visual variety without going overboard on the rainbow and pulling in too many colors.
    • Main Text Color: This should be an easily legible color and should offer as much contrast between the text and the background color as possible.
    • Primary Accent Color: The primary accent color is used to compliment the main design theme, graphics and/or company logo. For example, if your company logo is mostly green, use green or a complimentary color for the headlines.
    • Secondary Accent Color: The secondary color should be used minimally. It often becomes useful when working with charts and graphs and you need a third color to separate key data. The secondary color should compliment the primary color and/or the text color.
  8. Spell Check & Proof Read – The first part of this is a no-brainer, but the second part (proof reading) is often forgotten.  Just because your document passed the spell check with zero errors, doesn't mean you spelled everything correctly. My father always told me "Measure twice, cut once." In this case, I would say "Read twice (or three or four times), publish once." Don't just skim over your piece, REALLY read it. If you want your reader to take you seriously when they read it, you should take it seriously when you write it.
  9. Abbreviations – If at all possible, you should try to avoid these.  In the digital world, you can always make room for the "reet" in "Street" and for all those other letters that we leave off out of habit.
  10. White Space – I couldn't end a list without circling back to my favorite design element. Make sure you don't clutter your page with content. Leave plenty of breathing space for the letters. Allow your headlines and visuals to stand out without being crowded. Remember that too little white space can really frustrate your reader, but too much can be bad also.  You must be able to find a harmonious balance.

I have merely scratched the surface of typography with these ten quick tips. I hope, if nothing else, it inspires you to look a little deeper at those funny things we call letters dancing on the page.

Failure is the path of least diligence

Failure is the path of lease persistence

You are supposed to add "...in bed" to the end of every fortune.

It is a good thing that I'm not a landlord chasing people for rent payments.  Apparently, these days that is the path to failure. (wah wah wah)

...the road to failure is actually the path of least persistence!

Ziggy figured this one out 15 years ago.

There is the  possibility that this fortune is supposed to say what it says and imply that you will fail if you are always renting a property, I will go out on a limb here and guess that the author of the above fortune meant to write, "Failure is the path of least persistence."  This fortune was intended to be a play on the old cliche based on the scientific phenomenon of the path of least resistance. The clever play on words was actually used correctly in a Ziggy comic in 1996. 

"The path of least resistance" is an idiom for "the easiest way." According to answers.com, it is the "physical or metaphorical pathway that provides the least resistance to forward motion by a given object or entity, among a set of alternative paths."

As H.G. Wells said, “The path of least resistance is the path of the loser.” One can also deduce that if you are not persistent, you are also going to fail. Bravo to the person who came up with this clever variation on the theme (I don't think it was the fortune cookie company), but a big fat "F" (for failure) to the person who didn't check the final copy.

You can run your copy through the spell checker a million times, but there is no replacement for the human eye.  Not even a grammar checker can do a fool-proof job at making sure you are getting your message across correctly.  Say what you mean and mean what you say. Do your due diligence and read through everything that goes out the door.  At the end of the day, you'll be glad you did.

Don't confuse your sources.

Albert Einstein

Albert Einstein (March 14, 1879 – April 18, 1955)

I have heard many people say "the definition of insanity is doing the same thing over and over again and expecting different results." This is not true.  The aforementioned quote is primarily attributed to Albert Einstein, but this and other variations of the quote have been attributed to others as well including Benjamin Franklin, an old Chinese proverb, and Rita Mae Brown." In addition, countless 12 step programs use this as their mantra.

One should always be cautious when quoting or defining a term.  Be sure that you have verified your sources before you carve them in stone.

The Definition of insanity according to Oxford Dictionary is "the state of being seriously mentally ill." or "Extreme foolishness or irrationality." One who is mentally ill, may or may not exhibit the behaviors that Einstein mentions.

The devil is in the details.  Watch out!

For all intents and purposes: Stop. Think, then speak.

Scared or shocked face

For all intensive purposes, you will have this expression on your face.

I often hear people misquote this phrase and say "for all intensive purposes." Ironically, they are often using the phrase to make themselves sound more educated and articulate, but misquoting a phrase does the exact opposite.

The phrase "For all intents and purposes" means: for all practical purposes, or in every practical sense.

If you say this incorrectly as: "for all intensive purposes" you are actually conveying an almost opposite meaning: for all intense and extreme purposes, or in extreme and intense situations.

For example, you may have guests over for dinner, and when you ask someone if they want a beer, a glass of wine, or a cocktail, their response may be "For all intents and purposes, I don't drink alcohol"  This means that in any practical situation they don't drink alcohol. However, it implies that if some rare or unexpected situation occurs – like they are offered one million dollars to drink a beer – they may actually drink it. If your guest had said, "For all intensive purposes, I don't drink alcohol." That would imply that in that rare situation when they are offered a large sum of money to drink it, they would NOT do so, because that would be an intensive purpose. One should also note at this point, that there is a difference in emphasis between intensive and intense although they are similar in meaning. "Intensive" normally relates to objective descriptions like an intensive care unit, where as "intense" relates to subjective responses, or how one feels, like the doctor at the hospital was very intense, but I digress.

Let's use the phrase in another sentence to see how the meaning changes.

"For all intents and purposes, I drive very carefully." Another way to say this might be, "99.99% of the time, I drive very carefully"

Now let's see how the meaning changes when you use the incorrect phrasing.

"For all intensive purposes, I drive very carefully." Another way to say this might be, "When things get intense and extreme, I drive very carefully." This is most likely the opposite of what would actually happen.

When my children get really excited they sometimes tend to speak quickly, incoherently, or excitedly and I have trouble understanding them.  When this happens I often will say, "Stop. Think, then speak." After a brief glare at my facetious response to their apparently urgent matter, they will then think about what they need to tell me, and convey it rather articulately. This advice is great for anyone, at anytime.  If you hear a phrase or cliché that you think sounds useful, by all means please learn it and use it in your vernacular. However, always remember to stop and think about what it means. If need be, look it up in the dictionary. Once you are certain of what it means and how to use it, then you should use it in your conversations.  This is especially true when you are on a first date, at a job interview, writing copy for an advertisement, or making a presentation.

For all intents and purposes, you should know what you are saying before you say it. Stop. Think, then speak.

Nothing left to take away

Use a strong voicing.

The phrase "I think" is quite often superfluous in any essay or article, since the author wrote the article one can only assume that EVERYTHING in the article is subject to that person's bias and opinions, unless quoted or footnoted. The same might also be said for the phrase "I know,"  but that is perhaps subject to one's writing style.  Leaving one or both of those phrases out of your writing will result in a stronger voicing and will make you sound like an authority in the subject you are writing about.  It is almost akin to adding "like" in random places to fill in the sentence.

Consider this example from an excerpt from The FENG Editorial:

"I know that many of us pride ourselves on being brief. Being a financial person I think in part is defined as being factual and to the point. Any member of our profession who had a tendency to rattle on would be viewed as a little odd, don't you think?"

A stronger voicing would be to change that paragraph to:

"Many of us pride ourselves on being brief. Being a financial person in part is defined as being factual and to the point. Any member of our profession who had a tendency to rattle on would be viewed as a little odd, don't you think?"

It is perhaps ironic that a paragraph about being brief had some extra words sprinkled in there, but that aside, the second version of this paragraph is much stronger and to the point. This circles back to my central theme of "Less is More," which applies not only to design, but to writing as well.

You can tell a piece of work is done, not when there is nothing more to add, but when there is nothing left to take away.1

1. This is my spin on a quote by Antoine de Saint-Exuper - Ch. III: L'Avion, p. 60 -  "Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher."

Double check your font and spacing

MEGAFLICKS

Always take a step back to preview your work. Sometimes squinting at it helps.

This is just another friendly reminder to ALWAYS double check your FONT and WORD SPACING before you go into production with any major sign or project.

I believe the Megaflicks building sign speaks for itself. Perhaps lowercase letters would have been a better choice.

How to ZIP using SSH

To ZIP a folder via SSH (Secure Shell) log in to your server and at the command line type:

# zip -r myarchive.zip myfolder

This will create a ZIP archive of all files and sub directories

To UNZIP an archive type:

# unzip myarchive.zip

The Crystal Goblet

I originally read this piece by Beatrice Warde in 1998 when I was studying typography. It struck a strong chord with me and still resonates today. Time and time again I am reminded of what a great analogy this is and how even today - over 40 years after its original printing – it still has meaning.  The theory and concepts described, not only apply to print, but to web publishing as well.  With all the billions of web pages on the internet today, the one thing that we are lacking is white space.

The concept of  "Less is more" which applies just as much to the internet and print design as it does to any other form of design, was originally stated by Robert Browning in 1855 in his poem "Men and Women," although it is often attributed to architects Buckminster Fuller or Ludwig Mies van der Rohe. Many people make the mistake of over designing, taking a concept too far, or doing what I refer to as "Logo À Go-Go" – where you use a logo as a design element and stamp it all over the page.

Remember: your design is finished, not when there is nothing left to add, but when there is nothing left to take away.

With any further ado, please take a moment to read "The Crystal Goblet" by Beatrice Warde.

The Crystal Goblet, or Printing Should Be Invisible
by Beatrice Warde (1900 -- 196
9)

Imagine that you have before you a flagon of wine. You may choose your own favourite vintage for this imaginary demonstration, so that it be a deep shimmering crimson in colour. You have two goblets before you. One is of solid gold, wrought in the most exquisite patterns. The other is of crystal-clear glass, thin as a bubble, and as transparent. Pour and drink; and according to your choice of goblet, I shall know whether or not you are a connoisseur of wine. For if you have no feelings about wine one way or the other, you will want the sensation of drinking the stuff out of a vessel that may have cost thousands of pounds; but if you are a member of that vanishing tribe, the amateurs of fine vintages, you will choose the crystal, because everything about it is calculated to reveal rather than hide the beautiful thing which it was meant to contain.

Bear with me in this long-winded and fragrant metaphor; for you will find that almost all the virtues of the perfect wine-glass have a parallel in typography. There is the long, thin stem that obviates fingerprints on the bowl. Why? Because no cloud must come between your eyes and the fiery heart of the liquid. Are not the margins on book pages similarly meant to obviate the necessity of fingering the type-page? Again: the glass is colourless or at the most only faintly tinged in the bowl, because the connoisseur judges wine partly by its colour and is impatient of anything that alters it. There are a thousand mannerisms in typography that are as impudent and arbitrary as putting port in tumblers of red or green glass! When a goblet has a base that looks too small for security, it does not matter how cleverly it is weighted; you feel nervous lest it should tip over. There are ways of setting lines of type which may work well enough, and yet keep the reader subconsciously worried by the fear of 'doubling' lines, reading three words as one, and so forth.

Now the man who first chose glass instead of clay or metal to hold his wine was a 'modernist' in the sense in which I am going to use that term. That is, the first thing he asked of his particular object was not 'How should it look?' but 'What must it do?' and to that extent all good typography is modernist.

Wine is so strange and potent a thing that it has been used in the central ritual of religion in one place and time, and attacked by a virago with a hatchet in another. There is only one thing in the world that is capable of stirring and altering men's minds to the same extent, and that is the coherent expression of thought. That is man's chief miracle, unique to man. There is no 'explanation' whatever of the fact that I can make arbitrary sounds which will lead a total stranger to think my own thought. It is sheer magic that I should be able to hold a one-sided conversation by means of black marks on paper with an unknown person half-way across the world. Talking, broadcasting, writing, and printing are all quite literally forms of thought transference, and it is the ability and eagerness to transfer and receive the contents of the mind that is almost alone responsible for human civilization.

If you agree with this, you will agree with my one main idea, i.e. that the most important thing about printing is that it conveys thought, ideas, images, from one mind to other minds. This statement is what you might call the front door of the science of typography. Within lie hundreds of rooms; but unless you start by assuming that printing is meant to convey specific and coherent ideas, it is very easy to find yourself in the wrong house altogether.

Before asking what this statement leads to, let us see what it does not necessarily lead to. If books are printed in order to be read, we must distinguish readability from what the optician would call legibility. A page set in 14-pt Bold Sans is, according to the laboratory tests, more 'legible' than one set in 11-pt Baskerville. A public speaker is more 'audible' in that sense when he bellows. But a good speaking voice is one which is inaudible as a voice. It is the transparent goblet again! I need not warn you that if you begin listening to the inflections and speaking rhythms of a voice from a platform, you are falling asleep. When you listen to a song in a language you do not understand, part of your mind actually does fall asleep, leaving your quite separate aesthetic sensibilities to enjoy themselves unimpeded by your reasoning faculties. The fine arts do that; but that is not the purpose of printing. Type well used is invisible as type, just as the perfect talking voice is the unnoticed vehicle for the transmission of words, ideas.

We may say, therefore, that printing may be delightful for many reasons, but that it is important, first and foremost, as a means of doing something. That is why it is mischievous to call any printed piece a work of art, especially fine art: because that would imply that its first purpose was to exist as an expression of beauty for its own sake and for the delectation of the senses. Calligraphy can almost be considered a fine art nowadays, because its primary economic and educational purpose has been taken away; but printing in English will not qualify as an art until the present English language no longer conveys ideas to future generations, and until printing itself hands its usefulness to some yet unimagined successor.

There is no end to the maze of practices in typography, and this idea of printing as a conveyor is, at least in the minds of all the great typographers with whom I have had the privilege of talking, the one clue that can guide you through the maze. Without this essential humility of mind, I have seen ardent designers go more hopelessly wrong, make more ludicrous mistakes out of an excessive enthusiasm, than I could have thought possible. And with this clue, this purposiveness in the back of your mind, it is possible to do the most unheard-of things, and find that they justify you triumphantly. It is not a waste of time to go to the simple fundamentals and reason from them. In the flurry of your individual problems, I think you will not mind spending half an hour on one broad and simple set of ideas involving abstract principles.

I once was talking to a man who designed a very pleasing advertising type which undoubtedly all of you have used. I said something about what artists think about a certain problem, and he replied with a beautiful gesture: 'Ah, madam, we artists do not think---we feel!' That same day I quoted that remark to another designer of my acquaintance, and he, being less poetically inclined, murmured: 'I'm not feeling very well today, I think!' He was right, he did think; he was the thinking sort; and that is why he is not so good a painter, and to my mind ten times better as a typographer and type designer than the man who instinctively avoided anything as coherent as a reason. I always suspect the typographic enthusiast who takes a printed page from a book and frames it to hang on the wall, for I believe that in order to gratify a sensory delight he has mutilated something infinitely more important. I remember that T.M. Cleland, the famous American typographer, once showed me a very beautiful layout for a Cadillac booklet involving decorations in colour. He did not have the actual text to work with in drawing up his specimen pages, so he had set the lines in Latin. This was not only for the reason that you will all think of; if you have seen the old typefoundries' famous Quousque Tandem copy (i.e. that Latin has few descenders and thus gives a remarkably even line). No, he told me that originally he had set up the dullest 'wording' that he could find (I dare say it was from Hansard), and yet he discovered that the man to whom he submitted it would start reading and making comments on the text. I made some remark on the mentality of Boards of Directors, but Mr Cleland said, 'No: you're wrong; if the reader had not been practically forced to read---if he had not seen those words suddenly imbued with glamour and significance---then the layout would have been a failure. Setting it in Italian or Latin is only an easy way of saying "This is not the text as it will appear".'

Let me start my specific conclusions with book typography, because that contains all the fundamentals, and then go on to a few points about advertising.

The book typographer has the job of erecting a window between the reader inside the room and that landscape which is the author's words. He may put up a stained-glass window of marvellous beauty, but a failure as a window; that is, he may use some rich superb type like text gothic that is something to be looked at, not through. Or he may work in what I call transparent or invisible typography. I have a book at home, of which I have no visual recollection whatever as far as its typography goes; when I think of it, all I see is the Three Musketeers and their comrades swaggering up and down the streets of Paris. The third type of window is one in which the glass is broken into relatively small leaded panes; and this corresponds to what is called 'fine printing' today, in that you are at least conscious that there is a window there, and that someone has enjoyed building it. That is not objectionable, because of a very important fact which has to do with the psychology of the subconscious mind. That is that the mental eye focuses through type and not upon it. The type which, through any arbitrary warping of design or excess of 'colour', gets in the way of the mental picture to be conveyed, is a bad type. Our subconsciousness is always afraid of blunders (which illogical setting, tight spacing and too-wide unleaded lines can trick us into), of boredom, and of officiousness. The running headline that keeps shouting at us, the line that looks like one long word, the capitals jammed together without hair-spaces---these mean subconscious squinting and loss of mental focus.

And if what I have said is true of book printing, even of the most exquisite limited editions, it is fifty times more obvious in advertising, where the one and only justification for the purchase of space is that you are conveying a message---that you are implanting a desire, straight into the mind of the reader. It is tragically easy to throw away half the reader-interest of an advertisement by setting the simple and compelling argument in a face which is uncomfortably alien to the classic reasonableness of the book-face. Get attention as you will by your headline, and make any pretty type pictures you like if you are sure that the copy is useless as a means of selling goods; but if you are happy enough to have really good copy to work with, I beg you to remember that thousands of people pay hard-earned money for the privilege of reading quietly set book-pages, and that only your wildest ingenuity can stop people from reading a really interesting text.

Printing demands a humility of mind, for the lack of which many of the fine arts are even now floundering in self-conscious and maudlin experiments. There is nothing simple or dull in achieving the transparent page. Vulgar ostentation is twice as easy as discipline. When you realise that ugly typography never effaces itself; you will be able to capture beauty as the wise men capture happiness by aiming at something else. The 'stunt typographer' learns the fickleness of rich men who hate to read. Not for them are long breaths held over serif and kern, they will not appreciate your splitting of hair-spaces. Nobody (save the other craftsmen) will appreciate half your skill. But you may spend endless years of happy experiment in devising that crystalline goblet which is worthy to hold the vintage of the human mind.

London 1955.

Social Media and Blogging

As time progresses i find my self more and more embedded in social media sites. Clients often rely on me as their authority and the subject. I often differentiate my updates on Facebook from other networking sites like Linked in or Twitter.

All in One

Some people prefer to have a one point system to take care of all their social media in the same place. Fortunately, there is one easy way to update all of your social media from ANYWHERE - by using Ping.fm. Ping.fm is a simple and FREE service that makes updating your social networks a a snap! "Post From Anywhere » To Anywhere" is their slogan – use your phone, email, IM or one of another 3rd party application and your message will be posted to any or all your choice of social networks on their "mega list".

An alternate service is Hellotxt which allows you to do the same thing for the same price (FREE)  I am not sure which one is better, but if you have experience with one or the other, please let me know.

Stick and Move

If you are just sticking to one network or another, you can always use an app on your mobile phone to do so:

For the iPhone / iPad:

For the Blackberry:

Blogging

If you are a blogger (like me)  and want to automatically post your blogs to your various networking sites, you can use one of these plug ins:

How to Link Twitter and Facebook

If you want to b eable to update your twitter account with your facebook status, simply install the Twitter application and allow it to make updates for you.  It's as simple as that!

Add your Linkedin profile to Facebook

This application is available to people who want to post their Linkedin profile on Facebook. They also provide detailed step by step instructions on how to use the app.

Add the Twitter app to LinkedIn

If you are a Linkedin Buff and want to track twitter through the Linkedin interface, simply install this app and it all comes together.

I hope all these links were helpful and informative.  If you have any questions, don't hesitate to ask!