_Amazon Associates No Longer Valid for Connecticut Residents

Amazon.com Associates

I have a problem with Governor Malloy of Connecticut.  His policies are not doing anything to grow the state.  Yes, we are in a financial recession.  Yes, the state has a pretty big deficit but the policies he has proposed or implemented in the first 6 months of office have not made Connecticut enticing to move to or stay in.  From raising income tax, sales tax, sales tax on clothing to taxing pedicures, tax on home buyers and now this.

Amazon.com had a nice little program for associates.  Launched in 1996, the program is one of the most successful affiliate programs on the internet.  It helps store owners, Amazon sellers and developers make money by advertising products from Amazon.com and it’s subsidiaries.  I could build a store front or link to a particular product.  If that product was purchased I would get a little percentage of the transaction.

Well, Governor Malloy decided he wants a piece of the action.  He is imposing a tax on any of the transactions that take place.  This is counterproductive to the whole idea of what Amazon put in place.

As of today, June 10 2011, this program is officially canned for Connecticut residents.  Nice job Malloy, take away yet another thing.

Here is the letter from Amazon:

Hello,
 For well over a decade, the Amazon Associates Program has worked with thousands of Connecticut residents. Unfortunately, the budget signed by Governor Malloy contains a sales tax provision that compels us to terminate this program for Connecticut-based participants effective immediately. It specifically imposes the collection of taxes from consumers on sales by online retailers - including but not limited to those referred by Connecticut-based affiliates like you - even if those retailers have no physical presence in the state.
We opposed this new tax law because it is unconstitutional and counterproductive. It was supported by big-box retailers, most of which are based outside Connecticut, that seek to harm the affiliate advertising programs of their competitors. Similar legislation in other states has led to job and income losses, and little, if any, new tax revenue. We deeply regret that we must take this action.
As a result of the new law, contracts with all Connecticut residents participating in the Amazon Associates Program will be terminated today, June 10, 2011. Those Connecticut residents will no longer receive advertising fees for sales referred to Amazon.com, Endless.com, MYHABIT.COM or SmallParts.com. Please be assured that all qualifying advertising fees earned on or before today, June 10, 2011, will be processed and paid in full in accordance with the regular payment schedule.
You are receiving this email because our records indicate that you are a resident of Connecticut. If you are not currently a resident of Connecticut, or if you are relocating to another state in the near future, you can manage the details of your Associates account here. And if you relocate to another state after June 10, 2011, please contact us for reinstatement into the Amazon Associates Program.
To avoid confusion, we would like to clarify that this development will only impact our ability to offer the Associates Program to Connecticut residents and will not affect their ability to purchase from www.amazon.com.
We have enjoyed working with you and other Connecticut-based participants in the Amazon Associates Program and, if this situation is rectified, would very much welcome the opportunity to re-open our Associates Program to Connecticut residents.
Regards,
The Amazon Associates Team
Jun
10
2011

_jQuery Accordion with 8 Lines of Code

Ok.  Maybe more than 8 lines of code but very little.  I have been working with another agency (that will rename nameless) on a mobile web site for a client of ours.  The agency provided the HTML/CSS/Images and Script for our technology team to implement.  We hook up all the back end and call it a day.

The section that came into question was an ‘accordion’ style UI for a set of FAQ’s and other content.  When I first loaded up their pages, everything worked fine.  Upon further inspection of their code I noticed a lot of JavaScript libraries that were not needed.  They included jQuery AND Prototype along with some effects and accordion scripts.  (Prototype alone is almost 100kb in file size and the other scripts were 42kb.  That still does not include the 70kb for jQuery)  I thought to myself, this is a mobile site…why have extra scripts if not needed.  To make matters even more funny, we are supporting Mobile Safari (iOS), Mobile Chrome (Android) and the BlackBerry Browser (RIM), it does not work in BlackBerry at all.  Forget enabling or disabling JavaScript it just does not work.  Even the elements are hidden.

