Blog

Simplicity in Software Architecture is Underrated

Sabyasachi Ruj

fight hard against complexity

“Simple is better than complex.
Complex is better than complicated.” – Zen of Python

So what makes something Simple, Complex or Complicated?

It varies – A problem could be simple if you are Einstein but unfathomable for many of us. In case you are on the other side: hi Einstein!

Generally speaking, a problem is simple if it has just a few components and our mind grasps it easily. A complex problem can have many components and our mind takes some time to understand it, say, 20 minutes or more just to understand the problem. A complicated problem is a beast (sometimes beasts). You will keep missing few parts of the problem even after you get it. It is very difficult for our mind to keep the entire context of such a problem.

Why bother about it?

We are software developers and we love solving problems once and for all so that other humans won’t have to. The more complex a software becomes, the more difficult it becomes to maintain. This makes the software more likely to break due to changes and difficult to debug. It can cripple the team and bring the development pace to crawl.

Complexity is inevitable

Every non-trivial and useful software will gain weight as it keeps expanding its problem horizon. That is to say, complexity is inevitable for such a software because we will keep adding features and enhancements to make it more useful to our dear users.

Why should we fight against architectural complexity?

Since architectural complexity of a software already depends on the complexity of the problem it solves, what we should not do is make the software unnecessarily complex. As obvious as that sounds, it is important to keep it in mind, because it’s very tempting to step over the line and make something more complex than it should be. Why? Kendra Cherry has explained it better in this article. Though all the four “obstacles in problem-solving” listed in that article are very relevant for software developers, I must mention two of them right here. These are faced very frequently in our field:

Assumptions: When dealing with a problem, people often make assumptions about the constraints and obstacles that prevent certain solutions.”

You bet. We assume 100,000 users are going to sign up within a couple of days after we launch. We assume that a simple network call will take so long that we have to keep the data prefetched and maintain a cache. We assume a lot of such constraints and add unnecessary complexity to the architecture which is not needed right at this moment. According to Kendra the second obstacle is:

Irrelevant or Misleading Information: When you are trying to solve a problem, it is important to distinguish between information that is relevant to the issue and irrelevant data that can lead to faulty solutions. When a problem is very complex, the easier it becomes to focus on misleading or irrelevant information.”

I couldn’t agree more. It is easier to focus on these questions instead of the real problem at hand: should I be using NoSQL or MySQL? If NoSQL, will it be MongoDB or CouchDB. Enlighten me but I have never heard of a software that failed because it was using CouchDB instead of MongoDB (or vice versa).

Keeping things simple is hard, but important. While architecting and developing a software, you have to be careful about everything you are adding to it. Always ask yourself – Is that absolutely necessary? I would like to end this post with the following quotation:

“It is not a daily increase, but a daily decrease. Hack away at the inessentials.” – Bruce Lee

P.S. Please go and read the whole Zen of Python if you have not already.

Image Credit: dno1967b on flickr.


CloudMagic Analytics – MongoDB finds its place

Rishabh Dua

cloudmagic analytics uses mongodb

MySQL, the world’s most used open source RDBMS has been one great success story. And now, a new breed of database management system – NoSQL, which has no adherence to the widely accepted RDBMS, is showing some promise. One such project is MongoDB, part of the NoSQL family of database systems.

With developers looking for alternatives to the traditional relational database, MongoDB (one of the fastest growing alternatives) offers a number of compelling advantages over the others. Replicating the MySQL success story can be really hard for MongoDB, and with popularity comes a lot of criticism. Robert Scoble summed it up nicely in his comment: the best technologies gather passionate haters!

Does CloudMagic use MongoDB?

We do not use NoSQL at the heart of the product, but we did happen to find a valuable use case of MongoDB – running our backend analytics. It gives a good combination of flexibility and ability to query the database (though the querying capability can not be compared to a RDBMS, it’s still quite useful).

How we do it?

