Tuesday, May 15, 2012

Scala Learning–Day 1

- REPL - Read-Evaluate-print loop
- Scala uses interpreter, but internally it uses a compiler to convert you code to byte code and run it on JVM.
-IN scala there are two ways of defining variables using "val" and "var". Val is like defining constant for which you cannot change value once assigned.
- IN scala we are encouraged to use Val unless you are really need to change the contents. Note that you need not specify the type of a value or variable.
- in case you need to specify a type then you use the below given way to do the same
val greeting: String=null
val greeting: Any="hello"
- IN scala, the type of a variable or function is always written after the name of the variable or function.
- Scala line does not to end with semi-colon, its only needed when we have multiple statements in a single line.
 
val xmax,ymax=100
var greeting, message:String=null
- Like Java, Scala got 7 numeric types and one Boolean type(Byte, Char,Short, Int,Long, Float, Double and Boolean). The difference is unlike java these types are Classes, which means there are no primitive data types.
With this you can execute methods on numbers
1.toString() which will written "1"

- Scala uses java.lang.String for defining String but it has StringOps which is more power full with hundreds of options. Similarly Scala got RichInt, RichDouble etc. to provide better options on the types.
- IN scala we use methods, not casts, to convert between numeric types
- The operators like +-*/%&|^>><< are actually methods though they just work the way they work in java or c++.
- IN scala static methods need not be called from a class. Lot of mathematical functions are defined in scala.math and we can import this using
import scala.math._ (_ is the wild char in scala like * in java).
- Scala does not have static methods instead it got "Singleton Objects".
- Scala classes got "companion objects" whose methods, whose methods just act like static methods.
- Scala methods with out arguments does not use parentheses. For example StringOps distinct does not have any arguments which you can use like "Ashok".distinct which will written all the distinct char in the string. One important note here is parameter less method that does not modify the object has no parentheses.
- In scala if we use "Ashok"(2) will written 'h'. It just works like "Ashok".charAt(2) in java. You can think this as an overloaded form of () operator.It is implemented with a method name "apply". In this StringOps its defined as given below
def  apply(n:Int):Char

- Downloaded scala from http://www.scala-lang.org/downloads. As I use windows 7 I downloaded the msi file and installed with out any issues.
- After installation check the path in the system variables for some reason I found that the path is like "C:\Program Files (x86)\scala\\bin", remove the extra '\' then start the command prompt and type "scala" which will you REPL. It running slow compared to python console. May be its because of the JVM.

Configuring eclipse  to program in scala


- Got Eclipse Indigo and extracted the files from ZIP file.
- The went to http://scala-ide.org/download/current.html and found the link to download site for scala IDE for eclipse. http://download.scala-ide.org/releases-29/stable/site
- Started eclipse from Help->New Software and downloaded the plug-in and installed it.

Wednesday, February 29, 2012

Book Review: And Thereby Hangs A Tale

And Thereby Hangs A TaleAnd Thereby Hangs A Tale by Jeffrey Archer




View all my reviews

Wednesday, February 01, 2012

Best note taking software CintaNotes

Not sure if ever had any requirement to take notes when you learn something new or want few words as you think and keep those words in secure place for future reference. I been trying to find a tool for doing the same for a very long time and I tried lot of tools like wikidpad, spring pad, microsoft onenote etc. But I found this simple portable tool called CintaNotes and this exactly what I am searching all these days. Few things I like about this tool

- Very simple to use no nonsense in UI.

- Can save your .db( files you save you notes to) files on dropbox, so that you can access from anywhere.

- Fast as-you-type searching

- Clip text from anywhere. Just select it and press the hotkey!

- Portable.

 

Just try this amazing but simple tool and let me know your comments.

Tuesday, January 31, 2012

Book review: God Save the Dork: The Incredible International Adventures of Robin ‘Einstein’ Varghese

God Save the Dork: The Incredible International Adventures of Robin ‘Einstein’ Varghese God Save the Dork: The Incredible International Adventures of Robin ‘Einstein’ Varghese by Sidin Vadukut
My rating: 4 of 5 stars

