preload
Sep 30

java_logo_2Just a short note on an item that bugs me about Java.  In C++, I tend to use exactly three kinds of method parameters.

  • A const reference.  I don’t want to copy it, but I promise not to modify it, either.
  • A reference.  I might modify it.
  • A copy.  I might modify my local copy, but not the original.  I’m getting a copy, after all.

Easy peasy in C++.  In Java?  Uh, I pass all objects by reference. Continue reading »

  • Share/Bookmark
Tagged with:
Aug 21
Programming

Programming

I spend my time (recently) writing a mishmash of Python, C++, and Java. It’s interesting to switch back and forth.

What’s a good idea and what’s a bad (or dangerous) idea in computer language design? We’ve got a lot of candidates, and a lot of opinions.

I’ll list a few here, along with a few places where they show up. Continue reading »

  • Share/Bookmark
Tagged with:
May 10
Apple

Apple

The hard drive in my Mac has failed.  Again.  For those of you keeping track, this is the third time.

It’s a hassle, but it is usually okay, since:

  • TimeMachine is always there, making backups and keeping them up to date.
  • Apple support is wonderful.  We can’t send back the hard drive, but they let me open the case and remove the drive without voiding the warranty.

Sadly it is also a pain because:

  • The MacBook Pro is some of the most poorly designed hardware I have ever encountered for maintenance.

Continue reading »

  • Share/Bookmark
Tagged with:
Apr 14

java_logo_21Grrr.  I really wish Java had either:

  • Reified generics or
  • Closures

In the interim, I offer the following Java code to the world.  Does it help?  Use at your own risk.

Continue reading »

  • Share/Bookmark
Tagged with:
Mar 17

computer science: n. a study akin to numerology and astrology, but lacking the precision of the former and the success of the latter.

– Stan Kelly-Bootle, The Devil’s DP Dictionary

I’d say the above is no longer true: computer science is successful.  But it really isn’t very precise.

The field of computer science is probably the area of knowledge that is closest to pure gibberish. Continue reading »

  • Share/Bookmark
Tagged with:
Mar 13

1ebeb1d2f212046a4e47fcd414dbad9bI was recently asked what I do to secure my home computer.  This post will tell you some (though not all) of the things I do.  It will probably tell you more than you want to know.  I tried to start simple, and work up to more sophisticated items.

If you have additional advice, let me know and I’ll add it to this post.  I’ve tried to keep it simple and make it a summary; I don’t explicitly tell you the steps to do any of this stuff since you’ve all got access to Google.  Still, if you want more information on any of this, let me know. Continue reading »

  • Share/Bookmark
Tagged with:
Jul 09

java_logo_2I like Java.  Well, that is, I don’t dislike Java as much as I dislike most other langauges.  I’d honestly prefer ML, but I’d be without the massive ball of mud that is the Java class libraries, the wonder that is Eclipse, and ANTLR.  I need these.  It’s a weakness. Continue reading »

  • Share/Bookmark
Tagged with:
Jul 07

I used to have a site that used LaTeX to render equations.  This worked pretty well, except that I didn’t have LaTeX installed on the server.  It turns out that you can do pretty well without it.

There’s an excellent program called mimeTeX that renders math without a TeX installation. I used it with Drupal and DruTeX. Now I’m not using Drupal… so I need to find another way to display math.  Oh, mimeTeX still works, but you have to explicitly encode the link.  I’m way too lazy to do that.

[equation]

Update: I’ve been experimenting with using [ tex ]…[ /tex ] from the mimeTex plugin to WordPress. It’s working now, but I needed to do two things to make it work.

  • Create a cache folder under my wp-content folder.
  • Modify the plugin to point to my local installation of mimetex.cgi.

I also had to go into the cache folder and delete all the files that were created during the process, so I could see the effect of the changes. But now it works!

Here’s an example of an equation array. Note that you need to use & to insert the required ampersand delimiters.

\begin{eqnarray}<br />
\overset{*}{\triangleright}\!(uvx) & = & \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\<br />
& = & \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\<br />
& = & \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)<br />
\end{eqnarray}

[ tex ]\begin{eqnarray}
 \overset{*}{\triangleright}\!(uvx) &amp; = &amp; \triangleright\!(\overset{*}{\triangleright}\!(uv)x) \\
 &amp; = &amp; \triangleright\!(\overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)v)x) \\
 &amp; = &amp; \overset{*}{\triangleright}\!(\overset{*}{\triangleright}\!(u)vx)
 \end{eqnarray}[ /tex ]

So… shouldn’t everyone just install LaTeX by default? Shouldn’t all CMS ship with some math solution? Of course! :-)

  • Share/Bookmark
Tagged with:
Jul 03

Hard Disk

Over the past month my hard disk failed in my MacBook Pro (again), my wife’s MacBook, and our old Dell laptop.  The Macs are both still on warranty, but the Dell’s not.  Odd, you know?  Anyway, this shows the general usefulness of two things: external hard disks and Apple’s Time Machine software.  I’m currently running my Mac off of an external hard disk until I can get it back to Apple.  Fun!

  • Share/Bookmark
Tagged with: