Family webhosting plans and family tree design

Nowadays it is a new style to publish family history on website as it is a great way to share what is going on with other family members and friends, especially those who live far away. On the family website we share number of fun things about family which includes introducing new family members, excited events in family, birthday party, new baby birth, wedding, a travel etc.

Sharing photos of family parties, events, and kids. We can also post quotes, jokes to share with our friends. Creating family web site isn’t really difficult will be a fun family project and you can get it done at lowest price. Placing up a family tree online can thus be a great way of keeping up-to-date with scattered relatives.

Many people these days are pretty keen in learning about their family trees and genealogical maps. Most people begin off their genealogy study with no knowing the amount of time and extent of dedication it would take them to research their family history. Your web site can be dynamically made in a matter of seconds based on the work you have already done.

If you have just begun, you can create a brand new tree from scratch. Many people use it as a companion to their existing genealogy application, while others use it as their only program for doing genealogy work.

First task to start family website is choosing domain name for your family site, it is very import to choose meaningful name which sense to you and your family. Basic requirement of Web Hosting Plan are the general feature of Family Web Hosting, such as disk space, band width, reliability, etc. Those are the basic feature you need to think about when you want to hosting a web site.

Related Families offers family web hosting at lowest rates. You can get free domain registration for life, instant set up, friendly support no questions asked 30-day money back guarantee.

We’ll provide you with a library of dozens of web apps to choose from, including WordPress, Joomla, Gallery2, PhpBB and many more. You will also get full access to cPanel, PHP, MySQL and many more powerful features so you can create your own custom web site.

Related Familes also offer chance to earn online income from website and blog. If you are interested in making additional income, please join our affiliate program and start making money. As an affiliate you can get commission of US$ 30 – US$ 80 per sale.

Everthing you’ll ever want in a website Family Web Hosting from Related Families. Please visit our site at RelatedFamilies.com to learn more about our services. Join our affiliate program to make extra income.

No comments, shop8admin, April 11, 2017

Beautiful Antique Furniture for Every Purpose

It seems like nothing is made quite like it used to be made. Modern furniture and interior decorations are often inexpensive, stylish, and lightweight. Durability and craftsmanship somehow gets lost frequently with modern items. It’s no wonder that the world of antiques is alive and well, not only in America, but around the world. Antiques are often thought by many as anything old. A true antique is more of a treasure than merely something old, although antiques are usually classified as such when they are at least 80 years old. Antiques are collectible items defined by beauty, condition, utility, rarity, and sentimental value. They are sought after for their uniqueness, craftsmanship, and fine detail. If you go back through history, you’ll discover that building furniture, for example, was not done in bulk for the masses. Furniture was created and designed by skilled artisans and carpenters with an eye for detail, style, and beauty. Furniture was made of the finest materials. These are admirable qualities that are more rare to find in furniture stores today. Antiques are typically purchased from estate sales, auction houses, online auctions, and antique shops. Many antiques are inherited and have been passed down through families for hundreds of years. Antique dealers are often members of national trade associations. You can find antique furniture in Los Angeles from many knowledgeable dealers that can help you learn about your purchase. They will be familiar with the history of the time period’s styles. They may even know the history behind the piece. Antiques for Everyone >

Antiques are a wonderful way to add history, style, and uniqueness to any home or business. Many antiques, especially pieces that are older or with more highly skilled craftsmanship, are expensive. However, there are many antiques that are affordable for anyone. People often think of furniture when they think of antiques. Furniture is a big market in the antique world, but there is so much more. You can find antique clothing, jewelry, tools, equipment, clocks, lamps, mirrors, and more. Find a store withantique furniture in Los Angelesand you’re likely to find a variety of other more affordable items to add some history and design to your life. Castle Antiques & Design , open to the public, we are one of the largest importers of antique furnishings in the greater Los Angeles area. Established in 1975 as a major wholesaler to antique dealers and interior designers.We now offer retail, wholesale, rental, staging, repairs, restoration and custom made services at antique furniture in Los Angeles.

No comments, shop8admin, April 11, 2017

Ideal Instances During Which Sacramento Child Support Attorney is Necessary

Consulting a Sacramento child support attorney is necessary in the first place in case no conclusive result has been obtained in the case of the child support and custody. As a matter of fact, the court holds both mother and father to be equally responsible for the maintenance of any kid. However, a perfect decision could be taken only studying the case in great detail. Remember that every case will be different in its own right. Couples cannot bank upon a single aspect reflecting the fact that children need various benefits and features for themselves from time to time. Responsible parents understand this fact who end up in providing necessary care for their kids whether together or separated. >

