Showing posts with label other. Show all posts
Showing posts with label other. Show all posts

Monday, July 11, 2011

Avoid Duplication in Config Files

Any kind of configuration file, be it an ugly xml file or a prettier yml or properties file, its been a source of frustration to me. Here's a list of few such pain points:

  1. There are two config keys that point to the same value. e.g. db_username=master, data_source_user=master
  2. There are two config keys for urls that point to the same domain, but different paths. e.g. market.com/cameras and market.com/undies
  3. Config entries with placeholders. e.g. weather_url= weather.com/%s or weather_url= weather.com/%s/hourly
  4. Config entries with default values that should not default to anything.
  5. Config entries that are required but don't fail the application deployment when not set.

Are you having to deal with similar pain points? Some more?

Saturday, June 25, 2011

How Not To Provide Feedback When Doing Code Review

Code review, as any other review process, can often be an attack on someone's ego and incite anger and frustration. Being both on sending and receiving end of such code reviews for years, I have learned a few how-not-to-do-it, or as one might say, anti-patterns of providing code review feedback. Let me know if you agree/disagree with me on the following:
  • You are always reviewing Adam's code while Adam is never reviewing yours.
  • Your feedback is like "Adam, you should break down part of this method into a private method" instead of "we can probably extract a part of..."
  • You are always suggesting, for example "we should do x and y and z", instead of asking interesting questions "can we do x? what if we did y?"

Monday, March 14, 2011

My 2011 Q1 developer roadmap

For me, 2011 Q1 has so far been a good exposure to new techniques, tools, articles and books, thanks to ThoughtWorks book allowance! However, if you are interested, here's what's keeping me busy:
  1. User Experience: I find a good user experience is THE thing that you want in anything you design, and if you are writing a software, its even more important. After I read a few books, I have a feeling that its not just a common sense approach, it takes some education and a deep care to produce something usable. Check out my reading list at http://smsohan.com
  2. HTML5: HTML5 is so more than just knowing How To Meet Ladies (HTML)! The popular browsers are all way ahead of the official HTML5 release date, so if you are building something on the web, its time you give it a real shot. Again, I shared my reading list on my website.
  3. .NET NuGet: Microsoft .NET just got a major component, NuGet package manager, that greatly simplifies the sharing and consuming of reusable libraries. Already there are tens of thousands of downloads for the popular .NET libraries and I believe its just a start. So, if you've done something cool in your project and want that to share with the .NET crowd, you should consider NuGet as a distribution channel and get some traction on it.
  4. MvcMailer: MvcMailer has got all my developer attention in the recent past. If you haven't checked already, I highly encourage you take a look at its features at this page and you'll see its a full stack elegant emailing solution that you need in your ASP.NET MVC projects. However, while working on this, I got familiar with the internals of the ASP.NET MVC source code and I consider this as a good experience.
  5. Functional Programming: Did you learn one? Which one? Please suggest me your favorite functional language. In the remaining of this Q1, I want to spend some time on a functional programming language, probably F#.
Its inspiring to see Calgary getting warmer these days - hope we get some outdoor soccer by the end of 2011 Q1, that would be awesome!

Sunday, January 02, 2011

2011: Yet Another New Year

Dear Readers:
Happy 2011. 2010 was a great year. Why?

  • Defended my MSc thesis after a moderate 16 months of grad school life.
  • Published 3 papers in 3 international conferences.
  • Visited 4 new countries - Netherlands, Sweden, Finland and Norway.
  • Visited a few interesting cities - Vancouver, Victoria, Edmonton.
  • 100+ posts on DrinkRails.com.
  • 25,000+ visits to my two blogs from all over the world.
  • Developed a fresh new app, Plexina Central, for Wairever Inc.
  • Lived a healthy life.
  • Bought my first (98 Corolla) and second (2000 CR-V) cars (also sold my first car)!
