Posts

Losing the weekend fight

Image
Over the weekend I've lost several battles: First one was against my TV computer. The Asrock motherboard died last week, so I bought a replacement but it was an Elitegroup VIA KM400-M . To make a long story short I tell you this mobo does not play right with my Nexus-S PCI card. Of course, figuring that out took me a good part of the weekend. I sent a support request to the manufacturer, but given the way the manage their website I'm afraid I am in for a big dissapointment. Second, I turned to my desktop to scan some pages I realized that my Ubuntu upgrade to Feisty also did bring an annoying bug that made my Acer S2W 3300U scanner not to work properly. It turns out it is a new bug that can be avoided by using the scanbuttond application (weird but true, this daemon-like application prevents the scanner to be powered down which is what causes the bug). Finally I managed to get the work done, but I'm exhausted. Those of you with your shine Vista and the same scanner are ...

Weird CUPS printing problem

Since I installed Ubuntu's Feisty Fawn my user impressions have been very good. However, some days ago I experience a weird problem when my system began to work erratically. I was not expecting it so it took me some time till I realized my filesystem was full. I did not understand why that was happening as the last time I checked there where more than 7GB of free space on that partition. But the first trouble sign was that print jobs where not printed. After some confusion I realized I had 7GB /var/log/cups/error_log file. So that was the cause of my trouble. Inside the file I had millions of lines with the error message "Too many open files". It was clear there was a problem with the printing system. I googled for that and I learned there were not one but two different reports of a similar problem. Just restarting the printing system was restoring the service (but not deleting the error_log file). As soon as I removed the error_log file and restarted cups I was back on...

OpenOffice fonts in Feisty

Image
A colleague of mine who tried the new Ubuntu 7.04 was not happy with the OpenOffice Impress tool (I'd say he was not very impressed) because certain pages were rendered using larger fonts that in the original page. This odd behavior was forcing him to patch slides that were ok for previous versions of OpenOffice. I haven't experienced the problem myself, but I told him to have a look at Launchpad to see if there was a bug report on this and, if not, to file his own bug report. It turned out that a very helpful guy reported a similar problem , its cause and several suggestions to fix it. It turns out there is nothing wrong with OpenOffice but last version of Ubuntu fails to do the right substitution with some fonts. This bug was not happening on previous Ubuntu versions though. As my friend's problem was due to the use of some TrueType fonts from Microsoft (a document migrated from PowerPoint) I suggested to install the package msttcorefonts and that fixed the problem.

eBay experiences

A few days ago I bought one item from a seller on eBay. Seller looked good. But two days after I sent my payment I got an eBay warning message telling me the seller's account has been canceled and advising me not to send any money. Unfortunately the money was already sent so there was not much I could do. Checking the seller's account feedback page revealed that the flow of feedback messages had stopped as users cannot leave feedback on a canceled account (not sure this is a good idea) even if buyers are already getting what they paid for (or a brick in a box). Let me elaborate on this: Blocking a seller account should prevent the seller to do "any more harm" (ie. to sell any new item) but the feedback information is useful mostly for buyers, so you are here punishing the buyers if they cannot post feedback for a blocked account. Some days later my product arrived ok and I was surprised when I can see I can leave feedback for this seller. In fact, it seems the seller ...

New life to the Traveling Salesman Problem

Image
I learned about this problem when I was a CS student: A salesman has to visit a set of cities and then returns home. The problem is to find the fastest/cheapest/shortest way of doing so . It is a NP-hard problem as the solution space is n! (for a n-city problem) that is impossible to be examined fully in a lifetime. It can be entertaining to do by hand, but there are many programs that may help you, like Concorde . My interest for TSP was sparked as a possible solution to the optimization problem for the drawings made with my home-made painting machine. It is not a new problem but I was not aware of the best solution possible. I was lucky enough contacting Michael Trick who, right off the bat, gave me a nice and elegant solution. I need to determine the right order for drawing a set of n lines but each line may be drawn in one direction or backwards. The solution to the problem needs to determine the drawing order of the lines plus the drawing direction for each one that makes the t...

A good moment for a backup

Image
After doing a full backup of my trusty Ubuntu 6.06 system at home I decided to give it a shot to the new Ubuntu 7.04 (aka Feisty Fawn). I just decided not to be on the cutting edge and I did the install only after other users were reporting successful installs. So far I've updated a couple of my systems, the first one, an ASUS pundit worked like a charm and the graphics card was detected ok. The second system, with an ASROCK mobo with an ATI Xpress 200 graphics card was not so lucky and though the install worked I needed to do some black magic to get the graphics working at the right resolution and, more important, to get 3D acceleration. Why is 3D needed now? Well, it is not really needed but after so many comments about all the "experimental" graphic features nicely included in the last Ubuntu I decided it will be nice to try it out (don't worry I am not posting any video to youtube). The bottom line is that the new 7.04 feels a better Ubuntu than ever before, with ...