We parse the logs using shell commands and PHP to form a JSON and then dump it into a MongoDB Collection. You might be wondering why MongoDB as this could have been achieved using MySQL (or any RDBMS) itself. Well, the major benefit is that no two requests are alike, so the JSON formed does not have the same keys. This is where the flexibility of NoSQL comes in handy. With no concept of column names here, all you have to do is to insert a JSON in a collection and you are done.

Why MongoDB?

One can also create a key/value table in MySQL, but imagine having 200,000 requests per day with approximately 30 key/value parameters, viz 6 million rows. It’s just difficult to get desired results from such a table using a single query, you will need to use multiple joins of the same table. Whereas in MongoDB you can get the result in a single command. Speaks volumes of what MongoDB is capable of.

Map/reduce gives another edge, MongoDB uses JavaScript as query language thereby allowing us to write functions and manipulate the data in the database server itself. Map/reduce is actually quite powerful, you can implement many custom conditions to handle the data and it can also act as an alternative to GROUP BY in SQL.

To get the analytics for a given day, we query all the requests for that day and get certain numbers like ‘Daily Active Users’, ‘Number Of Searches’, ‘Number Of Previews’ etc. We do create intermediate MongoDB collections for simplification so that each request follows a certain standard. This intermediate collection holds information of selective request types like search, preview, snapshots which makes it even more manageable.

With each CloudMagic app upgrade or feature implementation, the request data and format might change, but there is no major change in the analytics database, this makes a our lives a lot simpler.

Fascinated by MongoDB? We sure are. Share your experiments with MongoDB. Drop a comment below or join the discussion on hacker news.

Image courtesy: Junya Ogura on flickr


The OS is the new browser – apps are the tabs

Rohit Nadhani

The OS is the new browser - apps are the tabs

This post first appeared in PandoDaily.

With the advent of Web 2.0 and webapps like Gmail (circa 2003), everyone started talking out how all desktop apps would be eventually converted to webapps.

Prior to Gmail, people didn’t believe that such a paradigm shift was possible. Websites were not considered as heavy-duty as desktop apps for a lot of use cases.

Gmail gave us new hope. Around the same time tabbed browsing became popular. The combination of tabbed browsing and rich webapps was supposed to deliver a death blow to traditional desktop apps – aka “thick clients”.

This combination promised that we will finally get rid of the nagging problems associated with desktop apps. Some of the serious problems that webapps addressed were:

  • Each tab of a browser was completely sandboxed. To try a new app you didn’t have to install anything. It promised us freedom from DLL Hell. Business apps were no longer dependent on arcane ODBC drivers!
  • Keeping multiple tabs open and switching back and forth was very convenient making us super productive.
  • App delivery and upgrades were simplified. The executable code that made up the app was distributed and managed from central servers.
  • New apps didn’t impact the performance of the OS. No virus problems (with the notable exception of webpages embedding ActiveX controls!). No Registry conflicts. No spyware.

The future looked bright. All hail the browser. “The browser is the OS” became a popular meme back then.

But there was one big problem. Those webapps were simply not as capable as desktop apps. JavaScript (JS), the language primarily used for the UI was not designed to be an industrial strength language for developing rich UI. Complex projects resulted in thousands of lines of spaghetti JS. Frameworks like Google Web Toolkit were introduced to bring some sanity into the entire process.

All of a sudden, the future didn’t look so bright after all.

A few years later, we saw another wave of optimism with HTML5.  HTML5 held the promise to solve world hunger. Everyone was dreaming of an utopian world where you could write rich apps once and those apps would run on different platforms with little or no modification.

HTML5 was a standard. No single company controlled HTML5 and developers would no longer be held hostage by Microsoft APIs. No vendor lock-ins. For the first time in the entire history of computing, it seemed possible to learn one front-end technology and deliver apps on all platforms. The promise once Java made, but failed to deliver – especially for the UI layer.