So it got me thinking about the old saying, “if you want something done right you have to do it yourself”.  So I did.

I removed all the libraries except for jQuery and made all of the elements visible by default.  Basically if a user does not have JavaScript enabled then they can see everything.

Here is my HTML

<div>
     <a href="#">Really Great Information</a>
     <div class="accordion_content">
          Content that will expand
     </div>
     <a href="#">Really Great Information</a>
     <div class="accordion_content">
         Content that will expand again
     </div> 
</div>

Styles and other HTML can be wrapped around it. You can change the paragraph tags to div’s if needed but that is the structure you need more or less.

Now for the JavaScript.

Make sure you embed jQuery (I did from Google)

$('.accordion_content').hide();
//If JavaScript is not enabled, all content containers stay open, which is nice.

//Next, bind the click event to all of the targets, in this case all 'a' elements in the 'accordion_toggle' class
$('.accordion_toggle a').click(function(e){
     //code to come
});
//Within the click function we need to first check if the element being clicked is set as the 'current' which means open.  If it is, we need to remove the class 'current' and close the content container.
if($(this).parent().hasClass('current')) {
     $(this).parent()
          .removeClass('current')
          .next('.accordion_content').slideUp();
} else {
...
}

Then hide all open content containers:

If the element does not have the ‘current’ class then we need to first remove the ‘old’ ‘current’, close the ‘old’ ‘current’ and open and set the new ‘current’.

$(document).find('.current')
     .removeClass('current')
     .next('.accordion_content').slideUp();

$(this).parent()
     .addClass('current')
     .next('.accordion_content').slideDown();

Done.

Here is the final:

$(function() {
     $('.accordion_content').hide();
     $('.accordion_toggle a').click(function(e){
          if($(this).parent().hasClass('current')) {
               $(this).parent()
                   .removeClass('current')
                   .next('.accordion_content').slideUp();
          } else {
               $(document).find('.current')
                    .removeClass('current')
                    .next('.accordion_content').slideUp();
              $(this).parent()
                    .addClass('current')
                    .next('.accordion_content').slideDown();
          }
          e.preventDefault();
      });
});

Depending on how you format the code and what you count as a ‘line’ it can be about 8 lines :)

Demo here – View in Mobile Browser.  Desktop browser will work as well.  Works on iOS, Android, BlackBerry.

Mar
10
2011

_The Real Technology War

It seems every other day there is a new battle brewing in the digital landscape.  iPad vs eBook readers, iPhone vs Android, Apple vs Adobe, HTML5 vs Flash, Chrome vs IE9, Google Docs vs Microsoft Live Office…and the list goes on.  With every new battle that starts there is another blogger tweeter techie know-it-all that comes up with an article explaining why participant in this battle is better than the other or why one will not last.  AND to top that off, you have CEO’s of companies battling with these bloggers and other companies.  It is very soap opera-ish.  ”What will Steve Job’s do next?  Will Google Chrome take over the world?  When will Microsoft strike back?  Stay tuned till next episode to find out.”

I am neither a CEO or a know-it-all but I have a different point of view that people are missing.  Let me first start out with an analogy.  Think back to when you were a kid and watching Mutual of Omaha’s Wild Kingdom (if you don’t remember this show, think Animal Planet).  Theses were fascinating shows about wildlife.  All sorts of wildlife.  The big episodes or the episodes that were always cool to watch were with the Lion.  The Lion is the main event.  Always!  At every zoo and every show, when there is a Lion, people stop and watch.  So true with this show.  Sometimes two Lions would fight.  Sometimes they would just sleep all day.  Other times they would hunt some prey.  No matter what they were up too you were glued to the TV waiting for the Lion to attack…yes…a Wildebeest.  The Lion would sneak up on a herd and take one down.  They would feast for hours and then move on.

Now bear with me here, I am not comparing any of these technologies or companies to either the Lion or the Wildebeest, but just the battle.  The battle would produce a ferocious scene; dirt flying everywhere, animals watching and running, blood spurting.  Most of all, the Vultures would come to wait and benefit from the battle.  Once the Lion was done, it was their time to feast.

