Just looking through some old code for a Java/Swing editor I started writing years ago, I saw this line of code that I added specifically for the Mac OS X platform:
Scala, Java, Unix, MacOS tutorials (page 416)
Here's a brief list of some of the most obvious, and important, team-level best practices I know for software development:
Linux ls command FAQ: Can you share some examples of the Unix/Linux ls command?
The Linux ls command is used to list files and directories. While it has many options, I thought I'd list the most common ls command uses I'm aware of.
The ls command options I use most of the time are -a ("show all") and -l ("long listing"). Put together, like this:
Using command-line expansion
Now, if I'm really cool, I don't actually type out that whole remove command, do I? As a practical matter I usually just type in something like this:
rm de
and then hit the [Tab] key, and if "delete.me" is the only file in the current directory beginning with the characters "de" the Unix system expands my command line to look like this:
rm delete.me
Pretty cool, eh? That part is called "command-line expansion", and it makes life very easy.
Looking at file contents with the "more" and "cat" commands
If I want to be sure that I have the right file I can also look at it with the more command, like this:
Question: How do I set my Java/Swing application to use the native look and feel of the platform it is running on?
Answer: Use the Java UIManager class to set the look and feel properly, like this:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Note that the setLookAndFeel method can throw an UnsupportedLookAndFeelException exception that you should handle.
Mac Java menubar FAQ: I'm creating a "Mac Java" application for (a Java Swing application for Mac OS X) ... how do I put my Java menu bar (JMenuBar) on the Mac menubar?
Answer: In your Java Mac application, set the system property apple.laf.useScreenMenuBar to true, like this:
Here's a simple Ruby program that opens a text file, then uses a series of simple algorithms to look for hidden words in the text. For instance, it looks at only odd words, only even words, then looks at Nth characters, Nth words, and also Fibonacci words and characters.
Logging in to a remote system
To login to that system I'll use a command named ssh, which stands for "secure shell". It's basically an encrypted login session to a remote system. To login to that remote system I'll type this command in my terminal window:
ssh al@foo.bar.com
(Of course everything after the ssh command there is made up. I don't have a login account on any systems named anything like that.)
Quick Start: A typical login session
In my previous post I talked about the history of the Unix and Linux operating systems to give you a little background for the rest of this lesson.
Next, I'd like to dig in and show you what a typical Unix login session looks like, and then I'll get into more details after that.
I thought I'd take a little time and write a tutorial on how to get started with the Linux, Unix, and Mac OS X operating systems. As I write this I'm trying to keep in mind a friend of mine who works strictly on Windows, so I'm writing this from that perspective.
Here then is my "Getting Started with Linux and Unix" tutorial.
I just updated my "Software career best practices 101" post from a few years back. It was a little dated, and hopefully now it's a little refreshed.
I just updated an old Postgresql blog entry about how to make a backup of a Postgresql database. The syntax changed quite a bit since that post in 2004.
I thought I'd take a few minutes to look at the philosophical design differences between the Mac OS X user interface and the Microsoft Windows user interface. This topic is probably worthy of a Master's degree thesis, but I'm going to rattle off the big differences I see in about 30 minutes worth of typing.
Ever have one of those days when you wish you hadn't said something publicly? Kevin Miller must certainly be feeling that way these days:
After working with del.icio.us and other tag-based systems, and thinking about adding tag support and other features to this blog, I started wondering if anyone had applied the "tag" concept to any other systems that are typically directory-based (as del.icio.us seems like a very good replacement for a traditional hierarchical organization (directory) of bookmarks).
Mac HTML editor review: I didn't go exactly where I wanted with that last post about Mac WYSIWYG HTML editors, so let me try again. This time I'll go the product review route I initially planned to go in that last post.
Mac HTML editors
First, as I related in that post I'm not happy with any of the Mac HTML editors I've found. Second, the point I didn't make, is that these are the Mac HTML editors I've looked at so far:
My search for a Mac WYSIWYG HTML editor continues ... I just finished trying Coda, but I don't like it much more than I like using a text editor like TextMate.
I understand the need for these HTML/text-editing tools when you get down to the nitty-gritty details of HTML editing and you want to work only with the HTML source code, and Coda or TextMate on the Mac are good for that.
Linux find/grep FAQ: How can I combine the Linux find and grep commands to search a large collection of files?
A lot of times when I need to find a file I know the text in the file that I'm looking for, but I can't remember the filename, or can't think of what directory it might be in, other than somewhere below my home directory. When this happens, and other search means like the "locate" command don't help, my favorite way of searching for text strings in files that are spread through a bunch of directories and sub-directories is this:
