GTK# Tutorial

Posted August 3rd, 2008 by Ken Weinert
Categories: Coding

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. Read the rest of this post »

.NET command line parsing

Posted July 22nd, 2008 by Ken Weinert
Categories: Coding

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.

Read the rest of this post »

Very cool research

Posted July 15th, 2008 by Ken Weinert
Categories: Technology

Someday I’ll get good at this blogging stuff - so far I really suck at any kind of regularity.

At any rate, you just gotta check out this link - it’s very cool, but a bit creepy. It’s called Big Dog and it’s a 4 legged autonomous “vehicle”. Watching the video is just a bit weird. I have to admit that the very first bit when it’s shown walking through the woods the very first thing that came to my mind was Monty Python. It just reminded me of some of the parts when they’re carrying baggage on the Quest for the Holy Grail.

It does do some amazing things and it has better balance than I do on some days.

Typos can be fun

Posted November 6th, 2007 by Ken Weinert
Categories: Ramblings

Sometimes the wrong word in the right place can give a whole new meaning to what’s written.

In a recent email to a Linux mailing list about backups and backup strategies, we find the following:

> On Tue, 2007-11-06 at 08:36 -0700, XXXXX XXXXX wrote:
> > Fifth, restore capabilities are only a website away, and can easily be
> > performed by the end user (assuming they have enough rites to do so).
This is a case where the word “rites” obviously should have been “rights”. However, the wrong word really changes the meaning. My response to the author (which I made a private reply and not a reply back to the mailing list) was:

> Sorry, but I was very amused by your typo: “rites” should have been
> “rights”, but the mental image of users making the proper sacrifices and
> chanting to get their files restored made me laugh.

When you take into account the common view that users don’t know how all that networking stuff really works and it’s all magic, only understood by the Administrator and his minions, that’s what really makes this funny.

In a follow on email the author noted that spell checkers don’t help when you spell the wrong word correctly.

It just reinforces what I’ve known for a long time - spellchecking is not the same as proofreading.

ImageResizer

Posted November 4th, 2007 by Ken Weinert
Categories: photography, Coding

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

Read the rest of this post »

Open Source Takeover, part 2

Posted November 3rd, 2007 by Ken Weinert
Categories: photography, Coding

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.

Read the rest of this post »

Open Source Takeover

Posted October 29th, 2007 by Ken Weinert
Categories: photography, Coding

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.

Chapter 1

Posted September 11th, 2007 by Ken Weinert
Categories: book

I’ve started on what I’m calling Chapter 1 - Setup.  I decided to refer absolute beginners to an appendix for full install instructions and only detail installation for the assemblies and dlls that are required for the project. So far I have 4 pages! Yes, I know it’s a very small start, but it is a start. Oh, and I’ve also done the Windows install of VSE so I have a ton of screen shots to edit for that part of the appendix.

Maybe I should talk a little bit more about what I plan on doing for the book.

Read the rest of this post »

Starting the book

Posted September 8th, 2007 by Ken Weinert
Categories: book, Coding

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.

Read the rest of this post »

Hey Look, a Chicken!

Posted September 7th, 2007 by Ken Weinert
Categories: book, Ramblings

The title is is related to my youngest daughter’s favorite expression:

Some people say I have A.D.D., but I say … “Hey Look, a Chicken!”

I’ve been looking into writing (or rewriting) some sort of game. In fact, I’ve started more than once. One of the drawbacks is that I am intent on being platform independent and I keep finding different tools that seem to fit the bill but I end up getting bogged down in one way or another.
Read the rest of this post »