Images in Emails


Do you get emails with images, and outlook blocking the display of images in the preview/display page? Then this image would resonate well: 

Image files were always thought to be vulnerable for viruses as it’s quite easy to embed malicious code into jpg or other format of images. See this reference for some more details: http://www.sophos.com/en-us/press-office/press-releases/2002/06/va_perrun.aspx
Now this problem can be easily mitigated by good image readers/scanners which only understand the image format and display it if it adheres to that standard and it doesn’t execute anything.
So VIRUS is not the problem. If you carefully read the warning, it says to “protect privacy”… 
That’s interesting! What can a image from a 3rd party site do with privacy? Answer is simple and it’s not addressable by email clients.
Consider the image(s) to be downloaded is at customized link for your email id. Once this image is downloaded from the site, it just means that your email id is valid. Quick and Safe way for spammers to make sure your email id is valid and can be targeted for more spams! Since email client like outlook can’t easily determine if the image is used for email id verification or not, it simply blocks images asking you to validate to download images. This happens everytime the sender id isn’t from your trusted domain or safe list.
This concept is not only used by spammers but interesting apps have been designed using this. Checkout: http://www.spypig.com/
All this does is find out if your email has been read without asking for read receipt from clients!

System Restart - Mac OS X

If your mac icon isn't working on the system menu, then here are 2 quick ways to achieve the same.

  1. Ctrl-Cmd-Eject works - does a force reboot.
  2. Open a terminal and type in:
sudo reboot
(sudo is required if you are not an admin)

or you can use
sudo shutdown -r  which is mentioned to be more gracious and other options.

Interesting short urls

Have you ever wondered what are the shortest URLs?

Found the following 1 letter second level domain names with .co and .com TLDs. Interesting list.


a.co => Redirects to amazon.com
o.co => Redirects to overstock.com
g.co => displays page mentioning about it being used for Google Product Links
s.co => __ NO_REDIRECT__ Startup America Site
t.co => displays page mentioning about it being used for a twitter service
x.co => Redirects to app.x.co  GoDaddy site for URL shortening

X.com => __ NO_REDIRECT__ An ebay Product
q.com => Redirects to Centurylink.com

Now taking a.co example, a.co redirects to amazon.com. but amazon.co redirects to an help page in amazon.com. Also surprising that they have a short URL for a.co but not for a.com

Also interesting why companies like apple, microsoft, intuit doesn't have single letter domain urls. i.co or i.com and m.com likes lucrative URLs for them to own for more web hits... doesn't it? (Though have to agree that the number of people actually typing URLs is ever decreasing with more and more usage of Google Chrome Awesome Bar :) )

Thoughts?

Also, if you are confused on what are TLD, Second level domain names etc. and their relationship to URLs, here is a quick reference:
http://www.seomoz.org/img/upload/anatomy-of-a-url.jpg

Use nanoTime instead of System.currentTimeInMillis()

Refer: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#nanoTime()

Especially useful when we are not really looking for a wall clock definition (current time) but are doing endTime-StartTime.

TextWrangler and formating XML & JSON Documents

TextWrangler is a good alternative for Notepad++ on Mac Os X but it quite doesn't have the plugins that notepad++ enjoys.

2 Scripts which I really use:

Format Xml Document:
http://www.bergspot.com/blog/2012/05/getting-xml-tidy-xmllint-to-work-on-textwrangler-4-0/

Format JSon Document:
http://ukitech.blogspot.in/2012/08/format-json-in-free-textwrangler.html


For assigning shortcuts -
Goto preferences in TextWrangler (Cmd + ,),
Click on Menus & Shortcuts
Select Text on the right side box.
Expand Text Filters
Click on the plugin (on to the right most side)
Type a unique key combination
Close Preferences.

Android UI Wireframing online tool


Anyone tried this Android UI wireframing online tool: http://www.fluidui.com/
Seems to be good.

More details:
http://www.androiduipatterns.com/2012/07/fluid-ui-wireframing-for-android.html

Http Post utility

Poster seems to be a very good browser plugin to do HTTP Posts. It supports all http method calls, headers and post body formats. It's available for Firefox and Chrome for both Windows and Mac.
Link for chrome: https://chrome.google.com/webstore/detail/cdjfedloinmbppobahmonnjigpmlajcd

http://hurl.it/ is another good one if you want to try it on browser & not install a plugin.

If you want to download an app for Mac, then try out ApiKitchen. Url: http://www.macupdate.com/app/mac/39400/apikitchen. It has an online version too: http://apikitchen.com/
It's still in beta (as of 30 May 2012) but accomplishes most of the job very well.
Rest-Client is another good tool.

SpringSource ToolSuite - changing maven repo

If you are using STS, you would have found that you cannot modify the default maven repo being used in the project preferences or STS preferences.