Ironically, the problem with HTML5 is that it was a “standard”. It was evolving rather slowly. It was a democracy led development, not a dictator led development. Historically, some of the most successful technology companies were dictator led. Notable examples are Apple, Microsoft and Oracle.

Meanwhile, all of us continued to love our browsers and its tabs for a lot of computing activities.

Then the iPhone launched. With the launch of iPhone, we were unknowingly transitioned to a new era. In my opinion, the best way to define this era is – “The OS is the new browser – apps are the tabs.”

The new era retained the richness and power of desktop apps and the delivery and sandboxing advantages of webapps. Additionally, you can use industrial strength languages C, Java and C# to develop apps.

iOS, Android and Windows 8 are designed ground-up to act more and more like browsers. There are some striking similarities.

  • Launching an app became as trivial as launching a new tab
  • Switching between apps became similar to switching between tabs
  • Installation and upgrades are seamlessly delivered through central servers. Those central servers are called App stores.
  • Complete sandboxing of apps. One app cannot access the data of another app. No DLL hell. Virus and spyware were contained.

However, nothing is perfect. This model introduced a new set of challenges.

In the classic browser and webapp model, seamless transition from one webapp to another was done naturally, using hyperlinks and URL parameters. In the app world, such seamless linking between apps is not popular yet. However, things are changing. Many apps now support URL schemes. For example, from the Twitter mobile web, you can launch the Twitter app with the right context. Over time, this integration will evolve and you can pass data from one app to another in more sophisticated ways.

twitter ios mobile app

 

Developing apps for multiple platforms is expensive when compared with HTML5 apps, that have a common codebase.

If development cost is the only reason you are settling down with HTML5, you are not working hard enough to create a killer browser tab for your app. You are going to miss out. Users don’t care about the cost implications of the developer. They care about the quality of their experience. Products that are winning provide the best experience.

instagram ios mobile app

Cover Image courtesy: Windows Blog


iPad Mini, Steve Jobs and Apple

Chirag

contradictions around iPad Mini Steve Jobs and Apple

Steve Jobs once said that the 3.5 inch screen is just the right size for a mobile – big enough to produce detailed, legible graphics, but small enough to fit comfortably in the hand and pocket. He argued that no one will buy phone with larger screens. What did we see with iPhone 5? A large 4 inch screen! iPhone 5 did have direct inputs from Steve.

Then comes the 7 inch tablet argument. He argued that 7 inch devices are destined to fail. He said; it’s better read in his words:

“Apple’s done extensive user-testing on touch interfaces over many years, and we really understand this stuff. There are clear limits of how close you can physically place elements on a touch screen before users cannot reliably tap, flick or pinch them. This is one of the key reasons we think the 10-inch screen size is the minimum size required to create great tablet apps.”

He continues…

“The seven-inch tablets are tweeners, too big to compete with a smartphone and too small to compete with an iPad. One naturally thinks that a seven-inch screen would offer 70% of the benefits of a 10-inch screen. Unfortunately, this is far from the truth. The screen measurements are diagonal, so that a seven-inch screen is only 45% as large as iPad’s 10-inch screen. You heard me right; just 45% as large. [Increasing screen resolution on small devices] is meaningless, unless your tablet also includes sandpaper, so that the user can sand down their fingers to around one quarter of the present size.”

And now the iPad Mini is here. It comes with 7 inch(ish) screen. Apple does it again – contradicting itself by creating a device with a form factor it vehemently argued against. Should we cry foul for Apple not practicing what it preached? HELL NO! Change is constant. There’s nothing wrong with it. In fact, it happens to be the personality trait of smart and successful people. Let me quote Jeff Bezos

“People who were right a lot of the time were people who often changed their minds.”

