Thursday, April 17, 2014

This Week I Learnt - 2

Ok. I am posting this after two weeks of the first one. But had a lot of work and couldn't find time for this.
So without much further ado, here are the learnings of the past two weeks.


1. Create a project with Gradle
I attended a training called - 'Agile Development With Scrum' and the trainer said if we are really following scrum, we should be doing atleast three things.
1. Daily Scrum Meeting
2. Test Driven Development
3. Continuous Integration.
Though we have heard things so many times, sometimes hearing it just one more time clicks (Tipping Point) and we are pushed into action. So I wanted to do
Test Driven Development. For that, a good build process becomes essential. So I surveyed the build tools available in the market. There are Apache Ant, Maven, Gradle,
Buildr and SBT (Scala). And the Spring team, for whom I have a lot of respect and who eased the development in Java, have started using Gradle. It added a lot of
momentum to Gradle. The syntax of Gradle is a seperate DSL (domain specific Language) written in Groovy and it is very concise compared to Maven. I decided to give it
a try and set it up for a web project. The dependency management is very easy and it can use both Maven and Ivy libraries.



Advantages: Very less work compared to Ant. Adding "apply plugin 'java'" to the build file will magically add all java related tasks like compile,build,jar,test etc to the build file
Very concise compared to maven. No big XML files.

Disadvantages: Not many plugins available. I used the jettyRun command which has options for automatic deployment by scanning the project for changes, but it is not working well.
It seems the tomcat plugin overcomes this problems. But I have to say I am a convert to Gradle. It makes dependency management lot lot easier and a first step to TDD.
Definitely going to use Gradle for the coming projects.

2. One-On-One Manager tools:
I don't remember how I came across this, but I learnt that using weekly scheduled one on one's with all the direct reports is one of the best ways to work together
and better with the team. The important things to remember are that it is an employees meeting rather than managers meeting. So employee should set the agenda.
http://davidjaxon.wordpress.com/2014/03/28/the-right-way-to-do-one-on-ones/
The key to a good one-on-one meeting is the understanding that it is the employee’s meeting rather than the manager’s meeting. This is the free-form meeting for all the pressing issues, brilliant ideas and chronic frustrations that do not fit neatly into status reports, email and other less personal and intimate mechanisms.

If you like structured agendas, then the employee should set the agenda… During the meeting, since it’s the employee’s meeting, the manager should do 10% of the talking and 90% of the listening… While it’s not the manager’s job to set the agenda or do the talking, the manager should try to draw the key issues out of the employee. The more introverted the employee, the more important this becomes.

Some questions that I’ve found to be very effective in one-on-ones:
If we could improve in any way, how would we do it?
What’s the No. 1 problem with our organization?
Why? What’s not fun about working here?
 Who is really kicking ass in the company?
 Who do you admire?
 If you were me, what changes would you make?
 What don’t you like about the product?
 What’s the biggest opportunity that we’re missing out on?
 What are we not doing that we should be doing?
 Are you happy working here?

3. PostGIS Installation on Amazon Ec2
I tried to install PostGIS on Amazon Linux AMI Ec2 instance but couldn't do it. All the forums seems to say that it is better to use Redhat or Ubuntu instance.

4. Trying to get a video to play using JAVA.
Currently I am just writing out the response using a servlet, but this way there is no way to seek through the file. It seems we need to allow for range queries for it to work. There is solution here by Java Guru Balusc Simply wondering why there is no framework level solution for this.  [OSS]


Monday, March 24, 2014

This Week I Learned - Week 1

I read a lot of stuff daily and sometimes I don't remember what I read after some time. So in order to remember them and review them, I would like to note them down in my blog and share them.

These might be useful to others too.

1: Older Developer Problem: I read about a developer who is out of work as he is older and the same work can be done by other younger developers at fraction of the cost and the technologies he has learned have become old. In India, most of the developers grow into the managerial responsibilities after some time, it does makes sense to keep in mind the things we can do to avoid the older developer problem if we wish to continue in the developer path. There is an excellent answer in Quora about always being fresh.

2: Comparison of Javascript Frameworks: There are lot of javascript frameworks coming up for creating single page/multipage javascript applications. While planning to build an application, I came across this comparison of Angular JS, Backbone JS and Ember JS. There are important differences between each of the apps. Angular JS is very adaptable and guides developers to write testable code often. Backbone JS doesn't do a lot of handholding and is used to write single page apps. Ember JS is the biggest library but it does provide lot of support for common use cases like back button support which are anyway required in an application.

