How to Reveal Hidden Files and Folders in a Mac OS X File Dialog

I downloaded a development tool to give it a trial run today. It reported that git support was disabled because it wasn’t on the path. I thought this odd since it works in Terminal. It turns out that the UI uses a different PATH than Terminal. That’s a topic for a different article.

The path to git is /usr/local/git/bin/git, but this cannot be selected in a file open dialog since /usr (along with other system directories) is hidden. 99.9% of the time this is no problem. Anybody who needs to dig into those directories will drop to the command line instinctively. However, this tool offered no place to type in a path. Only the file open dialog was available.

It turns out that there is an undocumented (or poorly documented) key combination to show and hide hidden folders and files. Press Command-Shift-Period (⌘⇧.) to toggle hidden files and folders on and off.

Posted in Mac | Tagged , , , , , , , , , , | Leave a comment

Cleaning Up Jammed Subversion Transactions

There was a very odd server failure while a big Subversion commit was in process. (The ISP hosting the server is kind of flaky.) To clean up the leftover files from the failed transaction, I did this:

$ svnadmin lstxns repository-path
47-1
$ svnadmin rmtxns repository-path 47-1
Transaction '47-1' removed.
Posted in SysAdmin, Uncategorized | Leave a comment

DHCP Lease Time Optimization

Setting DHCP lease times is in practice pure voodoo. I ran across a paper presented in 2007 on research into DHCP lease times at Georgia Tech’s student network called Usage-Based DHCP Lease Time Optimization.

While the paper on the whole is interesting, what caught my eye was the exponential lease time experiment, and how well it fit GT’s DHCP usage. Instead of a fixed-length lease time, the initial lease is 30 minutes, with each renewal doubling the lease time (up to a maximum of 30×25=960 minutes). Those machines connected for about 8 hours received 16-hour leases, allowing them to avoid reconnection (and reäthentication, which is a bother for users).

This exponential approach brought to mind what I learned in my operating systems class (waaaaaay back in the 1980′s), where the probability of a process terminating within the next fixed unit of time decreases exponentially with process run time.

 

Posted in SysAdmin | Leave a comment

Human Life Value

Posted in Uncategorized | Leave a comment

Eliminating Multi-Threading Headaches

I first touched parallel processing as an undergrad. I was selected to for a summer research program that tackled different aspects of parallel processing using transputers. They broke us into teams and I was put on the parallel debugging team. I missed the sign over the door that read, All hope abandon ye who enter here. My love and hate for parallelism began.

I actually have enjoyed parallelism over the years before it became mainstream. But, for all its intellectual challenge, it’s a pain in hindquarters because the traditional approaches of locks and semaphores makes coding a nightmare one you get past a quickly-reached complexity threshold.

One solution to that has been to use message-passing paradigms, but this has traditionally brought impractical and/or expensive “solutions” to the table.

I’ve been playing with ØMQ (ZeroMQ) because of its powerful sockets. But, I’m already intrigued by its potential power as a parallel-processing messaging system. The white paper Multithreading Magic reviews the problems of parallelism (all of which I’ve encountered) and makes the statement, Most ØMQ users come for the messaging and stay for the easy multithreading.

I’m skeptical of silver bullets, and it may not be fair to call ØMQ a silver bullet, but I have to agree that ØMQ’s simple and powerful tools make the intra-process message-passing paradigm very attractive so far. We’ll see how things go.

 

Posted in Programming | Leave a comment

Overriding DNS for Testing

This has come up three times in the last two weeks. There are times you want to do URL testing on a non-production test machine, but you don’t want to screw around with DNS either.

When resolving a host name, POSIX and Windows machines have a hosts file that it looks in first. If it doesn’t find the host name there, it falls back to using DNS to convert the host name to an IP address.

This can be handy when, for example, you’re monkeying around with Apache URL rewriting and want to (gasp) actually ensure it’s going to work correctly with the production servers’ URL.

For example, if the production servers are at foo.com, and the test server lives at 192.168.1.2, put the following line in the /etc/hosts file of the machine you’re running the tests from (assuming a POSIX machine):


192.168.1.2 foo.com www.foo.com

After flushing the DNS cache, the test machine will now associate foo.com with the test server instead of the production servers.

To reverse the process, remove (or comment out) the line from the hosts file.

 

Posted in Programming | Tagged , , , , , , | Leave a comment

Old But Funny

Ah the 80′s… big hair, Dr. Demento, and the Frantics. Ran across an old skit from the 1980′s that brought back memories. Somebody synchronized clips from Naurto to give a little video to the skit.

Posted in Uncategorized | Leave a comment

Sign of an Immature Programmer

This is a bit of a sticky subject, akin to the endless debates on what makes a “real” programmer (not to be confused with a Real Programmer). I don’t use the term professional because that simply denotes something that you do for pay, with the assumption that if you’re being paid for it, you have a certain level of competence.

However, there are stages of development that people seem to go through as a programmer. Just because one is at a certain stage doesn’t imply goodness or badness, it’s simply where one is at.

I’ve been working with a remote team in a not-to-be-disclosed location, and have been struggling with their work because while they can code, their practices have a lot to be desired. At first I attributed it to incompetence (of which there is a degree), but for my current struggle, I’ve settled on the explanation that they’re still immature in their development practices.

The thing I’m struggling with right now is revision control. In past discussions, I’ve been told that there’s not enough time, the schedule will be hurt, it’s too much trouble. Now that I’ve been forced to cut off direct access to the servers and have said, only through revision control, the truth has come out. The e-mail said, in essence, “Uhm… what’s revision control and can you tell us how it works?”

These people are technically professionals with degrees in computer science, but in my book this is a sign of underdeveloped maturity as a programmer. Revision control is an extremely liberating tool that allows one to work with reckless abandon, knowing that the next “I don’t believe I did that” moment falls from being a devastating heart-stopping mistake to an annoyance. It’s used to varying degrees by individuals, but at least in my circles, I don’t know of a single competent programmer that doesn’t have some form of personal revision control system in place.

In professional situations, a lack of revision control is in my book inexcusable. Client assets need protection, the software process needs the flexibility and surety, and developers don’t need the headaches.

Now it’s a interpersonal and management problem that I have. The inner annoyed part of me wants to say, “RTFM.” But we have work to do, so I’ll need to do a little hand-holding to not interrupt the flow.

Thoughts?

Posted in Programming | Tagged , , , , , , | 2 Comments

看板 (Kanban) and Agile Software Development

Agile software development is an evolutionary practice rather than a process (implementation). An 2009 article Kanban Development Oversimplified has a nice overview of adapting 看板 (kanban) ideas into the development cycle.

 

Posted in Programming | Tagged , , , | Leave a comment

Git Tutorial

For the uninitiated, here’s a nice git tutorial at progit.org.

You can download the current stable version of git at the git home page.

Posted in SysAdmin | Tagged , | Leave a comment