You can also find me on: google+, twitter, last.fm, github, librarything, granular, steam
@AnuragBhandari twitter updates
Tech enthusiast, open source evangelist, book worm, software developer, sports fan, passionate gamer, movie buff.

Category Archive: open-source

Mobile App Development: Lessons Learned

  1. Sencha Touch is a great framework, but requires a LOT getting used to. The officials Docs do not always have the answer you’re looking for. ST forums and stackoverflow are excellent resources to consult when in need.
  2. If you are a web developer, DO NOT waste time learning Objective-C or Java for creating native iOS and Android apps. Instead use something like ST to develop a mobile web app, and then convert it into a native app using Cordova / PhoneGap.
  3. Cordova is the renamed, open-source version of PhoneGap.
  4. If your app is data-centeric, most probably it will depend on a webservice / API. If the API and the app are hosted on the same server, no problemo. In case of native apps, that are basically web apps PhoneGapped into native apps, that’d mean calling a remote API, and that is the problem. See same origin policy.
  5. Most googled solutions will point to making the service JSONP supported; but JSONP works only for GET requests. CORS is a recent W3C standard that supports all HTTP methods, but it still doesn’t work for PhoneGapped apps. ASP.NET Web API provides an easy CORS implementation.
  6. The perfect solution is to keep making Ajax calls normally, but using the full URL of the remote API. That will work because a PhoneGapped app doesn’t render in a browser but in a WebView (through a file:// URL). So it’s not restricted by browser’s same origin policy.
  7. ASP.NET MVC 5 and Web API are awesome!
  8. You may frequently encounter annoying cache issues with PhoneGapped apps. Just place a super.clearCache() in your Android app’s main activity’s onCreate().
  9. Here’s how to create an animated splash screen in Android (though I have yet to figure out how to correctly use this in a ST-PhoneGapped app).
  10. If your device has Android 4.4+, you can remote debug your WebView-based Android apps using Chrome.
  11. JavaScript is yummy!

A new init system in Linux

It was bound to happen some day. The existing init system in use by most of the present Linux distros is really not leveraging the performance capabilities of modern hardware to the fullest. Spawning processes one-by-one to get the system up and running costs a lot of precious time, when it is possible to do more in less time using the power of multi-core processors.

It was a welcome surprise to read about this new thingy systemd in the Q&A section of last week’s DistroWatch Weekly. I’m really looking forward to a faster future. :)

Unjumble

Unjumble — You won’t lose that jumbled words game again

Another of my free time exercises, Unjumble does just that – it unscrambles a jumbled/scrambled word into all possible English dictionary words that can be formed out of that jumbled word. The interface is extremely simple. You have a textbox to input your jumbled word, and as you type, all unjumbled word suggestions start appearing as list items in the combobox below. To copy an unjumbled word to clipboard, just click on it. Simple, isn’t it?

Like QuickCopy, Unjumble was coded in C#, and makes use of SQLite as the portable database to store a huge list of English dictionary words. What’s the most interesting thing about this little app is the algorithm behind it.

There is a pre-prepared database of almost all (58000+) English words [wordlist.txt], stored along with their hashes (words formed by the original words’ individual alphabets in sorted order). The input jumbled word’s hash is then calculated in a similar way, and is compared with the hashes stored in the database. All matches are then displayed in the list box.

I bet, using Unjumble, you’ll never lose your newspaper’s jumbled words game again. ;)

Download: Source Code (1.5 MB) – Installer (1.7 MB)

QuickCopy

QuickCopy — No typing that password again

A very simple password management tool that I developed in my free time. It aims to simplify the task of copy-pasting frequently used text, like usernames and passwords. A Windows-only tool, it’s code purely in C#, and makes use of the wonderfully portable SQLite to store entries in the backend. The interface includes 2 components (basically 3; one is hidden) — system tray icon and “add content” dialog. All content added through the dialog gets added as a menu item in the system tray icon’s context menu (the one you see on right-clicking the icon). To copy a content from the menu to the clipboard, all you need to do is just click on its entry in the menu and it’s done!

Some features:

  • Store content – frequently used text, like usernames.
  • Store passwords – these are masked by content tags, which are then shown in the context menu (in red color).
  • Hotkeys – the top 3 entries in the context menu can be quickly copied to the clipboard using the key combinations of CTRL+F1, CTRL+F2 and CTRL+F3.

For a password, its respective content tag acts as a mask to hide it under its name. Say you’re adding your Gmail password @ILuvKatz!! in the dialog, and set its content tag as Gmail Password, the password’s entry will appear in the menu in red color with the name Gmail Password. When you click on Gmail Password, your actual password will be copied to the clipboard.

There is no easy provision of modifying existing content entries. But I’ve provided a QueryEditor (invoked by pressing CTRL+Q in the “Add Content” dialog), where you can change the content entries by issuing your regular SQL queries. For example:

UPDATE content SET content='@IHateKatz!!' WHERE content_tag='Gmail Password'

Download: Source Code (1.1 MB) – Installer (1.2 MB)

Loading...
X