Technology, Uncategorized 1 comment on jQuery, form submit() IE bug

jQuery, form submit() IE bug

Ran into a really bizarre bug today.

There is a lot of chatter about the form.submit() functionality in jQuery on its API page. There’s also some results you’ll find on StackOverflow and the like about the functionality just not working. Two interesting bugs seem to be cropping up here…

1) An input field with name or id of “submit” seems to somehow break the functionality of the submit function.

2) It didn’t work at all for me in IE. I didn’t have any of the problems that were pointed out in the thread there, but nonetheless, it continued to throw an error in IE. Which got me thinking… how do folks debug JS code in IE? I would love a legitimate way to walk through and debug JS code without needing to buy Visual Studio.

Anyway, the solution of finding the submit button and clicking it as opposed to submitting the form fixed it. Final code looks like:


Very weird given that I’ve never had an experience like this in jQuery, which I think is a huge compliment to the library.

just thinking out loud, Technology, Uncategorized 2 comments on Building a community by selling to communities

Building a community by selling to communities

I had a phenomenal discussion with Bartosz Solowiej, formerly of TokBox and currently of, about many a thing, but specifically about the community problem that I am having. Not a problem in the sense that something is wrong, but rather a problem in bringing horses to water. It really helped me realize that the problem isn’t about convincing the horse, but about finding the water.

Just to give a quick overview of the previous post, the goal was to bring the TokBox Platform to more developers in the hopes that it will bring video chat as a service to more people. I’ve been working on this problem for two years now, and have always focused on building out a developer ecosystem which is strong enough to both want to build video chat into whatever services they build, and welcoming enough to make developers want to be a part of the ecosystem.

After having a really amazing talk with Bartosz about connections, communities and their natural growth, I realized that the best approach may be to flip the whole problem onto its head. Returning to the horse to water analogy, I need to find pools of water, and convince them that they need video chat as a service.

Let me back up a bit. My big ah-hah moment this weekend was realizing that I made a big mistake in thinking that one could manually grow a community. Communities don’t have foundations of hard work, or aren’t a set of people just brought together. This approach to building community is very water/oil in nature. When you shake it just right, you’ll convince yourself that the different parts have mixed, but in the end the two parts end up separate. Realizing that I was doing just that, I stopped to think about a different approach. Taking two giant steps back, I came to realize that communities grow organically. People find a common interest, and from that common interest they build a foundation of mutual understanding from a set of beliefs. This, and not the actual work to maintain and grow the community, is the foundation. On top of this foundation, and here is where the hard work and luck comes into play, is where communities are acted out.

My efforts, so far, have been focused on setting in motion the actions of the community. What I have not realized is the fact that there isn’t a foundation. I haven’t found the mutual interest. I’m trying to get people to build a community without understanding what the common thread is. I assumed that having developers building video chat into their applications was the common thread. It’s not.

What then is the common thread? I’m glad you asked. It’s communities who can grow stronger because video chat, or video messaging, is a fundamental part of their genome. Behind the scenes are those will see that a better community will grow because of the services we can provide, and they will find a way to make it happen. From there, video chat will become something that is part of the toolkit of community builders, who can then continue to spread the technology.

Find the water, and when the horses see something they like, they will continue to come back. The next step is figuring out how to make them come back.

Reblog this post [with Zemanta]
just thinking out loud, Technology, Uncategorized 1 comment on Building a community

Building a community

I was talking to someone today about the TokBox Platform that we’re building. It’s been something that I’ve been working on since I joined the Box, and something about which I’m very passionate. I was discussing with them my three goals for the Platform from a developer point of view over the next six months. The three goals are:

  1. Build out a second layer of abstraction into all of the SDKs as has been done for the PHP SDK, and continue to improve the widgets to make them as customizable and flexible as possible
  2. Write tutorials, blog posts and show off use cases on a weekly basis on the TokBox blog
  3. Have a large, involved community on the developer mailing list who answer questions for each other