Modern child support laws have been updated significantly providing necessary care and independence required for them at such a young age. For instances, single parents need to consult a reputed attorney in order determine the extent to which they could obtain the custody of their children. In the event that either father or mother has met with an untimely death, then one of the relatives will be appointed as the guardian for legal sophistication. Most of the couples should consider the fact that any child requires equal care from both a mother and a father.

One of the classic instances during which the services of a child support attorney will prove to be crucial will be when couples obtain divorce. It is one of those sensitive moments for everyone involved during which it becomes extremely difficult to determine who should be given the child’s custody. Generally, the child’s father is expected to offer some amount on a regular basis as part of child support. The concerned attorney will play a crucial role in determining the extent to which the amount has to be payable.

Increasing demand for sacramento child support attorney itself reflects the extent to which the situations have reached. From one end, it is alarming to observe that more and more kids come under child support feature just because they have been deprived of all the love and care from their parents. However, consulting one of the experienced attorneys will bring in a significant change in the situations on an overall manner. Going through the past facts covering similar situations will prove to be handy and can be regarded as a ready reference. If only children are offered with necessary support and care, then there will be hardly problems in the future.

The author is a professional writer, presently writing for divorce attorney Sacramento

No comments, shop8admin, April 11, 2017

Vacation Fun At Alabama Adventure Theme Park

Hold on tight and get ready for fun, at the Alabama Adventure Theme Park!

Located west of Birmingham, the park encompasses many rides split into two fun filled sections, one for water, and the other for the dry rides.

So if you are staying in dry ride land, then you must take on the Rampage. This creepy and ominous ride is one of the largest wooden roller coasters in the United States. It hurls you through a maze of hills and turns as your body feels every impact of the wooden rails.

If you didn’t lose your lunch on the Rampage, then take it on over to the Zoomerang. This monster coaster is a steel rollercoaster designed with a boomerang in mind. The corkscrew turns seem never ending and you will find yourself screaming through every high speed turn.

Alabama Adventure Theme Park is a fantastic destination for the whole family, and sure to be a fun one. In the upcoming months many new attractions have been planned for the facility, including: go-carts, hotel accommodations with an indoor water park, camp grounds, and a petting zoo.

You’ll want to make sure Alabama Adventure Theme Park is on your to-do list in the great Yellowhammer state.

Dry rides are over and now you are ready for a good soaking. Fabulous! Head on to the wet park side and check out Steel Waters. This super slick water slide will thrust you along the slide with your rear end barely skimming to water’s top. Before you can believe it, you will find yourself landing squarely in the landing pool. Once you’ve endured the heart pounding adventure of the Steel Waters, then you might enjoy a lazy trip in the wave pool. Get a raft and grab your kids, both little ones and adults and everyone in between will love the wave pool.

By now the hunger monster has probably settled in and so head on over to Celebration Street where you will find all the theme park requisite foods, such as funnel cakes, ice cream, and lemonade. But if you are looking for something more, then no worries, you can also find french fries, pizza, hamburgers, subs and even tacos. Celebration is also the place to do your vacation shopping or check out some of the old fashion arcade games.

And if you haven’t had enough of the theme park vacation, then think about heading on over to Huntsville, Alabama where you will find the Southern Adventures Amusement Park. Complete with more carnival-style rides, mini-golf, go-carts and even a water park. Of course you can also find even more shows and food galore.

The Alabama Adventure Theme Park, ranking in 2005 as Alabama’s second most popular attraction, is one Alabama adventure that both you and your children will be sure to enjoy. Wet rides, dry rides, carnival foods and shows galore, the Alabama Adventure Theme Park will keep you smiling all day long.

No comments, shop8admin, April 11, 2017

Start A New Christmas Family Tradition With Matching Footie Pajamas

Are you looking for a fun and practical Christmas tradition for your family? Consider buying your family matching footed pajamas. Wearing matching footed pajamas might seem very strange when you first consider it. However, many families are now wearing matching footed pajamas. If you consider why, it really does make sense.

For a very long time, many families have shared the tradition of wearing normal matching pajamas for the holidays. Wearing matching pajamas makes everyone in the family feel closer together, much like wearing a family uniform. But it was often the case that the smaller members of the family would wear footed pajamas while the bigger members of the family would wear the non-footed type of pajamas. Why? Until recently, footed pajamas were only offered in sizes for children. Since some members of the family members were dressing in footed pajamas and others were wearing non-footed pajamas the pajamas were similar but not really matching.

