Skip to main content

Posts

Showing posts with the label continued

Writing your first UserScript, Template as a beginner's tutorial

UserScripts are fun, useful and often productive . A lot of sites have small improvements you think could add a lot of value. And just because you are not the author of the site, you need not give up. With some basic javascript skills, you could write a userscript, install it on your browser, and make the site behave.

Beginning with Android.

Got a new Android? This is the first place you should be looking at these tutorials . Online Search for Market Apps: If you are looking to search for market apps, and thinking that there no such online search tool? There may not be an official Google hosted online market replica, but appbrain.com gives one. Installing Apps: Most websites you browse on the laptop/computer, have what are QR codes (eg. shown below). These are like images that link to urls on other sites or market apps. So first you have to manually go to market place and search for " Barcode Scanner " and install an app by ZXing. From then, you can use the scanner to install various apps that can be looked up by QA Codes. This app can also get you product lookups (however there are specialised apps for that) Appbrains.com app: Appbrains has an app manager that can manage your apps, installing them and their updates. You create a profile online and all your installations are synced to your device. This...

Import Mysql data (or a CSV file) into MongoDB

You have MySQL database. And want to move either all, or some of the data into MongoDB. There is no direct way to do it, as such, It can be done in two steps. (If you are here because you have a csv file instead (or directly) move on to Step 2.) Step 1. Export all of your MySQL data as a CSV file. select columns INTO OUTFILE ' /path/to/csv ' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' from table [ where clause ] Step 2. Import the CSV into MongoDB. Assuming you have MongoDB running (on local, defaults) run the following command mongoimport -d dbname -c collname -type csv -f fields-sep-by-coma --drop /path/to/csv if your csv file has a header row add --headerline . p.s.: for more options on mongoimport look here More tips on mongodb, coming

v6.1 : SarathOnline live on java, now with Dynamic resources.

Fresh out of the oven, The new site is running on Java. The v6 version released in private had been trimmed down to remove extract bloat. One of the major changes in this version is serving images and jscss (with stiching) , not from the filesystem, but the Datastore. So the file content is a stored in BigTable. So It can be updated without having to redeploy the whole application. Having to deploy a whole application is one inertia causing aspect in a appengine app development. With Dynamic resource serving, this inertia is completely eliminated. Ofcourse, this will mean the site MAY slow down. The stats will be monitored over the next couple of weeks. Hopefully it won't be that bad. Fingers crossed.

java turorials: Learn everything Java basic to enterprise

Java Programming basics Introduction to Java programming   ServerSide Java Download Tomcat Demo - Servlets and JSP JSP Tutorial IBM JSP tutorial   Enterprise Java JEE 5 tutorial Develop Web services with RAD Part1 Part2 Crash course in Enterprise JavaBeans 3   Struts IBM Tutorial Apache Wiki (List of Tutorials)   Spring Viral Patel’s turotial Reference Documentation   Ibatis JavaLobby Introduction Apache Tutorial   Hibernate JBoss Tutorial    

FaceBook Privacy – reality check

Many privacy evangalists, like Dan Yoder, have taken facebook to a beating , as far as recommending you quit. This follows a series of Privacy policy changes from Facebook on an excuse to protecting themselves. It turns out Dan's points have quite a few compelling reasons to actually quit. However, personally, I would not - but would definitely advice a lot of caution to use ANY of FaceBook's features. Always protects yours and your friends' information. Reduce the visibility of any information to minimum or atleast only to your friends. And if possible omit it all together. As a general rule of thumb – only let that information go into facebook that has NO implication whatsoever, if revealed. To ANYONE – And I mean - your boss, collegues, girlfriends, wifes (ex-wifes :P). For  quick reality check how much can be dug out of your facebook profile WITHOUT logging in, you can head on to http://zesty.ca/facebook/ . And remember, this is as much information ANYONE can get. ...

How important is Communication in Software Development

  A picture is (also communication) worth a 1000 words.   credit: blogcmmi.com and makinggoodsoftware.com

BSNL slow (again).

