Finding Buyers for Wholesale Deals

We all love to buy wholesale deals and if you’re selling, you’ll find that it’s difficult to find buyers for your goods. In this article, I’ve outlined four different ways of finding potential buyers for your goods. You can also add Google AdWords or social media advertisements on top of these four methods as well.

  1. Use your friends and family

Using your friends and family is a great place to start with finding buyers in your local area. They can act as a potential backup plan if you find that everything else fails. Also, sometimes they will want to help you buy the items yourself or they might even offer to buy it at the same price that they would pay if they were finding it themselves! Of course, this means that you will usually be getting a slightly lower price than wanted, but it’s still better than nothing.

  1. Join Wholesale Clubs

Joining wholesale clubs like BJ’s is a great way of getting access to thousands of wholesalers who are willing to sell their goods at a discount to club members. This can be a great way to find a buyer, but you must be extra careful with the wholesalers that you join. Not all of them are legit and some can actually sell fake goods.

You’ll generally need to pay extra for the club membership to get access to the wholesalers who are willing to hire you. Generally, this means that you will have more options than with your local friends and family. The downside is that it will take a little longer and cost more.

  1. Use Google AdWords

Using Google AdWords is a great way of getting cheap exposure for your listings. These are targeted ads that can be placed at the end of your listing. They work great, but they can be quite expensive. Generally they cost around $10-20 per day, but you could spend up to $500 per month on them if you aren’t careful.

  1. Facebook Group Ads

Facebook is a great place for finding buyers for your wholesale deals. You can pay to have your posts included within a Facebook Group owned by a wholesaler. (There are thousands of wholesalers listed online. I’ve listed some of the top ones below.) You will generally be able to use the same discounts that you would find on Google AdWords.

You also have access to paid advertising, as well. You can advertise in the “suggested” or “promoted” areas of your Facebook page. This is a great way to get mass exposure for your posts at a much cheaper rate than Google AdWords or Facebook Group ads. It can also give you more control over what types of ads you can choose from, with options like pictures and video ads.

You can also post an ad online at Community like C1stYourVoice and get access to thousands of people who might be interested in buying from you, but it might take a little longer to get a response.

Work with a Wholesaler to Find Buyers for Your Goods

Wholesalers are the experts at finding buyers for your goods. When you work with a wholesaler, they will be able to track how many potential buyers have seen your listing and how many people have emailed you about buying. They will also be able to look at the social media activity of potential buyers, which is great for seeing what types of people are interested in what you’re selling. Working with a wholesalers is a great way for someone who has limited time or lack of experience to get started.

Wholesalers also have access to hundreds of thousands of potential buyers and they are generally very good at picking the right ones. They can also tell you whether or not a particular buyer is a good fit for what you’re selling. They will look at their emails and other online profiles to predict how likely they are to buy your goods and how likely they are to buy from you again if you have something else in the future. Wholesalers will often also offer free advice on marketing, pricing, shipping, etc…

How Can I Get Good Prices for My Wholesale Deals?

The best prices for wholesale deals come from wholesalers. For example, if you are looking to sell your used phone for $150, you can probably find someone on Craigslist who will do it for a couple hundred dollars. However, I’ve sold a similar phone in the same condition on Ebay for over $200 to a wholesaler because they knew that they could sell it online or at retail stores and make more money.

Where Can I Find Wholesalers?

There are thousands of wholesalers who have websites that you can browse through. The popular ones include:

You can also search for wholesalers in your local area. (Go to Google and type in: “wholesaler in your town”)

You can also have a look at the popular auctions sites like Ebay and Amazon to find wholesale deals. You can often find products that are even cheaper than you would find on Craigslist or a wholesaler’s website! Just look at the shipping costs to see if they are a good deal or not.

What Are Some Good Wholesalers?

I’ve listed some of my favourite wholesale companies below. It’s important to note that I’ve never tried any of these companies myself, so I cannot personally recommend them. If you do decide to use them, I would recommend checking the feedback feedback of the wholesaler and make sure that they are a good fit for you and your business.

  1. Wholesale House

Wholesale House has been around forever (since 1996), and they are one of the best places to find wholesale deals. They have loads of wholesalers who have shops around the world, so it’s great for finding buyers in different areas. They have over 4 million products that you can look at when browsing through their website, which is a huge help when deciding what you want to sell!

Wholesale House is one of my favourite places to find wholesale deals for my eBay auctions. They have a huge database of listings that you can look through when searching for what to sell. You can also use their search filters if you want to find specific items, or if you know exactly what sort of seller that you are looking for.

Unfortunately there are no wholesale listings available on the Wholesale House website, so I’d recommend signing up for their free newsletter to get access to their email list. They will send out emails with new products every few hours and the quality is generally good. There are times when the products are bad (mainly due to some wholesalers having multiple competing websites), but overall it’s a great place for finding wholesale deals.

  1. Alibaba

