As I mentioned in my previous post reactive programming has a compelling reason for adoption as it allows developers to focus on their data flow and business logic. Akka has come across as a tool to enforce reactive programming. It allows you to create distributed and concurrent applications of high complexity in shorter and more manageable time frame.
Reactive programming
Reactive Programming seems to be the rage nowadays (as observed in blogs and newsletter). Out of curiosity I looked it up and was impressed with what it is capable of. Turns out that this is a declarative approach which allow code to react to changes in referenced values.
Let’s understand it from the perspective of a spread sheet. Lets say cell A1 has the formula “=B1+C1”. Now typically we expect that if we change the value in B1 or C1 then the value of cell A1 will be updated automatically.
Keeping this example in mind now lets see how this can work in programming world. Lets say we have an expression that says A = B + C. When this expression is executed in our code then the value of A is updated whenever this expression is ‘executed’. Once this is done the value of B can be changed or the value of C can be changed without reflecting on the value of A. To enforce a ripple effect back to A like we observed for cell A1 in spreadsheet we have to devise elaborate observers / listeners on the values of B and C to update A whenever the value of B or C change. In a real life production environment this simple expression can be replaced with more complex algorithm or data flow and you have a situation which can quickly get out of hand and might be difficult if not impossible to debug.
In reactive programming we react to changes. So in the above situation the value of variable A will be updated as and when the value of B or C changes.
This concept has been well explained in a dzone article.
FireFox OS
I have heard some good things about FireFox OS and with recent launches for ultra cheap FireFox OS based handsets in India I think that HTML based development of apps for this OS will be a different experience. I have had some reserved feelings about HTML5 development on Android and iOS platform. Somehow I felt that HTML5 development was feature limited on the mobile platform. However with FireFox OS I think I would definitely give it a try and post my experience on this blog.
Eclipse Maven – Download Sources and JavaDoc
Eclipse Maven integration has improved quite a bit and I find it somewhat comparable to the excellent Maven integration provided by Netbeans. I recently required to debug third party jars and I needed their sources for this purpose and as a general practice I always download the javadoc for any third party library I use. This is easily done in Eclipse using the following approach.
Do it per project
Do it for all projects
Doing a hard reset in Git
In order to reset current changes back to the head revision I use
git reset --hard HEAD
Google Graveyard
We are so focused on the next thing being done or released that we don’t really have time to think about what was discarded. An interesting link about Google Graveyard which basically lists the products / tools abandoned by Google over a period of time.
I think the mantra of success is not only about what to do next but what to move on from. Falling in love with your creation or an idea can be dangerous if you are not looking at the big picture of adoption rate and impact being created by your work.
Finding unread email in Android GMail Client
Recently I noticed that my GMail inbox showed ‘0’ unread emails but my Android phone showed ‘1’ unread email persistently. I found the following trick which solved this problem. On my handset I clicked on ‘Search’ option and then typed the following in the search bar:
is:unread in:inbox
This allowed me to show only unread email in my Android Gmail client. Out Popped a one and half month old email which was still unread. All I had to do was open that email and the issue was gone.
What is not clear to me is how the GMail website showed 0 unread email while the Android client showed 1 unread email simultaneously for weeks at stretch. Perhaps the Android GMail client does a better job at keeping track if you missed reading a particular email a while back.
A free ScreenCasting / Presentation Tool
I have used Wink from debugmode.com for my basic presentation needs. I used this software to create flash videos for demonstrations and tutorials. This tool is free and it does the job well for small to medium duration presentation. I tried using Wink for Windows 8 and I found out that Windows 8 didn’t allow Wink to run. I will post that error later on. So I knew it was time to switch to another tool. I listed my requirements and they were coming to the following:
Mandatory Requirements
- The tool should work on Windows.
- The tool should be free.
- Doesn’t really has to be open source.
- There should not be any time limit on the recording.
- Watermarking is OK but it should not blur out any part of recording.
- Should allow me to record full screen presentation (my favorite mode).
- Audio recording should be allowed.
- System audio recording should be allowed (Only microphone recording doesn’t cut it).
Optional Requirements
- Capability to export video in HTML5 or Flash movie format
- Basic scripting support so that I can add controls like ‘Next’ and ‘Previous’.
- Some option to cut out unnecessary parts of video.
- Some effects like highlight and annotation is a bonus
My first few queries took me to a number of software which were either feature limited or time limited. So I decided to do some research on comparing the available software in the screen casting / presentation domain. I found this link to be invaluable in narrowing my research. I ultimately found out that ActivePresenter Free Version from Atomi Systems fulfilled all of my mandatory requirements as well as optional requirements. I decided on this tool based on the following points.
- Very easy to install and configure. A real no brainer.
- The performance of the tool was quite good. Although I didn’t like the non-cancel-able progress of video export. But it does the job well so I am happy.
- The tool itself can be hidden so while making a presentation I can hide the tool into the toolbar and keep it discreet.
- It records both microphone as well as system audio which is a mandatory requirement.
- The documentation and tutorial for the tools are available in plenty.
- There are sample projects on the website.
- There is a paid version of this tool for 99 USD which is a deal if I decide to upgrade.
I think it is better to use a tool which follows the ‘Freemium’ model so that when the need arises for more functionality one can simply upgrade the tool and re-use the existing experience with the tool. I am hopeful that ActivePresenter Free Version will work stable and I can continue to use it for some time to come. Thanks to Atomi Systems for a free tool that comes in as a drop in replacement for Wink.
Problem found with GWT installation on Chrome
Problem found with GWT installation on Chrome
The idea with GWT is that you need to install a Google Web Tool Kit Plugin on Chrome to realistically debug GWT application in your browser. On Firefox browser the plugin is already outdated and probably discarded so Firefox is no longer an option. However on Chrome we still have a plugin and it should work ideally. However my efforts to debug my GWT apps hit a road bump when I encountered the following error when starting chrome.
At the time of starting chrome:
In the Extensions view:
At the moment I just re-dragged the GWT plugin into chrome and resumed my work but I have a haunch that this is not the end of the problem and it will come back to haunt me. I did some search on the internet and I found the following link where people have discussed this problem. The most potent solution which I have not tried yet is listed here for future reference.
Link #1:
https://code.google.com/p/google-web-toolkit/issues/detail?id=7569
Quick fix that might help:
1. Right click on the chrome icon>Properties>Shortcut
2. Add in target: –enable-easy-off-store-extension-install
3. Open chrome and navitage to extensions ( chrome://chrome/extensions/ )
4. Drag and drop on it the plugin (should be in your download folder if you tried to install it before and didn’t succeed)
Link #2:
http://stackoverflow.com/questions/11901915/installing-gwt-plugin-in-chrome
I think the easiest way to install the plugin is, to load the google chrome Browser with the flag –enable-easy-off-store-extension-install With this flag you disable this “feature”.
Link #3:
http://techie-buzz.com/browsers/chrome-blocking-extension-apps-scripts-chrome-web-store.html
Finally Solution:
I finally gave up after trying all the above approaches and none of them actually worked. I hit the following link:
https://www.google.com/chrome/browser/?platform=win&extra=devchannel
I downloaded the latest devchannel version of Chrome and re-installed the GWT Developer Plugin. This seems to have fixed the problem, however I am not really sure how this has affected my chrome installation’s stability but atleast GWT Dev Plugin works and it’s good enough for now.
Open Command Window Here in Windows 7
Being a hard core java programmer the Windows console is only one step away from me. In Windows 7 I use a nifty inbuilt feature which allows me to open a command window and switch to a given directory in a single step.
- Using My Computer / Windows Explorer navigate to the relevant folder.
- Press Shift and do a Right Click either on the folder name.
- You will get a popup menu with the option “Open Command Window Here”.
- Clicking on this option will open the console / terminal window with this folder as the current directory.
- You can Right Click on an empty area as well to open the console/terminal for the current folder.
This facility is a time saver and I really like using it every now and then.