How to link to iTunes: iTunes Link Maker

Friday, January 23rd, 2009 | Tutorials | 11 Comments

I was just about to write a post about an album I’ve been listening to, and an audiobook I just finished “reading”.

I wanted to know how I could link directly to those items in iTunes.  Here’s how..

iTunes Link Maker

An official tool by Apple, it lets you find items in iTunes and link to them.

First you must enter the item you are searching for (I usually leave it as all media):

Apple iTunes Link Maker

Once you hit search, you see a results screen where all matching items are listed.  Click the arrow to the right of what you want to link to (keep in mind, clicking on the arrow next to an artist, will link to that artists page):

Apple iTunes Link Maker

Finally you get the HTML to copy from the page, and insert into your document!

Apple iTunes Link Maker

UPDATE

Recently I’ve discovered there’s a way to setup these links as an affiliate, to make 5% commission off sales made through your blog links.  Check out my article, iTunes Link Affiliate: How to Make Money Linking to iTunes Music

Tags: , , , , ,

Basic AJAX Tutorial: jQuery toggle and slide

Wednesday, January 21st, 2009 | Business, Tutorials | 20 Comments

In this tutorial we will review:

  • Definition of AJAX
  • Introduction to jQuery
  • Basic document jQuery preparation
  • Binding jQuery actions to an anchor (A) tag
  • Toggling visibility of a div
  • Sliding in and out of that div

It sounds like a lot, but it’s all very easy.

Definition of AJAX
The term AJAX means Asynchronous JavaScript and XML.  That means AJAX technically defines a method for javascript to communicate with XML.  Over the past few years AJAX has been interpreted as a means for implementing all “web 2.0″ functionality in the front end.  That added things like animations to the general term “AJAX”.





Introduction to jQuery
jQuery is one of my favorite libraries with a good toolset for working with AJAX techniques.  You can find out more information on jQuery at their site.

jQuery is a “fast and concise Javascript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development”.  Taken from the website itself.

As a javascript library, we will have to include the jQuery library on a page, and implement some of it’s more basic functions.

Basic jQuery document preparation
The first thing we need to do is incorporate the jQuery library in our page.  So download jQuery (direct link to the Google Code location).

Now that we have our JS library, we need to tell our document where it is (I renamed my js file to jquery.js, and threw it in the js folder):

<html>
<head>
     <script language="javascript" src="js/jquery.js"></script>
</head>
<body>

</body>
</html>

We inserted the SCRIPT tag to include the jquery library when the page is loaded.

Binding jQuery actions to an anchor (A) tag
Lets create a basic link in our document:

<html>
<head>
     <script language="javascript" src="js/jquery.js"></script>
</head>
<body>
     <a href="#">Click Here</a>
</body>
</html>

We now have a link that does nothing.  We are preparing to bind jQuery to the anchor.

Toggling the visibility of a div
We need to do 2 things to toggle the visibility of a div with jQuery.  First off, we need a DIV to toggle!  Second we need to bind jQuery commands to the anchor link.

We will take advantage of the jQuery toggle effect.

To do this, we change our code below:

<html>
<head>
     <script language="javascript" src="js/jquery.js"></script>
     <script language="javascript">
     $(document).ready(function() {
          $('#toggleButton').click(function() {
               $('#toggleSection').toggle();
               return false;
          });
     });
     </script>
</head>
<body>
     <a href="#" id="toggleButton">Click Here</a>
     <div id="toggleSection">
          Content to toggle on and off
     </div>
</body>
</html>

This step we did a lot.

First we added [id="togglebutton"] to the A tag.  That lets us identify it in the jQuery code.

Second we added the “toggleSection” DIV to the document.  The entire div will be toggled on and off.  Again, here we identified the DIV as “toggleSection” to be able to target it with the jQuery code.