Alibaba is a great website for finding wholesale deals for your eBay auctions and dropshipping stores. Most of the products are sourced from China, so you can find the cheapest products available on Alibaba. Many of the sellers on Alibaba will also offer free shipping if you make a large purchase, which helps lower your costs even more.

The downside to Alibaba is that you have to pay a fee in order to make purchases and there is no way of knowing if some listings are scams or not… Some people have also been ripped off by Chinese manufacturers who claimed to sell authentic merchandise but it was actually cheap knockoffs.

  1. Discount Supplements Supplier Listing.

The Discount Supplements website is a great place for finding wholesale deals for your dropshipping store. They list a large amount of suppliers that offer products in different countries, so it’s the most convenient option to find wholesalers that offer good prices to your target country.

You can also mention which country you are targeting when searching on the website, which helps narrow down the results even further. You can also check out their blog pages on Facebook and Twitter, so you’ll often be able to get more information about the businesses selling on their site.

  1. Amazon.com

Many people don’t know that you can actually sell goods on Amazon.com. They have a site called the Amazon Marketplace which is great for finding wholesale deals, and you can also take advantage of their huge traffic numbers and exposure to millions of potential customers! I’ve actually used it quite a lot in the past to find and sell goods, but I mainly stick with eBay now because it’s easier to get sales and feedback on eBay than Amazon.

  1. Wholesale Central

Wholesale Central is one of the better options for finding wholesale deals for your eBay auctions. They have a massive selection of products that you can choose from and they also have a blog where they often write about new businesses that sell on their site.

You can also join their SMS list to get updates about new stores that are selling on the Wholesale Central website. They will send you an SMS message with links to the latest stores, so it’s one of the most convenient ways to find new wholesalers in your niche.

  1. uTrades

uTrades is a great website for finding wholesale deals for your dropshipping store. They have over 5 million products that you can search through, as well as a lot of suppliers who offer free shipping to your target country.

Unfortunately there are not a lot of wholesalers available on uTrades, which is the biggest downside to their site (and many other wholesalers sites). However, there are still plenty of wholesalers willing to sell once you have built up an email list and built up good ratings on eBay.

Hopefully this article gave you some ideas of where you can find buyers for your wholesale deals.

What Trends Are Shaping The Small Business Environment

The 2020s are shaping up to be an interesting time for business owners. A lot of the trends are rooted in how things have changed, with new ways of doing businesses and roles. The global pandemic has made a significant impact on the way different countries and regions operate. These trends will make sure you stay afloat as a business owner through 2021.

The top 12 business trends for 2021 not only set out how businesses need to navigate through these global changes, but also show the importance of looking at what’s going on around you before taking any major decisions or investments into your company’s future.

