Jeff Pace’s Blog

June 27, 2008

Linux Network Woes, Redux

Filed under: Uncategorized — Tags: , — Jeff Pace @ 1:48 am

Once again, the network connection failed on my Linux machine. No helpful error messages, no warnings … nothing of use to a prole like me. But a reboot “solved” the problem. Oddly, once again, my Windows box was a sanity check, as it continued to maintain the connection, even through resetting both the cable modem and the router.

Gads. Is Linux becoming more like (classic?) Windows, for better and for worse?

June 4, 2008

Project G

Filed under: Uncategorized — Tags: — Jeff Pace @ 1:09 am

Most of my projects are on hold while I focus on the newest one, Project G. It’s reaching the plateau point, where the core functionality is complete, although some of it is not performing as well as I’d like. I’m already planning huge changes for version 2. Hopefully version 1 will be available later this year; the main task now is adding content to it, as opposed to code.

May 31, 2008

Sirius Tuner

Filed under: Uncategorized — Tags: , , — Jeff Pace @ 12:12 pm

Yesterday at the office I saw the Sirius Yahoo widget on a coworker’s desktop, so this morning I gave it a try. Long story short, I was not able to get any station other than the Pop one to load. Ironically, of the 180 or however-many channels, the Pop channel is very likely the least likely for me to listen to.

From a suggestion in the comments section, I loaded the Firefox Sirius plugin instead, and it’s working very well. The real test will be whether this plugin also works on my Linux machines.

May 19, 2008

(Code) Recipe of the Day

Filed under: Uncategorized — Tags: , — Jeff Pace @ 7:18 pm

This little ditty (there are no large ditties) looks for a file in the same directory as another file, and then searches that file for the string “desc”, using glark. Note that this is in Z shell.

% for i in **/foo.xml; do n=`dirname $i`/bar.txt; glark --label=$n desc $n; done

April 30, 2008

XEmacs

Filed under: Uncategorized — Tags: , , — Jeff Pace @ 7:19 pm

IDEs are all the rage in software development, but I’ve remained a devote Emacs user, or XEmacs to be more precise. Why? Primarily because XEmacs is primarily for editing files, and does the job extremely well. It can be customized to a great extent, where XEmacs is truly a platform in itself, allowing the user to tailor it to their needs. But even out of the box, XEmacs is phenomenally powerful, making it trivial to record keystrokes and record those as macros (hence the “mac” part of the name).

Some nifty XEmacs tricks:

  • Transposing two characters: control-t
  • Transposing two words: alt-t. This is all the more powerful in that words can be “dragged” forward by repeated alt-t sequences. And XEmacs mysteriously knows how to skip punctuation, making it very useful for when method arguments need to be reordered.
  • Transposing lines: switch the current line with the previous: control-x-control-t.
  • Reindenting code: highlight the region, then escape-ctrl-backslash (C-M-\ in Emacs-speak).
  • Inserting the basename of the current file. This is useful in Java code, where the file basename is the same as the public class in that file. This bit of Emacs Lisp does it:
  • (defun jep:file-split (file)
      "Split file name x.y by dot, returning the list (x y)."
      (let* (fn
    	 ;; extended so that foo.cpp => foo.cpp
    	 (re  "^\\(.*\\)[.]\\([^<]*\\)")
             ext)
    
        (if (not (and (string-match re file)
                      (match-end 1) (match-end 2) ))
            nil
          (setq fn  (substring file (match-beginning 1) (match-end 1)))
          (setq ext (substring file (match-beginning 2) (match-end 2)))
          )
    
        ; return a list containing the file name and the extension
        (if (and fn ext)
            (list fn ext)
          nil)
        ))
    
    (defun jep:file-basename ()
      "Returns the file name, minus the directory and suffix."
      (let* ((bn (buffer-name))
             (namelist (jep:file-split bn))
             fn
             )
    
        (if (or (null namelist) (= 1 (length namelist)))
            nil
    
          ;; first in the name list is the file name; second is the extension
          (setq fn  (nth 0 namelist))
          fn)))
    
    (defun jep:file-insert-basename ()
      "Inserts the basename at the current point."
      (interactive)
      (let* ((fn (jep:file-basename))
             )
        ;; Not doing a save-excursion, because we want to go to the end of what we
        ;; inserted.
        (insert fn)
        ))
    

That’s just a start; I’ll add more later.

April 27, 2008

Linux Network Woes

Filed under: Uncategorized — Tags: , — Jeff Pace @ 12:34 am

Much fun this fine evening.

I had to reboot the machine today — doing some work that required the electricity to that room to be shut off — and after rebooting, I noticed that the network connection would go down. There was nothing in /var/log/messages. I could restart the connection (/etc/rc.d/init.d/network restart), and ping my router (192.168.0.1) for a while. But within 45 seconds to 3 minutes, the connection would be lost.

Oddly, I could do a broadcast ping (ping -b 192.168.0.255), and see other machines on my network.

After a while, I ventured over to my newest laptop, given to me yesterday at my company, which had a nice helpful error message, that there was another machine on the network with the same IP address.

I’m shocked … shocked, I tell you. Because for the first time, in my 12 years of Linux usage, I found Linux to be harder to diagnose than Windows (this was XP). Would it really have been that difficult for Linux to add a nice little message, saying the same thing?

April 20, 2008

Chicken in Black Bean Sauce

Filed under: Uncategorized — Tags: , , — Jeff Pace @ 1:20 pm

I found this recipe on the net, modified it, and made it for the first time last night. The Mrs. and the Jr. were quite taken with it, so it’s passed the taste tests.

The cooking technique (marinade, deep fry, saute) is similar to General Tso’s Chicken, but with the peppers and black bean sauce, this one has more “depth”. Chicken thighs could also be good.

Chicken in Black Bean Sauce

  • Boneless chicken breasts (2)

Dice into 3/4″ pieces and marinade for at least 30 minutes in:

  • 1 tablespoon soy sauce
  • 2 teaspoons rice wine (hard to find; sake will probably do)
  • 1 teaspoon sesame oil
  • 1 egg white
  • 2 teaspoons cornstarch

For deep-frying, heat at medium-high:

  • Oil (2-4 cups; enough to submerge the chicken pieces in the pan). For high-temperature cooking, peanut oil is preferred, as it has a high flash/smoke point.

Heat the chicken, until it has lost its pinkness. This will be from 3-5 minutes, depending on temperature. Keep stirring the chicken in the pan, as it has a tendency to stick to the pan. While the chicken is cooking, dice:

  • Green peppers (2)

Remove the chicken and put onto paper towels to pull out the excess oil. Remove all oil but 4 tablespoons from the pan, and heat to medium-high. Cook the green peppers and prepare:

  • Green onions (AKA scallions) (2)
  • Garlic (3-5 cloves)

Slice the green onions into 3/4″ pieces along the diagonal. Mince the garlic. When the peppers are mostly cooked (i.e. will have lost their brightness), add the onions and garlic. Cook for 1-3 minutes, then add:

  • Black bean sauce (2 tablespoons)

Heat, then add the chicken. Heat back to a uniform temperature, remove from heat, and let cool.

Serve over rice. Calrose is my preferred “Chinese food” rice; jasmine also works well, as does basmati.

Welcome

Filed under: Uncategorized — Tags: — Jeff Pace @ 12:59 pm

Welcome. I’ll be blogging about my interests, which are:

  • Software development
  • Programming
  • Linux
  • Cooking
  • Woodworking

So expect recipes on a variety of topics.

Blog at WordPress.com.