To live up to this standard, 2011 is surely challenged by 2010. Let's see how 2011 rolls: To give you a heads up, I am joining ThoughtWorks as a Consultant on January 4th!
However, 2010 was the only year in my life when I didn't see my parents and siblings. I hope, 2011 does a better job in this regard. It is getting essential now.
This is how I look at the close of 2010
And I want to look leaner at the close of 2011 or even before that :(

Monday, July 19, 2010

Know Your Enemies Before They Kill You!

From darekb
You know what, this is a political world. So, enemies will seemingly look like your friends until the moment when.. well, its time for the kill! My dear readers, its time to know the enemies!

I have met with a few enemies off late. I will go one by one here.

If you are a software developer like me, you will often see this enemy, camouflaged variables, methods, classes and namespaces. For example, I have recently seen a Stack camouflaged as Visitor! I really mean this. I found a class called Visitor, so I was expecting a Visitor Design Pattern implementation or something similar, but what I got was a Stack under the hood with two methods Push and Pop! This enemies are very bad for your health, as they will keep you guessing all the time... you never know what they do from looking at their names!

Another enemy you will often see are the very skinny ones, to skinny to have any meat in them. I met some enemies like this as well. What happens when you do over engineering with interface explosion and a lot of one method classes? Is it really that difficult? Is it really a class? Is it really a package? I don't think so! You can spoil a piece of code by introducing a class/package for a single method. This enemy often surfaces because of the fact that, the design pattern book only shows classes with one/two key methods in them... which is of course not intended. But this is life... you gotta balance between class explosion and God classes... really, or this enemy will kill you someday.

I have just touched two common enemies... but there is another enemy we all are aware of, CMD+c (OS X) or Ctrl + C (Win). Its such a pain to copy a code fragment and use it in a different class... this is exactly the form of reuse that kills everything. Make sure you don't let this germ to grow, or it will outgrow you and leave you crying.

Have you reviewed your code by someone else today? If yes, keep up the good work. If not, beware of the enemies before they get you. Best of luck!

Wednesday, July 07, 2010

The Greatest Show on Earth and What Else?

FIFA world cup 2010 is almost coming to an end. This is definitely the greatest show on earth and I have been all occupied with the matches...

However, the show started almost immediately after I was back from Europe. It was a nice tour, starting a day at Amsterdam. Then to Trondheim (Norway), Stockholm and the best part was the night long sea cruise to Helsinki. An experience to remember for the rest of my life.

The days were eventful to say the least. At XP 2010, I presented my paper. Here is the presentation for my caring readers :-)



But XP 2010 was also a great place to meet people from around the world who care about software, its crafts and of course impacts. In very short, I found people to be very interested and starting to explore the possibilities with Lean and Kanban. This was a little surprising, because until now it has almost always been Scrum and XP to have a covering meaning of Agile. But, the industry seems to be leaning towards Lean. This is the beauty of being agile, to be able to adapt with time!
However, Norway seemed to be an expensive place even compared to Calgary. But, don't shy away from Norway for this reason, they have spectacular beauty in their landscape. Serene and soothing. While staying in Trondheim, I visited a cathedral from early 1000's. It was amazing to see the cathedral still standing firmly after so many years... extreme engineering! The city was full of historical buildings... if you haven't heard, the Harry Potter building is actually the main academic building at NTNU. (kidding! but the locals really call it by Harry Potter building)
This is me and my wife in front of the Harry Potter Building!

The city tour and canal cruise at Amsterdam was also a pleasant experience. It was nice to see the centuries old bridges and roads still serving the people so well. It is indeed a bicycle city, everyone in the city seemed to have a bicycle... believe me, they have multi-storied parking facilities only for bicycles! No wonder, why they are so healthy as a nation.

Next, Stockholm is a city full of life. You will see people dancing, having a drink and enjoying their times with friends everywhere. Especially for people like me, who barely see any crowd in Calgary, will find the place to be very exciting and inspiring.

Our Stockholm stay was rather short as we went to Helsinki on a sea cruise with Viking line. This was very eventful. Firstly because me and my wife lost each other when I was rushing into the ship as it was just about to start... then I stepped out of the ship, rushing back to the checkin counter and heard her crying like a baby... she was so upset and so scared! But we eventually managed to get into the ship may be 1 min before the doors were locked!

But this late entrance came with a surprise! We were given a window side cabin although we didn't get one while booking... and the awesome journey began. It was around 5:30 in the evening and the view from the deck was so nice. And there were live music and dance uptill midnight, nice romantic trip altogether. When we landed at the Helsinki city, we roamed around the tourist hotspots and I slept on the grass. Really! I took the following photo before I fell asleep..

