Category Archives: Uncategorized

Cutting the Charter Cord

Today I ran across this article on the cable industry losing subscribers in droves. I’m not sure if they think that what happened to the music industry can’t happen to them or they just aren’t sure how to stop it. What I can tell you is they’re not helping their situation by continuing to provide such horrible customer service.

After an incident this weekend I’ve decided to quit giving my money to them.  It’s not the first time.  About 10 years ago I switched to Dish+DSL for a few years after a long battle with Charter over an internet connectivity problem in our neighborhood.  When I moved back downtown I decided to give them another try.

For the past few years I’ve put up with video and audio drop-outs, the horrible DVR interface, and other occasional issues.  However, it was this weekend that finally got me fired up to “cut the cord”.

Saturday night around 7 P.M. my wife and I were watching a streamed movie from Amazon when all of a sudden our Roku lost internet connection.  After a quick look around I realized that not only was our internet out but so was our cable TV. We gave it 10 minutes to come back but then I figured it was time to call Charter.

Our internet was out but luckily I had my cell phone to search the web for Charter’s customer support line.  I dialed in to the automated assistant and was provided with the choice of tech support for “internet” or “TV”.  Unfortunately I made the bad choice of saying that it was a “TV” issue.  At this point the Charter robot told me that it was sending a signal to reset my cable box and that I would be put on hold for 5 minutes unable to do anything until after that time was up.  When the horrible hold music started playing I hung up.

I called back and this time asked for “internet”.  I was greeted with a message saying there were known outages in my area and did this answer my question.  I assumed that they were having some system problems so I answered yes and hung up.  When I finally went to bed there was still no service.

When I woke up at 6 A.M. it was still out so it was time to get back on the phone.  I called Charter and this time I didn’t get the “outages in your area message”.  I explained my issue to the tech support person and she said someone would get back to me within an hour to schedule a service call. I waited 90 minutes then called back to find out where my return call was.  After jumping through all the usual hoops to get to a live operator and re-explaining the problem, I was told the first person had been incorrect. I would have to wait until an hour after the dispatch office opened at 9:00 am.  I waited a few more hours and finally called back again at 10:00.  After re-explaining everything for a 3rd time I was told there was nothing she could do. The problem had been escalated and I would just have to wait until someone called me from dispatch. Awesome.

While I was waiting on dispatch I noticed that my cable boxes were all occasionally flashing the word “hunt” on their 7 segment LED displays.  Since I still had my phone as a hot-spot and my IPad, I did a little search around the internet and happened across this long discussion on a guy with the exact same problem. It suddenly made me remember something.  Our apartment building has always included basic Charter cable for free but recently they quit offering that amenity.  I had remembered that Charter had sent some piece of mail to that extent but I just figured since I had all the extra tiers and internet they’d start billing me for the “basic” cable. Perhaps they just went ahead and disconnected everything when they were no longer getting their basic cable payment.

It was right after this revelation that someone from dispatch called me back.  She told me that they were full for the day and I’d have to wait until Monday unless there was a cancellation.  I explained to her what I thought might be going on and asked her if she could check the levels on my modem to see if she had any connection to it.  She said she couldn’t see the levels and agreed that it was possible they’d come out and disconnected me.  However she couldn’t actually look at my bill to see what was going on as that wasn’t in her abilities.  After unhappily scheduling an appointment I decided to try calling Charter’s billing department back.

So once again after explaining everything another CSR verified that I didn’t have basic cable on my bill even though I had everything else.  He agreed it was a bit weird but once we discussed the removal of the bulk service by my landlord he said it made sense.  After much wrangling he said it’d actually be cheaper for me if I added on telephone service for their “Triple Play” offer. Although I didn’t want a phone I figured what the heck and went ahead and signed up for it.  It was now around 11 am and my wife I and I headed out for the day.

Upon returning around 7:30 later that evening I walked in and noticed that everything was back. TV and internet were all working just fine.  After making sure everything was good I called Charter back one more time to cancel the service call for the following morning.  I’m not sure if they actually got someone here to physically reconnect us or if it was some internal switch they flipped when I got the billing thing sorted out.