One of my ISPs (the all reliable) BSNL is slow again. This time to non indian servers. All indian servers are fast. The CDN balanced Gmail, Yahoo (and speedtest.net) are pretty fast. Twitter seemed slow. My servers on east cost (USA), aws boxes (east-1), and infoq dowload site are snail paced. This looks something in the lines od UnderWaterSeaCable cut a few days ago.   Here is my recorded information from speedtest.net is outlined below.   Time IP Download Upload Latency Location Distance 4/26/2010 5:24 PM GMT 117.195.198.xxx 1.19 Mb/s 0.64 Mb/s 128 ms Mumbai 400 4/26/2010 5:44 PM GMT 117.195.198.xxx 1.68 Mb/s 0.71 Mb/s 92 ms New Delhi 800 4/26/2010 5:53 PM GMT 117.195.198.xxx 0.14 Mb/s 0.59 Mb/s 291 ms Bangkok 15...

AppEngine Cold Startups - Rendezvous with Google App Engine Team

I was at Google App Engine IRC Chat today. Following a lot of concerns of others and of my own , I wanted to put forth my ideas to them about cold startups. I tried to promote my ideas of different approach to classloading, osgi, profiling the runtime itself etc. But time was not enough. I will probably talk again next time. For the most part, It looks like Google is almost ready to come up with *reserved instances* approach. But here is what they have to say. (9:59:52 PM) sar4j: This is about cold startups for java. I run my website sarathonline.com on appegnine py. But I am a java developer. So I have to get reasonabl undersanding about how gae/j works. To simulate the same performance, I am adding a test.js script to exisitng website. So every time a visit comes to gae/py a hit happens to gae/j. I still see that gae/j is very aggressively spinned down. (given number of requests are the same) is there any algorithm on how and when spinning down happens? ..... (10:04:17 PM) api...

Certified Scrum Master

Apr 6, 2010 – I finished my Certified Scrum Master Training. I took the Online test 2 days later. And Now I am officially Certified by Scrum Alliance. (Alright, people – Hire me :)) ScrumAlliance has a unique (rather beatable) way of handling how the authenticity of who is getting certified. They give you a membership ID. You are given a profile page that is public on their site (is this getting a public-private key mechanism. wait a min). You can add your photo and Have the interested parties download your certificate from their site. My profile is available here http://www.scrumalliance.org/profiles/86562-sarath-chandra-pandurangi Download my Certificate here http://www.scrumalliance.org/generate_public_certificate/86562/A4/csm And then the site also has an *Authentic* way of sending mails from their site on my behalf. I choose to *share* my certificate and they simply send the person of interest the following mail. Only problem : The email itself is not showing my certifi...

Faster.. Faster.. Internet in India

Just less than 2 weeks from the news of venture with Google , Airtel and BSNL have released new Faster internet plans.

Google App Engine / Java / cold Starup benchmarks (issues).

This is connected to the post in Google App Engine Group .  Although Google Appengine gives out a java container, I had to roll back to the python code I used for version SarathOnline 3.1 – for a sole reason – perfromance. My (blog) site has a very low traffic (compared to what google thinks a regular traffic application). Averaging ~100 visits/day. All the css and js is dynamically generated. My current python code is doing pretty well servicing these requests @ a maximum of 2.something secs

Sun Tech Days – My Day 2

Day 2 missed James. But the tech series remained just as educating as Day1's. I dug deep into the JEE6 foundation laid by Yesterday's  sessions. Today: I Jugged in knoweldge from Java Persistence API 2 Overview of Servlet 3.0 ZFS (a Whole lot on ) Context and Dependency Injection in JavaEE 6 Java EE 6 Tools Show: NetBeans, Eclipse, IntelliJ I have to bold all of them, but the ZFS really instigated me to push OpenSolaris into my dev space. Look forward to some OpenSolaris entries coming.

Faster internet! Coming soon to Asia (India)

A few weeks back I wrote a comparison on prices for internet in India and the USA. Well, A lot is about to change. According to CNet news , a 7.68Tbps line is due soon to Asia. Bharati Airtel (one of the largest telecom companies in India) is part of the Unity Consortium which is making this happen. According to the story, The Unity Consortium, which consists of Google, Bharti Airtel, Global Transit, KDDI, Pacnet, and SingTel, has nearly completed the testing of the $300 million project. Internet users in Asia will start seeing faster Internet speeds over the next several months from the new cable, which has the potential to create a 7.68Tbps (terabits per second) connection under the Pacific. This could mean a lot of change in dynamics and economics of internet traffic. With already (considerably) low prices in India (thanks to a tough competition among BSNL, Reliance, Airtel and Tata), The only complaint was the speeds of unlimited plans. A limit-less user, generally capped by a...

