Documents

Archives

Search

BLOGical Thoughts Archive

October 2009

Friday, 30 October 2009

I'm still working on the GUI for dvd-slideshow. I am cleaning up some of the interface - making sure that values selected are used, items are enabled/disabled at the proper time, etc. It's a bit boring but very important. I will work on the last two major portions of the program this weekend.

I got so involved in the programming last night that I forgot to bake brownies for the company Halloween party today. I had to do that this morning before I left for work and now the entire house smells like brownies. It's a good thing I get up so early.


Silly sign of the day:

I hope you don't trust these weenies with your phone bill!


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Thursday, 29 October 2009

I have the 'save' portion of the GUI for dvd-slideshow working. After the file was created, I hand-fed it to a command line, and it generated a video clip just fine. Can we get a Woohoo here?

I need to tweak the save method a bit, then I have only two more major parts to do: the 'load existing file' part and the 'run this script in dvd-slideshow' part. The former will let you load an existing script into the GUI and modify it, then save it. The latter will create a command line and will run the script with dvd-slideshow.

When I have finished with the program, I will release it to the public under an open source license. It depends on only two things: the gtk+ 2 library (part of Gimp and Gnome) and dvd-slideshow. I have installed it by just putting the executable on any Linux box, so it's real easy to do.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Wednesday, 28 October 2009

The Spokane Rock Rollers web site was a case of the right hand not knowing what the left hand was doing. They had already contacted someone about the work, so I get to keep any spare time I have for myself. I can't say I'm disappointed. In fact, I'm a bit jealous of their lapidary setup at their meeting location.


The old trick of thinking about a problem before you try to tackle it worked again. The temporary problem I had with trying to construct an image line in the GUI for dvd-slideshow has been solved.

I can usually solve problems like this by walking around the block at work. I devote that walk to thinking about whatever I am having a problem with, and can usually come up with a solution by the end of the walk. That's what happened in this case, too.

I wrote the code to solve this problem and attempted to run it all. I got a program fault at some point above the code for this solution. Since the debugging support for Lazarus is abysmal, it will be a bit tough for me to debug the problem. I'll get there, though.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Tuesday, 27 October 2009

I ran up my laptop computer with Ubuntu 9.10 Beta on it on Saturday. The Update Manager told me there were some updates, so I told it to go ahead and install them. Imagine my surprise when it told me there were 538 packages to download! Fortunately, it only took a little over an hour to do that. The Ubuntu repositories were dog-slow, but I got through the ordeal okay.

I haven't encountered any problems with 9.10 yet. I have installed vlc as my favorite multimedia player and the restricted extras so I can play DVDs on the box. Unlike some other operating systems, it just works.


I am now doing the file save and load code for the GUI wrapper for dvd-slideshow. I am temporarily stuck on how to construct the image lines for the file, but a little thought will get me past that. the problem is there can be either no fields at the end, and no colon separators, or fields with colon separators which may or may not have fields. It's much easier to read and parse that kind of line than it is to create it programatically.


I'm going to the Spokane Rock Rollers meeting tonight. They saw the North Idaho Mineral Club web site and they want me to do a web site for them. I think I had better explain to them that I did not design that site, I just maintain it.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Monday, 26 October 2009

I replaced a 30GB hard drive in the un-dead computer with a 500GB hard drive. It was a fairly straight-forward process. First, I used Clonezilla to make a backup of the 30GB drive onto a 320GB USB hard drive. I then removed the other 30GB drive in the system and replaced it with the 500GB drive. I then used Clonezilla to clone the original 30GB drive onto the 500GB drive. Finally, I removed the 30 GB drive and added back the other 30GB drive, crossed my fingers and rebooted the system. Ubuntu 9.04 on the 500GB drive booted up just fine.

About the only complaint I have about this process is the fact that when Clonezilla expands old partitions to fill the new drive space, it expands all of them. Not only did I get a larger root and home partition, I also got a larger swap partition. Instead of 4GB, it is now 61GB. That's not a problem, but it is kind of a waste of space.

My opinion of Clonezilla is good. It is very hard to use, though. You have to really read each screen, or you could end up making catastrophic choices.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Friday, 23 October 2009

I will have a busy weekend. I will be going to the North Idaho Linux Users Group technical meeting on Saturday, and will be installing a large hard drive and a card reader in the un-dead computer on Sunday (that is, if its owner calls me about that).


I am still hooking things up in the GUI for dvd-slideshow, but here are a few images. When you open a new slideshow, you are presented with the Slideshow Settings dialog:

This is the main window. I have added some images and a few transition effects to it as a sample.

