Development Annoyance

How-you-can-stop-annoyance-or-frustrations-quicklyI spend a lot of my time creating new features that simplify my companies business processes.

A good example of this is an invoicing system I created. Instead of users working off different spreadsheets and copying and pasting data between various different programs the user can click a couple of buttons and everything is done and they can move on to the next task.

I am currently expanding this system so more of the companies work can be invoiced quickly and simply.

I like working on this kind of problem.

I get to discuss with the different departments involved, finding out how they work and what could make their lives better.

I then get to look at what structures already exist in the database and get to rip out anything that makes no sense (Today I had a Customer table which has a primary key called ClientId – its now a Client table with PK ClientId) and add new structures to store new information.

I then can build a user interface so the users can interact with the data.

But the most important part of the process comes next. This is when I show the users what I have built and how it will make their lives better, they can then feed back to me questions and comments. How do I do x?, what about y?, have you thought about z?

After this very valuable feedback I can go back and tweak what I have done making it better and better until the users think it is suitable for what they need.

Now why did I call this post development annoyance?

I find it intensely annoying that after spending weeks of my time working on creating something to be used. Users either make do with my solution and never tell me the one thing that really annoys them or worse they go back to the time consuming process and never feedback the one or two changes I need to make to complete the project.

Now I am not perfect, like many IT people my people skills are somewhat lacking but apart from asking people what can you do to get the feedback you need to complete the project?

I do not have the knowledge that other departments have so I consider development a team effort that requires everyone to contribute otherwise it will not finish.

The second outcome where users return to their old ways is the most annoying. It could well be months or even years before I find out that what I created is not being used any more. By that time my memory of what I did and more importantly why I did what I did has been lost and forgotten.

So users please, please tell me what works and what doesn’t and what things I can do to improve things. I want my solutions to constantly improve and get better and I can only do that with your help.

Security Camera with Raspberry Pi Camera

So my first Raspberry Pi project is a security camera. If you have read my previous Raspberry Pi posts you will know that I have been playing  about with the camera but I had one or two problems with Pidora so I am using Raspbian for this example.

To take a photo with the camera module you can use the command raspistill, this has lots of options you can view the full list by just running the command with no arguments. I will list a few options I have used.

-o filename : this outputs an image to a file with name filename
-vf : vertical flip
-hf: horizontal flip these are useful if the camera is upside down etc
-q number: quality of jpg image between 0 and 100, the default image size is around 3 Mb, I reduced it to quality = 10 which gave me an image size of 300Kb which is more reasonable
-a text: annotate you image with some text, I found that the text needed to start with a character, numbers only failed for me.

I want to script the creation of images, so I decided to name the files my script created with the time and date.

This is fairly easy with a bash script.

DATE=$(date +”%Y-%m-%d_%H%M”)
raspistill -q 10 -vf -hf -a a$DATE -o /var/www/$DATE.jpg

The first $DATE is the date I have added to the image itself, because of the problem I encountered with annotating numbers only I have added an extra a to the start of this.

It is now very easy to get CRON to run this script every few minutes, I decided to run it every 2 minutes.

My next script tidies up so you don’t get overrun with images.

cd /var/www
ls *.jpg > stills.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt
rm /var/www/*.jpg

The third line in this script does something really rather clever it creates a video from all the images you have taken. In order for this to work you will need to install mencoder (sudo apt-get install mencoder)

This is all rather good but wouldn’t it be rather cool if this images were uploaded somewhere. If someone was up to no good and they might want to disable your security camera. My first thought was to use something like DropBox, but unfortunately it is not supported by the processor on a raspberry pi. However I have found to be rather good for syncing files.

To install just run wget and extract the file to install the client on your raspberry pi.

./CopyConsole -daemon -p=’mypass’ -root=/home/pi/Copy

This command syncs the folder you have set in -root with

The last thing I did was create a php file running on the webserver that allows you to scroll through the different images. I experimented with using javascript to auto scroll through the images but I found the manual way more useful. All the files I have written I have added to my github page.

Building something with a Raspberry Pi

Many years ago I spent a lot of time learning about electronics. It was great fun, I can’t remember specific things I built, but learning what resistors and capacitors do was fascinating.

I haven’t really thought about this much as my interests have been concentrated on computers and programming, but recently my interest has been peaked again.

The CodeNewbie and Hanselminutes podcasts have been running a month of stuff about making things and doing clever things with hardware called #Marchisformakers, this began to start me thinking about this stuff again.

Yesterday a friend of mine was showing me what he had been doing with a Raspberry Pi and Arduino. It is amazing what you can do with these tiny bits of technology and I was very impressed.Raspberry_Pi_-_Model_A

Now I am thinking what mini project could I play around with and which piece of hardware should I base it on. I don’t know much about the two platforms yet but I have found a blog post that introduces the two. My current thoughts are to start with the Raspberry Pi, it is a UK technology and it uses a linux OS (which I have some knowledge of).

Being a windows developer, most of my programming knowledge is with C# and Visual Studio. To use my existing knowledge I could install and use MONO, which means I can program the Raspberry Pi using C# (see here for more details about MONO on Raspberry Pi).

But deciding on a language to use, doesn’t help me choose a project. I haven’t even got myself a Raspberry Pi yet so I may decide more once I have had a play around with it. Thoughts so far include getting wi-fi to work on the Raspberry Pi or maybe adding a camera and sticking it somewhere and taking pictures, maybe even build myself a baby monitor (might go down well with the wife if its baby related)