The Top 12 Business Trends

  1. Price Tag: Pricing In The Era Of Price Gouging And The Global Pandemic Price-gouging is a common term used in the United States that refers to an increase in consumer price above the standard market rates, in response to a supply or demand surplus or drought. It can also be used to refer to a supply shortage in a market, which results in the same result as the former. When this happens, the price of a product or service often rises.
  2. World’s No. 1 Global Pandemic – Global Pandemic 2020 Projections. A global pandemic impacts social and economic systems around the world, making them weaker and exposing them to greater risk. While no single global pandemic has been as widespread as the current one, a new pandemic is inevitable, according to Ray A. Walser in his book “Pandemics”, 2005
  3. Rethink Business Models And Product Development to be “Open Source”. The best example of this is the open-source software model, which has been helping computer manufacturers save money and improve products since the late 1990s. In fact, Google’s Android operating system is based on Linux, a free and open operating system that was based loosely on the GNU Project and was created by Linus Torvalds in 1991. The open-source movement can be applied to all types of businesses and even the services that a business provides. For example, a business might keep its financial practices or legal negotiations open for everyone to read or a product developer might let open-source programmers have access to the source code for a product being developed.
  4. DIY – Do It Yourself – Entrepreneurship. The best example of the do-it-yourself (DIY) entrepreneurial movement is Apple, which was started by Steve Jobs and Steve Wozniak in 1976 as a manufacturer of personal computers. Jobs and Wozniak built their first prototype in Jobs’s parents’ garage, and were able to quit their day jobs at Atari after three months. In the early 1980s, Apple started moving from computers to consumer electronics with the introduction of mice, keyboards, music players, laptops and even a modem with a software as a service (SaaS) model for iPhone as an example. However, by the late 1990s there were two main trends at work with Apple: smartphones (which became the iPod) and mobile computing (which became popular with the iPad).
  5. Ideas-Based vs. Material-Based Economy. For the past 200 years, the United States and Europe were part of a physical economy. A farmer would grow crops, an artist would produce paintings and a cobbler would make shoes. In the early 21st century, the global economy is becoming increasingly ideas-based. The two most prominent examples of this are Apple and Amazon (AMZN). Apple is primarily an ideas-based company that uses technology to transform mobile phones into music players and mobile phones into tablet computers. Amazon is an ecommerce giant that sells everything from books to diapers online – with no brick-and-mortar stores to take up real estate.
  6. Human Capital and Currency: Employee Benefits and Paid Time Off. The best example of this trend was the debate over paid time off (PTO) in the United States in the early 21st century. In 1999, California was the first state to pass a law requiring companies to offer vacation time to their employees. The law wasn’t put into action until 2012, when President Barack Obama signed a bill that mandated employers with more than 100 full-time workers provide five paid days of holiday each year. The law went into effect in 2015, when it was the state of California’s turn to set its PTO policy.
  7. Connected Cities. The best example of this is Google Fiber, which promises bandwidth speeds 100 times faster than what most Americans have today. As a result, Google Fiber will flatten the internet service providers (ISPs) and cable TV companies that currently provide broadband services in cities throughout the United States. Google Fiber has been slow to get its network up and running due to many challenges, including distance from customers’ houses and cost of rolling out fiber. However, it is still an example of how the internet is changing the way we live and work for the better.
  8. Globalization, Population Growth And Exploding Suburbs. Globalization refers to how companies and governments are connected and connected together by international trade, global business and foreign affairs. Politics and economics affect one another directly or indirectly, like the U.S.-China Trade War in 2018, Population growth refers to how populations throughout the world are growing at a rate that was unseen at any point in human history; while suburban living is common throughout developed economies in Europe, Asia, North America and Australia. In the case of the Detroit metropolitan area, for example, a 2010 U.S. Census population estimate found that 85 percent of people living in suburbs were white, 12 percent were black and more than 1 million people lived in poverty – the highest of any nation on Earth outside South Africa.
  9. Selling Land and “Virtual Real Estate”. The best example of this is the real estate industry, which is continually changing due to developments like the introduction of digital cameras (which started in 2005) and digital photo editing software (which was introduced in 1998) that allow pictures to be shared on social media platforms like Facebook and Instagram. This has led to an increase in online real estate agents who sell various types of real estate, including homes, vacation homes, commercial real estate and even properties located on islands or water.
  10. Social Media And Online Journalism. The best example of this is The Huffington Post (which was launched in 2005 by then-owner AOL), which offers a platform for anyone to share their opinions without being monitored or edited by a third party. This includes social media platforms like Facebook, Twitter, Instagram and LinkedIn. These are all examples of how social media has changed the way news is consumed by the masses.
  11. Social Networks Like Facebook, YouTube And Instagram. The best example of this is Facebook’s use of fake news that manipulated the 2016 U.S. presidential election. The platform allowed fake news websites to publish false content on their platform with no repercussions for doing so – thus helping to put Donald Trump in the White House.
  12. Smartphones And Smart Home Tech. The best example of this was the introduction of the smartphone in 2007, which allowed users to use a mobile phone-based version of a computer while paying for it monthly. This was followed by smart home technology, including devices like Amazon Alexa and Google Home that allow users to control their homes from a central location.

According to a future shopping trends done by a team from the SparkleTeddy discovered that the happiness derived from getting married is equivalent to a pay raise of £53,833, or approximately $106,169.44 (according to Google). Excellent health is worth £304,000 ($599,548.80) whereas good health worth only a bump in pay of £251,000 ($495,022.20). Some would say that they’d take the $160k over getting married…

What’s interesting about the study is the fact that income didn’t matter, just relative changes. That is say, you aren’t happier by default if you make $100,000 versus $90,000, but if you increase from $90,000 to $100,000, you are actually happier. This, of course, is a concept that is studied over and over again in psychology and something you’ll often see in mainstream media.

I wouldn’t read too much into this but it’s certainly an intriguing study.

Bonus joke:

 Why is divorce so expensive?

 Because it’s worth it!

It is true that we get sucked into thinking that money buys happiness. If it were reality though then why are so many multi-millionaire celebrities so depressed, in drug rehabs, etc…?

 I am working hard for money, not necessarily for happiness but for freedom. I want so bad to be debt free and not be tied to my creditors anymore.

I don’t think money buys happiness. But the lack of money definitely creates lots of potential sadness!

There’s a fine line there, but for most people it creates the illustion that money buys happiness since when they don’t have it, they are not happy.

man..that’s deep…haha..but guess what…i’m still chasing the paper!! Although I empathize with the mimimum wage workers, but can you imagine everybody making 40K a year?? haha..going to McDonald..that would be $22.50 please for a Happy meal…..20oz coke at a gas station, that would be $7.85 please? how about $14 a gallon gas?

There is a reason why we keep minimum wage low.

maybe if some of the absurd CEO salaries/perks were lowered, then minimum wage could be raised without affecting the cost of your happy meal, no? (Not saying all CEO pay is absurd, but some of it…)

true true..but why stop there..how about the mulitimillion dollars athletes? singers? actors?…i’m not trying to defend the CEOs of America. We can’t turn this country into a Utopian lala land…we are built on capitalism. I do believe that minimum wage should be around 7 bucks an hour or at least keep up with inflation.

