Thursday, July 30, 2009

Moving to WordPress

WordPress has built in code formatting (SyntaxHighlighter) so no more manual formatting of code. My new blog is here

.

Saturday, July 18, 2009

Random thoughts


Slack


Reading a book called Slack by Tom DeMarco.


Very large text files processing

If you are dealing with very large text files, i.e. more than 500MB in size, here are a few tips that might help
  1. On windows, use Textpad for viewing/editing files. It handles large files very well. Alternatively you can use unix utilities or cygwin if you are working on windows.
  2. Java doesn't handle large files very well. Consider using Perl or unix shell script. You will be amazed at the performance gains.
  3. If you need to save this to a database, consider a direct bulk copy using your database's load utility e.g. sqlldr (oracle) or bcp(sybase, ms-sql).


Procrastinators logic: Cleaning your apartment is O(1) complexity

N being the number of days since you last cleaned your apartment, for small N, the time taken, t, to clean your apartment will not vary much over N.

This makes apartment cleaning an O(1) complexity algorithm.


.