On Monday morning I received an automated call from Charter reminding me that later that week they’d be coming out to install my new phone.  It was at that point that I decided I’d had enough.  I really didn’t want a phone with them and I was still unhappy they shut us off in the first place.  I took a couple hours to read a number of articles on “cutting the cord”  and felt it was time.

It seemed better to do this in steps so I called up Charter and told them I wanted to get rid of all our extra channels packages, 2 DVRS (we had 3), and I didn’t want to get a phone.  We’d still be keeping internet, basic cable and 1 DVR for now. I immediately got the Charter hard sell.  The salesperson asked me if I watched HBO.  I said yes but I’d be purchasing HBO online straight from HBO.  She said “why would you do that when you get all these extra channels if you buy it from Charter”.  I told her because I would much rather just give my money to HBO than a company who only cares about me when I call to cancel services.  We went round and round about how I was missing out on such a great deal with Charter.  At one point she asked me why I was even keeping internet if I was so upset with them.  I told her I didn’t have much of a choice in my area.  She also gave me some grief for not paying attention to that letter they sent me.  I said, “Hey I’ll give you that that’s on me, but then why did you come out and shut off my internet?  That has nothing to do with the TV service.  If it weren’t for the fact that I get my phone through AT&T I wouldn’t even have been able to contact you when you turned off my service.”

She then decided that I owed them for part of the month for the basic cable that had been missing for 2 weeks so she put me on hold for a few minutes while talking to a supervisor. Finally at the end of it all she also informed me that I’d be billed for the other 2 DVRs until I returned them to Charter.  They pretty much yelled at me on my way out the door making me even more motivated to get rid of the rest of my services.

I would think that I’d be the customer they’d want to keep.  I’m a 50 year old guy who was spending somewhere between $150 – $200 a month.  I don’t call and hassle them every few months to get a lower rate, I’m never late in payments, and every now and then I add some other feature (the Latino tier was the last one). Throw on a few on demand movies and the occasional pay per view event ($60 so my wife could watch Ronda Rousey spend 30 seconds in the ring) and I gotta think I’m exactly who they’d want to keep happy.  It’s really not that hard. Just care even a little about providing me with a decent service or be quick to react when something is wrong.  Better yet, offer to give me the $4.99 back that I had to pay Amazon to watch the rest of my movie that we were half way through when the internet went out for 24 hours.

We had been looking at newly developed high end apartments a couple months ago and I found it interesting when the landlords told me they hadn’t been concerned about providing cable to the apartments just internet as most of their renters didn’t care about cable TV.

Add this all up and it’s looking like Charter has got a fair amount of pain in its future.

Helpful Tech Flowcharts

One of these days I’ll get around to writing some posts on my product “accelerator/incubator” space, and the variety of security and bitcoin things I’ve been working on. In the meantime to make things easier for me I thought I would start making some very simple flowcharts to answer the questions I’m often asked.  So here’s the first one.. enjoy!

sweatervest

Silicon Isthmus

So there was this article titled “Silicon Isthmus (San Jose. San Francisco. Seattle. Madison?)” in our local newspaper the Isthmus. The introduction follows:

When most folks think about computer software and where it’s developed, Madison isn’t the first city that springs to mind. More than likely, cities like San Francisco or Seattle, home of software Goliath Microsoft, top the list.

Think Again. The West Coast may have the ocean and the weather, but when it comes to the software development scene, Madison is in a league with the big players.

According to the Greater Madison Area Directory of High Tech Companies, an annual guide published jointly by the city of Madison and Madison Gas & Electric, there are dozens of local companies churning out cutting-edge software in fields as diverse as biogenetics, entertainment and business solutions.

Of course it’s hard to have a successful software company without the person who has the ideas, the technological know-how, or both. Madison’s a chip off the silicon block in this department too. More than half of the aforementioned software concerns began as shoestring operations, the sweat of an inspired entrepreneur’s brow.