It’s funny what people say and their actions. Everyone wants to be seen as not greedy and generous, but in actuality many people are ruthless and sacrifice other things in the pursuit of money. But to me thats just capitalism-survival of the fittest!

In Maryland the minimum wage is 6.75 and all the prices are comparable to other places… So that argument needs a little work…

How many people actually work full-time minimum-wage jobs? Most studies I’ve seen show that something like 40% of the minimum-wage workers are students or teenagers. A better way to help the working poor is through the earned-income tax credit. Increasing the minimum wage will just drive more jobs underground.

Great post. I think too many of us–pf bloggers and non-pf bloggers alike–are too focused on making money and on comparing ourselves to others based on our financial worth. It’s always a good idea to step back and bring everything into focus. Thanks for the reminder.

Many people have different views of happiness. And I think in today’s world that view is something that just seems so unattainable that folks just stay in the “rat race” forever to chase that uncatchable ideal. Good job highlighting that in this post.

I think being happy would include having the ability to do whatever one wanted to do, whenever one wanted to do it! I think that would take some money though, for most people.

Lua & C++ – The Basics

With Lua, almost anything is possible. It is akin to JS, but in some ways, it is so much more powerful. With World of Warcraft incorporating Lua right into its core, you have to wonder how powerful you can make it. One of the things that make Lua so powerful is its easy integration into C++ and C. With this integration; you can accomplish just about anything. Today, we are going to go through the steps to get some essential interaction between C++ and Lua.

So you may be asking yourself, “What is the major advantage of using Lua with C++?” Well, the answer is as simple as the question. You don’t have to compile Lua; therefore, you can change the script on the fly, and get different outcomes in the program. Most of the time, you use Lua for user interfaces, but the possibilities are almost limitless.

We are going to be using visual studio. Visual C++ is pretty close to standard C++, so if you want, you should be able to adapt this any way you want. But, to start, we have to create a project.

This case is unique because we do not want pre-compiled headers for this project. By default, pre-compiled headers are turned on, but you can disable them during the project creation process. For today, we are going with a C++ console application. The only difference is the header’s checkbox, which you need to uncheck. I have provided a nifty screenshot to help you out.

Ok, now that we have a shiny new C++ project ready to go, we need to get Lua all straightened out, which honestly can be a pain. The Lua site is less than user-friendly so that I will point you in the right direction. What you want to do is go to the Binaries Downloads and pick up the “Windows x86 DLL and Includes”, which like it sounds, includes the C files we will need to get the job done. I do not know the source of the class, but the Script class is a must for simple actions between Lua and C++. If you are feeling a little lazy, you can download the VS Solution, and that has everything you need.

Once you have everything extracted, what you need to do with your files is simple, put them all into your VS project folder. You can add existing items or what I prefer to do is open up the folders and copy them. Remember that the includes folder in the Lua package should not be copied, just the contents inside.

Notice that all of the files are in one folder, there are no sub-folders. This makes it easier for everyone. It makes it looks like a lot of files, but using the files is not difficult at all. In fact, to implement the simple use of a Lua script, all we have to do is include our special Script class. In VS, right-click on your project, and goto add then existing item. Then find your project folder and add script.h and script.cpp.

Once those are added, now you have to include the script class into your c++ project. Since I am assuming you know the basics of c++ here, I will list the code:

#include "Script.h"

It’s that simple. Just add some files and include the class. But using this class is even simpler. The class itself has only a few methods, and today we are going to play with getting variables from Lua. But first, we need a Lua script to use. My script looks something like this:

PROGRAM_NAME = "C++ Lua Script Testing"
 PROGRAM_VERSION = "0.1A"
 SCREENWIDTH = 1920   
 SCREENHEIGHT = 1200
 COLORDEPTH = 32
 FULLSCREEN = false

Pretty basic, so much so that you don’t have to understand Lua to know that all we have is variables. We are going to use c++ to grab and display these variables. First, using the same process as above, you need to add your Lua file to your project. Once added, you can load it into c++. To do that, we need to use the

Script script;
 string sName = "script.lua";
 
 if(script.loadScript(sName.c_str()) == false)
 return 1;

As you can see, all you have to do is my a Script object, then call the loadScript method. It will return false on an error, so we want to test for that. Now, once the script is loaded, we can grab variables from the script with a set of effortless methods called getGlobal. There is one method for each primitive data types so that we can use them with the following:

string name = script.getGlobalString("PROGRAM_NAME");
 string version = script.getGlobalString("PROGRAM_VERSION");
 int width = (int)script.getGlobalNumber("SCREENWIDTH");
 int height = (int)script.getGlobalNumber("SCREENHEIGHT");
 int color = (int)script.getGlobalNumber("COLORDEPTH");
 bool fScreen = script.getGlobalBoolean("FULLSCREEN");

