Management, Mobile, Uncategorized

Mobile is to Desktops what Startups is to Enterprise


Something that caught my attention when trying to understand good Mobile UX was that many of it’s patterns can be applied to larger devices i.e. Desktops as well.

In other words if you start with a Mobile first UX approach you tend to remove the clutter and come up with a more “lean” UX that can be used on desktops as well.

But interestingly (or strangely) I see a similar relationship between how Startups are managed compared to larger enterprises.

Startups are managed in a very lean, less bureaucratic manner with a bias toward action. I think smaller organizational units (e.g. software project teams) within a large enterprise can also take a leaf out of the startup playbook.  This is similar to how Mobile forces a leaner UX design by removing “unnecessary” clutter.

Folks in the enterprise environment may call this Agile but I think having a “Startup mentality” at a large organization is going even more further by shedding as much clutter as possible and getting stuff done.

I guess SAP has already recognized this with it’s AppHaus concept.

Advertisements
Design Patterns, Java, Maven, Uncategorized

Missing ServiceProviders after Shading


Shading is a technique used in Maven to create a single”Uber” jar by merging the contents of  your app jar and all of it’s dependent jars. This makes it easier when distributing your application since there is only one big jar to deal with.

The Java Service Provider pattern is a cool way of building loosely coupled extensible applications.

When building a jar containing such implementations a text file per interface should be created listing all of it’s implementations and placed in META-INF/services. This is used by the JVM when the application needs to load (using ServiceLoader class) implementations of a particular interface without explicitly knowing about them.

The problem is when shading multiple jars containing service providers Maven does not merge the contents of META-INF/services by default.

The solution is to use the transformer ServicesResourceTransformer to tell the Shading plugin to merge the contents of META-INF/services in every jar it shades.

This can be specified in the pom.xml as shown below.

<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers> 
...
Uncategorized

2013 in review


The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 18,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.

Click here to see the complete report.

General, Technology, Uncategorized

Post Notifications plugin tip for WordPress


If you use the Post Notification plugin in your hosted WordPress (WP) blog you will notice that it maintains a separate MySQL table called post_notification_emails for users who subscribe for email alerts about new blog posts.

But unfortunately there is no easy, configurable way to automatically subscribe a user for post notifications when he or she registers a new account in the blog.

Remember, when a new user registers he has to provide his email address which is stored in the core WP users table which has no link with the post_notification_emails table.

A simple solution for this is to create a MySQL trigger in your WP database like so;

DELIMITER $$
CREATE TRIGGER `subscribe_user_for_notifications`
AFTER INSERT ON `users` FOR EACH ROW
BEGIN
INSERT INTO post_notification_emails (email_addr, last_modified, date_subscribed, gets_mail) VALUES (NEW.user_email, now(),now(),1 );
INSERT INTO post_notification_cats (id,cat_id) VALUES (NEW.id, 0);
END $$
DELIMITER ;

Note: 

  • I used the phpMyAdmin tool to execute commands on the MySQL database. This comes with the WAMP installation which is used to host the blog.
  • The table names mentioned above may have table prefixes if you provided them during the WP setup. (e.g. travelblog_post_notification_mails)

Although I’m sure there are other ways of doing this like hacking the PHP code in the Post Notification plugin (which by the way is no longer maintained) to query the users database for emails in additions to the post_notification_emails for now I prefer this backend DB solution 🙂