Jeff observed that the smartest people are constantly revising their understanding and re-considering a problem they’d already solved. They’re open to new points of view, new information, new ideas, contradictions, and challenges to their own way of thinking. Jeff’s right. Steve Jobs was one such guy. And Apple is a company led by such people. So don’t fuss about contradicting yourself, go ahead, absorb new information, change your opinions – it happens to the best of us.

I’m concluding this post with Tim Cook’s thought on Microsoft’s effort to combine a tablet and laptop.

“You can converge a toaster and a refrigerator, but those aren’t going to be pleasing to the user.”

Following Apple’s past of changing beliefs, don’t be surprised if you see an iToaster with Retina display in the next keynote :)

Cheers,
Chirag


How we redesigned our app icon

rishit

How we designed the cloudmagic app icon

When we redesigned CloudMagic, an important task during the design cycle was to redesign our app icon (on both iOS and Android). A task we assumed was simple enough, took us weeks! During which, we argued, fought furiously, contemplated going back to the old icon, and finally arrived at a great new icon.

Here is a perspective as to why sometimes we have no choice but to reject great looking icons. Here is the design process from the old icon to our new one, and things we learned along the way:

The Old Icon

cloudmagic 1.0 old icon

What was wrong with the old icon?

  • Gave an impression of being faded when seen on devices, looked dull and dated.
  • We wanted to highlight search capabilities, not evident from the existing icon.
  • The gloss effect on icons is dying. Take a look at icons of popular apps – Facebook, LinkedIn, Flipboard, Instapaper, Instagram, Dropbox, clearly gloss had to go.
  • Creating a new icon for a redesigned app is advisable as users expect the redesign from the start of their experience.
  • Of course, all the above while retaining Apple’s iOS Icon Guidelines

 

The Redesign Begins

CloudMagic App icon design process

1. This one takes inspiration from the website and hence used the sunburst / rays. This also gave prominence to search. Wasn’t all that appealing though. 2. Although the icon had cloud search written all over it, we found it too obvious. The bevels and shadows also killed the icon.

 

CloudMagic App icon design process

3. A nicely designed icon, clearly indicated the multiple services which CloudMagic supports. But the faded icons looked like trash can when scaled down. 4. A colored variant of the previous logo. The idea was turned down due to legal reasons. Nice looking though!

 

how the cloudmagic app icon was designed

5. The designer took the angle of an index used in books and indices in CloudMagic and tried a mashup. A really attractive app icon but the book concept was not really relevant to the product.

 

Icon-ic frustration!

how the cloudmagic app icon was designed

6. This version was a hint that the designer needed a break. He came up with a simple cartoon inspired icon, the clouds looked like ice cream. We gave him a break and asked him to relax and come up with some fresh ideas. 7. This icon cleverly indicated the types of content in one app and there was no clutter in the main part of the icon. The side strip icons for contacts, messages etc. were too tiny to recognize when scaled down.

 

Finally!

CloudMagic App icon design process

8. This indicated search prominently, used our existing branding but somehow wasn’t appealing enough. Though we did feel we’re getting somewhere finally. 9. This is the version we all liked. It was simple, clean, modern, indicated search and retained existing branding. We then created the Android icon, using the Android design spec.

Tips for (re)designing your app icon

  1. Dedicate some time to it, its not a trivial exercise, and an icon is the first impression users get and it’s used every single time to launch your app, it is important.
  2. Pick one platform to start with, and then ‘port’ the design to other platforms to retain consistency across platforms. We picked iOS to design the icon and then used the same design for Android.
  3. Sexy icons look good but die soon, so keep it simple and suited to your positioning. If we were a ‘fun’ app, we might have created a funky icon. Find your desired positioning and stick to it in all parts of design.
  4. Think about muscle memory – We included the magnifying glass into the icon because users associate it with search.
  5. While redesigning a new app icon, you might have to retain some elements of your old icon, just to make sure the users don’t get scared away by the new-ness.
  6. Useful links for app icon design -

So tell us what you think of the new app icon, we’d love to know!