This dialog is used to create the transition effects. It can also add a background change and a titlebar to the slideshow.

I'm almost to the point where I have to write the code to save all this information in a text file and execute the text file with dvd-slideshow.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Thursday, 22 October 2009

I am still making good progress on the GUI for dvd-slideshow. I have added the effects to the GUI, but I still need to add transitions such as fade in, fade out, wipe, change background and add title bar. The hardest thing about writing something like this is to know when to stop adding features to it. I think I have that well-defined, though.


Programming Tips

If you are debugging a Delphi program, and you want to see the contents of a stringlist, you could do it one item at a time:

sl.strings[0]

This is just a bit limiting. Try the following:

sl.GetText

If your stringlist has a lot of items, it won't display all of them, but it will give you a darned good idea of the strings in the list.

If you want to look at a string with the Delphi debugger that has a lot of #13#10 or #D#A in it (carriage return/line feed combinations), it is very hard to see what the string looks like. Try this instead:

Pchar(Pointer(str))


Silly sign of the day:


Free/Open Source Software

Wednesday, 21 October 2009

I am working on the GUI wrapper for dvd-slideshow and it is going very well. I am hooking up controls and have no problems with them. I even imported some utility functions I had used with Delphi. I had to remove a few that were Windows-centric, but I would not have used those anyway. The utilities provide me with a method to center child dialogs in the program window and a method to parse lines of text that I will need when I get to the part of reading a dvd-slideshow script that has already been saved.

I also added a component that has no equivalent in standard Delphi. It allows you to save program settings in either an XML or INI file. I am saving things like the window location and size and the initial directories of all the file open and save dialogs I am using.

And finally, I have hooked the image list up to the controls I have so far. So if you click on an image file name in the list box, the image will be displayed and it's personal information will also be displayed. To do all that, I needed to create a class to hold that information, and attach the created object to the specific list box line. I'm so used to doing stuff like that by now I have no trouble with it.

There are still several areas where I need to do work, though. I need to do something about title pages and I need to implement special effects. There is still a lot of work to do, but I seem to be on a roll, so I will do as much of it as I can.


Silly sign of the day:

Welcome to Windows!


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Tuesday, 20 October 2009

Programming Tip

Delphi does not contain a specific function that is present in C to help process a string. That function is a method to split a string up into individual pieces, where the piece is delimited by a specific character. The C function to do this is called strtok and it returns the first piece and deletes it from the original string. Subsequent pieces are returned with subsequent calls to strtok.

To fill in this omission, here is a Delphi function call GetToken. You give it a string and a delimiter character, and it will return a string containing the first piece of the string. It will also delete that first piece (and the delimiter) from the original string. Subsequent calls with the same string will return subsequent pieces, until the original string is empty. Here is the function:

// =============================================================
// Get a substring from a string and remove it from the string.
// =============================================================
function GetToken(var InTxt : String; const sep: Char): String;
var
i: Integer;
begin
// look for the first separator
i := 1;
while (i <= Length(InTxt)) and not (InTxt[i] = sep) do INC(i);
// return the token and delete it from the original string
Result := Copy(InTxt, 1, i-1);
Delete(InTxt, 1, i);
// remove any extraneous separators
i := 1;
while (i <= Length(InTxt)) and (InTxt[i] = sep) do INC(i);
Delete(InTxt, 1, i-1);
end


I did go to the Lewiston Gem and Mineral Show on Saturday. I took some pictures of the displays and you can see them here. I mostly concentrated on the Intarsia they are doing. They are all made completely out of rock.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Monday, 19 October 2009

Thinking about the GUI wrapper I want to write for dvd-slideshow, I got a brainstorm at work on Friday. I ran up the VM I have for Ubuntu 8.10 and used the package manager to remove Lazarus and the Free Pascal compiler from the O/S. The versions I removed were the ones that are supported in the Ubuntu repository. I then downloaded and installed the latest Lazarus and Free Pascal from the Free Pascal web site.

I then ran up a sample project and verified that the generated executable looks just like every other GUI in Ubuntu. The problems I was having with visual presentation were due to the old IDE and compiler.

When I got home, I did the same thing on my workstation. I have spent some time over the weekend working on the GUI for dvd-slideshow and it looks pretty good at this point.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Friday, 16 October 2009

I went to the monthly meeting of the North Idaho Mineral Club last night. They had a rock quiz and I found I knew a lot less about rocks than I thought I did. I only got 1/3 of them correct. Guess I'll have to study some more.

There is a gem and mineral show in Lewiston this weekend. I am thinking of going to that, since this is a free weekend for me.