About ten years ago, several companies started making matching footed pajamas in sizes for youths as well as adults. With that development, it became possible to dress the whole family in footed pajamas. Families began to switch from non-footed matching pajamas to matching footie pajamas.

At first, many families switched to matching footed pjs just for laughs. Children enjoyed seeing parents wearing pajamas which were normally worn only by kids. But once parents actually owned footed pajamas, many of them realized why they loved footed pjs so much as children. Footed pajamas are the warmest pajamas available. The warmth and the originality make footie pjs not only fun but practical too.

Why are matching footed pjs practical? Nearly 10% of the population have problems with circulation and complain about cold feet. People with cold feet are unhappy and many people with circulatory problems endlessly seek a solution for it. Many adults with circulatory problems find that they are more comfortable sleeping in adult footed pajamas. The warmth generated by the rest of the body moves to the feet and brings the temperature of the feet to the same level as the rest of the body. Further families discover that when the whole family is dressed in matching footie pajamas they can turn down the heat and save some money. Dressed in exactly the same pjs as the children, parents understand how warm their children are since if the parents are warm, then it is likely that the kids are warm too.

Matching pajamas may have begun as a fun family gift idea. But once adults buy footed pajamas for themselves and their families, many parents decide to make matching footie pjs a tradition that the whole family can enjoy forever.

No comments, shop8admin, April 11, 2017

In Search of the Best Coffee Makers

Coffee may be the most popular beverage in the world. Recent statistics indicate that over 50% of the American population are coffee drinkers and this number would more than likely hold true in many other countries as well. This more than any thing else helps to explain why there is such a wide range of coffee makers available for purchase today.

With such a diverse range of coffee machines, there is more choice for the coffee drinking public than ever before. Main stream popular styles include the Automatic and Manual Drip, Pod, Automatic Espresso, French Press, Percolator, Stovetop Espresso and the Vacuum. Each one of these styles has some unique characteristic that are sure to appeal to a certain segment of the coffee drinking public.

Automatic and Manual Drip Coffee Machines

The most popular style of coffee maker continues to be the automatic drip coffee maker. The basic design is very simple and efficient. Add fresh water to the built-in reservoir, insert a filter in to the handy filter holder, measure your favorite coffee grounds and pour into the filter and then press the start button. Within minutes your senses are excited by the smell of freshly brewed hot coffee! Most models also have a built-in timer and a pot warmer included so that you can set your coffee to brew and be ready at any hour of the day or night, and kept constantly warm as well.

Manual drip coffee brewers do take a bit more work since you need to boil the water using another heat source, but after that it is basically the same coffee making process of putting coffee grounds in the filter and pouring the hot water through the filter so that the coffee liquid is collected in the pot or container below. One great advantage of the manual drip coffee machine is that is can go most any where with you as it is not dependent upon having electricity to operate so it is great for camping and other outdoor activities.

Pod Coffee Machines

These are becoming very trendy and popular in recent years. Working similar to the automatic drip machines, they feature the ability to use pre-packaged containers or pods of specialty coffees to brew great tasting coffee. With many reputable coffee chains such as Starbucks now selling their most popular coffee blends in the pod format, consumers can get the same tasting cup of specialty coffee at home that they had to go out and purchase before at a much higher price.

Automatic Espresso Coffee Brewer

Espresso coffee makers have become much more affordable in recent years and because of this, they are gaining in popularity amongst serious coffee drinkers wanting something more than just a normal cup of coffee. There are currently three types of espresso coffee brewers to choose from, namely semi automatic, fully automatic, and super automatic. As a rule, the more automatic the espresso maker is, the less you need to do to brew your coffee, but unfortunately the more expensive it is to purchase. For example, where a semi-automatic model will tamp the coffee grounds, brew the coffee, fill your cup and eject the old grounds, an entirely automatic model will also grind the coffee for you as well, and the super automatic espresso coffee maker will do all of the above plus having additional features such as built-in water filters and self-cleaning.

Stovetop Espresso Coffee Maker

The stovetop espresso coffee brewers are basically a manual method for preparing espresso coffee when you do not have access to an automatic version or an electrical source of energy. This makes it an ideal coffee maker for taking outdoors on camping or fishing trips if you feel the need to make an espresso cup of coffee. First water is placed inside the underside boiler and then a cone filter is situated inside the boiler and filled with coffee grounds. Next the top is lightly tightened and the brewer is place over the heat source. After a few minutes, once the top of the boiler is filled with the freshly brewed coffee it is removed from the heat supply and the coffee is ready to be served. Here again, the absence of any warming feature means the coffee has to be served immediately.

