Matt’s Blog Just another weblog

2Mar/100

scanimage(1) command python wrapper

To reduce clutter and improve the efficiency of my home-office, I like to digitize all my "important" documents. To accomplish this task, I use a HP All-in-one scanner, an open sourced document management software called KnowledgeTree, and scanimage(1) from the SANE project.

It turns out that scanimage(1) is a fairly cumbersome command line program to use. I opted to avoid graphical scanning software because I don't want to be clicking around with the mouse when scanning large number of document sets. It turns out that I use a consistent set of options for all my document scanning purposes. The only options that to vary are the number of pages and whether the document set is single or double sided.

For the longest time, I was very happy with my simple bash script to store my command options to scanimage(1) and I would "manually" set any arguments (e.g. number of pages). This worked pretty well for single sided documents. After some time, I finally had it with the headache of modifying the command options manually when I wanted to scan double side documents and decided to write a python script that would wrap all this knowledge into a script. I call my script scan_pages.py. It has very simple usage:

scan_pages.py [-d | --double] total-pages

The script does three things. First, it manages the "--batch-count" and "--batch-start" command line options depending upon the parameters of the scan job. Also, it automatically calculates the number of pages that are to be scanned for a two-pass double sided scan job. It is only required to specify the '-d' flag and the total number of pages, both front and back, that are to be scanned. Lastly, the script will use the convert(1) command to trim any whitespace contained in the image that is not part of the original document.

If you use scanimage(1) you may find this script helpful. Let me know if you like it. You may download it here.

Filed under: Guide, Opinion No Comments
15Sep/090

Jim Cramer raises Apple (AAPL) target price!

In today's episode of Jim Cramer's Mad Money, Cramer has raised the target price of Apple (AAPL) to $264. This article has a great recap of the todays episode. Cramer states that the FASB is proposing a change in a revenue recognition standard such that it will dramatically increase Apple's reported earnings. Thus, making the stock appear cheaper than it currently is, even though Apple's financial position has not changed.

This episode has been bothering me all day because of the fundamental error in Jim Cramer's arguments. He made two points to justify his recommendation 1) The accounting change will increase Apples P/E ration thus making it appear it's financial position has strengthened and 2) Investors are going to ignore the accounting change.

However, I doubt it. Though there are many ways that a stock's price can be calculated, it is fundamentally the present value of the future cash flows. One does not have to be a hedge fund manager to see that an accounting change does not increase the future value of cash flows. Secondly, as Cramer pointed out, Apple's Statement of Cash Flows has already recognized the cash flow from the sales of Apple's products and investors do not ignore this important financial statement.

I would think that this revenue has already been priced in Apple's stock.

Filed under: Opinion No Comments
28Mar/091

Intel Atom!

I've recently decided replace two of my home servers with an Intel Atom system. The Atom is a low-power CPU which comes in various flavors which you can read about at wikipedia.org. What I will tell you about is the huge success that my upgrade has been and how extremely happy I am with this processor. You will also find a detail listing of the various components that compose my system, how the system is being used, and my overall opinion of the processor.

Components

  1. Athenatech Black Steel A100BB.270 Micro ATX Media Center / HTPC Case
  2. Kingston 2GB 240-Pin DDR2 SDRAM DDR2 533 (PC2 4200) Desktop Memory Model KVR533D2N4/2G
  3. ECS 945GCT-D Intel Atom FCBGA 437 Intel 945GC Mini-DTX 200x170mm Motherboard/CPU Combo
  4. Transcend 4GB Compact Flash (CF) Flash Card Model TS4GCF300
  5. LG 22X DVD±R DVD Burner Black SATA Model GH22NS30
  6. Addonics CF - SATA HDD Adapter
Total Price: $251.44

I went with the ECS 945GCT-D motherboard because it comes with a PCI-e slot. This is a very useful feature which will increase the longevity of your system giving you room for any possible future upgrades. For me however, I'm using the slot to stow my external RAID controller card which is the core component of my 5 terabyte data storage solution. The motherboard claims it supports a maximum of 2gb of RAM--1gb stick in each slot. Though, I'm having no issues with a single stick. One last thing I'd like to mention is splurge and purchase the highest quality compact flash card you can afford. I experimented with several models and found them lacking in performance. Worse, a Kingston stick I first purchased had constant data corruption issues. Avoid! The CF card listed above will not disappoint featuring 45Mb/sec transfer rate.