(NOT) yet Another Getting Started with OSGi

Last week I have been learning OSGi. I got my first application running in OSGi. I am not going to write another getting started post with code that will show a hello world. But rather give you an idea how to start getting in the mud. And then may be show you more than a direction :) I used Equinox 3.4 ( OSGi R4 ) implementation. I prefered it over Felix. Why - Eqinox is simple, and a single jar download. But I guess that aint a thing to notice. You can get Equinox jar from here . If the link is broken, go here , download the equinox framework, it should be ~0.95MB. Start equinox framework as java -jar equinox.jar -console You would have seen this on a lot of sites. but I did fall on two things flat on my face; missing -console and doing it wrong --console :P As per the spec, (and by now, you know ) a bundle is a jar with some special informtion in MANIFIEST.MF. A Bundle jar need not DO anything. It could just sit installed or be active (by exporting packages and services). So ...

Ubuntu Intrepid Ibex: A week to go

O so long, I have been waiting. With hopes that Intrepid will solve my sound issue out of box (I could have checked in live CD but it can wait), I am counting this week down for the next release of Ubuntu. This is not a major release but you could have seen a lot of beta (p) reviews if you follow digg enough. What I am looking for: Latest Gnome, X.org, Kernel (Solve My audio issues.. ) Encrypted FS Mounts (Protect my Data) Networking improvements (Bluetooth, Network Manager[ndiswrapper - would be needed futher?]) DKMS (interesting feature, eh?) Flash (My web cam issue )

Using Spring XML Schema based bean definitions

Spring's bean definitions (and configuration files) may go very verbose after your projects goes two or three iterations old. By verbose I mean, too many bean definitions, and complex injection graph. And many a times, these xml files go fat because of common definition types - props, lists, etc. These beans are generally configured using FactoryBean s. To reduce this verbatim Spring provides XML schema based configuration, for various types of FactoryBeans. There are some shortcuts presented in that appendix, I frequently use. I recomend those to others too. Here are some of those. <!-- creates a java.util.Properties instance with values loaded from the supplied location --> <bean id="jdbcConfiguration" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="location" value="classpath:com/foo/jdbc-production.properties"/> </bean> Could be written as <!-- creates a java.uti...

Public and Private JRE

This one is basic. Newbies in Java are overwhelmed with too many techy terms. Most know JRE, but some find it hard to understand the notation of a Public and Private JRE. A JRE is nothing but a folder that contains JVM executables, setting files, required lib files, and extensions. You can install multiple JREs on your system Sun generally installs versions in C:\Program Files\Java as jre eg.jre1.6.0_06. A Public JRE is available to all Java programs, Browsers, and the libs in this JRE folder are available to applications started in command line like java com.sarathonline.cli.HelloWorld This JRE is also registered in path, and Browser plugin. A Private JRE is something that is installed in the system by is not refered to by default. This could be a copy of the JRE / JDK folder from another installed directory. If you see a my earlier post :  starting eclipse with jre 1.6 where your environment is in 1.4, The JRE1.6 is used only by Eclipse, This is a private JRE. While the ...

Resource Contention in JEE for a layman

In terms of scalability, a frequent term used is "Resource Contention". Most commonly this means, there is a shared object, file handle, db connection, or similar for which Threads are trying to get ownership. Until they obtain this ownership they either wait or exit on a timeout mechanism. In normal flow, they simply wait - This state is called blocked state. In an asynchronous mode (generally meaning a spawned child thread), there can be a Time-Out flow that can be defined to control the maximum length of time the thread can take to complete a task. In a blocked state, There may be "Resource Contention" in one thread that is avoiding other threads to proceed. In a JEE environment, This Resource Contention is caused commonly by Transactions(, Synchronized blocks, Locks). Since User Threads are discouraged in JEE, Synchronized blocks and Locks are less often encountered as issues. That's theory. If you dint understand much, Dont feel despair. I come from the ver...