French Press Coffee Maker

Also known as “press pots” or “plunger pots”, the French Press coffee makers are not as common as they once were. Preparing coffee is more work than it would be using any of the coffee makers already discussed as it is a manual coffee machine. The pot is actually a glass or porcelain tube consisted of a stainless, mesh plunger that acts like a filter. To make the coffee you must first measure the coffee grounds into the pot, then pour in almost boiling water. After allowing the coffee mixture to steep for a few minutes, the plunger is then pushed downwards and the liquid beverage is forced into the waiting cup or container. As there is no built-in heating plate or element beneath the coffee container, you must serve the coffee beverage immediately or place it into an insulated container to keep it hot for later.

Percolator Coffee Maker

At one time percolator coffee makers were the standard type of coffee brewers in most households, a role now held by the automatic drip machines. Although not as popular today, they still have their place when a coffee maker is required that can brew large volumes of coffee rather than the 10-14 cup limit or less in most other popular coffee machines sold these days. Modern percolators are available as stove top models and electric and can be programmed like other automatic coffee machines. The coffee making process is based on running water continuously over the coffee grounds, held within a metal filter, as the water is boiled. One drawback of this method is that the coffee often gets stronger and more bitter tasting the longer it goes through the brewing cycle.

Vacuum Coffee Maker

Perhaps the strangest looking type of coffee machine is the vacuum coffee maker. Looking like something from a science fiction movie, the apparatus is made up of two overlapping containers connect by a siphon tube. The filter is located in the bottom section of the upper container. To brew coffee, the user first adds coffee grounds to the upper container, then pours water into the lower container. Next the brewer is placed on top of a stove where the water is then boiled and the resulting steam is passed along through the siphon tube into the upper container. After about 3 minutes the container is removed from the heat source and the steam condenses back into liquid water which is forced through the filter and back into the lower unit. Your fresh pot of coffee is now sitting in the lower unit. An interesting way to brew a cup or pot of coffee!

Needless to say, coffee lovers can select from a wide variety of coffee makers. From cheap stove top coffee pots to high end super automatic coffee machines, there is a coffee machine for every inclination as well as for every budget. Fantastic news! Now here is the unpleasant news. With all the many coffee machines to choose from today, even knowing the style you favor is not enough. Within each of the coffee maker styles noted above there are numerous different brand names and models to choose from.

No comments, shop8admin, April 11, 2017

Causes Of Error 823 In Sql Server And How To Fix It

Do you encounter Input/Output (I/O) errors while accessing a MS SQL Server database? Are you unable to run queries on or access data from MDF (Master Database File)? This behavior indicates system or hardware problems with SQL Server that corrupt the database and renders it inaccessible. It leads to critical data loss situations. In order to extract data from Microsoft SQL Server in such situations, you need to opt for solutions.

Hardware and system problems in SQL Server are generally indicated by an error message, similar to the following one:

Error 823
I/O error detected during at offset in file ”

You come across this error message when SQL Server attempts to read data from and write data to the database files. Format of this error message can be different, depending upon the version of SQL Server.

Cause

You come across this error message, if any of the below conditions are true:
Operating system error.
I/O logical check failure.
MS SQL Server database corruption.

If any of the above situations occur, it becomes essential to perform SQL Server Recovery by resolving it, to retrieve inaccessible data.

Solution

Try out the below things to fix up this issue, as per the cause of the the problem:

Operating system error: The read Windows API (Application Programing Interface) call or the write API call is unsuccessful and MS SQL Server experiences operating system errors, which is related to Windows API call. Run operating system integrity checking tools. Following is the example of operating system error:

2003-07-28 09:01:27.38 spid75 Error: 823, Severity: 24,
State: 2
2003-07-28 09:01:27.38 spid75 I/O error 1117 (The request could not be performed because of an I/O device error.) detected during read at offset 0x0000002d460000 in file ‘e:\program files\Microsoft SQL Server\mssql\data\mydb.MDF’
I/O check failure: If specified logical data checks are unsuccessful, you may encounter this problem. Run DBCC CHECKDB to solve this issue.
Database corruption: Restore the database from recent backup. If the backed is unusable, Recover SQL database through third-party applications.

The software are powerful enough to handle most of the database corruption issues. The applications use high-end scanning methods to ensure absolute recovery. They are incorporated with rich graphical user interface to provide quick and easy recovery.

SQL Recovery is the most advanced and powerful utility that is able to effectively handle all database corruption scenarios. The software works well with Microsoft SQL Server 2008, 2005, and 2000. It restores all MDF file objects such as tables, reports, forms, constraints, stored procedures, triggers, data types, and more.