It is that easy, at least using our nifty script class. There are limitations, but this will give you a good start. Once the values are loaded, you can, of course, do whatever you want. But what makes it better, is that you can change the values in the script, without recompiling the program. So you can change true to false, 10 to 20, and so on.

So for this tutorial, this is where we wrap it up. Before I wrap up, I want to note that there are other ways to accomplish this, but this is what I was thought, so if you have a better way, please share.

C++ Tutorial – Sorting STL Containers

Welcome to the first C++ tutorial ever written in here. Our tutorials are typically centered around C# and Flex, however lots of people in the world (including me) program in C++ every day – and the standard template library is an integral part of any modern C++ project. This tutorial is going to demonstrate how to use the built-in algorithms to perform custom sorting on standard template library collections.

The STL object I’m going to be using as my example will be a vector, which is one of several containers offered by the library. To use a vector, you’ll have to include <vector>. All of the algorithms, like sort, are located in <algorithm>. And of course, everything inside the standard template library is located in the std namespace.

Let’s start by using the simplest form of sort.

using namespace std;

//create a vector
vector<int> v;

//populate the vector
v.push_back(2);
v.push_back(3);
v.push_back(1);
v.push_back(5);
v.push_back(4);

//sort the vector
sort(v.begin(), v.end());

//v = {1, 2, 3, 4, 5}

This use of the sort function will sort the elements by applying the < operator on each element. So if you were populating this vector with your custom objects, you’d have to define the < operator to sort them. The sort function takes two iterators, which are essentially pointers to objects inside the collection. The begin() and end() functions return iterators that point to the first element and the last element respectively. Since sort will sort the elements between these two iterators, you could sort just a portion of the vector if you wanted:

using namespace std;
 
 //create a vector
 vector<int> v;
 
 //populate the vector
 v.push_back(2);
 v.push_back(3);
 v.push_back(1);
 v.push_back(5);
 v.push_back(4);
 
 //sort the last two elements
 sort(v.begin() + 3, v.end());
 
 //v = {2, 3, 1, 4, 5}

All right, enough with iterators. Let’s look at another version of the sort function. One that takes a functor instead of using the < operator.

Using namespace std;
 
 //create a vector
 vector<int> v;
 
 //populate the vector
 v.push_back(2);
 v.push_back(3);
 v.push_back(1);
 v.push_back(5);
 v.push_back(4);
 
 struct reverseSort
 {
  bool operator()(int a, int b) { return b < a; }
 };
 
 //sort the elements using custom functor
 sort(v.begin(), v.end(), reverseSort());
 
 //v = {5, 4, 3, 2, 1}

Functors are typically just functions or function pointers, but they are also objects that define the () operator. Here I created a struct that defines the () operator and takes two integers as arguments. The sort function will now use this functor to compare objects in my collection. In my example, I reversed the default comparer, which will sort the vector in the reverse order – largest to smallest.

The functor object passed into sort must be a Binary Predicate – that is a function that takes two arguments and returns a boolean. The sort function is also not stable, meaning if two objects resolve to the same value, their orders in the list are not guaranteed to be the same as they were before sort was called. If stability is required, stable_sort will get the job done.

That’s pretty much it for sorting standard template library containers. The sort function uses the introsort algorithm, which has a complexity of O(N log(N)) and is a hybrid of QuickSort and HeapSort.

Simple Chat with Node.js + WebSockets

One of the best use cases for Node.js is real-time applications that handle lots of small requests simultaneously. A perfect example of this is a small chat application that allows multiple users to connect and send messages to each other. So today we are going to build this.

We are going to be utilizing a technology called WebSockets, which will allow us to communicate between all of the users of our application quickly. We are using WebSockets via a Node module called Socket.IO. However, before we can dig into all the communications, we are going to need some Node code.

For static content, we are using Express. Maybe a little overkill, but it does the job. The base app.js file will look like so:

var express = require('express');
var app = express();
var server = require('http').createServer(app);

server.listen(80);
app.use("/", express.static(__dirname + '/public'));

Nothing special. What we need now though is some Socket.IO action. We need to accept an incoming message then blast it out to everyone else that is listening to our server. Thankfully it is a small tweak on the server-side:

var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);

server.listen(80);

app.use("/", express.static(__dirname + '/public'));

io.sockets.on('connection', function (socket) {
  socket.on('msg', function (data) {
    io.sockets.emit('new', data);
  });
});

Yeap, a require statement and two callbacks later we have our server-side code. Basically what this is doing is waiting for a connection, then when a connection is established, it subscribes to the “msg” event that happens when a client sends a message to the server. When this happens, we send the message to all connected clients, or “sockets” as they are called in this case — simple stuff.

The client is a bit more complicated though. Let’s start with the HTML, which is pretty straight-forward.

