Saturday, December 17, 2011

Quick Calc on Mac

  1. Click on Apps icon - Select calculator Or open spotlight, type calculator and select the first option to launch calculator. Type in your numbers and operators to get the result, seems to be the most used one. 
  2. You can also use Dashboard (by pressing F4) and calculator should be there by default.
  3. BUt the easiest of them if your data isn't very complex is just open spotlight (cmd-space) and type in your data there... For e.g., 3^4*2 and the first result is your answer. :)

Saturday, December 10, 2011

Android/Java Static Code Analysis Tools

Java/Android compilers in itself are very good and give very good warnings to inform about various issues/things done wrong.

Just thought about trying free Static Code Analysis Tools and found the below 2:

  1. FindBugs
  2. PMD
Both have eclipse plugin urls, so you can add the URLs at the software site link and easily add the plugins.

FindBugs
Damn good tool. Install the plugin and then right click on a java/android project. You will find FindBugs Menu. Just click on FindBugs and it gives a very good overview of the review bugs in it's own perspective.

Each of the bugs is categorized by the pattern (you can change the categorization in the toolbar) and it lists all the occurrence of that type in all files in the project under that. 
Clicking on it, it gives a very very good description about what the error is and why that is considered to be an error. It indicates if its just a suggestion or performance issue or style issue.  Some of these were quite new for me and the explanation made me feel good to have learn something.
It has mechanisms for marking/filtering out the warnings/bugs we know doesn't make sense in our case -  either file by file or by the pattern type.
It gives a handy way to save the results in XML format too.

All in all, a professional tool/plugin which does it job well.  

PMD 
I wasn't very impressed with this tool. Similar features of finding issues as FindBugs but gives issues in file by file manner. One useful feature is "Find Duplicate Code" which might be useful in some cases but not when you have various design levels for same data objects and it says code is repeating in the classes.

Do you use any other tool which you have been impressed with? Do share it in comments.

Cross posted from: http://bschandramohan.blogspot.com/2011/12/androidjava-static-code-analysis-tools.html

Tuesday, November 1, 2011

Open Terminal window here - Mac OS X

It isn't as easy as updating registry key in windows (or atleast I don't know). Found this link to be good source for app to do that.

https://sites.google.com/site/michaelsafyan/software-engineering/open-in-terminal
Chose the one with customized terminal window icon.
If the folder Finder doesn't exist in your 'Application Support' directory, then do create it.

If you have any other easy ways of doing this, let me know.

Mac DVD Not visible in Finder

In MAC, the dvd drive gets listed in finder only if a dvd is present. Else it's hidden.
In some rare cases, even after you inserted a drive, the disk might not be visible in finder and since there is no eject hardware button near the DVD, there doesn't seem to be a way for removing the disk.

Browsing around, found the following ways (from multiple sources) to eject the disk and re-insert it:

  1. Force restart finder.
  2. Open disk utilities (Applications/Utilities/DiskUtility) and the drive should be available there. Right click on it and select eject.
  3. Command line always rocks. Run the following in a terminal: drutil tray eject

Wednesday, April 20, 2011

Eclipse: Removing Todo: Auto-Generated comments

When you use Eclipse menus to create new class, constructor, method or even add a try/catch, typically it not only generates the functionality but also adds a TODO. This is good to indicate that the comment has to be replaced with a proper functionality.

However in a team environment, it's not easy to make people delete the line and add the code. Task remains and it becomes difficult to delete it at the end.

To remove the auto addition of that comment line, you have to follow the below steps:
Goto Window -> Preferences -> Java -> Code Style -> Code Templates
Click on Method Body.
Click Edit.
Remove the commented line. (Something like: // ${todo} Auto-generated method stub)
Click Apply.
Repeat the steps for other elements.

Click save.

Tuesday, March 1, 2011

Open javadoc in external browser - Eclipse

Solution:
http://stackoverflow.com/questions/4413883/how-to-open-attached-javadoc-in-external-browser

Should we do this for each workspace?

Function key on aluminium keyboards - MAC

Seen that many people do not find the Fn key in the new aluminium keyboard for mac and end up setting "use default functionality of function keys" in system preferences. However this affects the laptop keys too and might not be preferred by all.

Solution: There IS a function key in the keyboard. Not in the place we expect it though. Look for the key under F13. :-)

Opening multiple instances of Eclipse on mac.

Double clicking on eclipse icon always opens the same instance on MAC. To solve this, you can open terminal (Command-Space to launch spotlight. Type in terminal and click on the top hit/Terminal link).
Cd to the place where you unzipped eclipse.
For .e.g, Eclipse/Eclipse.app/Contents/MacOS/


Then run eclipse &. (& makes sure you run eclipse in background, so that you can kill the terminal window.).

Friday, November 19, 2010

passportindia site using weak public key?

I got this error in chrome but it happily went through in IE.

Server has a weak ephemeral Diffie-Hellman public key

This error can occur when connecting to a secure (HTTPS) server. It means that the server is trying to setup a secure connection but, due to a disastrous misconfiguration, the connection wouldn’t be secure at all!
In this case the server needs to be fixed. Chrome won’t use insecure connections in order to protect your privacy.

Thursday, November 4, 2010

Tuesday, November 2, 2010

Printing Wikipedia articles