After a very very long time I laughed while reading a book. Better than Chethan bhagat books(Except five point someone). A must read for all the fun loving reader.

Even though its not a new way of presenting a story, telling the story using dairy entries of main protagonist is really cool. Now I am going to find the first part of this book and will read and write a review here. :)

View all my reviews

Monday, January 16, 2012

Some more thoughts….

This is continuation to the article http://www.whatay.com/2012/01/13/dont-make-me-put-it-up-on-ebay/#disqus_thread

1) Do something about Indian Railways.
- First stop looking
at this department for giving more jobs to the unemployed, so that you can brag
about that in your next election.
- A full time
minister for this department who reports to PM and Parliament, not to some lady
who sits in Bengal.
- It’s a shame after
60 years of independence our fastest train runs 80 KM/H avg speed( yes I am
talking about Shatabdi Super fast express :) ). Whereas our neighbor got trains
to run 300 to 500 KM per hour.
2) Cancellation of food security and 100 day a year work
programs. Ban all freebies given by government.
- I strongly feel
that these programs are doing more bad to people than doing any good. Instead
do something to empower people.
- Cancel PDS
departments run by state and central government;  instead subsidies should be given to people in
the form the money using smart cards.
3) Constitutional amendment to make voting mandatory for all
the eligible citizens. This is the only way to make sure the right people gets
elected and this is the only to get some real progress.
4) Stop spending any more money on government education;
first clean the system which is in place. If you think it’s not possible to do
that, then provide health care insurance for all the people in this country.
Also given money to kids for their education so that they can choose their
school and a real school.

Sunday, January 15, 2012

Book review : Steve Jobs by Walter Isaacson

Steve JobsSteve Jobs by Walter Isaacson
My rating: 5 of 5 stars

In few words:

This is the best biography ever read. The reason is the book subject and the author of the book, both are amazing.

View all my reviews

Wednesday, July 20, 2011

Mac OS X Lion top 10 features

  1. Multi-touch gestures — Apps will be controlled by different multi-touch gestures; including three fingered swipe, scroll, pinching and zooming.
  2. Full Screen Apps — Much like iOS5, apps will be full screen in OS Lion.
  3. Mission Control — Like an expanded expose. All of your open app instances are grouped by app
  4. Mac App Store — Mac store is now built in, as well as in-app purchases. The new built in version will also include push notifications for app updates.
  5. Launchpad — Make a simple gesture: pinch motion — all your apps fly on screen.
  6. Resume — Before you had to quit apps. Now when you launch an app in Lion – it brings you right back to where you were when you quit.
  7. Autosave — Lion automatically saves your work in the background without you having to do much.
  8. Versions — Automatically save different versions of your document as you’re working.
  9. AirDrop — A Dropbox-type feature that allows you to get documents between computers.
  10. Mac Mail Version 5 — Including a threading feature called conversations.

Saturday, July 16, 2011

Must have add-ons for Thunderbird 5

Well below is the list of add-ons I like to use with thunderbird

1) Thunderbird Conversations: This is a must have add-on. This addon provides a conversation view for Thunderbird, including contacts tooltips, attachment thumbnails, quick (inline) reply, integration with other addons, and much more.

2) QuickFolders: Cut through the clutter of the folders sidebar with your favorite folders as tabs. Open folders and sub folders, move mails without scrolling around or searching.

I am using the above two add-ons and enabled vertical layout and hidden the folder pane. Look at the screenshot below

image1

Wednesday, July 13, 2011

what is new in Android 4?

As we are getting near to the release date of new android version, which is middle of Nov, 2011. Lot of rumors floating around some of like to believe rumors

1) Better performance there is no surprise as with every new version they does come up with  performance improvements.

2) Universal operating system for both tablets and mobile phones. That is something will really help both for users and developers for pushing new changes quickly. Hope this also brings much more user friendly UI.
3) Not sure how true it is but people say android 4 has camera sensor, but even if the software supports it what about the hardware.