Many of the entrepreneurs were born in Wisconsin, and most of them set up shop here for the same reasons other people do: a relatively low cost of living, more than a modicum of cultural and political goings on and a stable business climate.

The interesting thing is that article is from 1996 profiling my company Sonic Foundry, game software company Raven and a few others.  It goes on to talk about things like the difficulties of hiring tech talent in Madison, I’d bet that many Madison techies would assume it was written today instead of 18 years ago.

The more the things change, the more they remain the same.

No Bitcoin Campaign Donations For You!

Mark Clear who is running for the Assembly in Wisconsin held a fund raiser on Wednesday. I’ve known Mark through the start up community in Madison so when the Facebook invite showed up I figured I should head over to the “Beer with Clear” event to show my support.

Lately here in town I’ve been “that guy” when it comes to Bitcoin. Whether I’m getting a coffee, a haircut, or paying my office rent I’m always asking “Do you take Bitcoin”? I’m amazed how it’s usually met with curiosity and lots of questions. So of course when I arrived at the donation table I jokingly said “So are you guys accepting Bitcoin”? I wasn’t expecting the answer from the candidate, “We can! I’ve got a wallet on my phone.” I probably should have expected that Mark being a Tech guy would have a Bitcoin wallet.

I told Mark that I’d be happy to donate $100 worth of Bitcoin and we initiated the transfer. Within seconds the transfer for .2213 Bitcoins appeared on Mark’s phone evoking that empowered feeling that many Bitcoin users know so well. Realizing we may have just transacted the first Bitcoin campaign donation in Wisconsin we happily tweeted our interaction.

Well it only took 12 hours to find out no can do. It turns out that just about 6 weeks ago the Wisconsin GAB had taken up this very issue. See here

http://gab.wi.gov/sites/default/files/event/74/march_2014_open_materials_with_agenda_pdf_38483.pdf#page=230

So it’s good to see the GAB is trying to deal with Bitcoin but much of what is in the minutes is either technically inaccurate or misapplied. Unfortunately this meeting also took place around the time of the Mt. Gox/ Transaction Malleability fiasco. There is much discussion in the report on Transaction Malleability and how it throws doubt on the process. This is technically incorrect. Although TM allows the ID of a transaction to change before it is placed in the block chain, once the ID is in the chain it is immutable.

From the GAB minutes:
“While core information in a transaction ID cannot be altered, additional information that would be critical to any committee (such as address and employer information) could be changed through transaction malleability.”

The problem here is that additional information is not stored within the Bitcoin system. Campaigns would just enter a bitcoin transaction ID in place of the information they use for a monetary donation (check, Visa etc). So even if TM was a problem (which it isn’t) it’s not relevant as donor information is stored separate from the transaction.

In fact using Bitcoin for transactions is actually more transparent than any other means of donation. Had we done this via check or credit card this transaction wouldn’t be a public record like it is with Bitcoin.

Here’s the transaction with me sending .2213 bitcoins to Mark
http://blockexplorer.com/tx/ab78d3a3ac00dad8a9bf64106626b3ae179b700e2608b775ac8c172573649b9d#o0

Less than 24 hours later Mark returned the .2213 coins to me here
http://blockexplorer.com/tx/6200a20e319fa2d29c32ab02a7cf2534d9f3641fedc67e52b1e2eecfc56bf978#o0

The FEC is currently deciding on Bitcoin donations. I hope if nothing else they’ll treat them like cash and allow donations of up to $100. I searched the Wisconsin GAB site but couldn’t find the cash limit there. My understanding is it’s $50. In the meantime I’m forced to use PayPal, Credit card, or check to contribute to Mark’s campaign all of which cost me more in fees and time than our simple 15 second transaction the other night.

Here’s a link to the local story on the transaction http://host.madison.com/ct/news/local/writers/jack_craver/madison-ald-mark-clear-accepts-bitcoin-contributions-in-his-run/article_c6a94862-d16a-11e3-ac97-001a4bcf887a.html

CFO No No