3: MicroServices Architecture: Martin Fowler talks about new kind of application architecture called Microservice architecture. Spring Framework is also going forward in this direction.


The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.
 Here I do see the advantages of this kind of architecture. It is easy to use different technologies for different parts of the application and it would be possible to make changes quickly as everything is decoupled. I am not sure how we can decouple data. Till date, in all the applications I have created, one database contains lot of data related to users and it spans multiple functionalities. How can we split that data without duplicating the user information at each place ?



4: Spring Boot and other projects: Spring 4 release brought a new framework called Spring Boot which is used to quickly start a spring project. It helps to quickly get up and running with applications ala Rails. I have tried that and it works well to start up a web application. But it is too early to see how easy it is to configure or change the defaults included in the template project. It uses Groovy internally to decorate the classes so that developers need not write boilerplate code.

5: Devops with Chef & Vagrant: To get over the problem of long time for development machine setup, there is a solution called Vagrant. This tool can be used to automate the setup of a development machine. You can specify the configuration of the machine, the software needed to be installed, etc and Vagrant will setup the machine and get it available as a VM with a single command. Vagrant Up. I think this kind of single command setup will help a lot if  a lot of AWS instances are required to be created. It will be easily to replicate the setup with one command. I am looking into this and still have to setup.

6: AWS Reference Architectures: Initially when I wanted to deploy an application to cloud, this reference architectures would have helped a lot.

7: The Importance of Finishing : A parable about a guy jumping on to new things without completing the old ones.

8: The End of Average: (Atleast in the Winner Takes All Market) : In media and things that require our attention, it is going to be the end of average as the reach of the best is practically everyone. So everyone will only refer to the best, so the average ones will not be needed.  .

Note: I want to introduce a tool to manage and organize everything. I use a free tool called trello for that. Trello is the fastest, easiest way to organize anything, from your day-to-day work, to a favorite side project, to your greatest life plans. You can give it a try here and I'm sure you will like it too.







Wednesday, July 25, 2012

Exciting times ahead

Massachusetts Institute of Technology
Massachusetts Institute of Technology (Photo credit: Ochinko)
I have always dreamt of studying at the great institutions of the world like Stanford & MIT. Till now, it has just been a dream. But now the dream has come true atleast virtually.

Now great universities like MIT, Stanford, Harvard, UC Berkeley have their courses online. Yes we had open courseware from MIT before but we now have courses which are even more interesting and captivating.

Thanks Khan Academy for starting this revolution. Though just a humble beginning, you have inspired many others and showed the way.

The most exciting ones are Udacity, edX and coursera. Just browse through them and pick your courses. I have taken web application engineering course in Udacity and learnt many things which I could have learnt with great difficulty very easily. It was taught by Reddit co-founder Steve Huffman and was really useful. I learnt about MemCached, Replication & Sharding from there in context. I am very very excited to take the new courses and courses unrelated to our work but which we are interested in from the very best in the world. Exciting times ahead indeed.

If you are are student, then I don't think there are better times than this :) . If you have read till here, do yourself a favour and just check out the below sites.

Udacity
edX
coursera
Enhanced by Zemanta

Saturday, January 7, 2012

My efforts to get a house in Hyderabad

So after 5 years of staying in rented places in Hyderabad, I decided I should have a place I can call my own. Keeping in mind all the good times I had at my grandparents place during my childhood, I longed to have a similar house. A house with lot of open space in the backyard and in front of the house.

So with that thought in mind, I began searching for plots around Hyderabad, mainly around Madhapur area, where my office is located. After a long search, where every place I saw was about 20km from my office, I thought that my dream will remain just that after all. Luckily, one of my friends recommended a place called Bandlaguda, which comes to 17 km from my office. I was exhilarated and paid a token amount for the land.