I am extremely happy with the performance of this system. It makes absolutely no noise though it has a PSU fan and two small case fans. It is ideal for my home server needs and this box currently serves the following purposes:

  • MySQL Database Server
  • Apache/PHP Web Server
  • DNS Server
  • NIS Server
  • NFS Server
  • MythTV Front/Backend
  • SVN Server

All of the above services took a solid week and a half to match the flawless configuration of the systems it replaced. During this process, I experimented with several Linux distributions including Fedora Core 10, Ubuntu 8.10 Server, and Ubuntu 8.04 Server. Ultimately, I had the most success with Ubuntu 8.04. It was an interesting experience attempting to configure the system with FC10. I had configured almost all of the above services but failed to get sound working with MythTV. I won't get into the details of the problem but my conclusion is that Ubuntu has come a long way not just as a Desktop but as a Server. The configuration of Ubuntu was much easier not just because it is better documented but the overall higher quality of the packages offered by Ubuntu makes configuration of the above services a much better experience. It is worth mentioned that because I only have 4 GB of disk space on this system I could not afford to install unused packages (e.g. Ubuntu Desktop). The FC10 base install took ~1.4GB compared to Ubuntu 8.04 which took ~500MB. After installing all the necessary packages to support my configuration, my disk usage is:

/dev/sdg1              3753400   1723876   1840364  49% /

Which is perfect.

This $250 system is a perfect home server. I'll take it a step further and dare to mention that running X (specifically, LXDE) on the Atom system is just as responsive as on my dual-core box. Unless you need heavy computing power (e.g. gaming/video editing) you will be very happy with the Atom processor. I can't wait to build another one.

Filed under: Guide, Opinion 1 Comment
17Oct/080

PNSQC 2008

For the first time, I had the opportunity to attend the Pacific NW Software Quality Conference (PNSQC) and wanted to share a bit about my experience with anyone interested about the event. The non-profit two day conference took place at the convention center in Portland, OR and was filled by individuals involved in testing from IT to managers. The theme this years was collaboration and the agile methodology--though, the topics were variety as it's not difficult to incubate collaboration into any subject. In regard to the agile methodology, I was rather disappointed by the attempts made to glorify the idea. Simply put, it has been around for a long time and is obviously not a magic bullet in fixing your development problems--anyway, the concept was beaten into my head over and over throughout the two days. Fine. At the end of the day it comes to writing high quality code and the methodology can only take you so far.

Of all the presentations I attended, there are only a few worth mentioning.

Collaborative Change by Debra Lavell (Intel)

I had the pleasure of hearing Debra discuss how she implements change in a large, mature organization. I strongly believe that change is something to strive for. There are always ways in which something can be improved upon and effort should be made to achieve improvement. Problem being, people tend to avoid going outside of their comfort zone and Debra's job at Intel is to encourage teams to go outside of this zone, admit to the problems they are making, and take the necessary steps to implement the already known solution.

I was impressed with Debra's presentation. Her charismatic speaking-style (which I can only assume is a necessity in her line of work in convincing people to adopt change) was a change compared to some other presentations.Though she presented quite a bit of information, what I walked away with were some concepts applied by Debra to achieve change. I took note of these concepts as a way to remember qualities required to facilitate change. And here they are,

  • Conduct retrospective three times throughout a project life cycle
  • Reuse existing solutions
  • Create an action plan
  • Include a neutral facilitator
  • Illustrate gaps and areas for improvement
  • Shape the environment for change
  • Reward change

She covered all the topics, something I will not due here but leave it as an exercise to the readers to gather further insight.

Selling Your Idea to Management - Steve Smith

Steve Smith quite possibly presented the best presentation of the entire event. This topic had little to do with testing, collaboration, or agility. Though, each and every individual attending this presentation walked away with great insight in how to better sell an idea to management (or anyone for that matter). Perhaps, you need to convince management that your test department is greatly under-staffed? Or, maybe you want to convince your team that language X or library Y should be used for the upcoming project? Though we won't always have our way, Steve presented three simple, life-changing concepts which can greatly increase your success of others adopting your idea. The three concepts are,

  1. Change the perspective. The idea must be restated to change the perspective from how it benefits you to how it benefits the manager/organization.
  2. State the benefits of the idea. If we adopt X, the benefits are...
  3. Discuss the consequences if of doing nothing. Doing nothing is the default, state the downside of doing nothing.

Enjoy! I hope to see you there next year.

Filed under: Opinion No Comments