No comments, shop8admin, April 11, 2017

Finding Podcast Hosting

For anyone who wants to begin creating a podcast, podcast hosting is the most important part. Before anyone can begin distributing a podcast, they need a place to store the files and keep the feed file that will tell their subscribers about the new episodes available. The first thing required is a domain name where the site will be located. Many domain registrars are available who will help one register a domain name for a small fee. Once the domain is registered, hosting is required, and again there are many different companies willing to do the hosting for a small fee. One of those is bluehost.com, but many others are available. When looking for a host, the most important thing is to make sure that a lot bandwidth and storage space is available and cheap. Since podcasting deals with large media files, a lot of disk space will be taken up storing the files and bandwidth will be eaten quickly when they are downloaded by the subscribers.

After podcast hosting has been acquired, it needs to be used and the site needs to be set up. The DNS addresses of the site need to be set to the addresses that the host provides you so that the servers that underlie the
internet will know where your site is. DNS addresses can be set by going to the domain registrar that was used to acquire the domain and inputting the addresses provided by the host. After that is done, it will take a
few days before the master list the domain registar updates will be shared throughout the internet and all name servers know where to find your specific domain. You can then go about setting up your own podcast.

Using the podcast hosting you now have, you will need to look at the disk space allocated to the site using something called and FTP browser. The host may provide one as part of their hosting plan, but if not there are many available free to choose from. Using the FTP browser, log on to the host and upload a file called dircaster.php after editing it to fit the specifics of the
site. Dircaster.php is an easy to find piece of coding that generates a feed file by looking at the contents of its directory or folder. The individual episodes to be podcasted can then be uploaded to the same folder as dircaster.php for cataloging. Make sure that all the meta data, or information about the mp3 file is correct before doing so.

The podcast hosting you now have will allow you to distribute a podcast. It would be best to upload more to the site, such as an index page that tells visitors about the podcast and provides the address of the file dircaster.php on your site. When they subscribe to that file, the podcast client thy use will access it and recieve information about the latest podcasts available.

No comments, shop8admin, April 11, 2017

Beermen face Warriors in final

Bangkok – San Miguel Beermen stepped into the ASEAN Basketball League finals after eliminating Sports Rev. Thailand Slammers. In the fourth game, 77-61 win over Slammers Beermen.

With the victory at Nimibutr Stadium, Bangkok, Thailand, Thursday (30/05/2013), the Beermen won the semifinal playoff round with a score of 3-1.

Paulo Hubalde had 16 points and five assists for the Beermen. While teammate Hubalde, Pauliasi Taulava, had 15 points. While the camp Slammers, Christien Charles had 15 points and nine rebounds.

Beermen appeared dominant since the first quarter, in which they excel over Slammers 21-13. Only in the second quarter alone they lost the points of the Slammers.

An additional 24 points in the final quarter and then took Slammers to meet the Warriors, who had first advanced after defeating Westports Malaysia Dragons.

This is the final test. Last year, the Warriors defeated success to become a champion Beermen through three games.

Beermen won the first game by a score of 86-83 at the Ynares Sports Arena. However, the Warriors got up and won the next two games, each with a score of 81-61 and 78-76.

The first final between the Beermen and the Warriors will be held at the Ynares Arena on June 7.

No comments, shop8admin, April 11, 2017

It’s a Mad, Mad, Mad, Mad World: Scoping in CoffeeScript and JavaScript

CoffeeScript, as many people know, is a transpile-to-JavaScript language.1 For the most part, it does not introduce major changes in semantics. For example, this:

-> 'Hello, world'

Transpiles directly to:

function () { return 'Hello, world'; }

This is convenient syntactic sugar, and by removing what some folks call the “syntactic vinegar” of extraneous symbols, it encourages the use of constructs that would otherwise make the code noisy and obscure the important meaning. The vast majority of features introduced by CoffeeScript are of this nature: They introduce local changes that transpile directly to JavaScript.2

CoffeeScript also introduces features that don’t exist in JavaScript, such as destructuring assignment and comprehensions. In each case, the features compile directly to JavaScript without introducing changes elsewhere in the program. And since they don’t look like existing JavaScript features, little confusion is created.

equals doesn’t equal equals

One CoffeeScript feature does introduce confusion, and the more you know JavaScript the more confusion it introduces. This is the behaviour of the assignment operator, the lowly (and prevalent!) equals sign:

foo = 'bar'

Although it looks almost identical to assignment in JavaScript:

foo = 'bar';