One of the things I find fascinating is the titles that founders assign themselves. Why is the first thing thing on the agenda after coming up with an idea for a company is to assign C-Level titles to everyone involved? Here’s some observations I’ve made based around start-ups and those titles.

If three technical people start a company you’ll often find the guy who ends up being CEO is the least technically able of the bunch. Why? Because the CTO is almost always going to be the most technical of the group and probably the one with the idea for the company in the first place. When the time comes to raise money the three people look at each other and go “hmm we need someone to spend time talking to investors and creating presentations.” Usually what will now happen is that the least technical person offers themselves up to do this role. If they don’t then it will be forced on them by the other two using the logic that the most technically able people should be working on the product. Once the CEO and CTO titles are assigned usually the other person will get the title of COO. I honestly don’t know why people think a Chief Operating Officer is the next most technical person but for some reason this just happens.

Here’s where this can really go awry. I’ve seen in more than one case where the person who was chosen to be CEO just doesn’t have the skill set needed. They’re not as knowledgeable about the product, they’re often not as passionate about it, and in the worst cases they have really poor people skills. Many times I’ve been in a meeting where the person with the CTO title literally runs the meeting. They’re friendly and outgoing, they answer all my questions while the person with the CEO title sits back and defers all questions to this person.

What does this tell me about your company? You’ve got a really bad day ahead of you. It’s the day when the CTO finally wakes up and realizes that the CEO title isn’t right for the person to whom it’s assigned. More than once I’ve had this hard conversation when they’ve come to me asking me what to do. Unfortunately there’s no easy answer here. How do you go to a person, probably your friend, and explain to them that they aren’t cutting it as CEO? Now maybe you’ll get really lucky and they’ll know that they’re not right for the job. There is the slim possibility that they’ll actually be relieved that someone else besides them realized this and is saving them from drowning in the role. But the more likely outcome is that you’re now going to have to ask someone to either leave the company or take a demotion to a different role. Usually the latter turns into the former anyways.

CFO. Do yourself a favor and don’t ever end up with this title in your startup. What the hell are your responsibilities in a 2 or 3 person company as Chief Financial Officer? Are you the guy in charge of the quickbooks account? When I’m introduced to a company with less than 10 people who have a CEO/CTO and CFO I immediately jump to the following conclusion. CEO/CTO are the technical guy and the business guy or perhaps two technical guys with one of them being the leader. The CFO is the roommate or buddy who was with them at the bar when they came up with the idea. Sorry to be the bearer of bad tidings but if you’re walking around with the title CFO in that size of company you’re probably dead weight.

My suggestion is in the early stages of your company it’s best not to assign these titles that really don’t mean anything. There’s nothing wrong with being founder or co-founder. In startups you should all be working together towards a common goal anyways. By not assigning those titles early on, you’ll save yourself the later headaches when roles naturally emerge that conflict with some arbitrary earlier assignment. However, please don’t take this as a pass to assign yourself a title like “Chief Code Grinder”. I know you probably think it’s original and super cool, but I can assure you it’s neither.

Funny story I was judging a student start-up competition and the two guys walked in with the titles CEO and CFO. This threw me for a loop as there wasn’t even a CTO. Either the CEO was the tech guy or they had no one on board as the technical person. So I told them that I’d like them to switch their titles to co-founders as it might serve them better in the future. They told me that they actually had been using those titles until a week prior when they had met with another adviser who told them to switch them to CEO and CFO.

Well played Coinkite

I was checking out Canadian based (my wife’s hometown of Toronto) Bitcoin processor Coinkite.  They’ve got a claim on their FAQ that says:

  • Reliable support—we answer emails—go ahead and try.

So I thought I’d give it a shot.  I found a typo on their developer page, which seemed like a good thing to report.

Check out the emails.. total time to fix the page and respond to me.. under 2 minutes.

Coinkite you are my heroes for today.

 

coinkite

Crypto hacking

As some of you know I’m pretty much swamped in crypto-currency programming, research, and promotion these days.  I’m sponsoring first prize and am working with Brian and Sheradyn in planning and running the Madworks Crypto-Currency Hackaton in 10 days.