I think the second task is really the easiest one to do. Why? It comes down to organization and discipline. I’m going to spend some time this weekend working through six weeks worth of blog posts (at one per week, that isn’t too hard), and start outlining the content. I want to start with what a user can do with the basic embed, both the call widget and the recorder/player combination, and then work my way into some use cases and sample applications. Hopefully there will be some readership at that point which will allow me to understand what new posts the readers want.

That’s a weekend’s worth of work, and then of course somewhere between one- to two-hours of writing per week. I think the big win there will be driving traffic to our blog, and getting more exposure for how simple the Platform really is to use. I also hope that personally it will help me improve how I communicate technical concepts to a broader audience.

The SDK work, in my opinion, is just a labor of love that is necessary to improve the Platform, and to march towards my goal of doing everything in ten lines of code or less. Even if those ten lines of code come from layers of abstraction, I think simplifying the underlying actions of the Platform will make it much more attractive to potential developers, and that leads me to my final goal…

Building a strong community around the TokBox Platform. I’ve been working in the developer list and with partners for two years now. It’s a very humbling experience. I’m totally convinced that adding video chat, or video messaging, capabilities really adds a lot of value to a whole laundry list of services that are already out there. The amazing bit is that most of the individuals with whom I’ve spoken in those industries agree. They just don’t have time, money or a compelling use case to make it happen.

And so, humbled, I’ve focused on the little things, and making the little things count. Respond on the developer list as quickly as possible. Listen to feedback. Maintain good documentation. Build sample applications. All with the hopes of building a community that then starts to do these things for the Platform because the community has also discovered the potential of video chat and messaging. We still need to better address some of these issues, especially documentation, but we’re slowly starting to get to a place where I think the foundation is really well developed.

What then needs to happen to reach the tipping point, and go over it? I don’t know. I want to spend some time thinking about this over the weekend. I think the obvious first step is patience. I’m not good at that, but I’m learning. I think step one-a is luck. Sometimes you just need the ball to bounce your way, and of course laying a good foundation makes it more likely that when the time comes that lady luck will favor the solution we’ve built.

I’ll do a follow up to all of this at the end of the weekend, but would love to hear about any opinions or thoughts about the building of a community or the goals I’ve laid out. At the very least, let me know where you think video chat should be, and maybe that will be the idea that makes it all happen.

Reblog this post [with Zemanta]
Technology, Uncategorized 0 comments on Another bug bites the dust

Another bug bites the dust

I’ve been working on an interesting project lately that I hope to share with everyone soon. I keep running into the oddest of problems trying to get things going. It’s almost as if just getting the whole thing started is the biggest challenge. After that… it’s going to be a lot easier!

I develop on a MacBook Pro. I’ve had this computer since junior year of college when my iBook died right as I had finished page 18 of a 20 page paper on using Bayesian supported neural networks to predict the NCAA tournament and beat my mom in the annual family competition (more on that in March). I therefore use MacPorts to maintain packages on my system. I just don’t think compiling by source, keeping up with all of the packages I need, version matching all sorts of dependencies is a good use of my time.

This new project is the product of a lot of thinking and learning. One big piece of learning on my end involves understanding the value of using frameworks to do a lot of the grunt work that comes with web applications. I’m using CakePHP for this project. Turns out that CakePHP 1.2 and less is not compatible with PHP 5.3. Okay. That’s easy to fix. I’ve moved on to CakePHP 1.3, and the next major release of CakePHP will be API compatible with 1.3 per this blog post.

Next step is getting the database connection working. This drove me crazy. So it turns out that PHP 5.3 comes with MySQL Native Driver. I thought this meant there was going to be a problem with CakePHP as a result. Turns out that wasn’t the case. I was getting all sorts of errors about the extensions not being supported for basic functions like mysql_connect. It just didn’t make any sense. I tried making sure that the sockets were correctly defined in the php.ini files. I tried re-compiling PHP.

The solution. Before I divulge the solution, I think it’s fair to say that the source of all knowledge when it comes to PHP comes from either the phpinfo() function or from doing basic command line actions with PHP. It really gives you a good idea of the health of the PHP universe. The solution turned out to be that the extensions weren’t being loaded because the extension directory in the php.ini file was ./ where it needed to be /opt/local/lib/php/extensions/no-debug-non-zts-20090626 because that’s where the extensions seem to be installed when built by MacPorts.

