Friday, October 21, 2011

Linux utilities

I'll try to update this list over time...

  • bbcp -- alternative to rsync


Thursday, September 8, 2011

MySQL 4.1 for Windows performance problems

http://lists.mysql.com/mysql/202489

Excellent explanation.

Sunday, August 7, 2011

Git: What is the purpose of `git reset`?

Scott Chacon, the author of ProGit, also has a helpful blog, and this particular entry on "git reset" is absolutely invaluable. Also see this blogpost by Mark Dominus.

ShowOff: PowerPoint/Keynote alternative?

According to Scott Chacon (also the author of the ProGit book and a senior developer at GitHub) near the end of this interview, the following inequalities exist in the world of presentation slides for software developers:

PowerPoint < Keynote < ShowOff

Actually, the entire interview (of Scott Chacon by Werner Schuster on 06 September 2010 at the Scottish Ruby Conference in Edinburgh) is interesting, covering such topics as the use of ErlangRedis, and memcached in the GitHub infrastructure.

Node.js, Redis, Pub-Sub, WebSockets in one brief example

http://howtonode.org/redis-pubsub

That's a quick way to learn a bunch of stuff.

... Well, as of 2014 that's pretty much out-of-date, but the discussion thread has useful links.

Sunday, July 24, 2011

Java: The worst part? Checked exceptions.

This guy hates checked exceptions in Java, with good reason. They are also a bad idea in C++. Bruce Eckel has chimed in as well.

A "checked" exception is one which is named in a "throws" annotation on a function.

void foo() throws MyException {}

Friday, July 15, 2011

Git: Why should I use git instead of Subversion, CVS, etc?

Since the announcement that GoogleCode now supports git, many people are wondering why it's preferable to Subversion or even CVS. Here is my opinion:
I saw part of an interesting [1] video in which a YUI dev claimed that her productivity went up after switching from svn to git. YMMV.
For me, the advantages are:
  • Distributed repositories
    • At first, a central repo seems more appealing to a Project Manager, but eventually you may prefer the Integration Manager model which a DVCS facilitates. Also, a DVCS allows one to commit while offline.
  • Private branches
    • Keep your dirty laundry to yourself. With svn, many devs avoid frequent commits for this reason.
  • Simpler branch-merging
    • When it's easy, people do it.
  • Rebasing
    • The "killer" feature of git. (Also available in Mercurial.) Lets you consolidate groups of commits and pretend that you did them all after the most recent update.
  • The .git directory
    • Very unobtrusive, unlike CVS/ and .svn/. Perforce is even worse, requiring a specific directory for the check-out. With git/hg/bzr/etc., you can version-control any sub-directory in your filesystem at any time, very easily, without setting up a central repo. I sometimes run git init inside a working area for Subversion, for a one-day project. Remember: With Subversion you cannot hide your dirty laundry.
  • The "stash"
    • Unique to git. Syntactic sugar for temporary branching.

  • "rerere" (reuse recorded resolution)
    • Pure magic. Caches merge-conflict resolution, so you never have to resolve manually the identical conflict again.

The biggest advantage of git over mercurial is the [3] index, which is the genius of Linus Torvalds (at least to recognize the value). Otherwise, mercurial is very good and in some ways better.

And what's the biggest disadvantage of git? Large files can make it really slow. With default settings, it's for source-code only. If you want to store big files in git, try git-annex, which even allows the files to be stored on remotes such as rsync, the web (RESTfully), or Amazon S3. Also consider git-media. I wouldn't bother with git-bigfiles.