Introducing CloudMagic 2

rishit

Since our launch earlier this year, we received a lot of praise from you. You told us that CloudMagic is magical and that you use it everyday, that it is life changing, and some even said it is thunderbolt fast!

Everyone loved the simplicity and blazing speed at which they could search through their Gmail, Twitter and Exchange data.

You also however told us about the things you’d like CloudMagic to do further. The two most frequent requests were:

  1. The ability to search through more data
  2. An iPad app

As we set out to build more into CloudMagic, we realized that if we had to add the ability to search through your Facebook, Evernote, Dropbox etc. accounts, while continuing to retain the same speed and simplicity as earlier, we had to go back to the drawing board and work very hard.

We did just that and are thrilled today to launch CloudMagic 2 – completely redesigned with the ability to search through a lot more, and many new features.

What’s new in CloudMagic 2?

Search through much more

  • Now you can search through Facebook, Dropbox, Evernote, Box, iCloud, AOL, mail.com, GMX, in addition to Gmail, Google Apps, Twitter and MS Exchange.

iPad App

  • Full support for iPad 2 and iPad Retina, in addition to iPhone and Android apps.

New design

  • Completely redesigned interface for enhanced usability

Many new features

  • Snapshot view to see updates across all your data
  • Richer previews
  • More actions on previews
  • Ability to forward emails
  • Ability to view attachments

This new version brings us closer to our vision of providing lightning fast search across all your cloud data. Please visit cloudmagic.com to get access to the new website/browser extensions. CloudMagic 2 can also be downloaded from the iOS App Store or Google Play.


Your favourite search box comes to Internet Explorer

Chirag

Developing anything for Internet Explorer is definitely arduous! All sorts of limitations and speed bumps pave the way for any developer writing code for IE. Many even recommend to say no to IE development. Well, it’s a tough NO considering the fact that more than one third of the internet population is still on IE.

We went ahead anyway and are happy to announce the availability of CloudMagic extension for Internet Explorer. When you add the extension, a floating search box appears in all webpages. It’s right there when you need it the most. The keyboard shortcut and context menu further helps save time.

With this addition, the CloudMagic in-page search box now supports 95% of the desktop web browsers. Enjoy the awesomeness.

Download links:

CloudMagic Extension for Internet Explorer [To get CloudMagic search box]
CloudMagic Accelerator for Internet Explorer [To get CloudMagic in the browser context menu]

Requires Internet Explorer 7 or above.

Cheers,
Team CloudMagic


Personal Data Search – More Important Than Ever

Chirag

What is personal data?

Someone rightly pointed out that personal data online is the other half of the web. Websites are one half, and your data stored in various cloud based services is the other half. All your email, files, contacts, social network data, photos etc. constitute your personal data.

Why is personal data search important?

a) You spend more time looking in your personal data than in public data

This is the data that you look for most often – that important email you received from your boss, the quote that Oprah tweeted, the video that your roomie shared on Facebook, your resume, the designer boots that you had pinned on Pinterest etc.

b) Your data is scattered

As you sign up to more and more services – social networking (Facebook, Twitter, LinkedIn), repositories (Dropbox, Box), utilities (Salesforce.com, Sharepoint, Evernote) – you generate more and more data and your data continues to scatter further. This dramatically increases the need to have a mechanism to search across your personal data.

Let’s take a simple example of all your contacts – Your contacts are in your email address book, your LinkedIn account and your Facebook account. Now if you need to find one specific contact, you need to get into each contact list and carry out a search. A personal data search engine lets you find a specific contact across all your contact lists.

c) Native search functionality leaves us wanting for more

While online services are concentrating on providing a great platform for users to create data, they tend to ignore providing a great search on the data that is created. For eg. Twitter – you cannot search beyond 10 days, you cannot search in your own tweets, you cannot search in your follower’s tweets, you cannot even search in your own direct messages and favourites. The same goes for Facebook, while your news feed and wall are the most important elements of your account, you cannot reliably search on them.