We’ve already got great response and that was before this article came out. I’m looking forward to a really fun/hectic day. A special thanks to Greenpoint Funds and Foley & Lardner for ponying up the cash for the other prizes and meals.  It’s good to see people outside the programmer community interested in the crypto$ scene.

I’ve been doing a number of things in preparing for the hackathon including, getting miners set up, saving off preloaded blockchain data, and a few other tasks to help participants get up and running quickly.

Hope to see everyone there…

 

 

Phone companies still suck

So my wife has a phone number from when she lived in South Carolina.  This causes problems when people are expecting her to call her from Madison and instead they go “who the heck is calling me from South Carolina”?

So I set out to fix this with our wireless provider AT&T.  For those of you who use AT&T I bet you’re already cringing.

I started out by searching online and logging in to our wireless portal.  I learned that they will charge you to change phone numbers but if you have moved from one region to another that they will change your number to a local provider for free.   Ok sounds good.  But there was one issue I wanted to deal with.  My wife has had this number for at least 5 years and I knew it would take some time to notify all her contacts that she was changing phone numbers.  So I thought “Hey they must offer some 3 month forwarding service or something from an old line right?”  I thought wrong.

I was told that the minute that the number was switched she would no longer receive calls from her old number and that anyone trying to call her would get a disconnected message.  So this is my rant.  AT&T WHY THE HELL DO YOU NOT OFFER A SERVICE TO DEAL WITH THIS?  (Sorry for all caps.  I rarely use them for emphasis but this seems like an appropriate place).  I mean really, I would have been more than happy to pay for an additional forwarding service for a few months to make it simple.

Fine, OK, so how to get around this.  I told the representative what I was trying to do and we came up with a solution of getting a cheap secondary phone for a few months with a new Madison number.  When the phone arrived I would activate the new number, call AT&T, and switch the new number to her IPhone and put her old number on the cheapy phone.  That way she could start using the new number for outgoing calls yet still receive incoming calls on her old phone until she informed everyone of her new number.  Not a perfect solution but workable.

The phone arrived last night as we were headed out to dinner so I left it until this morning.  They sent me some crappy LG phone with a horrible UI which actually saved me.  I had to call in and activate the phone but every time I needed to type in a number on the key pad the LG phone had locked me out so I ended up with an actual human operator.  This would turn out to be lucky for me.  She told me I needed to activate the agreement for the phone and hooked me up with some automated recording which notified me I was signing up for a 2 year contract.  At this point I’m telling her “Whoa whoa whoa that wasn’t what I wanted”.

I explained what I was trying to do and how the original sales guy somehow decided to sucker me into a 2 year contract.  She explained to me that anytime you get a phone provided by them that there was a 2 year contract involved, and that if I didn’t want the contract I’d have to go buy a phone and then activate that phone on the new line.

So now I have to send back the phone on my dime to get a credit for this crappy phone.  I also have to head out to a local store to buy another phone so that I can then hook that up to the new line.  It really shouldn’t be this hard.

 

Not Ready for Prime Twine : A review of Super Mechanical’s Kickstarter hardware

A lack of an in-apartment washer and dryer can make life a bit of a drag.  Earlier this year I was wondering why our building’s washers/dryers don’t have internet monitoring.  I did some research and found a number of companies were offering internet monitored washers/dryers but they mainly seemed to be in use at college campuses.  Makes sense.

I brought it up to my  landlord and it turned out that the company that sold him the system in the building had them available and was willing to do an upgrade for him.  There was, however, the small problem of cost.  They wanted over $200 a machine to upgrade the “readers” as well as an ongoing monthly fee of around $100 for the service.  He and I concluded that people weren’t willing to pay $5 per load of laundry and that we’d all just have to keep using our microwave timers / iphones to keep track of our laundry.

It was around this time that I ran across a project on Kickstarter that I thought might help. I’m a big fan of Kickstarter and have funded a variety of things on there including Double Fine Adventure , Mail Pilot, and my personal favorite The Travoltas who I will be traveling to see in Houston this February.  But, the Kickstarter I’m talking about in this case is this one called Twine.