<!DOCTYPE HTML>
 <html>
 <head>
  <title>Simple Chat</title>
  <script type="text/javascript" src="/socket.io/socket.io.js"></script>
  <script 
    type="text/javascript"
    src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
  </script>
 </head>
 <body>
  <div id="wrapper">
   <h1>Simple Chat</h1>
   <div id="messages"></div>
   <div class="nic">
    Your Name
    <input id="name" name="name" type="text"/>
   </div>
   <textarea id="message"></textarea>
   <input id="send" type="submit" value="Send"/>
  </div>
 </body>
 </html>

The important bit here is the inclusion of /socket.io/socket.io.js. This is the client-side piece of socket.io and will provide us with a simple way to communicate with our server. The coolest part is that the socket.io Node module sets up this route for us on the server, so we don’t have to do anything server-side to get this route to work.

To organize our chat code, we are going to create a JavaScript module which will provide a single, global instance to utilize. To start, let’s just get the module code:

//Create a chat module to use.
 (function () {
 window.Chat = {
 };
 }());

This will create a single instance of the Chat object in the global scope. However, we are going to need our Chat object to do something. Initialization is always pretty important, so we can add that next.

//Create a chat module to use.
 (function () {
 window.Chat = {
  socket : null,
 
  initialize : function(socketURL) {
   this.socket = io.connect(socketURL);
 
   //Send message on button click or enter
   $('#send').click(function() {
    Chat.send();
   });
 
   $('#message').keyup(function(evt) {
    if ((evt.keyCode || evt.which) == 13) {
     Chat.send();
     return false;
    }
   });
 
   //Process any incoming messages
   this.socket.on('new', this.add);
  }
 };
 }());

In the initialize method, we are setting up the socket.io connection, subscribing to the new event, and making sure the send button and enter key do something productive. There is just one problem here, we don’t have an add function for the socket.on call to use. Let’s add that.

//Create a chat module to use.
 (function () {
 window.Chat = {
  socket : null,
 
  initialize : function(socketURL) {
   this.socket = io.connect(socketURL);
 
   //Send message on button click or enter
   $('#send').click(function() {
    Chat.send();
   });
 
   $('#message').keyup(function(evt) {
    if ((evt.keyCode || evt.which) == 13) {
     Chat.send();
     return false;
    }
   });
 
   //Process any incoming messages
   this.socket.on('new', this.add);
  },
 
  //Adds a new message to the chat.
  add : function(data) {
   var name = data.name || 'anonymous';
   var msg = $('<div class="msg"></div>')
    .append('<span class="name">' + name + '</span>: ')
    .append('<span class="text">' + data.msg + '</span>');
 
   $('#messages')
    .append(msg)
    .animate({scrollTop: $('#messages').prop('scrollHeight')}, 0);
  }
 };
 }());

Take some message data and add it to the DOM, that’s all we are doing here. Nothing special.

The final piece to this puzzle is sending the data.

//Create a chat module to use.
 (function () {
 window.Chat = {
  socket : null,
 
  initialize : function(socketURL) {
   this.socket = io.connect(socketURL);
 
   //Send message on button click or enter
   $('#send').click(function() {
    Chat.send();
   });
 
   $('#message').keyup(function(evt) {
    if ((evt.keyCode || evt.which) == 13) {
     Chat.send();
     return false;
    }
   });
 
   //Process any incoming messages
   this.socket.on('new', this.add);
  },
 
  //Adds a new message to the chat.
  add : function(data) {
   var name = data.name || 'anonymous';
   var msg = $('<div class="msg"></div>')
    .append('<span class="name">' + name + '</span>: ')
    .append('<span class="text">' + data.msg + '</span>');
 
   $('#messages')
    .append(msg)
    .animate({scrollTop: $('#messages').prop('scrollHeight')}, 0);
  },
 
  //Sends a message to the server,
  //then clears it from the textarea
  send : function() {
   this.socket.emit('msg', {
    name: $('#name').val(),
    msg: $('#message').val()
   });
 
   $('#message').val('');
  }
 };
 }());

With socket.io, you do two things: listen to events and trigger events. You listen with on (as we have seen), and you trigger events with the emit method. So when a message is ready to be sent, all we have to do is “emit” it with the message data. It will then be picked up on the server and emit it back out to all the sockets connected.

The only thing left to do is include it in the HTML and initialize it.

<!DOCTYPE HTML>
 <html>
 <head>
  <title>Simple Chat</title>
  <script type="text/javascript" src="/socket.io/socket.io.js"></script>
  <script 
    type="text/javascript"
    src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
  </script>
  <script type="text/javascript" src="chat.js"></script>
 </head>
 <body>
  <div id="wrapper">
   <h1>Simple Chat</h1>
   <div id="messages"></div>
   <div class="nic">
    Your Name
    <input id="name" name="name" type="text"/>
   </div>
   <textarea id="message"></textarea>
   <input id="send" type="submit" value="Send"/>
  </div>
  <script type="text/javascript">
   $(document).ready(function() {
    Chat.initialize('http://localhost/');
   });
  </script>
 </body>
 </html>