The cost per sq yard of the land was 10k. It is an open plot. Now the problem was that I didn't have enough money to pay for the plot completely. Not a problem, I thought. I will easily get loan for that. With this, I started going to banks for loan. First up, was LIC housing finance. And they gave me the first shock. They said they will give me loan on the SRO (Sub Registrar Office) rate which is another word for government rate. To know why I was shocked, just consider this point. The cost of the land per sq yard in the market is 10k, where as the SRO rate was just 3.5k. So considering this, I was getting far less loan than I expected to. So this kind of lessened my excitement for the plot. I told this to the agent who was kind of helping me buy the land. He said it should be possible for me to get the loan from other banks too. So I went to another bank, ICICI. They said they won't fund for areas outside the main city. But this area was outside.. so no loan. same with HDFC, Axis bank and so many others. One of my friends friend works in IDBI bank. So I went to that bank and enquired. They said I will get good amount of loan. That amount will be enough for me to purchase the land. Awesome I thought. But when I went with the documents to them, they said they will fund only if I have HMDA approval for the plot. To get approval for a plot, first the layout has to be regularized and approved. But my layout was not, so no question of getting approval. By this time, I was losing hope fast that I will be able to buy it. In a final effort, I contacted DHFL, who give loans exclusively in panchayat regions on market rates. They said they can process my loan, but the amount was less and I will have a shortfall during construction.

So I had to forget my dream home..... 

Saturday, April 30, 2011

Versatile Mr. Richard Feynmann