Graphics fun

Image
I was watching some paintings by Chuck Close and I thought of doing something in that direction but, of course, letting the computer do the hard work. I'm not yet finished as my initial goal was to create a GIMP plug-in (as Photoshop is not my thing), but I started using Perl and the GD library to get results like the one in the photo. If you are interested in the perl code just drop me a line, it can work with any photo file (once you convert it to a GIF file). If you are familiar with GIMP plug-in creation you might want to help out finishing the work!

Time to switch away from Microsoft?

I have been testing Office 2007 and its new user interface. I did like it. But at the same time I did have some trouble finding some options (like the Save As ... --a hint: press the circle on the top left--) but the general feeling was that it should be easy to get use to it. However, another idea came to my mind: Over the years I have heard people from different companies saying that while OpenOffice was kind of ok they did not want to incur on the extra cost of re-train employees to learn how to use OpenOffice. The bottom-line now is that I find much easier to switch from previous versions of Microsoft Office to OpenOffice than to Office 2007. And I have not yet mentioned that file formats have changed too for Office 2007!! This fact considered alone might be addressed by not switching to Office 2007 anytime soon. This is what all the companies I know are doing. But the second most amazing thing I can see happening is that no companies are switching to the much-hyped and secured Wi...

Better video

Image
When I built the vertical plotter I mentioned one week ago I realised the video I was posting was not very good. I have received no complains but as I was painting something else over the weekend I decided to shoot it better and to fast forward a bit so as not to bore you to death. This is the result: And before you ask me, this is the photo it is coming from:

Windows Log Files

Image
Today I needed to dig on a client's set of log files. I'm happy with text-based log files, but this time most of the research has to be done on Windows 2003 Server Event Logs. The problem is that in order to view this files you have to be running Windows 2003 Server and you have to use the Event Viewer program (or so I thought). After having some trouble because I was not aware that Event Viewer is not happy when your files are read-only (as when you are handed over a copy on a CD-ROM) I decided it has to be a better way. Unfortunately, Event Viewer error message just said "wrong parameter" which is not telling you much about the cause of the problem. A bit of Google and I discovered a software gem called LogParser , which can parse most of the different log files Microsoft OSs and applications create and, to ice the cake you can present your queries using SQL sentences on the command line. Many input and output formats are supported and it can also deal with your Apa...

New article published

April 2007 Circuit Cellar #201 features an article about my research on the inner work of ECP bus that has been used in ADEMCO alarms for many years . Note : It is not available for general download but for subscribers only .

Yet another shameless copy

Once I get one project running I tend to focus not on creating a polished version of it but on the next project to do. This time I am planning to build a 3D scanner for body parts (i.e. hands, arms, head) so I can create a polygonal version of them like an sculpture. The good news is that it's been done many times before: like this one , or this other . Some people even took the time to create an open source project to develop the software for such a homemade 3D scanner. As I am yet in the early stage of the project I can only tell you that a line laser and a webcam (or photo or camcorder) are needed. The line laser is a laser that creates a line shape instead of a single spot. The cheapest alternative if you do not have one is to buy one of these straight line levels . Alternatively you can create a line laser from a laser pointer by inserting a cylindrical lens on the laser beam (any solid cylinder shape of plastic or glass can work here). Once you have the laser line you also n...

Vertical Painting device

I've been working for a while on this project but now I've reached something close to a 0.1 version. I just suck at mechanical devices design. The system is copy of a similar project done at Cornell University and at école cantonale d'art de Lausanne but it happened to be more of a challenge that I assessed initially. Now that it is up and running I am using it to ease the process of transfering drawings to a canvas. I still have to discover why I am getting a 12% compression on the y-axis but in the mean time I can easily compensate for that. I wanted to use a solenoid for the pen up and down control but I did not manage to get a reliable behavior so I am using a third stepper motor I ripped off from a floppy drive (I use two stepper motors for controlling the two hanging strings). I am using coal sticks to draw over the canvas and I've noticed that next version will need to include a compensation of the wear of the coal (as it gets shorter as lines are being drawn)...

Regular Expressions in ... Visual Basic .NET?

A recent project required me to use Windows while I figure out how to write a driver for a USB-based stepper motor driver I am using. I decided to see how Visual Basic works in this new and glorified .NET version (my last experience was with VB version 6 and it was a pleasant one). So I downloaded the free version (called Express) of Visual Basic 2005. I am doing so because this way any advice I can give to others may include the usual "you may want to use this software" without having to add "it will cost you so many dollars". Because most of the time I'm giving advice to my students it seems an ok approach to me. The only "requirement" to use this software for an unlimited amount of time is to give away some personal info to Microsoft. I've found the deal ok this time. The new version includes a browser window on the user interface that makes the loading time longer and I am sure I will be happier without it (maybe it can be easily disabled). I...