It has different semantics. That’s confusing. Oh wait, it’s worse than that: Sometimes it has different semantics. Sometimes it doesn’t.

So what’s the deal with that?

Well, let’s review the wonderful world of JavaScript. We’ll pretend we’re in a browser application, and we write:

foo = 'bar';

What does this mean? Well, it depends: If this is in the top level of a file, and not inside of a function, then foo is a global variable. In JavaScript, global means global across all files, so you are now writing code that is coupled with every other file in your application or any vendored code you are loading.

But what if it’s inside a function?

function fiddleSticks (bar) {
  foo = bar;
  // ...
}

For another example, many people enclose file code in an Immediately Invoked Function Expression (“IIFE”) like this:

;(function () {
  foo = 'bar'
  // more code...
})();

What do foo = 'bar'; or foo = bar; mean in these cases? Well, it depends as we say. It depends on whether foo is declared somewhere else in the same scope. For example:

function fiddleSticks (bar) {
  var foo;
  foo = bar;
  // ...
}

Or:

function fiddleSticks (bar) {
  foo = bar;
  // ...
  var foo = batzIndaBelfrie;
  // ...
} 

Or even:

function fiddleSticks (bar) {
  foo = bar;
  // ...
  function foo () {
    // ...
  }
  // ...
}

Because of something called hoisting,3 these all mean the same this: foo is local to function fiddleSticks, and therefore it is NOT global and ISN’T magically coupled to every other file loaded whether written by yourself or someone else.

nested scope

JavaScript permits scope nesting. If you write this:

function foo () {
  var bar = 1;
  var bar = 2;
  return bar;
}

Then bar will be 2. Declaring bar twice makes no difference, since both declarations are in the same scope. However, if you nest functions, you can nest scopes:

function foo () {
  var bar = 1;
  function foofoo () {
    var bar = 2;
  }
  return bar;
}

Now function foo will return 1 because the second declaration of bar is inside a nested function, and therefore inside a nested scope, and therefore it’s a completely different variable that happens to share the same name. This is called shadowing: The variablebar inside foofoo shadows the variable bar inside foo.

javascript failure modes

Now over time people have discovered that global variables are generally a very bad idea, and accidental global variables doubly so. Here’s an example of why:

function row (numberOfCells) {
  var str = '';
  for (i = 0; i < numberOfCells; ++i) {
    str = str + '<td></td>';
  }
  return '<tr>' + str + '</tr>';
}

function table (numberOfRows, numberOfColumns) {
  var str = '';
  for (i = 0; i < numberOfRows; ++i) {
    str = str + row(numberOfColumns);
  }
  return '<table>' + str + '</table>';
}

Let’s try it:

table(3, 3)
  //=> "<table><tr><td></td><td></td><td></td></tr></table>"

We only get one row, because the variable i in the function row is global, and so is the variable i in the function table, so they’re the exact same global variable. Therefore, after counting out three columns, i is 3 and the for loop in table finishes. Oops!

And this is especially bad because the two functions could be anywhere in the code. If you accidentally use a global variable and call a function elsewhere that accidentally uses the same global variable, pfft, you have a bug. This is nasty because there’s this weird action-at-a-distance where a bug in one file reaches out and breaks some code in another file.

Now, this isn’t a bug in JavaScript the language, just a feature that permits the creation of very nasty bugs. So I call it a failure mode, not a language bug.

coffeescript to the rescue

CoffeeScript addresses this failure mode in two ways. First, all variables are local to functions. If you wish to do something in the global environment, you must do it explicitly. So in JavaScript:

UserModel = Backbone.Model.extend({ ... });
var user = new UserModel(...);

While in CoffeeScript:

window.UserModel = window.Backbone.Model.extend({ ... })
user = new window.UserModel(...)

Likewise, CoffeeScript bakes the IIFE enclosing every file in by default. So instead of:

;(function () {
  // ...
})();

You can just write your code.4

The net result is that it is almost impossible to replicate the JavaScript failure mode of creating or clobbering a global variable by accident. That is a benefit.

what would coffeescript do?

This sounds great, but CoffeeScript can be surprising to JavaScript programmers. Let’s revisit our table function. First, we’ll fix it:

function row (numberOfCells) {
  var i,
      str = '';
  for (i = 0; i < numberOfCells; ++i) {
    str = str + '<td></td>';
  }
  return '<tr>' + str + '</tr>';
}

function table (numberOfRows, numberOfColumns) {
  var i,
      str = '';
  for (i = 0; i < numberOfRows; ++i) {
    str = str + row(numberOfColumns);
  }
  return '<table>' + str + '</table>';
}