Now that things are finally setup, it’s on to building out the project. More on that by the first of March!

Technology, Uncategorized 0 comments on Being RESTful ain’t that easy

Being RESTful ain’t that easy

This is a more technical post, and so if you aren’t interested in some nuances of browsers and Internet architecture, then you should pass on this one. It’s okay, you won’t hurt my feelings.

Man, we ran into a doozy today. We had one report from a user that people weren’t able to enter their moderated video chats. We weren’t sure that made any sense, and we couldn’t find any records of failure to enter the video chat in our error logs. It turns out we made two mistakes. First, we didn’t gather enough information. Second, we didn’t understand the errors we were getting back. Both, thankfully, are now fixed, but the journey was an interesting one.

First, let me give a little bit of background on our new architecture. We’ve just released our new call moderation stack at TokBox, and, to do so, we really sat down and thought through how to build this functionality in an Internet architecture appropriate approach. We came up with a really solid, RESTful API. The basic premise here is that all actions have a URI, and are a very specific contract between two endpoints (one being the user making the call, the second being our server). It was all very well tested on a Mac in both FireFox and Safari.

Here’s where the real journey begins. In RESTful fashion, we are defining the user’s role in a moderated chat by transitioning them from an “ASK” state where they are essentially knocking to get in, into a “PARTICIPANT” state where they have joined the call. The modify action uses the POST verb (though technically it should use the PUT verb, we weren’t confident in the Flex framework’s HTTPService class to handle this properly, and have instead limited ourselves to POST and GET), and then redirects to the user info action which returns the updated role, as well as any profile information about the user that might be pertinent to the video chat.

Now here is the gotcha. We use an HTTP 302 redirect to move between the actions. In all browsers not IE, it looks as if the 302 happens by first doing the verb of your choosing (in our case a POST), and then a GET to the redirected site. According to the spec as we read it, this is probably wrong. In fact, the redirect needs to ask the browser which verb to use in the HTTP/1.1 spec. Seems as if the HTTP/1.1 spec is either being misinterpreted, or the HTTP/1.0 spec is being maintained to enable backwards compatibility with how sites acted. Why did this cause us a problem? Because in IE7 & IE8, the 302 redirect does a POST (essentially repeats the original verb action). Our user info action was scoped as only accepting GET requests. The result… guest users couldn’t enter a moderated video chat from the IE family of browsers because the redirect fell into an error state, and didn’t return the proper response.

It took watching the TCPDump coming across the server across multiple browsers and API calls to figure this one out, but in the end we learned a very valuable lesson about how redirects work, making RESTful APIs work cross browser, and making sure we test across all combination of browsers and scenarios.

Technology, Uncategorized 3 comments on Oh CSS… You drive me crazy

Oh CSS… You drive me crazy

I’ve been working on the content pages at work for the last few weeks, and it makes me wonder how people can work with CSS everyday without going bald (good thing I had already lost all of my hair). The inability to create a consistent user experience across web applications has got to be one of the largest dead weight losses in productivity and efficiency in the web industry. Not finding a solution for this, and a solution which is accepted industry wide, is just going to create a workplace for mediocre middle men whose sole purpose is to make sure that IE looks like Safari (or maybe I should say WebKit to include all WebKit based browsers) looks like FireFox. These people should not be in the industry because this problem should not exist in the industry.

(On a side note, this was a problem for Javascript, and the solution has been to build frameworks so that one isn’t working directly with the browser implementations themselves. I haven’t done the work to try and understand if there are CSS frameworks which mimic this, but please let me know if there are)

My specific problem was probably a bit of an extreme case. I often wonder when doing this work if there is a best practices to all of this, and if I’m just missing it. I’ve often made my way over to QuirksMode to see, but I’ve found that it’s often non-comital at best. But, back to the case at hand!

I was working on our new Platform page, and we were adding a call to action button (the Getting Started button that you see on the right hand side of the page). I have the image above it laid out in its own <div>, and I thought that I could put the call to action button underneath it, add appropriate padding, and the two columns which make up the content section of the page would be all lined up. Result…

