January 16, 2013

Transcoding a Movie Library with Python

Filed under: Home Theatre,Programming,Python — pj @ 10:18 pm

Like many a fellow geek, I have a Ubuntu server with shared folders that hold my collection of photos, music, movies, etc.. To show the movies on my TV, I started off with ASUS O!Play media player. Eventually, I bought a Samsung Blu-ray player with built-in media player. While the ASUS box supported CFS (Windows file sharing), the  Samsung could only see DNLA servers. I installed a DNLA service on my Ubunto and that worked fine until recently. Last summer, I moved to a new house. My new place doesn’t have CAT5 run all over, so I needed a new Blu-ray player with WiFi. I bought an inexpensive Panasonic unit from Costco because the Panasonic supported Amazon Instant Videos. Unfortunately, the Panasonic was much more picky about the supported video formats. While it can play modern .mkv files, it can’t play .avi files at all. I had a choice: I could buy another Media Player (the Western Digital WD TV Live was recommended for wide codec support) or I could figure out how to transcode videos.

(more…)

April 9, 2011

Linq Links

Filed under: .Net,Programming — pj @ 5:35 pm

Linq is some of the coolest new stuff to happen to programming in a long time. The idea was tried in the past with things like “embedded SQL” for Cobol and Fortran, but I think this time, Microsoft finally got it right (or at least has things headed in the right direction). With the Standard Template Library (STL), we got a uniform way to access and navigate type-safe and efficient memory based data containers. With Linq, we have finally a unified way to access and navigate data stored in just about any form. Yeah, I know, Linq really isn’t new, but I’m just now getting serious about using it large projects. Some of the interesting Linq related links I’ve seen recently:

January 1, 2010

Moving Contacts into My New Droid Phone

Filed under: .Net,Programming — pj @ 7:44 pm

I’ve been waiting on a phone like the Droid for years – an Internet connected miniature computer I can put in my pocket. I skipped Windows Mobile because it was lame: Poor resolution, poor open source application support, poor UI experience (poor Microsoft). I skipped Blackberry because the phones are ugly with small screens and the software is just awful. I skipped the iPhone because I’m not into platforms you can’t tinker with… app stores are fine, but, as a developer, I don’t want to be forced to use one. And Objective C should be something programmers either choose (or not) on its own merits – not due to Apple strong arming.

The G1 was almost good enough, but I heard it was slow and slow computers drive me crazy. Finally, my Droid has arrived. I’m not thrilled that Java is the recommended programming language, but at least you don’t have to program in Objective C. I’m on day 2 with my Droid and I’m really just getting started. The first challenge I ran into was moving my contacts from Thunderbird and my old Casio “Boulder” phone. (more…)

December 12, 2009

Hiring Your Friends

Filed under: Programming — pj @ 2:11 pm

Recently, a friend of mine asked me about hiring friends. I’ve read a lot of books about team management and I have a lot of hard won experience in this area. Posting this up in public may come back to haunt me, but I’ve decided to bumble on anyway and try to document some of my suggestions here in the hope that it will make the world a better place. A lot of the post below details what to do when things aren’t working out, but I don’t want you to think things are all “gloom and doom” – I love to work and I’ve had really good times at work. One of my very best friends today is a “success story” about hiring friends.

It’s All About the Money