It looked interesting since it was a simple sensor system with built-in wireless.  It  included temperature and vibration sensors and since I had this washer/dryer thing stuck in my head I figured I should check it out.  The project had already been fully funded but I went ahead and pre-ordered one and then promptly forgot about it. That is until about a month ago when I got an email saying that my Twine was ready for shipping.  The email also said that things had turned out a little more expensive than they expected so the cost of the Twine with full sensor package was $199 instead of the $174 when I pre-ordered.

My Twine arrived within a couple days and I have to admit as far as packaging goes it was amazing.  The guys at SuperMechanical certainly know how to put together a cardboard package.

The Twine itself as well as all the add-on sensors are sleek looking and well made.

Open Box 1
Open Box 2

After pulling everything out of the box I was pretty excited to start playing with my new toy.  Unfortunately this is where the excitement ended and the disappointment began to set in.

I installed the batteries in the Twine and fired up my laptop.  A new wireless network appeared and after connecting my laptop to it, a browser popped up asking me to select my local network and password so it could jump on my wireless.  I had a moment of trepidation here as I’m not big on putting passwords on devices that I don’t have the source code to but I moved ahead.

After that I had to create an account on SuperMechanical so that my Twine could start sending data to their web site.  This was all a relatively painless process and within a few minutes I could see that the Twine knew what orientation it was sitting in and that it was sending the temperature of my apartment.  Immediately I noticed that the Twine thought my apartment was anywhere from 78-80 degrees which is pretty much about 10 degrees too high. Oh well no biggy, next I thought I’d check out the vibration sensor. “Currently not supported”.  Huh what?  That’s why I bought the thing.  Nope,  I was out of luck.

I moved on to play with the other sensors, moisture, magnetic switch, and break out.  They all worked as expected.

The Twine is easy to take apart and if you look at the main board it’s pretty clean with a 32 bit ARM based MCU, a Gainspan low power wifi module, and some Flash memory. The board has a Micro-USB port but that is only for power, not communication.  The 4 pin sensor adapter plug is wired with the following : 3.3V,GND, Input, 1 Wire.  The Input is the input voltage from a sensor and the 1 wire is used to identify that sensor.  Each of the sensor boards has a 64 bit Unique ID chip with 1 wire interface. I’m pretty sure the people who are planning to plug their sensors in using a Y cable are going to be in for a surprise.

Take it apart

After playing around with the website for a while what I really wanted was to get the data directly from the device to one of my local computers.  Why make me round trip from the Twine to the SuperMechanical web site back down to my local computer.  I understand the “hey you can see it anywhere on the internet this way”, but “hey maybe I only want to see it locally”.

I posted a message asking about the local network support in the software developer section but didn’t receive any kind of acknowledgement from the powers that be.  A couple of other Twine users responded they’d like to see the same support.  My guess is the SM guys are probably a bit overwhelmed right now.  (I sent them a copy of this to see if they had any comments back on December 19th and never heard a word.)

At one point I considered throwing a proxy in the middle to see what the device is actually sending to the SM servers, but I decided I wasn’t going to invest that much time in it since I was probably going to shelve it for now anyway.

The Twine sends its updates to the server at a couple of different rates.  One is about every 45 seconds, the other is in a continuous fast update mode.  It will switch back to the slower mode on its own if you don’t click a button on the website stopping it.  This was another reason I wanted to access it locally instead of the whole crazy round trip it was doing to be able to monitor it from 3 feet away.

Although the actual hardware of the Twine seems to be well thought out and well designed (maybe even over-designed a bit) the software side is quite lacking.   As it stands today if you want to sense temperature and a single input of one other type, send that info to a server somewhere, then have it email you, tweet, or post to an http url using very simple rules then this is the device for you.  If your use doesn’t match that exacting criteria then $200 seems a little high when you can buy an Arduino or a Raspberry PI for less than 1/5th the price.

