New to the site? Welcome!

You might be interested to know that there's two different kind of posts on this blog: "Thought of the Day" and "Normal". The "Thought of the Day" category is a once-a-day random tidbit, usually a funny video or picture, and the "Normal" is just what you'd expect from a blog like this:

Unicorn-Butterfly Soup.

--Kyle

p.s. the subscription options to the left (psst! <---- that way) reflect the same content options

XMPP/Jabber As a Language

Recently there’s been alot of talk about the XMPP/Jabber Protocol as being used instead of other languages or methods to do… well, alot more than handling Instant Messages.

What (Is It)?

For the uninitiated, XMPP/Jabber is an open source instant messaging platform, with software on both the server and client ends. It, until lately, has been used as a free and open alternative to popular services like AIM, Yahoo! Messenger, etc. The protocol got alot of attention when Google rolled out their Google Talk platform, which is built using the XMPP/Jabber Protocol, making it very easy for “advanced” users on multi-user clients to user it, without needing to install “yet another” program.

Who (Uses It… Besides Google)?

TiVO apparently uses XMPP to send update notification to their users’ boxes, telling them when they have new software or listings that need to be downloaded. AOL claims they’re transitioning from their proprietary formats to XMPP, to be rolled out at some point in the future. Some new startups use it as an easy IM method, instead of building a custom one, or on top of a complicated method.

XMPP Logo

Why (Do We Care)?

The Internet, and pretty much all software, runs pieces of code periodically (could be on a daily, hourly, or even minute basis) to check for updates. For example, Desktop Email clients go out on a specified interval and check the server for email, and on non-AJAX websites you have to hit “refresh” if you want to see new data.

Now, imagine if this was all changed. Instead of waiting for your email to show up in your Inbox, what if it automatically knew when it had to update? And didn’t even check for hours, as long as you don’t have any new email? This might not seem like a big deal to the average user, but from a computing standpoint, it’s major. The resources (memory, processing cycles, etc.) saved by only accessing data when needed could cut operating costs of services and companies by large portions… especially when you’re consuming large amounts of bandwidth for a data transfer that may be meaningless.

But (Alot of Websites Use AJAX, So It Doesn’t Matter…)?

True, but AJAX is not the most developer friendly. Or resource friendly. Even if you have a site that auto-updates itself, chances are high that it does it the old fashioned way: queries a database, returns results, maybe doesn’t print anything. This is done, typically, using four languages: JS/AJAX, database (MySQL, Oracle, etc.), processing (PHP, Ruby, etc.), and rendering (HTML). Remove the AJAX layer, and suddenly websites run infinitely faster, especially on older computer.

Speaking from experience, you usually have to do weird workarounds to get AJAX to do exactly what you want. Call an AJAX function, call a script, query the database, print/return data, pass the data, and render it. This is a huge pain, and you hear about it all the time.

When (Will It Be Popular)?