I am not sure how many of you know about him. He is a nobel prize winning physicist. He is not talked about in the same breadth as Einstein or Edison and so he is not so famous (atleast I didn't know about him previously). I came to know of him from reddit where a link to one of his lectures was posted. It was very interesting. In no time, I came to his online home,  and started reading the anecdotes about him. Of particular interest was a speech given by him called - "What is Science" upon reading which I had a plenty of aha moments. Read the whole article. It is a gem. In that lecture Feynmann talks about how he learnt what science is. It is really amazing. Talking about how he got interested in science, he says


My father did it to me. When my mother was carrying me, it is reported--I am not directly aware of the conversation--my father said that "if it's a boy, he'll be a scientist." How did he do it? He never told me I should be a scientist. He was not a scientist; he was a businessman, a sales manager of a uniform company, but he read about science and loved it.When I was very young--the earliest story I know--when I still ate in a high chair, my father would play a game with me after dinner.He had brought a whole lot of old rectangular bathroom floor tiles from some place in Long Island City. We sat them up on end, one next to the other, and I was allowed to push the end one and watch the whole thing go down. So far, so good.Next, the game improved. The tiles were different colors. I must put one white, two blues, one white, two blues, and another white and then two blues--I may want to put another blue, but it must be a white. You recognize already the usual insidious cleverness; first delight him in play, and then slowly inject material of educational value.Well, my mother, who is a much more feeling woman, began to realize the insidiousness of his efforts and said, "Mel, please let the poor child put a blue tile if he wants to." My father said, "No, I want him to pay attention to patterns. It is the only thing I can do that is mathematics at this earliest level." If I were giving a talk on "what is mathematics," I would already have answered you. Mathematics is looking for patterns. (The fact is that this education had some effect. We had a direct experimental test, at the time I got to kindergarten. We had weaving in those days. They've taken it out; it's too difficult for children. We used to weave colored paper through vertical strips and make patterns. The kindergarten teacher was so amazed that she sent a special letter home to report that this child was very unusual, because he seemed to be able to figure out ahead of time what pattern he was going to get, and made amazingly intricate patterns. So the tile game did do something to me.)




Another interesting story hitting why just knowing the name of the effect or thing doesn't mean anything.


On the weekends, my father would take me for walks in the woods. He often took me for walks, and we learned all about nature, and so an, in the process. But the other children, friends of mine also wanted to go, and tried to get my father to take them. He didn't want to, because he said I was more advanced. I'm not trying to tell you how to teach, because what my father was doing was with a class of just one student; if he had a class of more than one, he was incapable of doing it.So we went alone for our walk in the woods. But mothers were very powerful in those day's as they are now, and they convinced the other fathers that they had to take their own sons out for walks in the woods. So all fathers took all sons out for walks in the woods one Sunday afternoon. The next day, Monday, we were playing in the fields and this boy said to me, "See that bird standing on the stump there? What's the name of it?"I said, "I haven't got the slightest idea."He said, 'It’s a brown-throated thrush. Your father doesn't teach you much about science."I smiled to myself, because my father had already taught me that [the name] doesn't tell me anything about the bird. He taught me "See that bird? It's a brown-throated thrush, but in Germany it's called a halsenflugel, and in Chinese they call it a chung ling and even if you know all those names for it, you still know nothing about the bird--you only know something about people; what they call that bird. Now that thrush sings, and teaches its young to fly, and flies so many miles away during the summer across the country, and nobody knows how it finds its way," and so forth. There is a difference between the name of the thing and what goes on.The result of this is that I cannot remember anybody's name, and when people discuss physics with me they often are exasperated when they say "the Fitz-Cronin effect," and I ask "What is the effect?" and I can't remember the name.I would like to say a word or two--may I interrupt my little tale--about words and definitions, because it is necessary to learn the words.It is not science. That doesn't mean, just because it is not science, that we don't have to teach the words. We are not talking about what to teach; we are talking about what science is. It is not science to know how to change Centigrade to Fahrenheit. It's necessary, but it is not exactly science. In the same sense, if you were discussing what art is, you wouldn't say art is the knowledge of the fact that a 3-B pencil is softer than a 2-H pencil. It's a distinct difference. That doesn't mean an art teacher shouldn't teach that, or that an artist gets along very well if he doesn't know that. (Actually, you can find out in a minute by trying it; but that's a scientific way that art teachers may not think of explaining.)In order to talk to each other, we have to have words, and that's all right. It's a good idea to try to see the difference, and it's a good idea to know when we are teaching the tools of science, such as words, and when we are teaching science itself.



there are many such stories, about inertia, about law of conservation of energy etc.. and we can feel the wonder he felt when he learnt about that. It is such an interesting story.  I was very much impressed by this talk. So I got hold of his book 'Surely you are joking Mr Feynmann' and started reading.

In that book in one place, he talks about his experience teaching Brazilian students who would answer any question but still not understand anything. It was because of the people just learning by rote and not really understanding anything.

If you think that all he did was just study, do research and teach then you are terribly mistaken. He is a versatile genius. He, at various times, was a radio repairman, a samba player and dancer in Brazil, a tumba drum player, a very experienced professional lock-picker (his stories about how he used to pick locks in Los Alamos are very interesting), an accomplished painter (so much so that he painted commissioned pictures),  a learner and speaker of other foreign languages(Spanish, Portugese, Japanese)
,a mayan hieroglyphics solver (he loved puzzles), a mind reader (literally) , a hallucination experiencer and many more. He really had a very very interesting life. Apart from the things mentioned above regarding what is science, I also learnt a very easy way of understanding physical theories. You just have to apply that theory on a valid physical object and see if the observations in the theories are right. that is a very very easy way to understand and remember the theories. I wonder why we don't do this more often.  I read the whole book in one sitting. It is full of  really witty, funny and interesting stories. You will come out with a whole different feeling after you read the book. You will really become a lot more interested in science. Even if you don't have any interest also, it is a very good read





Thursday, February 24, 2011

Media Fast for twenty five days. - Updated

I waste a lot of time daily doing a lot of things but in reality, I don't do much. Today was a relatively free day at office and I have been meaning to complete a small project from the last week. But I am always putting it off for just a few minutes whenever I get a sense that I am free. It typically goes like this. If I feel I am free from 11:45 am, I decide that because anyway I will go to lunch at 12:30 pm, I will just check what is happening in hacker news. It will go till 12:30. I will go to lunch and I come back to my desk by 1 PM. Then again, I want to start working on the project but I remember that there are revolutions going on in Libya, Bahrain and else where in middle east. I open up nytimes and guardian to check the status on that. I know that I can in no  way influence the outcome of that but still I can't keep myself from checking those sites. Then I check gmail. I will get a mail from facebook saying so and so person has left a comment on your post. I follow the link and see the comment and reply to that. Also, I see the links and statuses and photos that my friends have shared and in no time, I will be diving deep in the chain of links and by the time I come to my senses and start working, it will be 3:30 PM. I work for half an hour, go for a tea break and come to my place. Again I want to check twitter to see what my friends are saying.  Again I drown in another sea of links. By the time, I am rescued, it will already be time for my leaving. I come home and hope that I can do something at home atleast. After coming home, I start checking sites of telugu movies like idlebrain, telugustudio.net etc and by the time I see the interviews, news and videos I am starved. So I just pull me up, cook something and eat  and by that time, it will be time for calls to India. By the time I am done, I can only sleep. 

                This is kind of frustrating.  I just tell myself tomorrow will be better daily. The days have become weeks and weeks have become months. With such an addicted situation, it is really a wonder that I have been able to complete an android app. So something has to change. As I have mentioned in my resolutions review conentrating on something is not a problem thanks to pomodoro once I have started, but starting itself is a big problem now. So I have decided to extend the pomodoro technique to get me started also. In the classic pomodoro technique, we start working on something for 25 minutes without any distractions -any distraction is  attended to after this 25 mins-, now I want to start something and work on only that thing of 25 days and leave the other 5 days to attend to any distractions. 

                    So I will not visit any news sites during these 25 days. I will check my email and facebook only once everyday and that too at the end of the day. Ideally this would be best if I start it at the beginning of the month, but then I don't want to lose the motivation now, so I am starting it now. If I am able to successfully complete this, then I will take an extended break at the end of march. 

Update- 1: So It has been one and a half week since I started this fast. I would say I didn't succeed wildly in this becuase I am still seeing the websites and news sites I will visit. But still, there is a marked change in the way I see reading. Before I read anything, I am asking myself if it will help me take any action - If yes, then only I am reading big articles. Ofcourse I am just glancing over the news, which I would have previously read. But still I can be better. I followed the Ipad 2 announcement live on Endgadget. But over all, I am very happy with the decision. I have been very productive this two weeks. I will continue to observe the fast and tell you of all the updates.

Update - 2: It is going really good. To be frank, I am not really forcing myself to not go to websites and I am checking them intermittently, but the key word their is intermittently, I am not getting stuck there. I am visiting them only as break in my work. And it is working too. I completed my first Django web application and deployed it here.

Update -3: After the success above, I should say, i completed hit the wall. But the media fast ends. It is one thing which is very difficult for me. I am a sucker for news... The Japan earthquake and the surrounding media hype was too much to ignore. Now it is the cricket world cup. This will never end, but this week has be disastrous in the sense, I didn't even work for one pomodoro after I come home. Saving grace is that I am reading and summarizing Keith Ferrazi's book on relationships - 'Never Eat Alone'. Check out the posts here. Meanwhile, I have also  have to do a lot to improve the app which has been languishing without any improvements. You can follow my progress and encourage me here.


Monday, February 21, 2011

The role of organized religion

In 2009 when I was thinking a lot about religion and our place in the world, I wrote these


Following a religion gives us hope, faith and confidence about problems which we cannot solve ourselves...and a sense of humility which is very necessary in this random world.It also is used to give some sort of stability, checks and balances in the society so that it will not degrade..


And 
All these things (castes and rules)  make me feel these things were only created for manipulation and power-grabbing. 
After that I argued that I didn't need someone else to set the rules and that we ourselves can make our own rules for life. 

I found a different perspective regarding organized religion in Sebastian's blog. 


because people attribute things like discrimination or war to religion, but I think that’s mistaken. We naturally draw lines as humans, and support the people on our side of the line. Sure, religious groups often promote themselves at the expense of other groups. But so do trade organizations, national organizations, race-based organizations, and so on, and so on. Humans naturally divide themselves into groups, support people in their group, and oppose people outside of it.
So I’d say, even the worst implementations of religion tend to get 80% of things correct. They all pretty much say don’t steal, don’t kill, do charitable and good deeds, be hospitable, purify and master yourself, serve and do good works…
If you belong to an organized religion, you know how people are generally expected to act, you know it’s pretty good, and you know everyone’s consistent about it. You have some people that you know are going to back you up if times get tough, and you’ve got common ground to connect on and work together, socialize together, and build families together.
Y’know, a hardcore athiest that focuses on the mystical side of religion and says it’s ridiculous is kind of missing the point. Organized religion greatly simplifies people’s lives by giving them a reasonably good belief structure and standardizing a large group of people’s customs, culture, and expected conduct. It makes life easier and allows for strong connections and alliances and agreements.


 So he says, religion has made life easier by giving us a culture and standard beliefs. This helps in creating and maintaining relations and being together amicably. Though I argue that if we are all intelligent, we can think about and form our own beliefs and understand that our well-being lies in live and let living, I will not.  Because, 

guy that can research, strive, examine, think, brainstorm, and scratch and claw your way towards having a uniquely developed, cohesive, powerful set of ethics.
Most people can’t, and don’t want to do that. It’s a lot of work, and it leads to a lot of doubt and confusion and then no one understands you. Having your own ethics is lonely. Very lonely.

Hence religions have spread and established with the help of the charisma of the people spreading them. But I think his perspective is very useful to understand religions influence in the world. His blog is very good and he writes really interesting stuff. You can read it here