I hope they open source the system or at least open up the interface to the local network. This would allow alternate uses for the hardware to grow. Without that I think the Twine is in for a rough road. I wish them luck as they seem like good guys who really know how to do physical product design.  Right now there’s better value for your money if you have any DIY skills at all.

Using WordPress for a Simple News Web Widget.

I often find myself needing a simple blog type news feed for the various sites I’m creating.  In the past when I was still doing my primary development on .NET I rolled my own solution using a SQL database to hold the entries.  At first I’d just put the data into the database directly but of course over time I wanted to be able to edit and add new entries from a web interface.  So I found myself incorporating TinyMCE and pretty soon I was writing a whole management interface just for editing news posts.  I knew it was time to stop myself before completely falling prey to NIH syndrome.

Lately I’ve been doing a fair amount of small projects using WordPress and it seemed that I could just use its CMS to hold my news posts. I’d now have a repository for my posts as well as the ability to edit them.
In order to use the post data in my other sites I wanted to export my posts in JSON format. I’ve written a fair amount of JSON exporting code server side so I knew this wouldn’t be a problem. Luckily I took a look in the WordPress plugin repository and there’s already a pretty nice plugin that dumps any post in JSON.
If you want to do this you first need to download and install the latest version of WordPress.  This should take you all of 5 minutes unless you’ve never done it before in which case it might take you 30 minutes if you need to install LAMP or WAMP if you’re on Windows.  You can also do it in about 5 minutes on an Amazon EC2 micro instance by following this excellent guide.
You will also need to download the JSON plugin and copy it to the plugins directory.  You can now create new posts in WordPress and pull the data out in JSON.
I’m using this for my Madtown yoga website.  If you look at the site you will see a list of  news posts on the right that are fed by the WordPress blog.
The simple blog interface is here, where you can see a series of posts in the default wp skin. If you look here you can see the exact same posts rendered out as JSON data. Since I’m only using the blog as a data repository I didn’t bother messing with the WordPress UI.

If you look at the HTML for the news section on the right you will only see two lines of relevant code.

<script src="/Scripts/wpnews.js" type="text/javascript"></script>
<div id="news-widget-container"></div>

I’ve implemented this as a web widget. A web widget is a way to allow people to very simply place some kind of functionality on a web page.  A container div with a specific ID is placed on the page and then that div is filled in on the client side by the corresponding JavaScript. If you want a good tutorial on web widgets you can check out this article.  It’s the article I used to originally craft this news widget a few months ago.

In this case the JavaScript checks to see if JQuery v1.6.4 is currently loaded on the page and if not it loads it. It then reads the data from my WordPress site as JSON into an array and then adds the posts as a series of divs to the HTML DOM . The actual formatting of the data is handled by a separate CSS file.

If you want to have some fun make a simple text document on your desktop that looks like this and save it as test.html.

<html>
<script src="http://madtownyoga.com/Scripts/wpnews.js" type="text/javascript"></script>
<div id="news-widget-container"></div>
</html>

If you then open this test.html file in your browser you should see an unformatted list of my news posts in the document you just created. If you add in the line

<link href="http://madtownyoga.com/Content/Site.css" rel="stylesheet" type="text/css" />

you will then see it with my formatting applied to the divs.  What’s nice about widgets, besides the simplicity of using them, is the ability to their look on your page.  In this case add simple formatting to the classes FrontPageNewsTitle and FrontPageNewsContent and you can make my news feed look however you like on your web page.

If you take a look at the source code for wpnews.js it should be pretty straight forward to understand what I’m doing.  The majority of the code at the bottom is simply used to get JQuery loaded up if it isn’t already used on the page.

A special note to be aware of when pulling data from a web site in JSON  format. Often when pulling data into a web widget the domain which has the data may be different from the domain from which we load our page.  The issue here is that JavaScript is not allowed to load JSON data cross domain. The way that you solve this problem is by using a format called JSONP. The only difference in JSON and JSONP is that in the latter case the data is wrapped in a function and then returned as an object when that function is called.  Since code can be loaded and executed cross domain you just got around the problem!