However, back to normal life and the greatest show on earth started! At office, I have kind of wrapped up the application that I was working on for the last 3 months and now heading towards another project. This time its gonna be Java after a looong time... At the lab, trying to wrap my thesis related implementations by the summer. Discovering lot of things as I am working with Lucene, Solr, Tika, Acts as Solr and these full text search engine related stuffs. Hope to push a post about these things when I get some time!

But, this is summer in Calgary. And I attended the Canada Day fireworks at the City hall. Here is a photo of the event for my reader:
This is pretty much it. Looking forward to the events at Calgary Stampedes. Hopefully this will also be a wonderful time pass. I will see if I can be back with some real "meat" in this blog shortly!

Monday, May 03, 2010

Summer of 2010! Europe, here we come!

I just completed my Winter 2010 semester at school. It was so far a good one. I pushed my papers and presentations on the courses of this semester at http://smsohan.com/#courses If you are interested to read my paper about Tabletop Application Testing or Communication Challenges with Distributed Agile Teams, you are most welcome at my site.

However, its time to look ahead to the summer. And I hope this will be a good one! I just received my driving license after a wonderful training from Drashko and Gordana at the Green Light Driving School. If you are looking for a caring and professional driving school in Calgary, I highly recommend them. They will make it easy for you.

Well, driving license comes with an obligation to buy a car :-) I am right now looking for one used car, probably from Toyota, Honda or Nissan, as people told me these are more reliable than others. I am not sure if I will be buying a car soon, but I already got visa for a Europe trip, my first ever. Its gonna be our second honeymoon in the European land :-) We will be going to Norway for attending the XP 2010 conference where I will be presenting my research paper on Email Auto-Tagging with User Stories. However, we are planning to see a part of Amsterdam and Stockholm alongside Norway. I have heard all the good things about these sites during summer... staying tuned to that!

I will also be working on my research project as well as my job at Wairever Inc. This summer will be a busy one. But I am hoping the summer in Calgary will be a lot of fun with friends and at work...

One little realization: I figured out that there are two crowds in the software world. One crowd has lot of respect for open source stuffs like Ruby on Rails and another crowd has that for "established" big players like .Net or Java. With this realization, I am focusing on getting my .Net knowledge in sync with recent developments as of .Net 4.0 and VS 2010. I am always reading the blogs and MSDN... but this time I will look into one/few books that give(s) a complete and detailed picture about the deltas in .Net 4.0.  However, I will keep posting on my Drink Rails blog as usual, almost daily.

Do you have any recommended book for .Net 4.0? Please use the comments area for that.

Thursday, February 25, 2010

Why would you spend $10 to learn to use Basecamp?

This is sounding very strange to me indeed! 37Signals is very much known for creating the simplest of interfaces and I really found people finding it very intuitive. But this is strange... now they are asking people to buy a book for $10 to learn how to use Basecamp! Can you believe it? See the sales post (!) here at "Sams Teach Yourself Basecamp in 10 Minutes" is a comprehensive guide to Basecamp

Thursday, January 21, 2010

Uploading files with blog post

At times I wanted to push some files with my blog so that people can download and check something locally. Up until now, it was not a straight-forward way. I either uploaded the file to my own server or google pages or somewhere. Then linked it on the blog.
However, you can now publish files from Windows Live SkyDrive (total free space of 25 GB) or Google Docs (Total free space 1GB). If you haven't checked already, google now offers you the opportunity to upload any kind of file without conversion. I know there are other services like this, but these two should be reliable.
I took some information from this Tim Anderson's ITWriting blog.

Friday, January 01, 2010

Home/End key in Mac ( MacBook Pro ) Windows on Bootcamp

If you are anything like me, you love using the home and end key to quickly move to the start/end of a line of text. But, in Apple MacBook Pro, there is no default home/end key! I searched the internet and found Command + Left/Right to the rescue on OS X.
But, then I installed windows 7 on my Mac and it was nightmare to edit without the home/end keys. Today I just found that you can use fn+ Left/Right for this purpose! Hurray! It makes my time with Microsoft office and Visual studio much happier, again :-)

Thursday, December 17, 2009