Now that’s a surprise! I think the first thing that I needed to change was to set the image width and height explicitly instead of in the CSS selector. This helped things in IE, but ended up changing nothing for FireFox. Safari saw no difference. The irony of it all was that there’s no such thing as a FireFox specific stylesheet in our ecosystem.

I’m sure that if we were to do browser detection and build out a full HTML+CSS site, then we could do have a FireFox specific stylesheet for these nuances.

Nothing I tried using a two column layout worked. I finally ended up taking out the two buttons from the bottom of the content section, and creating a footer <div> which aligned the two buttons as we wanted. This was the cross-browser implementation that finally worked, but either my lack of knowledge or the quirks of an imperfect system really drove me batty on this one.

Technology, Uncategorized 2 comments on Fighting Java Ant… Setting params in a foreach loop

Fighting Java Ant… Setting params in a foreach loop

It’s really frustrating to me that doing something ever so slightly differently leads to such drastically different results when dealing with software. It’s true that software engineers (if you’re curious about the treatment of the word engineer, then just call me on TokBox me and I’ll explain) tend to be the harshest critics of software, and that it’s hard to impress someone who thinks that they know how to do it better. Every software engineer thinks that they know how to do it better.

With that disclaimer, I want to complain a bit about some behavior that I found in working with Ant.

I don’t know how to do Ant better than the creators of Ant have. It’s not my favorite tool, but if I had to use makefiles, then I would stop developing code. I don’t think whether I use hardtabs or softtabs should determine the validity of my code. That, however, is a different rant. However, I was very surprised to find that when using the <foreach> tag in an Ant script, that it doesn’t inherit the properties that have been set so far. Instead, you have to expressly define what properties to pass into the <foreach> tag. As an example:

target: buildinfo
<property name="" value="${current.time}"/>

target: getcssfiles
<foreach target="compile-css" param="the_file">
        <fileset dir="${localedir}">
            <include name="*.css"/>

The <foreach> loop doesn’t know that the property exists. Every other target does, but the <foreach> doesn’t. However, if I were to add:

<param name="" value="${}" />

into my <foreach> loop, then it not only knows the build number, but everything builds! The final code ends up looking like this:

<foreach target="compile-css" param="the_file">
    <param name="" value="${}" />

        <fileset dir="${localedir}">
            <include name="*.css"/>

Technology, Uncategorized 0 comments on CES 2009

CES 2009

While the pundits were relatively correct in pronouncing the death of CES, and trade shows in general, those who didn’t make it out to this year’s trade show really missed out on what was probably the top show in the last 3 years.

In truth, it’s really difficult to go to CES every year, and expect to see something new each time. I just don’t think that the industry moves that quickly. This is also why most feel that Apple pulled out of its relationship with the MacWorld conference. It’s just too hard to come out with something amazing year-in, year-out on such a tight schedule. However, the benefit of going every year is that you really start to notice when amazing, cool things are coming down the pipe. Case in point, when I met up with fellow NCSU classmates Jordan O’Mara and Win Bassett a few years back, they had discovered a game called “Guitar Hero” which they immediately fell in love with. The rest, as they say, is history!

What were this year’s gems?

I’ll be honest and say that I didn’t get to spend as much time at the trade show as I would have liked, and so I’m sure I missed a lot of stuff. With that disclaimer, here are some of the really cool technologies which I saw that I think will make big splashes in the years ahead.

These guys aren’t a technology, but instead a way to make your
technology look good. I think it’s really interesting that everyone has
the exact same computer, and that there isn’t a larger push by the
masses to be unique. Are unified, recognizable computers the “uniform”
of this generation? Is the thought that I can’t make myself different
or everyone won’t know that I have a Mac, and that makes me cool? Lame.
Anyway, these guys had some really good computer covers, iPod holders,
etc. for all of your digital gear.

  • Microprojectors

This was by far and away the coolest thing that I saw. The days of clunky, A/V club driven projectors seems to have come to an end. The quality was good, but not great, but yet the thought that the full projector get up can be miniaturized to the point where it will fit into your backpack just seems awesome to me. I was most impressed by 3M’s product, though there were some Asian companies which had products that seemed to be close in the race. The main features to look for are

  • Luminance
  • Battery Life
  • Size