To change it, goto preferences -> maven -> Installations. You will find the location for settings.xml. Goto this file in Finder/Explorer and modify the to point to the correct repo you want. Restart STS and you should be good to go. 

Solution found from : http://forum.springsource.org/showthread.php?84284-How-to-modify-M2_REPO
Thanks Christian.

Blogspot.in?

Visiting any blogger sites from India seems to redirect it to .blogspot.in. This seems to be part of creating a country-code top level domain, or 'ccTLD' so that removal of content becomes easier for country level. If you want to visit the original blogsite, just append /ncr to the blog. 

So to access this blog, you would be using http://bschandramohan.blogspot.com/ncr



XCode 4.3.2 install fails



If you get an error stating mobile device framework has to be installed, but errors out when trying to install it, then try the following:
Right click on the xcode.app file and click on show package contents.
Goto Contents/Resources/Packages/ and open MobileDevices.pkg
Try launching xcode after installing above and it should go ahead fine now.

MAC: Remove icons from Finder toolbar


Customize Toolbar doesn't have option to remove the icons. Right clicking the icon only gives options to
If you want to remove the icon, then press "Command" and drag the icon outside the toolbar and release the mouse.

iPhone 4 not starting

I have seen this happen 3 times now.

iPhone stops working suddenly - it just goes dead and whatever you do, you cannot boot up. Tried following:

  1. Long pressing lock button (on top). 
  2. Use special screwdriver and remove the screws near speaker and blow.
  3. Try to connect to your MAC/Windows and see if it gets recognized in itunes/drive. 

None of the above worked. Simple solution to fix is:

Press Lock & Home Button together for 10 to 15 secs. Apple icon should come up :-)


Interesting article on why we shouldn't use Task Killers on Android



Not that I completely agree as per my observation, but interesting to read - especially the section which mentions: 
"On Android, having your RAM nearly full is a good thing. It means that when you relaunch an app you've previously opened, the app launches quickly and returns to its previous state. So while Android actually uses RAM efficiently, most users see that their RAM is full and assume that's what's slowing down their phone. In reality, your CPU—which is only used by apps that are actually active—is almost always the bottleneck."

Associating file types to an app in MAC

There doesn't seem to be one place like windows registry classes subclass or the file associations application where you can set the application to open a file of certain extension in Mac OS X.

If you select one file and click open with and select an App, it's associated to open that file only even if you select "Always open with". It doesn't set the open with app association for all files with that extension.

Easiest way (or is it the only way?) to do that seems to be this way:
Open File Info of a file of that extension. For e.g., to set all .sh to open in macvim, select any .sh file in Finder. Then Click Command I or right click -> File Info.
In the Open With section, select the app to open the file with
And importantly select the option "Change All". That's it - This should do.

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. :)

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:

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

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.

Others found on forums and google search but haven't tried yet:

CheckStyle
Mainly enforces coding standards though the documentation says they have started adding more checks than for UI layouts only.

CodePro Analytix
From Google Web Toolkit. Has lots of good features like dependency analysis, source code repetition, metrics, code coverage etc. Need to try this.

JTest

Julin Online Analyzer
Upload online and select category like checks, nullness, termination etc.

JChord
More details at http://pag.cc.gatech.edu/chord/

Do you use any of the tools above or any other tool which you have been impressed with? Do share it in comments.

Kaiwara and Avani Trip

Date: 21st November
Places Covered: Kaiwara, Kailasagiri, Kurudumale, Mulbagal and Avani.
Vehicle: My Ritz
Distance Covered: 280 Kms
Start from Home @ 8 AM
Back Home @ 10 PM


We went to Kaiwara to see the Amaranarayanaswamy temple there. 
A passer-by suggested us to visit Kailasagiri when we asked for directions to cave temples of Kaiwara. Didn't know it was man-made caves but it was first time I saw chaturlinga (4 faced Lingas like Brahma). Nice place to visit and temple free lunch was amazing. Details about this place: http://www.deccanherald.com/content/6954/snippets.html


We came back to see Kaiwara caves with the lakshminarasimha temple in the caves and then saw the "Kaiwara" Thatha's Ashram + temple.




We then headed to Kudurumale Ganesha temple near mulbagal. There is a large stone idol of Ganesha.


After that we went to Anjenaya temple in Mulbagal town. It was supposed to be very famous but didn't find much crowd and the pujari there wasn't interested in doing a pooja too :(.


It was already getting dark but wanted to cover Avani too and lucky we did cover that place.
Had an awesome experience in Avani. On account of Last Karthika somawara, Ramalingeshwara temple was being decorated with mud deepams all over the temple. It looked like half the village was inside the temple with kids joining in pouring oil and lighting the lamps. 
More details are in the link:
http://en.wikipedia.org/wiki/Avani,_Kolar 
Had temple prasada as dinner and headed home.