"Promises are meant to be broken" and my 2010 promises

"One must have a good memory to be able to keep the promises that one makes"
--Friedrich Nietzsche
"Promises are like the full moon, if they are not kept at once they diminish day by day"
--German Proverb
“Better a broken promise than none at all.”
--Mark Twain

Its always good to refer to previous experiences when you do a research. This doesn't only make you fair but also eliminates the reinventing the wheel problem! Well, this is what I learned from my graduate studies :-)
So, what is this about promises today? Well, you know its the time of the year when you have vacations and enjoy with family and friends... and start thinking about the next year. Make some rough plans probably for the upcoming year. Here is what I am promising-
  1. By January 1, find two potential MS research topics and draw an outline of each!
  2. By January 1, reduce 1kg weight!
What's next? Well, I have a vision of the future but trying to be agile here. Not doing lot of useless upfront thinking and leaving it up to the retrospect session on January 1 :-) I believe agile works and so if I can follow the spirits, I should be able to reach my vision on time.
My readers can wait till Jan 1 to get the retrospect report! I will be blatant and truthful (and this is a promise!).

Tuesday, October 06, 2009

Web application user interface without any Menu

If you are like me, with little creativity with UI (!), on a new project you always start with a simple layout, banner followed by a row of menu and then a two column body that ends with a footer. Well, here is an example:-
----------------------------------------------------------
CampZero
zero hassle camping
----------------------------------------------------------
Home | Place a booking
----------------------------------------------------------
Welcome |
|
|
|
|
|
---------------------------------------------------------
Campzero.com, all rights reserved
---------------------------------------------------------
Well, there are other ways and you will almost always see good visual elements in most websites. However, somehow all of these beautiful sites come with some sort of menu. This post is about a site that doesn't have a menu at all.
Yes it is possible to create a web app without a menu. The application that I recently developed is designed around an intuitive workflow. The workflow itself drives the app and it does so without any menu. For example, on landing you see a dashboard with three sections. Main section shows highlights of different projects, sidebar contains the search box and top part contains profile card. Now, you can navigate the whole application from here. For example, select a project you will see main section with the project latest activities and the search box will search in the scope of the project.
The point is, if you know the users of your app will most likely follow one of a few workflows, then you can design a UI that flows naturally.

Wednesday, August 19, 2009

Rambling stories from my days @ Code71 : My Takehome

Today is going to be my last day with the Code71 team and this is the last post of the series on my Code71 days.

The journey started on June 1, 2006 and now at this moment, I just wanted to summarize my takehome from the last three years' of work. I will go short, just touching the bits...
Teaming is at the core of Code71's culture. It went beyond teaming just for software development as we met outside for a movie, celebrated even the smallest of personal achievements and shared the excitement of a cricket or tennis match even at midnight from home over phone!
Planning and adapting practice. I have gone through aprroximately 70 sprint planning and 50 sprint retrospect sessions at work. But this scrum habit of inspect and adapt has been engrossed in my personal life as well. I try to maintain a written to-do list with deadlines and look back at times.
Continuous learning. As I worked on different technologies (.Net/RoR) and different domains (Financial/Vehicle dealership/Project management/Web community), I learned to grab new concepts. I developed a learning attitude towards solving a problem and realizing an opportunity.
Happy memories are great as takehome gifts and I feel blessed to have a large array of such memories. Helping the team growing and maturing towards best-practices is itself a happy feeling. And there are those great memories with seeing a start-up client making millions, getting gift card from happy clients on new year... and of course the team meets at the Code71 dining.
I will end with a few thanks note here. Thanks to Nimat and Syed for believing in my competence and giving me the opportunity to work, lead and learn. (I am really sorry that the I had to turn down the L-1 offer, it really was too late!). Thanks to all of my teammates for your ever smiling faces and support. Thanks to Omar, my first mentor at Code71, for introducing me to the basics and the pathway to continuous learning. A special thanks to Sohel, our office assistant, for his ever enthusiastic service and care. Wishing best of luck to Shaer and his team, you will take the company to the next height inshaAllah.

I am going to graduate school at University of Calgary, Canada this fall to start my MS under Prof. Frank Maurer and looking forward to it. I hope my experience at Code71 will help me in my future life and who knows, may be someday I will again be a part of the Code71 team!


