Archive for the 'Coding' Category

GTK# Tutorial

Sunday, August 3rd, 2008

I’ve decided, as I may have mentioned before, that I plan on using C# and GTK# built using MonoDevelop as my cross-platform platform of choice. I’ve always had one problem with this - getting the GUI to be responsive.

You have to understand that I’ve been programming a long time (the first program I wrote I had to flip the toggle switches on the front panel to toggle in the 0’s and 1’s), but just about everything I’ve done has been command line based. Mostly utility programs, programs that operate behind the scenes, programs that are used by other developers or systems people - in short, nothing graphical in nature. This is a whole new issue for me. (more…)

.NET command line parsing

Tuesday, July 22nd, 2008

For a project I’m working on I needed an assembly that would easily parse a command line.

“A command line? What’s that?”  you might ask. I understand that most of the programs you run always start up with a GUI that you can then use to set up all your parameters. This is not always the Right Thing to do. A lot of what I program are utility programs that do things to files in a scripted (or batch) mode. GUIs, in this case, just get in the way.  Thus the command line - you tell the program what to do when you start it up and it never talks to you again.

For example:

 playMP3 --directory /myhome/music --background true

The convention is that a long name option has two preceding - (dash) characters and a short name option (a single character) has a single preceding dash character.

(more…)

ImageResizer

Sunday, November 4th, 2007

This is part 3 of the Open Source Takeover series. I had to make a change to the user interface as I didn’t understand how a couple of the widgets were meant to be used. Here’s the new and, pending some input from actual users, final look of the application:

Final User Interface

(more…)

Open Source Takeover, part 2

Saturday, November 3rd, 2007

I now have a working resizer/watermarker, but it only works if I manually edit the configuration file. This is because the original author had a separate config program and that was written with some sort of code generator. That’s not a bad thing, mind you, except for the fact that the code it generates is rife with absolute pixel positions and that makes it difficult to add on new elements.

(more…)

Open Source Takeover

Monday, October 29th, 2007

OK, so it’s not that dramatic - but here’s the story.

I’ve recently gotten involved with a group called <a href=”http://eons.com” target=”_blank”>Eons</a>, a website that’s targeted toward the over 50 folks. I’m involved in the Better Photography group, and the subject came up about someone’s image being “borrowed” by a different person without permission.

So, I went off the to web to look for some sort of utility that would be able to resize and watermark images. I found a resizer program (named, appropriately enough, Resizer) and an article on creating both image and text watermarks. The Resizer program was up for adoption as the person who wrote it was no longer interested in maintaining it. He had written it for a specific purpose and the program was no longer needed.

I contacted him about adopting it and after the appropriate conversations, he passed it on to me. I added three features to it (reduced DPI, image watermarking, text watermarking) and it’s now working. I don’t have it available for download quite yet as it’s currently set up as two separate programs - one to edit the config, one to resize images. In the process of fixing the config I came to the conclusion that I needed to integrate the two programs as I don’t want to plot pixels to place items on the dialog by using pixel counts.

One other thing that prevents me from putting up at the moment is that it’s a .NET program (and yes, it runs on both Windows and Linux) but I don’t have a good install for it yet. I have a link or two to investigate for an install program, but I’ve not quite gotten that far.

All that being said, if you have .NET installed on your Windows or Linux box and don’t mind a little hand-editing of the config file, then drop me a line and I’ll zip up the two programs for you to try out.

Starting the book

Saturday, September 8th, 2007

I’m glad I have a mentor in this process.

Right now he has the confidence in me that I don’t (yet.)  I’m just having a hard time getting started. The first chapter is all about getting set up. Since the book is about coding you have to have some tools installed to get working.

(more…)

Yes, I’m still alive

Monday, July 30th, 2007

As you can tell, I’m really bad at this writing thing.

I’m currently working on a couple of .NET projects. The first is to instantiate a rendition of a galaxy by using the rules for creating a planetary system using the rules found in Universe, a RPG originally created by SPI.

(more…)

An old fashioned guy, revisited

Friday, January 12th, 2007

If you search long enough you can eventually find what you’re looking for.

I do have to wonder, however, why some people have to make things so difficult.

(more…)

An old fashioned guy

Sunday, January 7th, 2007

I’m attempting to use ECMA 334 (.Net or Mono - in my case, Mono) to create some cross-platform applications. Before striking out on my own programs I decided to attempt to run through an exercise in a book to create their application first, especially as it’s something I can use.

(more…)