There it is, a complete chat application. If you run the Node script, it will start up and let you know socket.io is ready. Then you can bring up localhost and start chatting with…well, yourself if you run it locally.

Hopefully, this has been an informative, quick introduction to using WebSockets in Node.js.

Come to lunch with Animated Yorkshire at Bradford Animation Festival

On Friday 11th November, 12-2.30pm, the Bradford Animation Festival hosts the panel event Tenacity and Talent – How to survive and thrive in animation, at National Media Museum, Room at the Top, Bradford.

A panel of award-winning animators share their experiences of making creative and commercially successful work – from apps, to ads to architecture.

The panel consists of:
Tim Searle Tim runs Baby Cow Animation with comedy creators Steve Coogan and Henry Normal. Credits include Horrible Histories, The Catherine Tate Show and Have I Got News For You.
Rob Millington Rob is Lead Creative with The Neighbourhood , a creative studio working across architecture, advertising, design and broadcast. They have worked with Sony Playstation, Renault, BBC, Wallpaper* Magazine, Stella McCartney, Fulham Football Club and Heston Blumenthal.
Linda McCarthy Filmmaker specialising in stop-motion animated films running her own company Tiny Elephants since 2007 . Linda collaborates with cartoonist Steven Appleby in making a series of films Small Birds Singing, which have been screened at Festivals around the world and for this year’s Ident for Bradford Animation Festival
Mole Hill Stop motion Animator/director/designer. He has worked as an animator on
numerous series Ooglies, Fifi and the Flowertots and many commercials such as Dairylea Cows and Cadbury’s Creme Eggs.
David Bunting David has had a varied career in animation, working on feature films including Thunderbirds (2004) and Disney’s The Tigger Movie (2000). He’s worked as a
storyboarder for Shaun the Sheep series 2 (2008).and as a producer on award-winning digital short The Astronomers Sun. Dave also teaches animation to children, young people and BA and MA animation students.
Matt Howarth Former Head of 3D and Digital Effects for Granada TV in Manchester. Matt has since founded Puppetman Productions, an animation and special effects company based in Halifax. He’s worked on major education series for Channel 4, the BBC and Discovery Kids. He’s produced interactive games for CBBC and CBeebies and has recently released his debut game on the app store.

Responsive Web Design Testing Resources

As far as responsive web design is concerned, testing is one of the most crucial aspects of this truly complicated process. It’s not just about writing the code and figuring out the layout and the design, but you also have to be adamant in your strive for perfection by constantly testing the product again and again and looking for flaws in what is otherwise a perfect symphony of mathematical precision.

Indeed, the process is difficult, but there are lots of tools to help you along the way in this inexorable march towards a flawless product. It is in the irrevocable nature of the responsive web design that you have to always be on your guard and not let your guard down even for a second. Otherwise, mistakes might be made that will put your whole project in jeopardy. Fear not, though, as I will present you with some of the most useful weapons to combat those dire eventualities and forever detriment the rise defects and imperfection in your work. If perfection is what you’re after, then you will definitely need some of these tools.

Respondr

The invaluable companion to anyone who is searching for anomalies in one’s design, Respondr is a pretty small and easy to use tool. It enables you to check the results of your work through the eyes of various devices without actually having to own those devices. Have you got the dimensions right? Are the pictures displayed properly? Is the site loading with a regular speed? Answer these questions and more with the help of this little gem. Just paste the URL of the site you want to test and then pick the setting of the device and viola – you’re done! It’s a truly amazing yet unimaginably simple tool, but you know what they say – everything genius is simple.

Viewport Resizer

In a pretty similar fashion like Repondr above, VR enables you to copy and paste the URL of the site you want to test and the settings you want to test it with. This little program has more variety in options, though, as it lets you go from a small smartphone to an HDTV and even though I doubt most people use their 49” plasma to browse the web, when you are after perfection, then you are not allowed to make any compromises, even if it’s a huge improbability that anyone will ever see your site in this manner.

Responsivator

You already know the drill – enter URL, pick dimensions of testing. If you’re already getting a sense of deja vu, you should – you’ve already seen it. But of course you, these tools are similar and have the same functions using the same methods – what did you expect? Still, there are small differences between all of them. In this case, the difference comes from the fact that this tool lets you also use a custom resolution or screen size in order to test it, which is pretty neat if you’re trying to pull something interesting and truly creative.

Screenfly

Guess what this tool does. If your answer is “creating a virtual fly on your screen just to annoy you or scare your girlfriend,” then you haven’t been paying much attention to the article so far. It lets you enter a URL to test a site, choose the dimensions you want to test and also enables you to share a custom link with others to test the site, which is what makes it different from the other programs or applications in here.

Well, you can choose one or more of these to test your site and create something truly beautiful and unique. Good luck!

Forget Retirement? In Central America You Don’t Have To