Will existing search engines evolve to include personal data?

It would be very tough (read impossible) for existing search engines to include personal data into their realm of search. While it might have its own set of technology challenges, that’s not what will hold them back.

a) They will stop each other

Historical proof – Twitter denied Google access to its firehose. If users are able to find tweets on searching in Google, the search queries on Twitter.com will reduce. Therefore, ad revenue on Twitter search will decrease. Similarly, Facebook would not expose its data to Google. Remember how Google responded to Facebook? They will continue to fight.

b) They will be their own enemies in this case

If Google wished to include personal data into search results, they would essentially be making it easier for users to access Facebook, Twitter, Dropbox, Microsoft Exchange etc. all of whom are competitors to Google in one way or another. This will this piss off a lot of people at Google for sure.

c) They will be biased

Google tried to include personal data in their search results – Search Plus Your World. What did they do? They started giving priority to the data from their assets. Twitter slammed Google for prioritizing results from Google+. Would Google treat Facebook, Exchange and Dropbox data with equal importance as Google+ data?

Finally…

There are a handful of startups who have built solutions to address this problem, ours being one of them – CloudMagic. We’ve been working on this for more than 2 years, and have never felt more strongly about the gaping need for a personal data search service.

Cheers,
Team CloudMagic


CloudMagic now available for Amazon Kindle Fire

rishit

Amazon’s Kindle Fire is a great tablet device. Powerful, great content from Amazon, yet very well priced. We see the presence of the Kindle Fire in meeting rooms, living rooms and even office desks. However, the ability to have access all your data (emails, calendar events, contacts, tweets) on your Kindle Fire is quite a task. Either you need to download various apps to sync/download your data or you need to login to numerous cloud services and keep various tabs open all the time.

With CloudMagic’s Kindle Fire app, you no longer need to fret about accessing all your data. Simply install CloudMagic, link the services you want access to and use CloudMagic’s super-fast search to instantly find that email you were looking for, that contact info you needed or that tweet you want to read.

What’s more, with our recent support for Exchange, you can now have your work email as well as your personal Gmail searchable together. So go ahead, find anything in a second from your Kindle Fire. Click here to download the app.

We would love to have your feedback on CloudMagic Kindle Fire app. For frequent updates on CloudMagic, please follow us on Twitter and like us on Facebook.

Cheers,
Team CloudMagic


Microsoft Exchange and Google Chat Support | Exchange search no longer sucks

Chirag

Hi,

We are delighted to announce two big updates today:

  • Support for Microsoft Exchange, and
  • Support for Google Chat

Support for Microsoft Exchange
Why Exchange? Most work email is on Microsoft Exchange, and looking for an email using Outlook or your smartphone sucks big time. We guess every iPhone+Exchange user on this planet has been a victim of “Continue search on the server?” message (which still fails to fetch search results most of the time). CloudMagic eradicates this problem by introducing support for Exchange emails.

As always, with CloudMagic you’ll find what you are looking for in under a second! So stop remembering where ‘that’ email is and don’t worry if John’s phone number is in your GMail address book or Exchange address book, let CloudMagic find it for you.

Note to Office 365 users – You can also add your Office 365 account to CloudMagic and search through the emails, events, contacts and much more.

Support for Google Chat
Almost all Gmail users use Google Chat and we got a lot of requests to make chat conversations searchable through CloudMagic. Now you can search through all your chats using CloudMagic! If you have already added a Gmail account to Cloudmagic, follow these steps and you will start seeing search results from your chat conversations.

You can also login to your CloudMagic account and go to the “Add Services” page to add these newly supported services.

We are excited about this release and we would love to have your feedback. For frequent updates, you should follow us on Twitter and like us on Facebook.

Cheers,
Team CloudMagic


« Previous PageNext Page »

Livefyre Not Displaying on this post