• Have 43 Things?

    43things.com is a social networking, web 2.0 site that allows you to create lists of your goals in life and share it with the rest of the world. Why you’d want to do that is up to you, but this kind of application allows one to observe some interesting derivative things and behavior. For one, you can compare roughly how much more popular some goals are compared to others.

    For example, I see in my list that there are close to 1,000 other users who would like to learn mandarin as I would, but only seven others would like to learn nihonggo. One may make a case from this about which goal is more worthwhile than the other but I suspect this won’t be more rewarding than a parlor game. But what’s wrong with a parlor game? It’s fun, simple, and, well, it’s just a parlor game! So I did a bit of playing around and listed among my goals: learn Java, learn C#, learn Ruby on Rails, learn .NET*, learn PHP, and learn Groovy. I hit save on each of these, and went to my “six things.”

    The numbers:

    • Learn Java - 617
    • Learn Ruby on Rails - 1,284
    • Learn PHP - 1,380
    • Learn .NET - 118
    • Learn Groovy - 8
    • Learn C# - 537

    Again, I’d like to say that I’m treating this (and you should too!) like a parlor game and nothing more. Not because I’m a scaredy-cat (even though I am) and I’m afraid of getting flamed (this too), but because really, there’s nothing to flame about. This is hardly scientific and serves no direct technical benefit of one way or other. Also, note that these results signify desire rather than accomplishment.

    That being said, there’s no reason we can’t have some fun, yes? *wink wink*

    From the results above we can see that RoR and PHP are roughly at the same level, getting about 1,300 “aspirants.” Next is Java and C# with about 600, then lagging far behind are .NET and Groovy, with about a hundred, and less than ten, aspirants, respectively. Interestingly, there are about half as many 43things.com users wanting to learn Java as RoR or PHP — and given that Java is like, old (a teenager really — nearly thirteen — but that’s old for programming languages), that’s quite fascinating. Conversely, with .NET and C# about half as old as Java, it’s already got fewer aspirants**.

    On the subject of age — the results show us that PHP is quite hot! It’s just about as old as Java, but its numbers are even slightly ahead that of the new kid on the block, RoR. A lot of the reason for this may lie in the fact that PHP is one of the most, if not the most, popular module in the most popular web server, the Apache web server.

    So there’s our parlor game. Head on over to 43things.com and try out its features and see if you can come with your own parlor game. *wink wink*

    ______________________
    * Yes, .NET is a framework, not a language.
    ** On 43things.com only

  • AJAX on the Menu

    We tried out McDonald’s online ordering site the other week, and I was mildly surprised because of two things. One: what, a site where you can order online and have your food delivered as if you actually called? I couldn’t even find a McDonald’s when I was walking around San Francisco last year! Two: AJAX is on the menu! Yep, you have it right.

    Take a look and you’ll find that their menu system is AJAXified — just goes to show that the technology horizon is right where we can reach it, and that we can make this a strength of our own by mastering related skills and marketing ourselves as, if not experts, then as people who sure damn know what they’re doing.

    In the meantime, I’ll have that Big Mac with orange juice, please.

  • What Sustains Web 2.0

    Finding fresh ways of distributing content in Web 2.0

    I signed up for an account the other week at SproutBuilder. It’s a beta application that claims to allow anyone to quickly and easily “Build Living Content.” Uh, yeah. It came across to me as another slogan fit for a sound bite.

    Looking more closely, though, the concept around the entire thing is interesting at the least. In SproutBuilder, you create what are called “Sprouts,” which, in a nutshell, is simply a snippet of flash content that you (or SproutBuilder) propagate to the blogging and publishing sites that you use. You can add many kinds of content to your Sprout — images, text, sound, video — as well as mix in any number of SproutBuilder elements such as calendars, buttons, and charts to enhance your design.

    For example, I created a Sprout to announce the awesome party I’m throwing tomorrow. I added some images of everyone going wild at the last party I threw, plus the usual info — when and where and what you should bring (just yourself and a party “toy”). I click Publish, choose my blogs and personal site from the catalog, enter my credentials, and voila, my Sprout appears on those sites and all my avid and rabid fan-readers get notified of my party, and that they can expect to spend their evening tomorrow having the finest time of their lives (again).

    If, say, I maintain my party blog at Wordpress, my hip tech blog at Blogger, and my ultra-cool personal site at Piczo, then this means that I can broadcast all this cool information using just a single, centralized and convenient interface. Another advantage is that if ever there’s a change I want to make to any of my Sprouts (like if I wanted to move the party *tonight*), then I just go into SproutBuilder, modify that Sprout, republish, and that’s it — the content at my blogs and personal site is updated!

    SproutBuilder may be on to something here, because, if anything, content is what makes social networking and the Web 2.0 world go round — but not just any content, it has to be *user-generated* content that the masses (that’s us) are able to create with the lowest possible barrier and propagate with also the lowest possible barrier. It’s all about enabling the “viral” behavior of user-generated information.

    Which brought me to another interesting thought — how difficult is it to allow information to be viral? Facebook was able to do this by opening up an API and allowing thousands of applications to be developed that allow generation of content from users (this is what Facebook got right that many others didn’t — hence OpenSocial). SproutBuilder is trying to gain a foothold through the use of this concept, though it’s just one of the budding tools out there; its strength however is that it can publish to a host of platforms, including Facebook, Wordpress, and a lot more.

    At the bottom of it, getting information to or from other applications is not where the hurdles lie — rss, web services, mashups (a la Y! pipes), and direct user mediation make this possible; what people are looking for instead are ways of mixing things up differently to come up with something that has the greatest novelty and utility for users. And the rewards for a smash hit way of bringing content together are not trivial — it is estimated that ad revenue will climb to around US$20 billion for 2008. Grab half of half a percent of that and you can’t say you’ll be in bad shape.

    Me, I’m taking over the world by building this cool app that gets ads with address information from craigslist.com and mashes that up with Google Maps, so that users can easily find what they’re looking for. Neat, huh?

    Oh, wait.

  • Management Caught Monitoring Employee Info With Concerns

    [DEVELOPING STORY]
    Exist Global Inc., Pasig City, PHILIPPINES — Reports have been confirmed here of management found responsible in the indiscriminate monitoring of its employee’s activities. The management had been keeping track of varied and sensitive employee data on a regular basis, and had done so without regard to privacy.

    An insider, who wishes to be concealed under the name “Boy Bakal”, has informed us that the management uses a mix of tools to perform this devious operation. He admits to being deeply involved in the scheme and describes the process below.

    Management extensions are used together with programming to aspects, and the Spring framework is used to bind them all, he says. “JMX is a technology that provides tools for managing and monitoring applications and systems,” the informant expounded. “We are looking at the indiscriminate way that this management has used MBeans, MBeanServers, and agents to get at all that data,” he adds. “By taking advantage of our cross-cutting concerns, the management is able to monitor when we eat, when we go to the bathroom, who we make friends with… it’s terrible!”

    Boy Bakal then proceeds to explain in detail how the covert scheme was perpetrated. We present a condensed version of his account:

    JMX is used in conjunction with the AOP facilities in Spring and hooked up to the employee information application. The application serves the welfare of the employees and fulfills the contract described below:


    public interface EmployeeWellBeingService {
    public Food[] giveSustenance( Employee employee, MealType mealType );
    public void relieve( Employee employee );
    public void addFriend( Employee employee, Employee friend );
    }

    The definition of the big brother MBean interface that corrupted this well-meaning services was deduced to be as follows:


    public interface EmployeeBigBrotherMBean {
    public void initiateEmployeeMealAction();
    public void initiateEmployeeRelievingAction();
    public void initiateEmployeeSocialzingAction();
    }

    An MBean is simply a Java class that follows specific rules as determined by the JMX specification. Instances of MBeans are responsible for exposing management interfaces for tampering with and accessing our employee information. Bits and pieces of the class definition for the employee big brother MBean was smuggled out of Exist Global’s maximum security servers at high risk, and is shown here for the first time ever:


    @ManagedResource( objectName="exist.bigbrother:name=EmployeeBigBrother" ) [1]
    @Aspect [2]
    public class EmployeeBigBrother implements EmployeeBigBrotherMBean {

    @Around(argNames="employee,mealType", value="bigBrotherWatchMeal(employee,mealType)") [3]
    public Object recordEmployeeEating( ProceedingJoinPoint pjp, Employee employee, MealType mealType ) { [4]

    StopWatch stopWatch = new StopWatch();
    stopWatch.start();

    Object result = pjp.proceed( pjp.getArgs() ); [5]

    stopWatch.stop();

    long eatingTime = stopWatch.getTime();

    logEmployeeMeal( employee, mealType, (Food[]) result, eatingTime,
    Calendar.getInstance().getTime() ); [6]

    return result;
    }

    ... public void recordEmployeeRelieving() { ... } [7]

    ... public void recordEmployeeSocializing() { ... }

    @Pointcut( "execution(* com.exist.service.EmployeeWellBeingService.*(..)) && "+
    "args(employee,mealType)")
    public void bigBrotherWatchMeal( Employee employee, MealType mealType ) { } [8]

    @ManagedOperation [9]
    public void initiateEmployeeMealAction() {
    PerformanceMonitor.spikeEmployeeFood( DataBank.getAllEmployeeMeals().getAllDrinks(), Enhancers.RED_BULL ); [10]
    }

    @ManagedOperation
    public void initiateEmployeeRelievingAction() { ... }

    @ManagedOperation
    public void initiateEmployeeSocialzingAction() { ... }

    ...
    }

    [1,2] The big brother is defined to be a managed resource in JMX and goes into a lifecycle suitable for MBeans. It is also declared as an aspect. The annotations are detected and handled by the Spring framework.
    [3,4] This devious method is an around aspect, meaning that it intercepts the sensitive employee service both before and after execution of its methods.
    [5] A stopwatch is used to record how long the employee takes to finish his or her meal. Devious indeed!
    [6] All monitoring data are gathered and recorded in the secret big brother data center. This is where the crime occurs!
    [7] Our infiltration only allowed us to retrieve an incomplete, but highly descriptive, look at the big brother.
    [8] This method serves as a declaration for a pointcut, and allows the big brother to specify which methods it wants to intercept.
    [9] Specifies that this is a JMX operation for manipulating a managed resource. In a JMX console, this will appear under “operations” and will appear as a method taking no arguments. All they need to do is push the button!
    [10] The management is using its big brother powers to turn us into Energizer bunnies!

    These are then bootstrapped into the application from the application context xml file. Our highly developed but inadequate sleuthing skills only produced the following configuration snippet:


    <bean id="wellBeingService" class="com.exist.service.EmployeeWellBeingServiceImpl"> [1]
    ...
    </bean>

    <aop:aspectj-autoproxy /> [2]

    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
    <property name="assembler" ref="assembler" />
    <property name="namingStrategy" ref="namingStrategy" />
    <property name="autodetect" value="true" />
    <property name="autodetectModeName" value="AUTODETECT_ASSEMBLER" />
    </bean> [3]

    <bean id="jmxAttributeSource" class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" /> [4]

    <bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
    <property name="attributeSource" ref="jmxAttributeSource" />
    </bean> [5]

    <bean id="namingStrategy"
    class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
    <property name="attributeSource" ref="jmxAttributeSource"/>
    </bean> [6]

    <bean id="bigBrother" class="com.exist.devious.bigbrother.EmployeeBigBrother" /> [7]

    [1] The target service is configured somewhere.
    [2] Enables Spring support for AspectJ aspects. This automatically processes beans annotated with AspectJ annotations.
    [3,4,5,6] Enables JMX annotations and sets up the big brother for operating in a JMX environment.
    [7] The big brother enters.

    The informant’s exposition ends there and he declines any further comment. The authorities are still undertaking a complete investigation at this point; in the meantime, all parties that may be affected are advised to exercise judgment and discretion in any activity.

  • Sexy Development

    Just to set the record straight — all kinds of software development are sexy in my book. But this entry is not about all kinds of software development, but rather about the one that’s getting all the hype and buzz.

    If buzzwords were Rings given out by Sauron, I guess “Two-Point-Oh” would rule them all. While 2.0 isn’t a buzzword in itself, it’s been attached to a host of other expressions so much so that it deserves a ring of its own. Much has been said about “X 2.0,” where X is some nice-sounding term that is not overly arcane but looks complex enough. Examples are “Sustainability 2.0,” “Convergence 2.0,” “Enterprise 2.0,” and the alpha-male of them all, “Web 2.0.”

    I wouldn’t venture into defining all of these but rather I’d like to look at the top dog, Web 2.0, and from the perspective of software development in particular.

    Or to be most specific, I’d like to enumerate some things that address the topic of what things might go into an environment to set up for doing development work targeted at Web 2.0 involving AJAX.

    IDE
    Eclipse goes without saying here. However, for client-side coding the splendid Eclipse-based Aptana is a prime candidate. Aside from the features expected in an IDE (code assist, debugging, etc), Aptana includes reference material for Javascript, HTML, CSS, and DOM, among other things, so that nifty function or class definition is just a click away. But wait! There’s more! It also comes with support (preloaded libraries) for the most popular AJAX-oriented libraries like Rico, Prototype, Dojo, Scriptaculous, and a host of others. But wait! There’s more! It’s also extensible through plugins and Javascript!

    There is a Pro (aka not free) version which includes a JSON editor, statistics, IE debugger (the Community edition supports debugging only on Firefox), and Aptana support, all for the wonderful price of $99.

    Libraries
    I’ve already mentioned some of the most popular libraries, and here’s a brief description of these:

    • Rico, Prototype, Dojo, Scriptaculous, jQuery. These libraries provide encapsulation of XHR requests and also an API for client-side dynamic elements as well. Use them as you need them.
    • DWR. This has been a mainstay for Exist across a number of projects. We started using this from its early versions and it’s still a top choice with the ease of working with Java objects on the server and “auto-translation” to DOM on the client.

    Testing and Utilities
    I haven’t really used any unit testing framework for Javascript in the past but I’m looking to set this up in future work. Below is a short list a combination of all-around utilities and testing frameworks.

    • JsUnit. This is a unit-testing framework for Javascript that’s fundamentally a port of JUnit, so the essential approaches are the same as what we’ve been used to in JUnit.
    • Firebug. A firefox plugin that comes in as a swiss-army-knife kind of utility: Firebug has inspectors for CSS, HTML, DOM, and can perform debugging and profiling of your application. But wait! There’s more! A lot more, actually so see here for yourself.
      I found Firebug to be essential and a totally useful tool during development. The Web Developer plugin is somewhat similar but not as nifty.

    So, there. Just a few things to look at to streamline your development environment if it’s Web 2.0-oriented. Just mix and match, and if there’s some new or better stuff out there it would be great if you can also share your discovery.

  • Open Source And Exist @ DLSU

    It was a good talk at De La Salle University during the weekend, where we had Philip, Brett, and myself giving out a few words to an enthusiastic mixed crowd of sophomore and junior college students [1].

    Philip, wearing his open-source evangelist hat, gave a deft discussion on the history of open source, from its beginnings to its current impact and pervasiveness in the world. With some timelines here, a few choice quotes there, and a diagram or two to round it off, he was able to illustrate how the idea of open-source has become a compelling force and how Exist has come to embrace it and harness it in the local setting, both as users and participants in open-source, but also, going 360, being an advocate and active practitioner in the business or commercial arena.

    Brett and I gave out some juicy tidbits about ourselves and how we came to be involved in the open source community, fielding some good questions from the audience about the commercial aspects and how Exist has taken advantage of these.

    There were also some questions about Exist’s ECC program which Mafe took care of, and overall it was a very good exercise in getting out there and contributing to awareness about open source in general and Exist in particular.

    ______________________
    [1] I give out the usual disclaimer to set the tone for this blog: statements and pronouncements made here are interspersed with both fact and fiction. The astute reader is encouraged to exercise his or her best judgment.