DNS-323, PS3 and UPnP
I recently bought Dlink DNS-323. I am using this in RAID 1 mode to copy my data and archive images.

I am also using it as media server (UPnP) for streaming video / audio and image content to PS3. The whole setup is very easy and lot of fun! I copied entire catalog of movies / audio and digital image archive and realized the setup is not working properly. I kept getting error while movie streaming on PS3.
"This content cannot be played (800288D8)"
I was very frustrated by the error message. Earlier I thought this is happening due to lack of processing power at DNS-323 end. After careful examination that possibility faded. DNS-323 has Marvell 500 Mhz processor, 64 Mb RAM, 1000 Mbps Ethernet connectivity. There are two Samsung Spinpoint 1 TB each HDD placed inside. I wasn't expecting any bottlenecks for couple of users.
I was about to return the unit and then I came across this fantastic online resource. I installed Mediatomb as UPnP server and disabled in-built application. This allowed me to have seamless access to my video content without any issues! I will recommend you to install this on your DNS-323 so that you can enjoy secure storage and media server.
This setup is good for -
- Archive of all of your files. No more nightmares of hard-drive failure!
- Cheap and abundant storage.
- Media serving capabilities at home.
- Expose firewall-enabled FTP server over internet.
Don't expect miraculous speeds though. 3-4.5 MBps is average transfer speeds for me. This is enough for me to backup and access stored data. For faster access, I prefer firewire or USB 2.0 drive. Figure out yourself about your requirements. Ciao!
Rewards of “Frequent Check In”
I have worked with many developers and many times, I ran into following conversation. Whenever we are in the middle of development and I ask for checking in the code, one of following reply is heard -
- Umm, lets do check-in towards end-of-the day. We are not yet done with the code.
- Let me clean up these things and make them perfect.
- I don't want to check-in as I have some ongoing changes and I can't checkin partial files.
- Lets checkin tomorrow when we complete major functionality.
I am sure you must have heard similar conversation (or had it). Can you give a moment and think about why do are we afraid of checking-in? I have been constantly thinking about this issue and there are many reasons which makes sense on this issue. Few of them are -
Fear of bad code - Developers are afraid of peers criticizing their code. Its GOOD! Believe me, you're never going to write perfect code without receiving feedback about it. Sooner you receive the feedback, better you perform in short time. This is the reason, people don't make their changes public until they are convinced that they can't do any better. It is clearly a false fear.
One of the way to improve and influence your team is to make your work public as it is in progress. This way, you make team aware of your approach. If there is any conflict in approach or disconnect in understanding, it becomes visible sooner and you can resolve it better.
Not sure about impact on other parts of the system - Yes! This is very valid reason. You're in middle of a feature and you're not sure how it will impact rest of the system if you check-in early. Half baked features can take the whole system down. To get over this fear, unit testing your code, running a full build before check-in and having continuous integration makes sure your changes are fail-safe. Make sure that you are providing a working build to the team by writing solid unit tests and more comprehensive integration tests.
Working on multiple parallel streams - It is often a bad practice to work on multiple parallel streams of work. Even worse when you don't commit any of those changes in VCS.
If you're working with DVCS like Git, it is very easy to branch and commit code. If you're working on central VCS like subversion, then it is little tricky to keep your parallel working streams with minimal effort. There are few simple things you can do to make your life little easy -
Use DVCS. This will prove immense value in long run, if you use it properly. There is a learning curve associated with it, but it is definitely worth it.
If you are using SVN, create a branch if it is a big change. If it is small change, evaluate if you can checkin without breaking application. Taking patch is another option too. Use unit testing safety net on your side and make sure you progress smoothly.
In any situation, its not helpful when you're working on parallel streams of work and those changes co-exist. I have often observed people checking in partial or missing content. This happens when they are confused and trying to understand what all files are required to make one of streams live.
Why frequent check in is important?
- Getting feedback from your application and team.
- Never lose any of your changes and hard work. Machines do crash and when they do, its bad!
- Avoid stepping on each others toes, particularly when team is distributed and code churn is faster.
- Making whole team aware of your approach and remove silo operations. This helps bringing everybody on the same page and triggers conversations whenever required.
- You can't explain in 30 minutes of speech what code explains in 10 minutes. It eliminates confusion.
- Discipline of frequent checkin allows you to make sure, changes are not causing any conflicts.
- Smaller changes, encourages you to refactor and improve code quality.
If you want to read more -
Golden principle of development: Check-in-early, check-in-often.
DVCS introduction from the master: Google Video on Git.
Continuous integration: Wikipedia entry.
Export CSV from MySQL Query
As you might be aware that I started a "Murmur" category on my blog. I discover or learn these tips on day-to-day basis and just forget them. Sometimes those takes hours to come with one or often it boils down to just a google search. In any case, you might want to refer to these tips in future as well. So I decided to keep a log of them publicly so that it can help others too.
Many times I need to get dump of data which is output of a sql query. MySQL makes it very easy to output the query result as csv file from command line. Following command should create a names.csv file in $MYSQL_INSTALLATION/data/$DB_NAME/ directory. This command comes very handy when you're working on remote shell where you don't have any GUI tools.
SELECT first_name, last_name
INTO OUTFILE 'names.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM employee;
Very useful.
Nice utility for finding classes in Jar files
When you're working on large java code-base, its not very difficult to run in situation where you get a ClassNotFoundException. Many times we have a daunting task to find where the class is located and it is not very easy task. I found this nice utility called "jarscan" which makes life much easier.
Worked great for me today!
Delete My Account
I have few questions for you -
- For how many years, are you using Internet?
- Can you remember all the sites where you created an account or shared your personal information? (Email, Phone number, Birth date etc.)
- Although you can remember all the websites you registered, can you keep those accounts active forever?
Whenever I ask these questions to myself, I get uncomfortable. There are probably 50 websites, who have my online account and personal information. It might be more in most probability. Considering this might be similar situation for most of us, how to make sure that you can delete your account? Most of the websites like Google / Yahoo allows you to delete the account completely. Although few of my readers will love to debate about its actual process.
Considering our faith in these online services, I am not quite sure what does complete account removal means for these online websites (Facebook / Gmail / Yahoo etc). Even if it is not complete removal at least I have an option to go and remove my online account information. For most of the websites this option is not available at all!
I will love to make this as public awareness that we should have account removal as standard feature on all the websites who allow users to sign-up. It should be complete removal of account (including all personal information) and not limited to just un-subscribing user from their mailing list.
This will make lot of users much more comfortable to create online account.