Maybe never, but I’m going to start using it as soon as I can. I’m currently hosted on (mediaTemple)’s (gridserver) plan, and they don’t support it, but I’ve asked for it and it’s apparently being “prioritized” [if you use them too, ask for it... maybe they'll do it faster]. The ability to create programs and scripts that automatically update and talk to each other, without complicated CRON Jobs, is something I’m looking forward to.

Alot.

What I’ve Been Doing

Well, since I’ve mentioned that I’ve been relatively busy, both on and off the computer, recently, I thought I’d make a list for anyone that cares about what my life may have involved.

  • I left California on Dec. 18th, and have spent the majority of the time in the Baltimore (actually, Towson) area of Maryland.  That’s on the East Coast for you geography failures.
  • I leave tomorrow night to return to the epic awesome that is California.  Be ready.
  • I spent a week in the Palm City area of Florida (a little bit north of Miami), right around Christmas, visiting lots of family I hadn’t seen in awhile.  Something like 21 of us.
  • mySHOUToutLOUD has been the apple of my eye for the last few months, and we finally launched the Consumer side on January 1st.  Since then I’ve put the programming on hold, and have been trying my hand at PR/Marketing, with mixed results.
    • Facebook Advertising gets you alot of ad views, very few clickthroughs, and even less active users on whatever you’re advertising.  Just FYI, it sucks and isn’t worth it.
    • If you pick up an issue of the METRO (Silicon Valley newspaper) from last week, or this week, turn to the back page.  You’ll see an ad for mySHOUToutLOUD.
    • I’m supposed to have one interview today, and another tomorrow, to have articles in some Towson/Baltimore area newspapers, with the twist that I’m a “20 year old from Towson with a tech startup in California”.  I’ll link when they come out.
  • I’ve decided that Shell Scripting sucks.  I needed a script that would generate entire server backups, and then download and distribute them to different locations.  Since it’s easy to do this via command line SSH and FTP, I assumed Shell would be good.  It’s not.  I’ve spent a large handful of hours on it, and it’s not done yet.  Next time, I’ll just do it in C, thank you very much.
  • I got some feedback on my book from teachers I like/respect from my high school Alma Mater, Loyola Blakefield.  Apparently “Whispers Into Shadow” isn’t a load of crap, and I should continue with it.  Writing resumes tomorrow on the plane, hopefully completing it within the next three months.
  • Finally, I actually go back to school starting Monday at San Jose State University.  This is my first real semester of school since last June, when I decided to leave Santa Clara University and transfer to SJSU… not knowing it would take 6 months to do that.  It’ll be interesting, so we’ll see how it goes.

And, as if that weren’t enough, I’ve also spent alot of time being:

  • awesome
  • egotistical
  • amazing
  • a rockstar
  • sick programmer
  • your worst nightmare

Words to live by?  How about… “Keep the demons inside you.  It makes you more real.”

Prototype JS: IE Issues

Anyone having issues with the latest update of Prototype JS? I started using Prototype so things could be cross-browser very easily. And now portions of it are broken.

IE throws a “script error” when I try to do:

$(’dataContainerId’).innerHTML = ‘<p>stuff</p>’;

This didn’t happen until recently, when I started using the latest edition. It works in FF. Why not IE?

Anybody? You can find this question over at the Google Groups discussion.

Update 1: Roland tells me that it should be: $(’dataContainerId’).update(’<p>stuff</p>’);

Update 2 (delayed):  the .update() method did work.  Just be careful if you use underscores [_] in the ID names… that doesn’t always fly in IE with this, for some reason.

MySQL Search

I’m looking at how I can replace the current search for mySHOUToutLOUD (http://www.myshoutoutloud.com) to be more beneficial.

Right now, it’s a pretty basic MySQL Query. Here’s an example of searching for a user:

$sql = mysql_query(”SELECT * FROM $haystack WHERE username LIKE ‘%$needle%’ OR fname LIKE ‘%$needle%’ LIMIT $position,15″);

Limitations:

  • Can’t use Google Custom Search/Co-Op, as the data is all walled away.
  • Can’t use a Google Search Appliance, as the server is not mine (rent from MediaTemple).
  • Can’t use an Apache module, like Lucene, since (mt) doesn’t have it on the (gs) plans, and will not install it for me.
  • Other spidering techniques, using text-file caches, are very slow.

So, basically it has to be a very fancy MySQL Query. I’ve been thinking about how to write it…

Any suggestions?

Why OpenSocial May Be Over-Hyped

I’ve been purposely avoiding writing anything about Google’s new OpenSocial project. Why? Because it had the potential to go in a few different directions and be used different ways, and I wanted the hype to die down before seeing what it’s actually worth. (If you’re totally in the dark, read this and this, and about how it was hacked.)

The Hype

If you believe all the hype, this new initiative may be the end of “walled” social networks, meaning that users would put their data in a centralized location, and then distribute it as they wish to other networks and services.

Bar Chick
Hello, Michael Arrington.

As I’ve mentioned before, this is a good idea in principle. Places like Ning, 37Signals, and LinkedIn (despite the fact that I hate Ning) are among the first major supporters of this, and are lauding it’s praises as if it’s the best thing since sliced bread. And the blog network (aka TechCrunch, Mashable, RW/W, etc.) is falling over themselves with self-promotional joy, except for the always-straight-shooting O’Reilly.

The Problem

Here’s the central problem: the hype is about “open data”, and yet OpenSocial is being used to create “applications” that can exist on any social network platform, not de-privatizing data. Who really cares if you can SuperCrotchPunch all your friends across 131 different social networks? No-one (except preteens and frat boys).

 

Also, these applications have apparently been hacked. It’s unclear as to whether this was Google’s fault or the individual network’s, but it is a problem nonetheless. I know I don’t want my data screwed with by some guy who figured out how the system works… do you?

Facebook Mom
How about “I VampireStabbed Your Mom”?

The Future

If you poke around the Google Code pages for OpenSocial, you’ll find something called “Data API”, which is labeled as “not released” and only provides documentation. But it gives insight into the true intentions of Google…

It appears that sometime in the near future, this “set of APIs” will be used for what everyone thinks it will (cross-network data), or at least be available for use. The companies/services that had access to these APIs before the general public may already be integrating the next release, but nothing’s been said.

The Final Countdown

Here’s how it breaks down: as it stands, OpenSocial is pretty worthless. Most of the “applications” on these social networks are stupid, childish, and totally worthless, so there’s no need to port them to other systems. In the event that Google does what it claims to be doing, aka “tear down [these] wall[s]“, then chances are it will be successful…

Social Graph
Um, yes?

But the question is will this be done with the lack of enthusiasm as other Google releases, or with the fervor of a true PR engine? The fate of the Internet’s data and Google’s dominance over search may depend on their next few dance steps.

Oh, and Facebook needs to be involved for this to be 100% successful. Which remains doubtful.

Sweet! Another Javascript!?!

Scoble, the famous self-promoter who many people love-to-hate, did a short post tonight on “ECMAScript“, something of a mashup between C++ and Java that aims to replace (read: fix) Javascript. Is this good (everyone knows Javascript was poorly thought out)? Is this bad (aren’t browsers bad enough as it is)?

The Good

Let’s start with the positives. First, everyone (and I do mean everyone) that has used Javascript knows the following:

  • not well thought out
  • very hard to develop with
  • supported and interpreted different ways (because of the DOM) by different browsers

Given those items, the simple fact that ECMAScript has much better syntax and higher level functionality gives it a major leg up on the competition. A language that is based on both C++ and Java, one would assume, has many more development and debugging tools than Javascript/AJAX currently does. What do you use now? Firebug? And that’s it? Oh right, that’s all there is.

You Will Fail
Just like the entire .NET Platform.

If you actually look at some of the specs, you should be impressed. I would love to have structure, syntax, and functionality comparable with compiled/server-side/”normal” languages like C/C++, PHP, and Java. True DOM OOP? Oh how you tease me…

The Bad

Take a look at any website that isn’t built entirely in flash. Chances are that it involves at least one “hack”… something to make the fancy menu work? Or perhaps some dynamic data flow courtesy of AJAX? Or one of those little-known projects like Google Maps that work so fluidly? Let’s look at some info on the three “main” browsers (and pretend Opera doesn’t exist):

  • Internet Explorer is a total failure, and is currently trying to play “catch up” with the rest of the browser world. This is not news.
  • Mozilla/Firefox has become the poster child for attempting to closely follow the W3 recommendations, and receives praise daily from almost anyone who works with computers.
  • Safari has been known to be better than IE, but worse than Firefox. However, with the new/forthcoming release, many of the problems in rendering items, as well as it’s idiosyncrasies, are fixed or improved. There’s even rumors of it being based on the ‘Gecko’ engine…

Browser Wars
Gates = Sith = Evil. Get it?

My point? The three most widely used browsers are all terribly different. They can’t agree on how to render certain HTML/XHTML and CSS elements… let alone how to handle Javascript and the DOM. What happens when you try and implement a language that is meant to do more while replacing Javascript?

The Ugly

If you’ve been paying attention the last year or two, then you’re aware that very few (if any?) AJAX applications are custom coded from the ground up. More often than not, they use a library like Prototype or jQuery. Even Google doesn’t… they developed a “translator” that moves Java to Javascript, allowing you to code in Java and then implement it as Javascript/AJAX: it’s called the Google Web Toolkit.

Think about all those applications, pages, sites, and “business models” based around using Javascript and a certain library. Think about how long it took them to figure out how to do what they wanted… and then guess at the cost. Once you’ve wrapped your brain around that, think about how long and costly it would be to switch languages.

That would be the web equivalent of recoding your entire program in C++ when it was written in FORTRAN… it would really be that different.

Understand Me
Pretty much the same thing here.

My Stance

Believe it or not, I don’t have one. I’m divided. I really would like to have everything I described as being a benefit of a “real” language to replace Javascript, but I think the outcome of attempting this would be truly disastrous.

Maybe the answer is not to build another language that sits on the browser for DOM usage… why not build that functionality into server-side languages like PHP or Ruby? I realize that sounds impossible, but what if there was a way for the script to recompile itself (or portions of itself) as necessary? Tie in connections to the browser itself, and doesn’t that meet all the requirements without all the hassle?

Hancock: AT&T’s Language to Spy On You

Wired recently covered “Hancock”, a new programming language developed by AT&T used to spy on telephone customers and “graph” the results. Alot of people are up in arms over this, decrying the end of privacy… but I, at least, think they’re misguided, if not totally wrong.

“Language”?

I think that the use of the word “language” here is not the write way to describe Hancock. If you look at the code sample provided on Wired’s post, it should look familiar. It appears to be a very close cousin of C, with some procedural and syntax changes. At what point does a language change from and “adaptation of” to a new language? The obvious point in C vs. C++ is OOP… Should this be called a “security oriented C adaptation”? Or “C, using different libraries”?

In this case, however, it would appear that “different libraries” is an understatement, and “new language” is an overstatement.

VaderPhone
This is completely unrelated.

Uses

AT&T developed this language with security monitoring and “community of interest” goals in mind, but when you read about how it works, and the end results… does anything else come to mind?

This language has huge potential. Looking for groupings of habits, traits, and connections between items (in this case, “people”) is a programmatical way to describe what Hancock does. Now imagine what search engines do. Or Facebook with their “social graph”. Or statistics’ processing.

If Hancock were to become more widely used, complicated things like searching for data and returning the most relevant results would become very easy… and, in the case of Google, perfect an already near-perfect system.

Maturation

Hancock is more than just an added library or two to a pre-existing language (kind of like C++), or a modification of one (Ruby)…. I believe it is a “maturation” of the language. As I mentioned before, it has many similarities to C, but makes some things much quicker, more efficient, and simpler than C. C++ was supposed to do that for C, but the end result was a more complicated language.

Iteration and data sorting is a huge part of any “real” language (LOLCODE does not count). Take another look at the sample provided by Wired, and then meditate on the code.

I Can Has Programming Language?
i can has SHUT YOUR MOUTH

Evil? Maybe.

Yes, maybe Hancock is currently being used for “evil” deeds like sorting through very private data to find “terrorists” for the American government. But take a step back from your emotions…

Elvis made “devil music” in his time… what’s he considered now? I’m pretty sure he can’t compete with Slayer…

Update (v1): Goodreads Widget

As I mentioned, I’m in the process of creating a Goodreads widget that auto-replaces certain tags with the appropriate links to authors or books…

I’m actually almost done, after about an hour of work so far.  There’s a problem with the AJAX Request for some reason, but everything else is more or less complete.

The only change I’ve had to make (in comparison to my original claims) from a user standpoint is that the tags will look like:

  • [[author:Terry Goodkind]]
  • [[book:Children of Dune]]

Instead of:

  • [author:terry-goodkind]
  • [book:children-of-dune]

The reason is that it makes parsing the page easier with two brackets, and with the correct spelling and capitalization, I don’t have to do any funky string reformatting.

I’ll be back later tonight or tomorrow, hopefully, with the final update…

Goodreads Widget

Something I found would be interesting, and asked Otis of Goodreads if it would be possible…

A widget for blogs (and other sites), using Javascript and the Prototype Library, that searches for authors and books, and attempts to reference them… instead of forcing you to link them yourself.  This would have been useful here.

Otis has created an API method for me to send queries to (will be available later tonight), and I’ll be using Javascript to look for “tags” in the text.  Two examples:

  • [author:terry goodkind]
  • [book:sword of truth]

Which would turn into direct links (or the closest match), spat out by Goodreads, to Goodreads.

I’ll be starting (and hopefully finishing) it this weekend.

Web Startups Done Right

I’ve written before on why some/many tech startups are just doomed to fail, but O’Reilly (the company behind the phrase “Web 2.0″) seems to agree with me on certain points.

The Basics

If you’re a company that wants to have a successful web application/service, you need three things:

  • good programmers
  • scalable server architecture
  • a vision

While the legitimacy of point number 1 is in question, that’s not what I’m getting at. Many companies, regardless of their grand (or not so grand) visions, and potential programming power, forget that your web application/service doesn’t mean anything if no-one can get to it, it’s slow, or it breaks.

Professional Recruiter
Maybe you should recruit for intelligence…

MySpace

MySpace is a perfect example of failing to prepare for the future. First, it’s written in ColdFusion. Second, it’s coded on a very low level. Third, it’s not built to be easily scalable. Have you seen the URL’s (”?fuseaction.item=123455&action=etc.etc.”)? Why do you think the site is so slow, even after it’s received alot of money and attention? Because the core code has not been rewritten and was not built with the future in mind (there’s a link to this statement somewhere on TechCrunch or R/WW, but I can’t find it at the moment).

Sweetness

You know, with all of the money that some of these web applications/services get, you’d think they would do something right. Facebook managed to, MySpace didn’t; Jaiku (and Twitter) did, Pownce hasn’t… the list goes on and on.

My Experience

I’m not claiming to be the best programmer in the world, but in coding my upcoming application “mySHOUToutLOUD (real consumer complaints, for real people), I’ve kept an eye on what I want the future to be. Here’s how…

  • GUI: coding in blocks and segments, and using things like header/footer files so that you can easily implement a graphical redesign
  • Codebase: creating your own function/code library that you re-use across the entire project, with clear and definitive names. Even if you replace 3 lines of code in each page with one function… that increases usability. Imagine that for much larger implementations.
  • Database: optimize database queries to the full extent possible. Enough said.
  • AJAX: do not use AJAX when your server-side language will do. An oveuse of it slows down your site, and may even break it. Ever seen Pownce?
  • Hardware: scalable. Many startups spend alot of money creating their own server clusters, which is fine… if you can afford to continue that in the future. The wrong thing to do is buy a couple of servers, set them up, and ignore them. I personally host with MediaTemple on their “gridserver” plan… even though I get frustrated with the lack of control sometimes, it’s very easy to scale since you just have to tell them to throw more “grid units” at your account… which does not cost $1000 each time you need one.

Server Mess
Wow, impressive. Want to go draw with crayons now?
My Future

I’ll find out in the coming months if my theories, which are supported by many others, are correct, and I implemented them properly… but the one thing I do know is that many many don’t.

This is why many web startups fail, or just break in half when they get any number of users. Stupidity is not an excuse.

Next >>