Grit is a Ruby library for extracting information from a git repository in an object oriented manner.
I am trying to use grit for a simple project - basically provide a GUI for git. Eclipse does a good job for CVS and SVN and gitk doesn't do a good job with git. It sounds like a good idea, and I really am all for git. Other than a few irritating things about merge, git is a pretty kewl tool.
So for this simple project, I am using mojombo-grit (and Ruby on Rails) to look at the tree/branch structure of git commits. Its pretty straight-forward but the API documentation is not that great. Its just not laid out intuitively and IMHO not easy to understand to follow. I like their example on the home page, which starts you off easily. But then after that, if you have to get more information on (say) a branch, then the doc doesn't do much for you.
Looking around for a better take on the documentation ....
Wednesday, July 16, 2008
Thursday, May 29, 2008
GIT
A couple of reasons have led me to play around with GIT. I have had experience with CVS and Subversion. I use CVS at work, and use Subversion for my personal projects. Both have their pros and cons, and I heard a tons of good things about GIT. Linus wrote it and uses it for the kernel development - that's good enough!
After a ton of reading up on it, and watching
Randal Schwartz's presentation on git, I was inspired to get git and use it. It hit the spot - I have always had a few issues with the source code management systems out there and git supposedly has thought of everything -
Think Globally, Work Locally.....
After a ton of reading up on it, and watching
Randal Schwartz's presentation on git, I was inspired to get git and use it. It hit the spot - I have always had a few issues with the source code management systems out there and git supposedly has thought of everything -
- So here's a typical scenario - I checkout the source code from the HEAD at my work repository. I want to refactor it but don't want to break anything. I just want to change a few things, make them more efficient ( yea right! ) and basically try out a coupla things I couldn't try out earlier due to deadlines. So I edit code, play around with some kewl new technology, refactor it. By the end of the day, my editing has been finished. But its not perfect and frankly I rather not commit these changes since I really don't wanna break the code and/or I don't want the rest of the world to know I made these changes! So the only option left for me is to delete these changes ( or make a local backup copy ). I will have to start working on the main branch again, I guess I'll have to forget about this entire day's of work. The problem with that is that I have lost my work; however trivial it was. Hence the concept of a distributed version control system appeals to me. I clone the repo and play around all that I want. Ooo the concept of private branches...
- Another interesting feature of distributed development is that since you "clone" the repo to your hard disk, you always end up having the entire repo, the history of each and every file - all readily available. You can work on it offline, and commit it only when you are absolutely ready. This also helps when more than 1 person is working on the same piece of code, and needs to be able to make changes all the time.
- Every time I have to work on >1 different branches of the same project, it is always a hassle. I don't know of all the .cvs ignore files that are lingering around, and I always make mistakes committing my changes. I tried out git and tried out checking out 2 different branches. I tried out editing them, and then checking those changes in. Wow, that was simple! It really is very intuitive and the non-polluting of any sub-directories makes it so easy to learn and use git.
- For legacy humans ( ;) ), git has a "backwards-compatibility" feature to work with cvs clients. The end user does not need to learn 5 extra git commands, and can use cvs-style commits/checkout/branch to basically use git. I guess in my company, if I was trying to push Git, this would be an awesome plus-point!
- Git has funky merge and rebase features for tons of different users working on the same code. Merging is always a nightmare, and its not too bad with git. Of course you are going to break something somewhere, but thats what a developer in a team has to go through!
- It has to be real fast - the linux kernel has 25000 files
Think Globally, Work Locally.....
Wednesday, January 2, 2008
OutOfMemoryError: Java heap space
Ugh memory leak! This is what I encountered a couple days ago at work. My java application is not too complicated - parsing data, normalizing it, and then inserting into the database. Its a kinda "critical" application and should always be chugging away. Its a a very random occurrence and I haven't been able to re-produce it yet. Sometimes I get this error after 1 day, sometimes 10 days, and sometimes none at all ( or like maybe at infinity ).
So one of the 2 causes of OOM is inadequate heap space - so I allocated more and ran the app, this time with the Xms and Xmx arguments. It ran for a longer time but again crashed with the OOM error. OK so time to look into the second reason - Memory Leak.
I looked around for a decent profiling tool, and downloaded JProfiler. It's free for 10 days and I hope I can figure out what the issue is before that. Installing it on my RedHat box was a piece of cake, but setting up the environment wasn't! Anyway, after setting it up, I started it. Way too cool!! ( Not the debugging/diagnostic part of the analysis ) I haven't really had experience with JProfiler so this is very new to me. The amount of data that is available is very impressive (and in pretty colors too ;) ). Tons of different views and graphs to help make the software more efficient and memory-leak free. Looks like I am going to be using the Heap stack view in my search for the memory leak.
Right now, I am familiarizing myself with this tool, reading up on what should be my best approach. It's more of an art to find the runway non-GC'ed variables than science! A couple of things I am going to take a look at - objects like String, HashMapEntry, Char, Long maybe a problem due to their growing numbers (but maybe thats valid ?), database connection pooling and result sets not getting closed properly....
I am looking forward to playing around with JProfiler, but not as much to finding this "random" memory leak.
So one of the 2 causes of OOM is inadequate heap space - so I allocated more and ran the app, this time with the Xms and Xmx arguments. It ran for a longer time but again crashed with the OOM error. OK so time to look into the second reason - Memory Leak.
I looked around for a decent profiling tool, and downloaded JProfiler. It's free for 10 days and I hope I can figure out what the issue is before that. Installing it on my RedHat box was a piece of cake, but setting up the environment wasn't! Anyway, after setting it up, I started it. Way too cool!! ( Not the debugging/diagnostic part of the analysis ) I haven't really had experience with JProfiler so this is very new to me. The amount of data that is available is very impressive (and in pretty colors too ;) ). Tons of different views and graphs to help make the software more efficient and memory-leak free. Looks like I am going to be using the Heap stack view in my search for the memory leak.
Right now, I am familiarizing myself with this tool, reading up on what should be my best approach. It's more of an art to find the runway non-GC'ed variables than science! A couple of things I am going to take a look at - objects like String, HashMapEntry, Char, Long maybe a problem due to their growing numbers (but maybe thats valid ?), database connection pooling and result sets not getting closed properly....
I am looking forward to playing around with JProfiler, but not as much to finding this "random" memory leak.
Friday, October 12, 2007
Video Games
A sort of pre-requisite for being in the technology world is that one should be addicted to video games. I just don't get it though. Why would one want to spend tons of time (urm and money) jumping over hurdles, killing alien bosses just to save the Princess...I think its fun playing Wario Moves on the Wii, but playing Final Fantasy for 75 hours sounds crazy!
Let me try and list my issues with playing video games.
1. Time : I tried playing Zelda. I did put in a few hours. After that, I just got irritated. Sure I am not the most patient person in the world, but why "waste" all this time to learn a few jumps, how to swing your sword and how to correctly press A and B together to shoot.
After Halo1, I want to see how they did Halo2, and oooo Halo3 is out....I played Zelda5 years ago and now they are releasing it for the Wii, I have got to buy it!
Common, you guys have heard this before. I rather spend money on cool sci-fi books or music( maybe ) or something cool!
3. Addiction: People spend hours upon hours just playing and playing and playing! They want to get to the next level, and specially for MMPOG, people get crazily addicted to it. Being this addicted to anything can't be healthy!
Ahh maybe its just me and my short attention span, but hey, we are talking about developers and software engineers too who are probably really impatient, and yet spend hours on their gaming console. Sometimes, I do like playing with my friends and having fun with the graphics and the remotes and the controllers. But, I wish I could get really excited about standing in line for hours for the next big game. I would love to use the Wii remote as a LightSabre just for the ooo factor, and that would last for exactly 20 minutes!
Let me try and list my issues with playing video games.
1. Time : I tried playing Zelda. I did put in a few hours. After that, I just got irritated. Sure I am not the most patient person in the world, but why "waste" all this time to learn a few jumps, how to swing your sword and how to correctly press A and B together to shoot.
- I do understand that at least the gamer is using his brain and is not ideally sitting around and watching TV. But, if I want to use my brain, I will go work either on my own projects or on my day-job project. Either of them will be beneficial and no one can argue the useful-ness of using your time to "work".
- Of course the gamer could just be playing a game because he's taking a break and wants to get away from work. Fair enough: so why would you want to get deeply involved in something that will take 50 hours to finish! How is that a 30-minute break? Like I have seen, its really never 20-30 minutes, its about reaching the Save Point and then getting addicted to finishing the damn boss!
After Halo1, I want to see how they did Halo2, and oooo Halo3 is out....I played Zelda5 years ago and now they are releasing it for the Wii, I have got to buy it!
Common, you guys have heard this before. I rather spend money on cool sci-fi books or music( maybe ) or something cool!
3. Addiction: People spend hours upon hours just playing and playing and playing! They want to get to the next level, and specially for MMPOG, people get crazily addicted to it. Being this addicted to anything can't be healthy!
Ahh maybe its just me and my short attention span, but hey, we are talking about developers and software engineers too who are probably really impatient, and yet spend hours on their gaming console. Sometimes, I do like playing with my friends and having fun with the graphics and the remotes and the controllers. But, I wish I could get really excited about standing in line for hours for the next big game. I would love to use the Wii remote as a LightSabre just for the ooo factor, and that would last for exactly 20 minutes!
Thursday, October 4, 2007
I Hate Documentation
According to dictionary.com, Documentation is defined as : Computers. manuals, listings, diagrams, and other hard- or soft-copy written and graphic materials that describe the use, operation, maintenance, or design of software or hardware. Alas, If only this was the true "definition" of documentation.......
In my company, I inherited a project - lets call it FBB for FooBarBaz. My work is fun ( yes even at a megacorp, work can be fun!). It gets tedious and boring and interesting and I spend long hours @ work, but I am not complaining about that ( at least right now)! What I would like to talk about is documentation on FBB. Documents are required for maintenance of a project, right. So when I come on board, and am expected to 1. start developing 2. fix bugs 3. and support the Support Team AND there is just no docs to make my life simple, I get frustrated. I volunteer to start documentation in order to help me, the next person, the system administrator, and the Support Team. Wonderful: I know exactly what another Software Developer wants to see in a document, and since I am so smart, this shouldn't be a problem. Right?
Nope.....In order for me to write up a document which is actually useful, I have to speak to the people who were involved in FBB since day 1. -> Problems!! Either they are busy, or in another country, or simply not available. So a Software Engineer with very less background in FBB and the system gets stuck with writing all sorts of document, only 'coz she wanted to make life easy!
This is not just one "How does FBB work" document, There are Operations documents ( futile for me to write them up on so many levels ), Delivery Stuff, blah blah blah. I waste my time in doing "work" that really should be done by someone else. And of course, this is a ASAP requirement, BUT I need to focus on content as well as the darn formatting.
Don't get me wrong - I think we need documents in order to plan, develop and maintain a system. But the problem here is that either we don't have enough docs or we have way tooooo many with so much redundant information, that people just get turned off by documents and documentation. Vicious circle...
In my company, I inherited a project - lets call it FBB for FooBarBaz. My work is fun ( yes even at a megacorp, work can be fun!). It gets tedious and boring and interesting and I spend long hours @ work, but I am not complaining about that ( at least right now)! What I would like to talk about is documentation on FBB. Documents are required for maintenance of a project, right. So when I come on board, and am expected to 1. start developing 2. fix bugs 3. and support the Support Team AND there is just no docs to make my life simple, I get frustrated. I volunteer to start documentation in order to help me, the next person, the system administrator, and the Support Team. Wonderful: I know exactly what another Software Developer wants to see in a document, and since I am so smart, this shouldn't be a problem. Right?
Nope.....In order for me to write up a document which is actually useful, I have to speak to the people who were involved in FBB since day 1. -> Problems!! Either they are busy, or in another country, or simply not available. So a Software Engineer with very less background in FBB and the system gets stuck with writing all sorts of document, only 'coz she wanted to make life easy!
This is not just one "How does FBB work" document, There are Operations documents ( futile for me to write them up on so many levels ), Delivery Stuff, blah blah blah. I waste my time in doing "work" that really should be done by someone else. And of course, this is a ASAP requirement, BUT I need to focus on content as well as the darn formatting.
Don't get me wrong - I think we need documents in order to plan, develop and maintain a system. But the problem here is that either we don't have enough docs or we have way tooooo many with so much redundant information, that people just get turned off by documents and documentation. Vicious circle...
Subscribe to:
Posts (Atom)