programming category archive
I made this program to go along with my process for handling incoming digital pictures, but I hope you might find it useful also.
I copy files from my camera in to a working directory, and bulk rename them using my Nautilus script: rename-with-exif-date.sh. This gives me a bunch of files with a timestamp in YYMMDD_HHMMSS format, for example: 071125_090623.jpg.
Next I need to give them additional descriptive tags, and then sort them in to their permanent homes. I like to keep one big directory of originals for each year, and then a smaller subset sorted in to categories, which I might then crop and fix red-eye and etc. Let’s say the end result of a naming/sorting session results in these files:
~/pics/original/2007/
…
by Scott Carpenter on 26 November 2007 at 9:39 pm
Permalink |
Comments (0) | filed under java, programming
|
Hi, loyal readers. I’m still here. Last week was busy at work, and getting up at 3:30am tends to make my evenings shorter. Any time I’ve had, I’ve been working on writing a Java utility to help with naming and sorting my pictures. It’s always a battle between finding time to write blog entries and finding time to write code. I like doing both, but writing articles tends to crowd out programming time. It hasn’t been as often that writing software has crowded out blogging time. And since I really want to write free software as well as write about it, I’m going to have to work on that balance.
I’ll be sharing my program here, with some trepidation. It’s not perfect; nothing ever is. …
by Scott Carpenter on 18 November 2007 at 9:47 pm
Permalink |
Comments (0) | filed under free software, programming, writing
|
I’m working on a small application to help me with naming and sorting my pictures, so one of the basic things it needs to do is load and scale an image. Found lots of information here and there on this, and this post is to share what I came up with.
When searching around trying to figure stuff like this out, it’s hard to credit where you found everything. A lot of search results point to forum.java.sun.com, with discussions that are alternatively helpful and abusive to newbie questions. When I started leaning towards a solution based on overriding the “paint” method, one of the forum threads pointed to a good tutorial: “Lesson: Performing Custom Painting,” and an in-depth explanation: “Painting in AWT and Swing.”
The core of this is a class that …
by Scott Carpenter on 11 November 2007 at 8:26 am
Permalink |
Comments (2) | filed under graphics, java, programming
|
Let’s say you have a project with package Example, and in that package you have:
Example.java // troublemaker!
ExampleUI.java // “form” - extends JFrame
LabelExample.java // extends JLabel
One of the cool things about the Matisse GUI Editor in NetBeans is that you can add LabelExample.java as a custom component to the widget palette and then drop an instance of it on your ExampleUI.java form in design mode. NetBeans will generate the source code for you.
However, there is a little hitch. When NetBeans creates the variable declaration, it will use the fully qualified path of your class, in this case Example.LabelExample, and then the IDE (which is chanelling the compiler), will complain with:
That is, here is your generated code block:
// Variables declaration - …
by Scott Carpenter on 10 November 2007 at 8:48 pm
Permalink |
Comments (0) | filed under java, programming, tip
|
Following up on my previous, surprisingly popular post about NetBeans, I finally wrote a Java GUI program with it. Simple program, but the writing of it confirmed my initial impression that NetBeans will be a good Java IDE for me. I’ve been avoiding the learning curve of Java GUI, but this weekend I thought of something I figured I could manage. It went pretty well, and I’ll be writing another post about the program soon. I still have a lot to learn, but I’m confident now I’ll be able to muddle my way along.
Random bullet points:
I certainly haven’t put the Matisse GUI builder through its paces yet, but I’m still impressed by how robust and full-featured it is.
The overall environment still feels comfortable to me …
by Scott Carpenter on 29 October 2007 at 4:56 am
Permalink |
Comments (0) | filed under java, programming
|
NetBeans Projects Pane
I’m trying out NetBeans 5.5.1 as a Java IDE and I’m very impressed so far. Thought I’d cough up some related thoughts on programming environments and free software, mixed with some personal history:
MS Visual Basic
I began my corporate programming career using Visual Basic 4, and moved on up to VB6, which I continued to use at home until last year. I really liked VB for GUI programming and quickly putting together various utility programs. I’ve probably made over a hundred more or less complicated VB programs for my personal use, in addition to the huge program I worked on at my job many years ago.
Java
While still using VB on the job, I started learning Java and have done a fair amount of …
by Scott Carpenter on 28 August 2007 at 2:49 pm
Permalink |
Comments (19) | filed under java, programming
|