table(3, 3)
  //=> "<table><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>"

Good! Now suppose we notice that no function calls row other than table. Although there is a slightly more “performant” way to do this, we decide that the clearest and simplest way to indicate this relationship is to nest row inside table Pascal-style:

function table (numberOfRows, numberOfColumns) {
  var i,
      str = '';
  for (i = 0; i < numberOfRows; ++i) {
    str = str + row(numberOfColumns);
  }
  return '<table>' + str + '</table>';

  function row (numberOfCells) {
    var i,
        str = '';
    for (i = 0; i < numberOfCells; ++i) {
      str = str + '<td></td>';
    }
    return '<tr>' + str + '</tr>';
  }
}

It still works like a charm, because the i in row shadows the i in table, so there’s no conflict. Okay. Now how does it work in CoffeeScript?

Here’s one possible translation to CoffeeScript:

table = (numberOfRows, numberOfColumns) ->
  row = (numberOfCells) ->
    str = ""
    i = 0
    while i < numberOfCells
      str = str + "<td></td>"
      ++i
    "<tr>" + str + "</tr>"
  str = ""
  i = 0
  while i < numberOfRows
    str = str + row(numberOfColumns)
    ++i
  return "<table>" + str + "</table>"

table(3,3)
  #=> "<table><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>"

It works just fine. Here’s another:

table = (numberOfRows, numberOfColumns) ->
  str = ""
  i = 0
  row = (numberOfCells) ->
    str = ""
    i = 0
    while i < numberOfCells
      str = str + "<td></td>"
      ++i
    "<tr>" + str + "</tr>"
  str = ""
  i = 0
  while i < numberOfRows
    str = str + row(numberOfColumns)
    ++i
  return "<table>" + str + "</table>"

table(3,3)
  #=> "<table><tr><td></td><td></td><td></td></tr></table>"

Broken! And a third:

str = ""
i = 0
table = (numberOfRows, numberOfColumns) ->
  row = (numberOfCells) ->
    str = ""
    i = 0
    while i < numberOfCells
      str = str + "<td></td>"
      ++i
    "<tr>" + str + "</tr>"
  str = ""
  i = 0
  while i < numberOfRows
    str = str + row(numberOfColumns)
    ++i
  return "<table>" + str + "</table>"

table(3,3)
  #=> "<table><tr><td></td><td></td><td></td></tr></table>"

Also broken! Although the three examples look similar, the first gives us what we expect but the second and third do not. What gives?

Well, CoffeeScript doesn’t allow us to “declare” that variables are local with var. They’re always local. But local to what? In CoffeeScript, they’re local to the function that either declares the variable as a parameter or that contains the first assignment to the variable.5 So in our first example, reading from the top, the first use of str and i is inside the row function, so CoffeeScript makes them local to row.

A little later on, the code makes an assignment to i and str within the table function. This scope happens to enclose row’s scope, but it is different so it can’t share the strand i variables. CoffeeScript thus makes the i and str in table variables local totable. As a result, the i and str in row end up shadowing the i and str in table.

The second example is different. The first i encountered by CoffeeScript is in table, so CoffeeScript makes it local to table as we’d expect. The second i is local to row. But since row in enclosed by table, it’s possible to make that i refer to the i already defined, and thus CoffeeScript does not shadow the variable. The i inside row is the same variable as the i inside table.

In the third example, i (and str) are declared outside of both table and row, and thus again they all end up being the same variable with no shadowing.

Now, CoffeeScript could scan an entire function before deciding what variables belong where, but it doesn’t. That simplifies things, because you don’t have to worry about a variable being declared later that affects your code. Everything you need to understand is in the same file and above your code.

In many cases, it also allows you to manipulate whether a variable is shadowed or not by carefully controlling the order of assignments. That’s good, right?

all those against the bill, say “nay nay!”

Detractors of this behaviour say this is not good. When JavaScript is written using var, the meaning of a function is not changed by what is written elsewhere in the file before the code in question. Although you can use this feature to control shadowing by deliberately ordering your code to get the desired result, a simple refactoring can break what you’ve already written.

For example, if you write:

table = (numberOfRows, numberOfColumns) ->
  row = (numberOfCells) ->
    str = ""
    i = 0
    while i < numberOfCells
      str = str + "<td></td>"
      ++i
    "<tr>" + str + "</tr>"
  str = ""
  i = 0
  while i < numberOfRows
    str = str + row(numberOfColumns)
    ++i
  return "<table>" + str + "</table>"

table(3,3)
  #=> "<table><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>"