And for some pretty obvious reasons, size really matters in this regard! My prediction is that within 3-5 years this technology will be embedded into your smart phone, and you will simply bring your presentations/movies to class, work, community theater, and project away.

A really cool, though still somewhat gimmicky, technology which I discovered was 3-D television. It was quite spectacular to see some technologies created in real time (which is what Sony was doing), and other companies such as TDV Technologies using the glasses, also real time, and providing an out of TV experience. I’m not really quite sure what the use case is today, but I’m imagining a scenario where I can walk into the 3D projection from my screen and watch as Shawne Merriman breaks through the line, and turn around and watch him sack Peyton Manning. That, I would buy.

  • NetBook Computers

The Intel booth was highlighted by the rise of NetBook computers and their ATOM processor. I think that the ultimate goal for NetBooks is truly having a portable document, e-mail, and basic browsing machine for situations, such as travel, where you probably aren’t doing truly intensive work. I’m just not convinced that it’s for me as the machine I have already does quite poorly when I try to get work done. Nonetheless, everything seems to be included (optical drives, webcam, and the standard array of USB slots). Also, you can’t disagree with the argument that you’re paying for exactly what you’re getting, and so I see the value for the heavy traveler.

This was just really, really cool. I took a photo of this because I almost couldn’t believe it. The focus of Gravitonus seems to be accessibility, but they’ve also made quite the fashion statement when it comes to “Pimping My Workstation”. Check out the photo, and the link, but I think as ergonomics becomes a bigger, and bigger, issue in the technology workplace these out of the box approaches will become more and more popular. I’m not quite sure what the pricing is, but that’s probably the limiting factor right now. Nonetheless, this ranked extremely highly on my coolness radar at CES 2009 this year.

  • OLED Technology

The OLED technology which was in the Sony TVs was unbelievable. The colors are ridiculous, and they could be the thinnest monitor-like device I’ve ever seen. Just a few years ago, the push amongst the TV Manufacturers was size of the screen, contrast, true 1080p, and now it seems to be thinness, as this was on display in many places. However, the OLED screens at Sony were hands the ones I found to be the most unbelievable. The width of my thumb was probably 4x wider than the entire television. Just awesome!

School Year 07-08, Technology, Uncategorized 2 comments on Chronicling My Visualizaton Project – Start with an error

Chronicling My Visualizaton Project – Start with an error

It seems that you can’t claim that a project has started until there is a bug of some sort that has nothing to do with any code that you have written. In fact, it’s a bug in you setting up your system, which often tends to convince folks that the stars are lined against them, and they should just quit. Don’t quit. Just be patient, and you’ll find the way.

I will be building the visualization that I created for the MovieLens Recommendation System as my project in Visualization. It is probably the most awesome thing that I’ve planned on doing in a long, long time. To do the visualization, I will be taking advantage of an IMDB API written in Ruby by a one Stephen Becker IV. I need the API to pull out information from IMDB that isn’t available in the data that we are given in the text file.

And so today I am setting up the environment as a proof-of-concept, and I immediately run into a problem. Others seem to have had this problem, and seem to have solved it by waving their hands in the air and changing the magnetic field around themselves by just enough to switch the necessary bits on their hard drive. Unfortunately, I was never very good at waving my hand in the air like I just don’t care.

The problem was that an included extension wasn’t building properly, and therefore when it was called it was puking the following output:

monvural$ ruby imdb.rb
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require': no such file to load -- hpricot_scan (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.6-jruby/lib/hpricot.rb:20
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from imdb.rb:12

I thought to myself, “Well damn, there’s no way I’ll figure this out.” The solution however was quite trivial. Props must go to the blog aki note that had the answer written in Japanese. I used my amazing powers of reading the English characters to solve the issue at hand. The following steps will fix the error:

cd /usr/local/lib/ruby/gems/1.8/gems/hpricot-0.6/ext/hpricot_scan/
sudo ruby extconf.rb
sudo make install

The result was a working program! The first major obstacle tackled, I can now get the information that I want from IMDB. Now I need to learn how to efficiently use Java3D.