The recent economic downturn has diminished 401(k)s, scrambled nest eggs and devastated retirement plans. According to data from the Center for Retirement Research, 51 percent of households are at risk at age 65 of not having enough retirement income to maintain their pre-retirement standard of living.

The key question is no longer “How early can I retire?” but “Will I be able to have a comfortable retirement?”

The future appears dismal and many people are finding it hard to decide what to do. But others have stopped whining about the economy and are out looking for an alternative. They’ve run the numbers and realized that moving overseas for their retirement makes more sense than growing old in the US.

Given the region’s close proximity to the US, Central American counties are often at the top of the list of overseas retirement destinations. So what is it about the region that makes it attractive to retirees?

Cheaper cost of living and affordable real estate

According to data compiled by Reveal Real Estate, it is possibly to live comfortably in Costa Rica or Belize on less than $1,800 a month. Those very worried about their finances can bring the number down to as low as $1,300 in the dollar-stretching economies of Panama or Nicaragua. The cost of beach or golf property is also far lower in Central America than the US or Canada, with Nicaragua real estate being the cheapest in the region.

Tax breaks and ease of residency

Central American countries are actively eying the retirement demographic and rolling out the welcome mat to woo retirees to their borders. Panama, Costa Rica, Belize and Nicaragua all have attractive retiree programs offering good tax breaks, no restrictions on property or business ownership (an important factor for those who wish to work during their retirement) and straightforward residency programs.

Amenities and a sense of community

Of course retirees can’t just pick a spot and expect to find good local hospitals, grocery stores full of western goods, golf courses and thriving expat communities. Some areas of Central America have unmaintained roads and dire infrastructure. Most retirees begin their research in the most mature destinations such as Ambergris Caye in Belize, the Central Valley of Costa Rica or Panama City in Panama, and only then expand outwards to the more ’emerging’ and undeveloped areas.

Healthier lifestyle and lower health care costs

Health care costs are a prime consideration for retirees. The good news is that many surgeries and medical procedures can be performed at about 30 percent of the cost of the US. The bad news is that hospitals offering a US standard of service are few in number and often only restricted to the capital city. (On the other hand, it’s also often ignored that expanding horizons, meeting new people and adapting to new cultures may make retirees healthier and more mentally energized.)

Avoiding currency fluctuations

By choosing their retirement country carefully, US retirees can avoid worries over currency fluctuations. For example the official currency in Panama is the US Dollar and the Belize dollar is pegged to US dollar.

So before you resign yourself to giving up on that dream of an ocean-side retirement home. Remember that things might not be as bad as they seem. If you are able to expand your horizons beyond US borders you may find it possible to have a comfortable retirement, with all the trimmings, for far less than it would cost back home.

Save Money By Learning Good Shopping Habits

I love finding bargains and deals, and even in this economy, they are possible. I get my bargains from many sources and using several methods; I can share with you what I have learned. There are many ways to trim dollars and cents off of your shopping budget. Being prepared and gaining insights into buying and selling patterns of stores, manufacturers will help you master the art of saving. My top tips to get the most out of your spending dollars.

1. Patience is a virtue.

Collect and clip insert coupons and internet coupons, many sets if possible. Many coupons offer great discounts if you can learn when to redeem them. Many times I have gotten a better bargain by holding on to coupons and keeping a lookout on special sales and clearances. It isn’t always best to redeem them as soon as you acquire them. If a coupon is valid for 6 months, Keep your eye on sales papers for loss leader sales. By redeeming coupons then you can save extra discounts over what you would have saved if you had used it on a regular price item. I often use coupons on manager specials of food items that are about to expire, Buying these items then and freezing will save you money. If such a sale hasn’t appeared within five and half months, Go ahead and use it if you buy that item regularly for your household. It is better to save those few cents than not.

2. The 4 Seasons of Shopping

Retail stores have cycle patterns of when they put items on sale and clearance. Pay close attention to your regular stores and learn that pattern to maximize your savings. I always buy Christmas and Winter Holiday items week after the holiday and after the beginning of the new year depending on how the store does it markdown cycle. It is cheaper to buy ahead of time for the next year than buy for that year right before the holiday.

3. Be the Teacher, Become the Student.

The best thing I have learned that helped me save is finding a friend or an online community to ask questions and compare strategies. I have learned from people here how to watch for deals, avoid wary websites, and learn the true prices of items to be able to identify if sale prices were real or just a regular priced ploy. Once you learn to recognize true prices, That will help you avoid overpaying. When you get a chance, share what you learned with others. Smart consumers make for a better marketplace.

4. The Codes are the Keys.

Most of my purchases online involve promotion codes or coupon codes. These promo codes are great combined with clearance sales and no minimum purchase free shipping offers. Many websites have user-submitted databases of promo codes and checking them every time you make a purchase is a good habit.

Learning these habits and even developing your own strategies can increase savings by cutting out impulse regular priced purchases. Improving your buying skills will give you power over your budget and keep you in good financial shape.

What are your strategies and habits that you have learned to save money? Share in the comment area below.