All will be well, until you are debugging late one night, and you add:

console.log('Hello!') for i in [1..5]

table = (numberOfRows, numberOfColumns) ->
  row = (numberOfCells) ->
    str = ""
    i = 0
    while i < numberOfCells
      str = str + "<td></td>"
      ++i
    "<tr>" + str + "</tr>"
  str = ""
  i = 0
  while i < numberOfRows
    str = str + row(numberOfColumns)
    ++i
  return "<table>" + str + "</table>"

table(3,3)
  #=> "table><tr><td></td><td></td><td></td></tr></table>"

This breaks your code because the i you used at the top “captures” the other variables so they are now all the same thing. To someone used to JavaScript, this is a Very Bad Thing™. When you write this in JavaScript:

function row (numberOfCells) {
  var i,
      str = '';
  for (i = 0; i < numberOfCells; ++i) {
    str = str + '<td></td>';
  }
  return '<tr>' + str + '</tr>';
}

It will always mean the same thing no matter where it is in a file, and no matter what comes before it or after it. There is no spooky “action-at-a-distance” where code somewhere else changes what this code means. Whereas in CoffeeScript, you don’t know whether the iin row is local to row or not without scanning the code that comes before it in the same or enclosing scopes.

coffeescript’s failure mode

In this case, CoffeeScript has a failure mode: The meaning of a function seems to be changed by altering its position within a file or (in what amounts to the same thing) by altering code that appears before it in a file in the same or enclosing scopes. In contrast, JavaScript’s var declaration never exhibits this failure mode. JavaScript has a different action-at-a-distance failure mode, where neglecting var causes action at a much further distance: The meaning of code can be affected by code written in an entirely different file.

Mind you, the result of calling our row function is not affected by declaring an i in an enclosing scope. Our function always did what it was expected to do and always will. Although you and I know why the change breaks the table function is that row now uses an enclosed variable, imagine that we were writing unit tests. All of our tests for row would continue to pass, it’s the tests for table that break. So in an evidence-based programming sense, when we maintain the habit of always initializing variables we expect to use locally, changing code outside of those functions only changes the evidence that the enclosing code produces.

So one way to look at this is that row is fine, but moving i around changes the meaning of the code where you move i. And why wouldn’t you expect making changes to tableto change its meaning?

so which way to the asylum?

If you ask around, you can find people who dislike JavaScript’s behaviour, and others who dislike CoffeeScript’s behaviour. Accidentally getting global variables when you neglectvar is brutal, and action-at-a-distance affecting the meaning of a function (even if it is always within the same file) flies against everything we have learned about the importance of writing small chunks of code that completely encapsulate their behaviour.

Of course, programmers tend to internalize the languages they learn to use. If you write a lot of JavaScript, you habitually use var and may have tools that slap your wrist when you don’t. You’re bewildered by all this talk of action-at-a-distance. It will seems to you to be one of those rookie mistake problems that quickly goes away and is not a practical concern.

Likewise, if you write twenty thousand lines of CoffeeScript, you may never be bitten by its first-use-is-a-declaration behaviour. You may be in the habit of using variable names likeiRow and iColumn out of habit. You may find that your files never get so large and your functions so deeply nested that a “capture” problem takes longer than three seconds to diagnose and fix.

It’s a bit of a cop-out, but I suggest that this issue resembles the debate over strong, manifest typing vs. dynamic typing. In theory, one is vastly preferable to the other. But in practice, large stable codebases are written with both kinds of languages, and programmers seem to adjust to overcome the failure modes of their tools unconsciously while harvesting the benefits that each language provides.


  1. Yes, “transpile” is a real word, or at least, a real piece of jargon. It’s a contraction of “transcompiler,” which is a compiler that translates one language to another language at a similar level of abstraction. There’s room for debate over what constitutes a “similar level of abstraction.” https://en.wikipedia.org/wiki/Source-to-source_compiler

  2. There are other possibilities: You could write a Tail-Call Optimized language that transpiles to JavaScript, however its changes wouldn’t always be local: Some function calls would be rewritten substantially to use trampolining. Or adding continuations to a language might cause everything to be rewritten in continuation-passing style.

  3. Scanning all of the code first is called “hoisting,” in part because some declarations nested in blocks are “hoisted” up to the level of the function, and all declarations are “hoisted” to the top of the function. This is a source of confusion for some programmers, but it isn’t germane to this essay.

  4. If you don’t want the file enclosed in an IIFE, you can compile your CoffeeScript with the--bare command-line switch.

No comments, shop8admin, April 11, 2017



Recent Posts