As Android 4 is a major release there must lot more features which are coming as part of the bundle, hope make our experience with android much more enjoyable.

Wait continues………

Friday, July 08, 2011

What happens to orkut?

Google plus is almost here. It looks almost looks like facebook but has more features when compared to facebook. Now its facebook that need to play catch up game. The one advantage facebook is 750 M user based it already got. But once thing I don’t understand is Google already got Orkut as social network and now they got google plus, what happens to Orkut and its users now?

1) They will automatically migrate all the orkut users to google plus and shut orkut.

2) They shut orkut and redirect all its users to google plus to start a fresh.

 

Not sure what they are going to do, lets wait and see.

Future and Android

Just amazing and fearsome to know one platform having controlling everything around you from mobile to your car and house.

This article I am pasting here is by Marko Gargenta on the website http://radar.oreilly.com/2011/07/3-android-predictions-home-clothes-car.html

Prediction 1: Android controls the home

Marko Gargenta: Google painted their vision of Android @ Home at the last Google I/O. I think this has huge potential to make Android the de-facto controller for many other devices, from lights to music players to robots and factory machinery. We are seeing the first stage with numerous home security systems being developed using Android, as well as set-top boxes powered by Android. At the moment, many of these devices simply use Android as a replacement for embedded Linux and they're still just self-contained devices.

In the second stage, manufacturers will start exposing libraries so developers can build custom applications for their devices, effectively turning them into platforms. I predict this will happen later this year as manufacturers realize the power of letting users hack their systems. The latest case study with Microsoft Kinect should help pave the way.

In the third stage, various devices will be able to interact with one another — my phone can detect my TV and my TV can communicate with my stereo. This will take a bit longer to get to as we still don't have common protocols for this type of communication. We also run the risk of companies developing their own proprietary protocols, such as a Samsung TV only talking to a Samsung phone, etc. Compatibility may require Google stepping in and using the Compatibility Test Suite(CTS) as a tool to enforce common protocols.

Prediction 2: Wearable Android

Marko Gargenta: The form factor for Android boards is getting to be very small and the price of the actual chipset is approaching the $100 point for a full-featured device. This allows for development of wearable Android-powered devices. Some of them will be for fashion purposes, such as watches. Others will be for medical and safety applications. I predict that toward the end of this year we're going to start seeing high-end fashion accessories based on Android. We may not be aware they are Android-powered, and we may not be able to develop for them. At the same time, early medical devices will emerge, initially for non-critical applications. These will likely be closed, purpose-built systems with little opportunity for development or extension.

Prediction 3: Android and networked cars

Marko Gargenta: This is the next big frontier for Android to seize. The car industry is now at the point where the mobile phone industry was 5-10 years ago. People are going to want more from their car systems as they realize that things like Google Maps beat any stock navigation system. Consumers will want car-based connectivity to the Internet as well as apps.

The first stage of networked car development will involve using Android to build proprietary systems. This is already underway withcommercial systems being built for cars without users even knowing the systems are based on Android. The second stage will involve connecting the cars to the Internet. This can be done in a couple of ways: cars can have radios with their own connections to the Internet or a driver's mobile phone can be tapped for online access.

Whatever approach we take, 4G and LTE network developments will help the process quite a bit. Once the cars are connected, manufactures will have the opportunity to open up kits for developers to build purpose-built applications for those systems. It is likely that manufacturers may tightly control what apps are allowed into what vehicles by running their own proprietary app stores with strict policies and quality control. This is simply the nature of the auto industry to self-police itself and focus heavily on testing the software. It is not very likely that we'll be able to simply download car apps from a major app market right away.

Wednesday, May 18, 2011

Why choose Android over iPhone?

This is a nice article from lifehacker, check from the below given link. But top 10 reason why you choose android over iPhone

1) True App Integration

2) Flash

3) Controlling Your Phone From Your Computer

4) Custom ROMs

5) Wireless App Installation

6) Removable Storage and Battery