Typically we copy contents from wikipedia articles – paste it into word documents or other wysiwyg editors. Then format it and print. However after posting the question on facebook questions (http://www.facebook.com/q/Is-there-a-easy-way-to-print-wikipedia-articles-without-the-sidebars-and-see-also-references-etc/10150286691460015?t=1&keep_objects=1), I found that there is an option right there in the sidebar to get printable version or even download it as pdf.

http://techcrunch.com/2009/02/27/print-you-favorite-wikis-as-books-courtesy-of-wikipedia-and-pediapress/ has some more details on new initiatives. We can add multiple chapters into http://en.wikipedia.org/wiki/Special:Book and print out combined articles too.

Thursday, October 14, 2010

BarCamp Bangalore 9th edition

BarCamp Bangalore 9th edition was held in our Intuit Campus (Bellandur, Bangalore). There was a good crowd of around 250 people. Intuit, OrangeScape and FusionCharts were the official sponsors.

Attended the sessions :

Also helped Saurabh in presenting the session: Android Programming for Desktop Programmers

Had very informative and entertaining sessions.... Got lots of ideas and web links to check.... Eager to attend the next one :)

Saturday, October 9, 2010

Subscribing to Perforce depot changes

Command line mechanism is mentioned here:

ftp://ftp.perforce.com/perforce/r97.3/doc/cmdguide/html/changere.htm

Details about this are in:

http://stackoverflow.com/questions/588264/perforce-getting-email-on-every-checkin

 

In Perforce p4v –> Click on Connection –> Edit Current User. In reviews enter the perforce depot directory ending with /… You should be getting emails for the current user email.

Monday, September 20, 2010

Technical sites that I Like

Original post: @ 7/22/2010 03:45:00 PM

I typically start office time with browsing my office mails followed by gmail and live mails. This is now invariably followed by 30 mins of browsing technical sites and I have kind of grown addictive to these:

Regularly visit:

Few other sites I visit occasionally:

Few more which I rarely visit:

Trying to avoid mention of FaceBook, Orkut and Twitter where I spend considerable time too :)

Different Personal and Professional news streams for Facebook?

Original post: @ 7/16/2010 04:08:00 PM

In FaceBook

  • You share a lot of technical stuff …. links relating to the work you do, company info, competitors products info etc etc….
  • Then there is the personal front – snaps. ..outings.. .your philosophical notes, ramblings etc etc ….

Two different streams or a classification of the news stream would be a good way to get the relevant information displayed to the correct audience of your co-workers/family/friends :).. Hope FaceBook implements it soon!

Win 7 – Few useful tricks

Original post : @ 6/18/2010 03:45:00 PM

  1. Right most spot on the taskbar is the equivalent of “Show desktop shortcut in quick launch”
  2. Win + 1 to 9 can be used to open the application ordered by the entry in the taskbar. Multiple windows of the same application? Then the hover gets displayed.
  3. Shift + Right Click on folder gives “open with command prompt” option.
  4. press the shift key and the icon in task bar to launch one more instance of the application.
  5. Alternatives for Alt-Tab; most of us are familiar with the WIN+ tab – This displays 3D tab feature. You can also use WIN + T to display the hover windows in the taskbar.

Other links:

Simplified version from: http://clubhouse.microsoft.com/public/post/261c40ef-ed74-4113-a8a7-5d26c9792228

Another good one: http://lifehacker.com/5390086/the-master-list-of-new-windows-7-shortcuts

Technology Shift – My career change

Original post : @ 6/16/2010 10:18:00 AM

After nearly 9 years of being involved in desktop software development, am finally thinking of shifting to the online/mobile space. Attended a 2 week JavaEE course and planning to start learning developing on Android platform. Hopefully can shift to that domain soon.

Java EE course was good but felt I learnt the syntax and “how to do” part but not the why part. Am looking for some suggestions on learning projects for JavaEE, so if you have some cool suggestions, drop it in :)

Office worker Ribbons for computer users

Original post: @ 2/25/2010 12:08:00 PM
Surprised with the number of people fascinated by the ribbons they get on online social games on FaceBook like Farmville, zoowold, cafe world, etc., I was wondering why we couldn’t use the same and give ribbons for most effective users of the pc/laptop.

For a software engineering team, we could decide ribbons for people who spend more time on visual studio or eclipse or any other development tool they work on {Ribbon: Workaholic}. They get bonus ribbons for surfing websites like msdn/stackoverflow.com {You are a technical help seeker}, if they contribute articles on web {Techno sharer ribbon} etc.

Wouldn’t this be interesting to share not only colleagues but also to all your friends on the social networking site?

Business Idea: Outsourcing Farmville, café world e.t.c.,

Original post : @ 2/02/2010 10:08:00 AM

Read that the FaceBook app Farmville has more users than the “in-thing” twitter. It’s a good time-pass activity but I think it’s the competitive spirit that drives it rather than the interest on the art of farming – plowing/ buying seeds/harvesting.


Even with the vehicles like Tractor, Seeder and Harvester, it’s really tedious to harvest plants, plow the land and again put seeds. There are lot of cheat sites, tricks for Farmville which suggest plant different kind of plants with different harvest times so that you won’t get bored :)… Same applies for the different dishes in café world.


Well, one easy solution is to outsource it! I am sure there are tons of people who would be willing to pay a small amount for their farms to be harvested before they get withered, when they are having a good sound sleep. Read that one of my senior colleague was doing the farming as her son had to go on a school trip and he didn’t want his crops to be withered out. I am sure she or for that matter anyone who is going out on trip or busy for few days won’t mind shelling out bucks for this :)


What do you guys think?