Timing belts and pulleys

When I started the project of creating my own version of Hektor I thought that the most difficult task would be something related with the software or the stepper motor controller, but I was wrong: The most difficult part has been finding the right hardware parts. More exactly, finding a local supplier. While getting a USB 3-axis stepper motor controller on eBay was easy, even though it was coming from Australia it didn't take long. Finding the right toothed pulleys and belt it is being a nightmare, as local suppliers do not have "small size" elements nor a fast delivery. Should I have bought everything online I will be done now. To be honest I was not even aware I would need that type of transmission system. My first impression was that it could be done with just some type of string, but after several failures I had to admit that toothed belts was probably the smart way to go. But then it was kind of late as I had the rest of components laying on my desk. After vi...

Grayscale with ImageMagick

I use command-line ImageMagick's graphics file handling software. It usually rocks and it use to be easy and simple to use, for that I love it. However, I've been fighting now for more than one hour to get it right. What I wanted was to convert to grayscale a set of JPEG files I had on a folder. There are a couple of annoying things with ImageMagick: Once you use wildcard as the command source file (i.e. mogrify -resize 1024x768 *.JPG ) then it seems to take a long long time to work. The reason seems to be the command reads and stores in RAM all the files BEFORE the magic starts. The result is a poor user response time (and sometimes an almost frozen system if you run out of memory and all the time is used paging). I use to change to use a for loop instead, with some "progress information" (i.e. for i in *.JPG; do mogrify -resize 1024x768 $i; echo $i " done!"; done ) I do not convert to grayscale every week, so I cannot remember how to it. Here is when the...

Oracle SQL Developer

I needed to access some data on our corporate Oracle database server. Unfortunately, no information was given to me other that the PHP connection string. I had not idea about the table or view names either, so I tried to use a database management tool but lacking any previous knowledge about Oracle databases I look for what I've used in the past. I was quite happy with EMS Postgresql Manager and I learned they do have a simlilar product for Oracle databases, but after installing it I learned I needed to install SQL*Net software which I did not know where to get from. However, a quick Google search lead me to another gem from Oracle: SQL developer and the word free captured my attention inmediately. It turns out it is a nice Java program that is available for a variety of platforms. I'm currently using it on Windows and Linux successfully (please note JDK >=1.5 is required). Using this program I was able to learn about the tables on the server but not before I was able to ...

eBay deals

Image
If you use eBay long enough you'll end up with some trouble. I guess the same is true wherever you buy your stuff. Sometimes things go wrong either with shipping or you get a nice DOA. My case is no different, after several good deals I've got a badly broken bycicle headlight (pictured on the left). As it was a cheap item money was not a big problem, but still you feel you should get a fix, either in the form of a refund or a new item. The problem this time was the seller was not answering my messages. At this point I decided not to let him go without a fight. After 48 hours without an answer and checking in that seller feedback that not answering complains was his standard behaviour I filed a complain with eBay. However, eBay forwarded me to PayPal as the item had been paid using PayPal. I thought that although I might not get the money back I would be educating the seller as I was guessing PayPal (through which he gets most of the payments) would force him to at least provid...

Digital camera madness

Image
I recently tried to learn a bit more about photography (I can recomend you this book ). I've owned several film-based cameras over the years (both compact and reflex) and since 1996 when I bought a Casio QV-10 (not that I can recommend that battery eater) all of them have been digital units (Canon S10 and A520 and lately Panasonic DMC-FZ7 , all of which I can recomend). I was thinking to finally jump to the Digital Reflex bandwagon but I was waiting to get a better idea of that segment. But it seems the waters are not that clear. Although it seems that Nikon has settled with the so-called APS-C sensor size, Canon has mixed feelings and now it has three different sizes from full-size 35 mm sensor (like the one on EOS 5D) to APS-C size (like the one on 20D, 30D or 350D). Why sensor size is important? Well, one of the reasons professional photographers have kept the reflex market going was compatibility. You cannot be compatible if you change the sensor size. And, it does not matter...

File Uploads

Every now and then we all face a common problem poorly solved by today's applications: You want to send a big file to another person (or you want them to download it). For files several megabytes long (or larger) email is not the right tool (as email servers will reject send attempts larger than a few megabytes). IM applications like MSN Messenger or Jabber might solve the problem, but only if you and your friend have that software installed and have a user account. But there is still another catch: This transfer happens between peers, so both you and your friend need to be online during the whole transfer. To fix this, some applications like Pando can help, as they provide a multiplatform solution that does not require you both to be online while the transfer takes place. However, you both still need to download and install Pando client. Upload centers allow you to upload files to be shared with the rest of the world. No user registration is required for some of them but some lim...