7) Widgets

8) Custom Home Launchers

9) Automation

10) Alternate Keyboards

http://lifehacker.com/5801862/top-10-awesome-android-features-that-the-iphone-doesnt-have

Friday, May 13, 2011

Google Chrome Book

Well, at last the much awaited and much talked about product is launched by google and ready to be shipped to end users. Looking at the specifications I am impressed with hardware capabilities,boot speed and battery backup(8.5 hours). Also this device provides solid state storage which is much reliable, and also hope Google’s claim about layered security from viruses is true and reliance.

But one think I am not impressed is with the price they(both samsung and acer) are quoting $500, which is very steep and for the same price you can get windows 7 laptop with similar hardware capabilities and disk space. That aside, I still think this new model of the laptop is the future of computation.

Friday, April 15, 2011

My feedback in Infibeam Pi E-book reader

I am one of the very early users of Pi, I have been using this device for more than 10 months.  If you are reading normal text based PDF files, its good. Though its gets stuck some times. The funny part if every time its stuck I round around to find a sharp device to reboot it, I don't understand the logic of having a small reboot button for the device which needs so frequent resets.

If you try to open a PDF with images and sizes more than 40 MB then you will have lot of problem like the device gets rebooted in a never ending loop or its stuck at the boot screen. Every time I see this issue the only solution suggested by support is to install the firmware. I have seen this issue two times in last 10 months.  To my understanding if there is a problem with the file or file is too big to open then it should exit gracefully and should not hamper users from reading any other book till be re-installs the firmware.

Too bad, I guess some basic stuff they should have checked before they ship the device.

Hope they resolved these issues in the latest pi2.

Monday, March 21, 2011

Firefox 4.0 RC2 is out and it has status bar

Just now I have downloaded firefox RC2 and first thing I looked for is status bar and its there :). That’s a very good decision by Mozilla, because like many out there I am missing that dearly since I started Firefox 4.0 Beta 8. Everything else looks normal on UI, need to see what else changed in RC 2.

 

[Edit] I am wrong there is no status bar, its just that my add-on Status-4-Ever started working on RC2 which was not working on RC1. Sorry for this.

Wednesday, December 29, 2010

How to search for a string in profile rules of Oracle Universal Content Management(UCM)?

From time to time I have a requirement where I need to find rules which are using specific string or specific metadata as part of a the side effect. Its very tuff to find the same by opening each and every rule using configuration manager applet. There is a easy of doing it by just going to <ucm_install_dir>/data/profiles/document, where you will find hda files for each and every rule you create. Just issue a operating system find command in that folder with the string you want to find, that should return the results you are expecting to see.

Let me know if this helpful for you.

Try new Opera 11

I just downloaded Opera 11 and its looks pretty good. The first thing I observed is its looks and the way it loads the we b pages. As usual it has much appreciated feature of blocking images and animations from loading. Also this version introduced concept of extensions and when looking at the developer’s guide I realized developing a extension is pretty simple and no nonsense involved. Just need to know html, css and javascript( Yeah…! no need to learn any fancy XUL).  

There is one more feature Opera Unite which promises a lot of revolutionary additions, yet to try that thing. Will post something on that soon once I explore it. Keep watching this space.

 

But make sure you download and try this, its too good. I have already made this browser my default browser.

GMail not working in Opera 11

I just downloaded Opera 11 and impressed with its speed and useful options like not loading images and animation to the page. Also impressed with the simplicity of creating extensions for opera. As I said impressed with its speed and looks and I have decided to make it my default browser instead of chrome. Then I found the worst thing, gmail does not work and throws a message Connection closed by remote server. I am not sure whose fault, if its gmail’s fault its worst case blocking a competitor. Its totally unfair. Hope I will figure out a away to make gmail work and keep opera 11 as my default browser on my system.

 

As on update looks like Opera does something with gmail javascript resulting it to fail to load just check this thread

http://www.google.com/support/forum/p/gmail/thread?tid=6e4ba0f797ec5c55&hl=en