Tuesday, August 11, 2009

Rambling story from my days @ Code71: My reading list

In my previous post, I got a bit nostalgic! However, ever since I posted the first one, I was looking for another post on the series. Trying to capture what I learned during the past 3 years, I found it would be really time taking for me and my readers. So, I sort of compiled the following list in this post. Hope it helps someone who is just eager to learn about software.

Books

Most visited sites

Blogs

Community

Saturday, August 08, 2009

Rambling stories from my days @ Code71 : Startup days

Sighs!

Back then, on Friday, May 26, 2006, I was a final year undergrad student at CSE, BUET. I was looking for a part-time software dev job opportunity and found a little one page advert for a student job at asha-technologies (lately renamed as Code71). Visited their website and thought it might be worth giving a try!

As usual, I was interviewed over phone and enjoyed a long 2 hour interview on premise. I found it really inspiring and gained more interest towards the job after this session. I started waiting for a response… but was pretty certain about a positive one!

Good things happen in quick successions in our lives. Agree?

I agree. Because I just started a soul-journey with my soul-mate, Shahana, on the March of 2006. Then got the job offer on the 26th of May! Couldn’t be happier. A job for me during that time was just beyond its compensation, it was an inspiration, opportunity to see the real world and being part of something bigger than myself.

Photo taken at Chhera dip (The Torn Island), St. Martins, Bangladesh. The last photograph taken with my first digital camera bought from my first month’s Salary!

I started my job on the 1st of June, 2006 at Asha-technologies. Asha-tech was still to find an office and Omar asked to meet him at his home office! That’s how it all started. We met a few times a week at Omar’s home until we moved to our office at the green building of green square at green road, Dhaka on the first of July.

Asha-tech signed up a client before it was even formed! So, once we moved into the office, we were building our first asha-tech product, an online loan financing gateway. We were enthusiastic about agile scrum/xp practices from the first day at office. The result was found in just less than 3 months. We rolled out our first release of the product. It was really a happy start. A fantastic start for a start-up. The client started generating revenue in less than 3 months of project inception!

The office setup was a small but adequate enough for our team. We installed long backup UPS (2 hours * 5 computers), A/C, IPS and dedicated internet connection with Wi-Fi. The work environment was full of fun. We were going for an outing to a team event every month and even more often going to delicious buffet places. We played table football and bowling… every time had a record breaking score and a new winner. We went swimming and believe me, Omar is as good a swimmer as he is a master in software technology. He would go to swimming with a flipper and flip like professional swimmers. He can even swim without using his hands/legs at all, lying side-on and in all such actions… I learned swimming keeping heads down and the easy way of breathing from him! Thanks!

Technologically we were maturing as well. Started using XPlanner for managing our project, attended daily standup meetings and started doing TDD. I won’t claim we got everything right at the first try… but, we were trying consistently, improving bit by bit… to this day.

For the most part, I was enjoying my job and became used to the pressure of a job + undergraduate studies. I said, good things happen in close succession. Another proof here! My first term final result with this job was a 4.0/4.0. I never scored 4.0 in a term before this nor had a 20+ hour/week job alongside my studies.

I strongly believe, my job taught me the attitude towards work, “plan, act and retrospect”. After over three years, I would suggest any new entrant in the software industry to start a career with passion. Its fun with passion. Its a win everyday with passion.

Saturday, April 11, 2009

Testing the SyntaxHighlighter Scripts

For the last few months, I am on the lookout for a really good syntax highlighter that helps me to post blogs on all the programming languages in a pretty html with syntax coloring/highlighting. This one is taken from http://alexgorbatchev.com/wiki/SyntaxHighlighter

Ruby/Rails
class TestHighlighter
def my_highlighter
return "SyntaxHighlighter"
end
end

CSharp

public class TestHighlighter
{
public string MyHighlighter
{
get {return "SyntaxHighlighter";}
}
}


What did I add to my blog?



Open Edit Html and add this just before in the blog's template



<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" type="text/css" rel="stylesheet" />
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" type="text/css" rel="stylesheet" />
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/>
<script type='text/javascript'>
    SyntaxHighlighter.config.bloggerMode = true;
    SyntaxHighlighter.all();