This morning, Woot.com is selling the netbook I got from them for $50 less than I paid for it. It's an excellent computer and $230 is a very good price for a refurbished netbook with a 10" screen and a 160GB hard drive..


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Thursday, 15 October 2009

I had lunch at Famous Willies in Post Falls yesterday. Monday was their first day in business. They serve southern-style barbeque and it is just terrific. I had a smoked brisket sandwich with a little Rajun' Cajun BBQ sauce. The very tender smoked brisket was served on a sesame seed bun that seemed like it was fresh out of the oven, and the sandwich was incredibly tasty. I am going again next week and I will try out all of their meats - they have brisket, pork shoulder, smoked sausage, smoked chicken, smoked hot dogs and Louisiana hot links. Side dishes are extra and include garden salad, coleslaw, chili beans, potato salad, corn on the cob, corn bread, or potato roll. They also have a different home-baked pie every day, but I'm staying away from that.

So, if you are an omnivore or a carnivore, I think I can recommend this place. It is on 7th Street in Post Falls, directly behind the Domino's Pizza that is on Seltice near The White House.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Wednesday, 14 October 2009

I have ordered a couple of books that may help me decide which development system I want to use for the dvd-slideshow GUI. In the meantime, I will model it in Lazarus and Free Pascal.


I have complained here about the tendency for the local highway department to tear up the streets in such a fashion that you can't get where you want to go without a major time and mileage detour. I also complained that 4th Street down towards Coeur d'Alene was closed for the entire summer with no apparent construction going on.

I found out last Saturday why it had been closed. The four-way stop at the corner of 4th and Dalton Avenue is now a roundabout. It was so far down the street from where they detoured us that you could not see any construction going on. At any rate, that now makes two roundabouts on 4th Street. Makes the trip down to CdA slightly faster.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Tuesday, 13 October 2009

The other day I mooched a Linux programming book on BookMooch.com. Yesterday, I received a refusal notice from the guy I mooched it from, informing me his wife had thrown the book out. So I had to get one from Amazon.com.That makes three books from them in the mail pipeline at this point. And they will dribble in days apart.

I really miss BookPool.com, which was my online technical bookstore of choice. They gave really deep discounts and their service was as fast or faster than Amazon's. Of course, the deep discounts might be the reason they are no longer in business. Nevertheless, I am in the market for a new online technical bookstore. It has to have discounts, though - have you priced any new technical books? Ridiculous.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Monday, 12 October 2009

I installed Ubuntu Linux 9.10 Beta on my notebook computer on Saturday at the North Idaho Linux Users Group meeting. The only problem I had was the same old problem I always have with that notebook: the WiFi chip in it is a BroadCom chip and I need to download a package called B43-fwcutter to get the thing to work. After that was done, everything seems to work fine. I have not had time to look into the beta further, though. I will try to do that sometime this week.


I'm still evaluating languages for use with the GUI program I want to build for dvd-slideshow. I know that Java will work fine, but I am reluctant to use it because I don't know enough about how the NetBeans IDE works. Maybe I should just go back to using Lazarus and Free Pascal, which is what I was using in the first place.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Friday, 9 October 2009

The North Idaho Linux Users Group general session is tomorrow. I will bring this workstation to the meeting to show people how Linux can be used for every daily computing task, and how I use two monitors to display all the information I need when working on a task.

I will download the beta version of Ubuntu 9.10 tonight, and will dig up a computer to load it on. If I find any problems, I will document them and bug them in Canonical's bug tracker. It's the least I can do to support their wonderful work.


I am looking at using Glade and C to create the GUI for dvd-slideshow. I have some issues to work out, though. Like why my sample program refuses to compile on this workstation. Figuring that out would be a big step.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Thursday, 8 October 2009

I am putting the dvd-slideshow GUI program on hold until I figure exactly how I want to do it. My original approach was a wizard-style interface. After looking at other approaches to the problem, I believe a semi-wizard approach is best. There will be a first page to allow the setting of global parameters. The second page will allow the user to input a set of pictures to be displayed and will allow the setting of individual parameters for each picture. The third page will save the dvd-slideshow file, execute the program and display the results.

When I spell out what I want to do, it sounds very similar to what I was going to do with the wizard, but the picture section has more detail than in the wizard. You will be able to select special effects, display time and even select music for a given picture if you wish. The wizard did not allow this level of detail.

I was writing the original wizard in Pascal, as I have the Lazarus IDE and I have been writing Delphi programs for 14 years. But the visual details you get with Lazarus leave a lot to be desired. I am looking around for another way to do it. So far, I am leaning towards writing the program using the Glade interface designer and the code in C. If I knew how to use the NetBeans IDE proficiently, I would do the program in Java with NetBeans. But I don't.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Wednesday, 7 October 2009