Third, we added the jQuery code that actually does the toggling in the HEAD section of the document.  jQuery is a javascript engine, so we have to execute the commands in SCRIPT tags.  The first line of the code, “$(document).ready(function() {” is complicated.  Lets dissect this code.

Finally we put “return false;” in the code, that tells the link NOT to use the HREF value.  This means “#” will not be loaded.  It’s annoying, because that brings the browser to the top of the page in certain browsers.

$(document) — this is the HTML document itself.  It is the same as “document” in normal javascript.

.ready( — this is us looking at the “onLoad” part of jQuery.  When the document is ready, it executes  the “ready” method.  Here we are defining what the ready method is.

function () { — basically, we are creating a new function that will fill in for the document.ready method.  When the document is ready, our code will be executed.  This is smart, as executing code when the page isn’t ready can result in missing elements that aren’t loaded yet.

After that statement, we have “$(‘#toggleButton’).click(function() {“, another complicated statement.  Lets break it down:

$(‘#toggleButton’) — we are looking for the “toggleButton” via jQuery.  This code finds it for us.

.click( — Instead of setting the value of the “ready” method before, we are setting the function of when the “toggleButton” is clicked. So we need to create a function…

function () { — again, creating a function inline.  This will be assigned to the button’s “click” method.

Finally we do the fun stuff, toggling the DIV on and off with “$(‘#toggleSection’).toggle();”.  By now it should be easier to read this line.  We are finding the toggleSection div, and calling the jQuery method of “toggle()” which will toggle the visibility of the DIV.

It is important to note the “return false” part of this.  By returning false, we are telling the HREF that it should NOT execute the HREF value (which is #, and would bring the browser to the top of the screen).  If we don’t return false, the browser will still load the HREF value, and we will have some minor issue cross browser.

We’re done!  We are toggling the visibility, check out the demo — jQuery toggle demo.  Fortunately, we can still have a little more fun..

Sliding in and out of that div
In the previous step, we toggled the visibility of a DIV.  It’s not too exciting, as we could easily do that with javascript before with stylesheets and basic DOM code.  What is great about the jQuery library is all of the additional methods for animation it gives us.  Lets setup that div to not just appear, or hide — but to slide in and slide out.

For that we will take advantage of the slideUp and slideDown methods, they are just 2 of many Effects available in jQuery.

<html>
<head>
     <script language="javascript" src="js/jquery.js"></script>
     <script language="javascript">
     $(document).ready(function() {
          $('#toggleButton').click(function() {
               if ($('#toggleSection').is(":hidden"))
               {
                    $('#toggleSection').slideDown("slow");
               } else {
                    $('#toggleSection').slideUp("slow");
               }
               return false;
          });
     });
     </script>
</head>
<body>
     <a href="#" id="toggleButton">Click Here</a>
     <div id="toggleSection">
          Content to toggle on and off<br>
          More content<br>
          Slides are more fun with more content<br>
          Four lines should be enough
     </div>
</body>
</html>

We have added a little more content to the DIV, so we can more easily see how the slideUp and slideDown work.  There are 2 interesting steps we hav taken.

First, we added an “if” statement to detect if the DIV is hidden or not.

Second, we added code to slideUp or slideDown depending on whether the DIV is actually hidden.

Check out the result on our example — jQuery slideUp and slideDown demo.

Conclusion
I hope this helped some of you out.  Let me know if it did.  Comments are open!

Tags: , , , , , , , , , , , , ,

Slumdog Millionaire (no spoilers)

Wednesday, January 21st, 2009 | Personal | No Comments

Slumdog Millionaire PosterI will make sure, not to spoil any of the plot for any of you.

Just this past weekend we went out to see Slumdog Millionaire.

The reactions were slightly mixed. I loved the movie. It was not the type of movie you are used to seeing, as well as very engaging. The girl liked the movie, but didn’t love it as much.  I forgot the reasons.  

Let me frame the experience. We had never heard any promotions for the movie yet. The first we heard of the movie was when it won at the Golden Globes.

The movie is the type where everyone in the theater stayed when the credits started, and didn’t move until the “final” credits began to roll.  The last movie I remember that did that to me was Requiem for a Dream.

Slumdog Millionaire gives an interesting insight into growing up in third world conditions.  Things that youth around the world take in as normal on a daily basis, are situations we consuder unsuitable for life.  Yet the kids adapt, and grow with it. 

There were “artistic” statements throughout the movie.  Usually I choose to ignore those, identifying, but ignoring.  

At no point did I even look at my watch.  Simply put, just go out and see it.  If you’ve seen the promos, it may seem odd, but it is worth it.    If you can, don’t read any reviews of the movie (after this one) or even read the description of the movie, just see it.

Tags: , , ,

Watch the Inauguration Live Here

Tuesday, January 20th, 2009 | Personal | No Comments

Tags: , , ,

Analyzing Twitter Traffic

Tuesday, January 20th, 2009 | Business | 2 Comments

I’ve posted a few times on my experiment to see how much Twitter boosts my overall traffic.  In doing so I’ve noticed a lot of my traffic now comes from strange sources.  With the use of TinyURL, and some of the interfaces people use for twitter, traffic is difficult to watch.

An article I just read on Yoast, The analytics issue with Twitter offers a nice solution.  

According to Tweetstats.com, only 50% of twitter traffic comes from the web.  The other 50% comes from all sorts of various applications.

How do we track it?

One great way, suggested in the aforementione article, is to tag twitter posts with campaign tags.  Just like large companies do, tagging traffic as a campaign will let you analyze traffic coming form all Twitter sources.

Check out the original post, The analytics issue with Twitter.  He deserves credit on this, I’m just pointing you to his article.

Tags: , , , , , ,

jQuery 1.3 Released – How to use jQuery

Thursday, January 15th, 2009 | Business | 10 Comments

jQuery is a “fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.  jQuery is designed to change the way that you write JavaScript.”

jQuery version 1.3 was released yesterday.

Some new features in 1.3 are:

  • Sizzle – a brand new CSS selector engine
  • Live Events – event delegation with a jQuery twist
  • jQuery Event Overhaul – simplified event handling
  • HTML Injection Rewrite – Lightning-fast HTML appending
  • Offset Rewrite – Super-quick position calculation
  • No more browser sniffing!!
  • New API Browser - http://api.jquery.com/

I have yet to play with jQuery 1.3, but will post my impressions after I get some hands on time with it.

Are you new to jQuery?
jQuery is a library that you can include on your web projects.  jQuery enables HTML and JavaScript developers to rapidly deploy functionality that traditionally is more complex.  Through browser independent APIs, developers and designers can implement event handling, CSS changes, animations, popular web 2.0 effects, or other common function of web 2.0+ sites. 

Downloading jQuery
You can get jQuery by going to jQuery.com and downloading the version of jQuery you want:

  • Production version – 18kb – Minified for production environments (don’t try to debug this, its a nightmare)
  • Development version – 114kb – Developers can go in and see how things work with this version, but the footprint is huge

Getting Started with jQuery
jQuery provides a series of useful tutorials.   

Some favorites are:

There are so many more tutorials out there.

Tags: , , , , , , , , , , , , , , ,

Disney Star Guitarist — with a real guitar!

Friday, January 9th, 2009 | Personal | 1 Comment

I don’t think I will be able to sleep now.  This is Guitar Hero (or Rock Band 2) but with a real guitar!  My girl will finally have to stop saying “you know, you’re not REALLY playing the guitar”. 

Games make it so much easier to structure learning for things that require eye/hand coordination.  That may be a relic of my video game upbringing, but it’s how I learn things the fastest.  Games give me something obsess over.

Watch the video, it was taken from Gadget Roundup: Innovation is Back at CES 2009:

Tags: , , , ,

Allergy Update: Honeywell Tower, Honeywell Round HEPA and 3M Filtrete

Friday, January 9th, 2009 | Business | No Comments

Thanks to our new puppy, Olive (check out the link, she’s adorable) — starting in mid December I began a trip down allergy memory lane.  

I grew up with dogs (two great dogs) but developed an allergy as I got older.  Unfortunate for me, I love dogs.  

Recently we adopted Olive, and brought her into our home.  I knew things may not go aboslutely perfect.  

Here’s an excerpt from the post I made on December 30th describing the problems:

I have asthma, and significant dog allergies.  That is only for certain dogs though.  Olive is a hypo allergenic dog.  To her credit, she is much better than any previous dog my family has ever had.  However, it is still not perfect.

The first 5 days with her were bearable.  My nose stuffed up immediately, but that could have been from standing in the cold waiting for her to arrive.  The 6th day with her my lungs started to tighten up significantly.  This was unfortunate, Olive was already a loved member of the family.  

What helped it?  Air filters!

I did a lot of research online, and determined that the IQAir HealthPro Plus HEPA Air Purifier – Air Cleaner with with Gas and Odor Filter – HyperHepa Technology was the best out there (this is not paid, just my opinion).  If you have severe allergies, please check it out.  It is very expensive (the model I was looking at was easily twice the price of comparitive models), but sounded great.

The problem was that my lungs were in distress that minute, and couldn’t wait for the air filter to be delivered.  While waiting for calls back from distributors, I went to Home Depot and picked up some items:

It’s been another 2 weeks since then and I have to say, things are going smoothly.  I’m almost entirely off using my inhaler (I really think I took my inhaler too much, and I’m slowly getting off of it, my lungs don’t seize up anymore, I just have a cough that is really annoying).  I haven’t had a stuffed nose since those first few days.

We have adopted an additional Honeywell 50250 99.97% Pure HEPA Round Air Purifier since then to round up any issues we had before.  It has been nicknamed “R2D2″ — if you look at the filter, you’ll see why.

R2D2The only problem with the Honeywell HEPA is that it is pretty big, roughly 2/3 the height of R2D2 (seen to the side).  We found out we can tuck it neatly underneath a side table.  That helps a little.

It is very nice now, we don’t have to lug the Honeywell Tower around the house to whichever room I go into.  Fortunately, I spend 95% of my time in the office.

If any of you suffer allergies, have asthma, or other breathing issues — I strongly urge you to consider air filters.  Even the girl says she can’t believe how much cleaner the house is — both air quality and in general.  

We haven’t had to spend the $800 on the IQAir filter yet, and I don’t see a need to at this point.

Tags: , , , , , , ,

In Google We Trust

Friday, January 9th, 2009 | Personal | No Comments

I hear about the anti trust lawsuits against Microsoft.  Honestly, I think they are a little bit of “hey, lets get the big guy — he’ll pay us to go away” — but still, we’re protecting our bests interests.  

We trust Google.  Google has always been the digital apple of software user’s eyes.  Think about it, when was the last time you were pissed at Google?  So we trust google.  We trust google’s famous mantra “Do No Evil”.  We trust all of our emails with Google.  We trust Google with our digital lives, and sometimes more (how many of us acknowledge Google’s Picasa web albums as what we consider acceptable backup of some of our most precious moments.  We condiser Google a member of our family, someone we would trust with most of our private information.  

We need Google.   On my daily routine, I must use some aspect of Google every 5 minutes.  It’s disgusting if you think about it.  How much we rely on certain things, notions, and ideas to be constant in our lives.  How much of the web relies on Google?  Lets look at what I use Google for:

  • My Gmail account
  • My seangw.com email (I won’t even get into how much of my life depends on that email service)
  • My calendar gets sync’d with my google calendar
  • Support for all of my technical issues
  • Reference material for my profession
  • IM
  • It’s where I send my family to see photos
  • This blog submits every post to Google
  • This blog uses Google’s Adsense, for advertising revenue (however small that may be)
  • 80% of the traffic on this blog comes from Google
  • I throw out those pesky outdated firmware CD’s that come with hardware, because I can google for updated drivers and firmware
  • Desktop Search
  • Web traffic analysis (analytics)
  • SEO tools
  • You Tube (enough said)

I’m sure there are dozens more uses I have on a daily basis for Google’s technology. 

Now what if one day I couldn’t log into any of the services I use at Google?  We depend on google.  I think if I found out I couldn’t use Google products and services, my life would change dramatically.

An article on Chris Brogan‘s blog, When Google Owns You, describes the story of Nick Saber, who loses his Google account.

The problem with monopolies is that we end up relying on them.  Even if there is no mal-intent, what if a mistake occurs?  A simple keystroke on a keyboard somewhere can probably delete our online lives.  

When do we trust a company too much?

Google likely knows more about you, than your significant other.  Additionally, you probably rely on Google (funtionally at least) more than your spouse.  

I’m going to think about Google in a different way. They have a lot of control, for a company who has automated email responses.  

After all, individually, Google doesn’t need us.

Tags: , , , , , , , ,

Got unused domain names? – Try Google Adsense for Domains

Thursday, January 8th, 2009 | Business | No Comments

I never knew I could take some of my unused domains, and hand them over to Google (why do I even link “Google”?  Who doesn’t know where Google is?) to try and monetize some of the wasted traffic.

Looking through Google’s Adsense interface earlier this week I found a new option — Google Adsense for Domains.  

I’m not an advocate of parking domain names.  If you happen to have some extra domains sitting around it’s a great idea.  

The steps are simple:

  1. Create an Adsense account - https://www.google.com/adsense
  2. Purchase Domains (if you don’t already have them)
  3. Setup the Domain for use with Adsense for Domains (there’s a guide at https://www.google.com/adsense/support/bin/answer.py?answer=100301&sourceid=aso&subid=ww-ww-et-asui&medium=link)
  4. Add Unused Domains to Adsense
  5. Modify domain registrar settings (setup a blank A record to the IP 216.239.32.21, and setup a CNAME “www” record pointing to pub-xxxxxxxxxxx.afd.ghs.google.com, where “xxxxxxxxxxx” is your provisioned Adsense ID)
  6. Request Approval of the domain from Google (they are very helpful)
  7. Configure some basic options (color, channel names, keywords if you want to hint the ads in a specific direction)
  8. Profit

It is important to note that you can only do this with a domain that you don’t use for any other google hosting services (such as Sites, Apps, etc).

For me it’s been worth it.  I made $0.32 today that I wouldn’t have otherwise made.  

The best part is just to see how many people visit your defunct domains.  I love knowing how many people are just typing in a domain, or linking to it on accident.

I haven’t figured out how to run both this service, and Google Analytics.

Tags: , , , , , ,


Please share, it makes me happy:

Subscribe to Email Alerts

Make a Donation

Follow Me

Follow seangw on twitter

Archives

Categories

prestashop theme

virtuemart template