I am a Vulture.  I am going to feast on these battles.  Why?  It is because I am a technologist and I have too.  The way I look at it is this; sure one technology will probably overtake the other but until then I will support both and deliver both.  I will feast on the remains of the war of words and the war of the diverse technologies to deliver what is right, appropriate and on target to my clients.

Here is another example.  One of my clients is a Fortune 500 client.  Thousands of employees.  They all use IE6.  IE6 is bad.  Real bad.  Not only from a security standpoint but from a coding perspective as well.  It is buggy, renders CSS differently than other browsers, and requires a lot of extra effort to make it work.  There are sites out there that are not supporting it any more.  But when a client is paying you to develop a web site and they cannot view it on their computer or better yet from, ANY of their company computers, that is a big time #FAIL.  So what do we do?  We do what they want us to do and make it work.

There are 2 rules in Customer Service that I learned from Stew Leonard’s:

Rule #1: Customer is always right.

Rule #2: If Customer is wrong, see Rule #1.

As a technologist, I am not going to deliver a solution that only works on X percentage of the devices that are out there.  If I am building a web site, not only will it work in older browsers but mobile phones, netbooks, iPads, Android Tablets etc.

So what’s the point?

There are 2 points.

Point 1:  You don’t have to rely on one technology to do a job.  Each of the technologies in question came out because one does something different from the other.  The questions should be, what are you trying to accomplish?  Answer that first, then the technology will shake out from that.  I had someone ask me about HTML5 vs Flash and what do we do since Flash is not available on the iPad.  What are you trying to do?  Will your customers go to your site on an iPad?  If so, lets make an iPad enabled site and leverage what the iPad does best.  Keep Flash for the desktop based site.  What’s the problem with 2 or 3 different sites?  You don’t wear dress shoes to go running.  Choose the right tool for the job.

Point 2:   While companies argue and battle regarding what technology will win, I will need to support all of them until there is a winner.  By supporting all of them, I will deliver 100% coverage to my clients customers which makes everyone happy.

So the next time someone asks, “Will HTML5 take over Flash?” or “iPhone vs Android”,  your response should be “I hope it is a long battle”.

May
24
2010

_HTML 5 + IE 8 = #FAIL

IE8 Rendering HTML 5

I am testing out HTML 5 for some time now and what it can do over conventional HTML 4.x.  It is pretty cool.  The way it is structured with new tags and able to play video.  Add in CSS3 and you can get a really great looking web site.

The thing about HTML 5 is that it is not new.  It has been in the works since 2007-ish, albeit that it is NOT finalized, it is further along than you would think.  The latest version of web browsers like Firefox, Google Chrome, Safari and IE 8 support it…wait…IE 8!  IE 8 supports it?  Ah…that would be a NO.  Why?  Why not support it?  ALL of the other browsers do.  Microsoft’s answer is it is not finished yet.  But that never stopped them from supporting other technologies that no one ever adopted.  Is it because Google and Apple are the big proponents of HTML 5 and Microsoft is scared to come to the table?  Is it they are trying to come up with their own HTML?  What gives Microsoft?

Microsoft, the company that was on the forefront of all technologies is now holding back the web with in adequate browsers (don’t get me started on IE6 from the year 200) and not inventing and pushing the web like these other companies are doing.

Microsoft #FAIL

Chrome Rendering HTML 5

Feb
05
2010

_New Theme…again

I installed Magaling theme before the new year.  I liked the look.  My plan was to modify it to have jQuery Tools to work with it.  What I wanted was a tabbed interface where instead of clicking on the “nav” links, they would be tabs and you would slide to the next page.

Well, jQuery Tools did not play nice with WordPress.  I got busy with the holidays and some other jobs.  So I abandoned the idea for now, and installed a new theme.

Modern Style is what this is called.

Jan
20
2010