Many surveys and studies of programmers suggest that job satisfaction is more important than money, but my experience is that you have to take care of money issues first, or you’ll keep coming back to them over and over. The ideal situation is:

  1. Everybody feels that they are being generously compensated (some of the generosity can be in deferred compensation - see #2)
  2. Any type of deferred compensation (sales commissions, stock options, profit sharing, etc.) is “icing on the cake” and not necessary for the person to pay their normal living expenses
  3. You don’t directly control the person’s paycheck (you both work for somebody else)

(more…)

August 1, 2009

GoogleBase Troubleshooting

Filed under: .Net,OnlineStoreTech,Programming — pj @ 11:16 am

I just spent a large part of the last week troubleshooting a GoogleBase data feed. (more…)

June 28, 2009

Web Service for Document Conversion – an Odyssey

Filed under: .Net,PHP,Programming,T3city — pj @ 2:02 pm

A couple of years ago, I needed a way to convert Microsoft Word documents to Pdf from a C# program. The application I was working on processed hundreds of documents and was run by the system scheduler every day at around 3am, so manual conversion was not an option. I wasn’t in control of the source documents, so I had to accept the documents the way they were given to me. I needed to do additional processing on the documents, so I wanted to convert them into a universal format. I already had a good library for reading Pdf files. After researching my options, I settled on using OpenOffice to do the conversion. OpenOffice has a pretty good Word filter, the ability to create Pdfs and an automation interface accessible to all .Net languages, including C#, so it was a good fit. I know there are commercial solutions and ways to automate Microsoft Office, but the OpenOffice solution was free and fairly easy to use.

Recently, I upgraded my development system from OpenOffice 2.x to OpenOffice 3.1. I can’t remember now the main reason I upgraded, but I was looking forward to being able to add the ability to convert docx to pdf (Office Open XML support was added in OpenOffice 3.x). I figured the upgrade might require some minor changes to my document conversion code, but it turned out not to be so simple.
(more…)

March 26, 2009

PHP IDEs

Filed under: .Net,C++,PHP,Programming — pj @ 11:06 pm

What is an Integrated Development Environment (IDE)? For sure “IDE” means different things to different programmers. Some probably think an integrated GUI form editor or WYSIWYG HTML editor is critical. Others may think that the most important parts of an IDE are the text editor and code browser. Others still judge IDEs by their code “refactoring” tools.

For me, the IDE goes back to the days of Borland’s Turbo Pascal and Turbo C. They didn’t have GUIs much less GUI form editors, HTML wasn’t yet invented and I don’t remember the text editor being anything special. What turned them into IDEs was the super efficient work flow… A typical “Hello World” program was mostly a matter of typing in some code and pressing the Run key. If you wanted to debug, you would set your breakpoints right in the editor, then press the Debug key to start your program under the integrated debugger. (more…)

August 18, 2007

Simple Tracing and Logging for Asp.Net and .Net Command Line Applications

Filed under: .Net,C++,PHP,Programming — pj @ 12:51 am

From time to time, I need some quick and dirty logging in my .Net applications.  I don’t always have time or energy to worry about the ideal logging API. The MSDN documentation and all the examples I found for the built-in .Net logging facilities were confusing and, it turns out, overkill.

Logging in Asp.Net

Logging in Asp.Net is confusing because Microsoft uses the word “trace” in two different contexts: (more…)

Logging for Services, GUI and Command Line Applications

Filed under: .Net,C++,PHP,Programming — pj @ 12:50 am

This is the first is a series of articles about logging. In this first article, I will describe what I believe is a simple, yet useful logging API. In later articles, I’ll give some hands on practical advise. As I continue the series, I’ll add links to the new articles here:

Wow, some programmers go crazy about logging.  Do a Google search for “.net logging” and you’ll see what I mean. Some of these libraries are huge.  While some applications may really need all the complexity these libraries offer, I have seen it severely abused on more than one occasion. Crank up a copy of Blackberry Enterprise Server (BES) and let it run for a week or two. You’ll find your Windows Event Viewer overflowing with all types of mysterious, confusing and generally useless messages.  In addition to the constant Event Viewer spew, if you let BES run unattended, you’ll eventually find that your BES hard drive is literally overflowing with many different log files all with obscure names and even more obscure contents.  Exchange Server has a similar problem where some logging is done in Event Viewer, other logging is done to text files. And none of the Exchange Server logging options ever seems to enable the simple email flow messages you need for common day to day administration tasks that I take for granted on our Linux email servers.

Is all this really necessary? (more…)

March 13, 2007

Switching from PayflowPro to PayPal Website Payments Pro

Filed under: .Net,PHP,Programming,T3city — pj @ 10:32 pm

Way back in 1996 I created an e-commerce web site for a small software company I owned. The system allowed customers to purchase and download software our web site. To make the system appealing and easy to use for buyers, we processed credit cards automatically. Back then, there were no Internet credit card processing gateways, but I was able to purchase some rather expensive software that allowed my computer to emulate a credit card terminal. The software used the computer’s modem to call a modem bank at the credit card processor and complete the transaction. There was a way to automate the software via text files and command lines and that’s what I did. It was slow, but it worked.

Eventually, my credit card processor teamed up with one of the first companies to offer an Internet credit card processing gateway, Cybercash. I hopped on board as one of the first customers. (more…)

Powered by Teztech