One of the reasons I have breakfast on Saturday mornings at the Down The Street restaurant in Coeur d'Alene is so I can replenish my home supply of Marketspice tea (Pike Street tea). When I run out, I take one of my glass crocks along with me and purchase a pound of the loose leaf tea.

Down The Street has had a new owner for a couple of months now. He has made a lot of improvements to the restaurant, while not changing the food. That is good. What is not good is his new policy about Pike Street tea. Last Saturday, I went in for breakfast and brought my crock with me. The waitress said they could no longer sell the tea to me. This is an arbitrary thing, as far as I'm concerned. I'm not sure how to respond to it, as I really love their breakfast and don't want to stop going there.

In the meantime, I've found a place on the Net to get Pike Street tea and have ordered two pounds worth. I placed the order on Sunday and got the tea yesterday. that's very fast work that I appreciate.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Tuesday, 6 October 2009

I had one of those nights last night. I was almost finished laying out the last of the wizard panels for the GUI for dvd-slideshow, when a single keystroke made the whole panel vanish. I tried to recover it, but it is all gone. I guess I will have to re-do the panel from scratch tonight.


I think that the development environment and process we have at work is pretty good. We have an Internet message server and everyone has a chat client. Instead of walking over to someone's office and talking to them, we use IM. This ends in less interruption of the development process. The server has several channels dedicated to different tasks: dev, test, tools and a general 'gossip' channel are a few of what we use. We have greatly increased our communication, because if you ask someone a question and they don't know the answer, someone else may chip in with their two cents.

We document everything on a wiki server using software called Confluence. Development plans, development implementations, test plans and test results are a very few of the things that are included on the wiki. There is also how-to information, resource information and even meeting minutes on the wiki. I tried to do this kind of thing when I was working at Getronics, but it was never promoted by the boss. One of the first things out of my current boss's mouth is always, "did you document this on the wiki?"

Since we are more or less an agile development shop, work is assigned to people (mostly pairs of people) using a browser-based product called VersionOne. Task assignments, priorities and time estimations are assigned in VersionOne. It also keeps track of actual times for tasks.

For software bug tracking, we use Bugzilla. It is bug tracking software that keeps its information in a database and has a browser-based client. It works very well but the interface is a bit dated.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Monday, 5 October 2009

I got sidetracked again. I was talking with a friend and she asked me what I used to create video slideshows in Linux. I told her it was a command line program called dvd-slideshow. She expressed disappointment that it was command line and I told her I thought it would be fairly easy to make a GUI wrapper for it.

That kind of preyed on my mind so much that I ran up Lazarus and started prototyping a user interface. It's no longer a prototype. The interface is about 75% complete. I still have to write the routines that takes everything the user entered, writes it to a text file and then executes dvd-slideshow with that text file. Before that, though, I need to finish the screen that allows the user to enter options like the titles and slideshow special effects. It should not take more than a couple of days, I hope.

When the program is finished, I will get back to my evaluation of Drupal.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Friday, 2 October 2009

I continued to investigate the Drupal CMS last night. I verified that it could be configured to have more than just three types of users (admin, logged in, visitor). Actually, you can add as many as you want. I want to do two types of logged in persons, as well as admin and logged out. So that is a very good thing.

I have downloaded half a dozen themes for Drupal and the one I really wanted to use does not behave correctly. I have an alternative, but I may have to tweak it to meet my needs. I also got a theme that would be perfect for this web site, so I will have to see if there is a corresponding theme for the CMS I am currently using.

Drupal has very flexible layout options. It has a menuing option that allows you to place the menus in different zones, including left, right, top and bottom. I think I will like this content management system, but I still have more to look at.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News

Thursday, 1 October 2009

I installed Drupal last night. First, I installed PhpMyAdmin from the Ubuntu repositories, then used it to create a blank database and a user dedicated to the database. Then I ran Drupal's install code. I answered a few questions and the site was set up. I have looked at the administration page for the CMS, and it looks to be very easy to set the web site up to look and feel the way I want it to. We shall see as I investigate further.

Actually, the first thing I think I will do is search for an appropriate theme. I hope to find one that has green overtones and that can be set up to have a sporty look. I want to do this, because I am entertaining notions of doing the sports program as a CMS-based web application. It all depends on the capabilities of Drupal.


Silly sign of the day:


Free/Open Source Software

"It's Mine, and You Have to Pay (and Pay and Pay) For It"

Local and Other News