tags/programming http://moria.greycastle.net//tags/programming.html moria James Davidson: git notes James Davidson http://moria.greycastle.net//blog/gitnotes.html http://moria.greycastle.net//blog/gitnotes.html git programming Thu, 16 Sep 2010 21:54:00 -0700 2010-09-17T05:00:37Z <p>The <a href="http://progit.org/">ProGit blog</a> has a nice post on using the new <a href="http://progit.org/2010/08/25/notes.html">git notes</a> feature.</p> James Davidson: git send-email tricks James Davidson http://moria.greycastle.net//blog/gitsendemailtricks.html http://moria.greycastle.net//blog/gitsendemailtricks.html computer git programming scm Wed, 28 Oct 2009 21:29:00 -0700 2009-11-16T00:22:58Z <p>If you typically send patches to mail lists then Felipe Contreras' <a href="http://felipec.wordpress.com/2009/10/25/git-send-email-tricks/">git send-email tricks</a> blog post is definitely worth reading.</p> James Davidson: Highlighting Coding Errors James Davidson http://moria.greycastle.net//blog/highlightingcodingerrors.html http://moria.greycastle.net//blog/highlightingcodingerrors.html computer programming Wed, 27 Aug 2008 22:47:00 -0700 2009-10-12T19:33:00Z <p><a href="http://www.codemonkey.org.uk/">Dave Jones</a> is a genius. Using mutt and your editor to <a href="http://kernelslacker.livejournal.com/129237.html">highlight your coding errors</a> -- he should have patented that one!</p> James Davidson: Emacs can do that James Davidson http://moria.greycastle.net//blog/emacscandothat.html http://moria.greycastle.net//blog/emacscandothat.html computer programming Sun, 03 Feb 2008 14:31:00 -0800 2009-10-12T19:33:00Z <p>As an <a href="http://moria.greycastle.net//tags/../emacs.html">emacs</a> user, I knew the <a href="http://xkcd.com/378/">butterfly command</a>. I just don't find it that useful.</p> James Davidson: Why volatile is practically useless James Davidson http://moria.greycastle.net//blog/volatile.html http://moria.greycastle.net//blog/volatile.html computer programming Fri, 17 Aug 2007 11:47:00 -0700 2009-10-12T19:33:00Z <p>In the C/C++ programming language, data can be given the volatile qualifier. Typically, people think this is sufficient to prevent code ordering problems. Well, volatile does not do that.</p> <p>Linus provided a great <a href="http://lkml.org/lkml/2007/8/17/187">explanation of the problem</a> on the lkml today. Definitely worth reading. Also, you should read <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/memory-barriers.txt;hb=master">Linux Kernel Memory Barriers</a> from the kernel documentation.</p> <p>Update 2007-10-14: Also check out the LWN article <a href="http://lwn.net/Articles/233479/">The Trouble with Volatile</a>.</p> James Davidson: Aliasing and pointer casts James Davidson http://moria.greycastle.net//blog/aliasing.html http://moria.greycastle.net//blog/aliasing.html computer programming Tue, 21 Nov 2006 14:52:00 -0800 2009-10-12T19:33:00Z <p>If you've heard of pointer aliasing but have not fully understood what it means, read this <a href="http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html">great explanation</a> by Krister.</p> James Davidson: CPUID specifications James Davidson http://moria.greycastle.net//blog/cpuid.html http://moria.greycastle.net//blog/cpuid.html computer programming Wed, 01 Nov 2006 00:00:00 -0800 2009-10-12T19:33:00Z <ul> <li><a href="http://www.intel.com/Assets/PDF/appnote/241618.pdf">Intel</a></li> <li><a href="http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf">AMD</a></li> </ul> <p>Update 2009-10-12: Updated Intel document link</p> James Davidson: Hex Words James Davidson http://moria.greycastle.net//blog/hexwords.html http://moria.greycastle.net//blog/hexwords.html computer programming Wed, 30 Aug 2006 00:00:00 -0700 2009-10-12T19:33:00Z <p>When you are programming it is often convenient to have 32-bit values that, when displayed in hex (base-16), spell words (e.g, 0xdeadbeef). These values are useful for signifying specific conditions either within a program's resident memory or in persistent storage.</p> <p>I found a cool <a href="http://nedbatchelder.com/text/hexwords.html">list of words</a> that were pragmatically generated and expanded to include <a href="http://en.wikipedia.org/wiki/Leet">l337</a> spellings.</p> James Davidson: Debugging Memory Bugs James Davidson http://moria.greycastle.net//blog/debuggingmemorybugs.html http://moria.greycastle.net//blog/debuggingmemorybugs.html computer programming Wed, 21 Jun 2006 00:00:00 -0700 2009-10-12T19:33:00Z <p><a href="http://people.redhat.com/drepper/">Ulrich Drepper</a> has a blog entry about using the environment variable <a href="http://udrepper.livejournal.com/11429.html">MALLOC_PERTURB_</a> to aid in the detection of typical memory usage bugs in programs.</p> <p>Using this debugging feature is as simple as setting the environment variable and running the program you want to test. No recompiling required. Sweet!</p>