</script>


Thanks to Ashraf for informing me about the Windows Live Writer Plugin! It will be useful for sure.

Wednesday, May 14, 2008

Try the CopySourceAsHTML VS Addin to blog .Net Codes

I have just found a great add-in for blogging my codes preserving the styles exactly the same as that I see in VS 2008. I am surely going to use it in future posts.

Follow the steps here - http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/11/21/copy-source-as-html-copysourceashtml-for-visual-studio-2008-rtm.aspx

Tuesday, March 25, 2008

My MCTS Certification

Today I have appeared at the MCTS Exam # 70-528 (Web Based Client Development) and successfully passed the exam. I also appeared at another exam # 70-536 (Microsoft .Net Framework) and successfully passed in that exam too.

Although, I haven't got the MCP website access information yet, I can now possibly be called a 'Microsoft Certified Technology Specialist'!

Saturday, March 08, 2008

What does a Scrum Master really do?

Hmm! I am now a CSM (Certified Scrum Master) after two days of training with CST Pette Deemer.

You want to congratulate me! Lets congratulate me first-
You: Congratulations! It's really a great news! How does it feel to be a CSM?
Me: Greaaaaaaaat! You know, its so cool that my profile gets a CSM on it!
You: Oh Sohan! I am so sure that you will contribute more at the company?
Me: Yeah, I surely will. I just need a product owner and a team with me to contribute!

(Now that I am so good with the certificate let me be your teacher on 'Scrum Master'ing)

Well, I have been following SCRUM for almost two years in my team and we had a lot of questions in our minds regarding the process. Some of the questions are answered and some are not. But to be very positive, the outcome of the training is good. It clears the philosophy behind SCRUM and also creates a clear vision on why one should follow SCRUM. I will be going on a question answer mode that closely resembles my learning at the training.

Q: Is scrum master a part of the daily scrum meeting?
A: Yes, he is involved, but stays outside the team's SCRUM cycle and takes note whenever someone points out to anything that is a hurdle before the team in meeting sprint commitment.

Q: So, is Scrum Master is a lead role?
A: No. Its rather a helper role to the team.

Q: Is it possible that Scrum Master is not co-located with the team?
A: Generally its bad. It seems unlikely that she can remove blocks from heaven (the distant is always a heaven!).

Q: What are the core responsibilities of the Scrum Master?
A:
Help team to follow SCRUM.
Do anything to remove blocks reported by the team.
Do nothing to create any block for the team.
Update the Burn Down charts, the 'Not Started, Started, Completed' board and other progress indicator 'things'.
Facilitate the team in meetings - avoid unnecessary time loss meetings, manage meeting place and things like laptop, projector, mic and sound systems... all that it takes for the team to have a potentially meaningful and quick meeting.

Q: Is Scrum Master part of the team?
A: Well, it depends. If the team is small and doesn't need/cannot afford a full time scrum master, someone from the team may take on this responsibility. But, a dedicated one is most likely to be effective.

Q: What should be the bullet points of the Scrum Master's characteristics?
A: Helping, self-motivated and feels comfortable to help people on any sort of problem.

Q: Enough is Enough. What else do you know about Scrum Master?
A: Hmm... Scrum Master is not executed if the team does not meet their commitment (unless its because of the fact that the Scrum Master wasn't able to remove blocks). Scrum Master always guards the team from product owner's pressure and change requests in the middle of sprints.

I could have a longer list of Q & A that I have actually learned at the training. But I am not going to do that partly because, I have only a few readers (namely I, me, myself and Sohan) in my blog and partly because I do not see comments on my posts too often.

So, if you have read this and really think you want to know more, energize me with your comments and questions :-). I will be really glad to share my learnings with you.

Wednesday, February 13, 2008

Preserve Ownership, mode and other attributes while copying in Linux

I dare not say, I am savvy at Linux :-)

Recently, I ran into a problem where I found that upon executing a copy command, my source and destination files had different permissions and attributes (i-nodes), but I badly needed the permissions to be preserved in the destination files/folders. The following command will preserve the attributes -

cp -p source destination

here, the switch p (-p) does the trick, it preserves the permissions, modes and other attributes to resemble the source.

Hope this helps some of you with similar needs!