Archive for July, 2008
How to Write 3v1L, Untestable Code
2008-07-25 19:51:20
I always love a good laugh and this one is great. The developers and testers at Google have put up a great "How to Write 3v1L, Untestable Code" article with tongue in cheek and enough sarcasm to really tickle your thought processes. In reality is a list of things not to do as a developer. I love the reverse style delivery. You can find the complete post here: Google Testing Blog (http://googletesting.blogspot.com/2008/07/how-to-write-3v1l-untestable-code.html).
Posted by Leeland
0 CommentsPuTTY SSH + default pointer + rdesktop = where is my mouse?
2008-07-17 13:02:05
I work on a beefy Linux box with multiple desktops & monitors. I also have a windows laptop to do office junk and some testing. If my computers are side by side things are pretty sweet and I use Synergyc / Synergy2 (http://synergy2.sourceforge.net/) to make all my monitors flow together.
But, I also have another beefy Linux development box in a shared team space where again I have multiple desktops & monitors. No problem I just use rdesktop (http://www.rdesktop.org/)to make one of the monitors turn into my windows screen. All is fine in the world.
Until I need to use SSH from my windows box (it has access to some things that are not on the Linux network). When I run PuTTY (a window ssh client) through an rdesktop connection my mouse pointer turns from the nice white arrow I use to a black I inside my PuTTY windows. Normally not a big deal, except that I prefer color schemes which have near black, or very dark backgrounds, essentially rendering the mouse pointer invisible. So to find it I have to move it around a lot or selection some text to find it.
Wasn't sure if this was because of rdesktop graphic handling or something else. But I was pretty sure it was related since when directly on the Windows box the I-beam pointer turned white. So it had something to do with the interactions of PuTTY and rdesktop.
Naturally this eventually drove me nuts. (Officially this happened about 20 minutes before I wrote this. I wanted to paste some shell script stuff into a PuTTY session and it went... well never mind it was bad.) So annoyance became a real menace that demanded to be crushed under the totalitarian control of my domains. I alone will decide the fate of the bits in my systems. And this was a challenge to my authority.
A little poking at the mouse settings fixed. It a little more research into why it happened explained it. Turns out PuTTY uses "Text Select" pointer for all things within its borders. But it does set some internal color bits on the pointer when it does this. This is not a bug, just a surprising interaction for which there is no real way for PuTTY to know what it should do. The solution is to alter the "Text Select" pointer (Control Panel->Mouse->Pointers->Text Select) to a bit-map image, problem solved. There are actually a number of already provided images for this all called beam_XX.cur, I chose beam_rm.cur as it was nice and thick and had a white outline built in. Problem solved, order restored and I can see my mouse pointer in PuTTY when working via rdesktop.
But, I also have another beefy Linux development box in a shared team space where again I have multiple desktops & monitors. No problem I just use rdesktop (http://www.rdesktop.org/)to make one of the monitors turn into my windows screen. All is fine in the world.
Until I need to use SSH from my windows box (it has access to some things that are not on the Linux network). When I run PuTTY (a window ssh client) through an rdesktop connection my mouse pointer turns from the nice white arrow I use to a black I inside my PuTTY windows. Normally not a big deal, except that I prefer color schemes which have near black, or very dark backgrounds, essentially rendering the mouse pointer invisible. So to find it I have to move it around a lot or selection some text to find it.
Wasn't sure if this was because of rdesktop graphic handling or something else. But I was pretty sure it was related since when directly on the Windows box the I-beam pointer turned white. So it had something to do with the interactions of PuTTY and rdesktop.
Naturally this eventually drove me nuts. (Officially this happened about 20 minutes before I wrote this. I wanted to paste some shell script stuff into a PuTTY session and it went... well never mind it was bad.) So annoyance became a real menace that demanded to be crushed under the totalitarian control of my domains. I alone will decide the fate of the bits in my systems. And this was a challenge to my authority.
A little poking at the mouse settings fixed. It a little more research into why it happened explained it. Turns out PuTTY uses "Text Select" pointer for all things within its borders. But it does set some internal color bits on the pointer when it does this. This is not a bug, just a surprising interaction for which there is no real way for PuTTY to know what it should do. The solution is to alter the "Text Select" pointer (Control Panel->Mouse->Pointers->Text Select) to a bit-map image, problem solved. There are actually a number of already provided images for this all called beam_XX.cur, I chose beam_rm.cur as it was nice and thick and had a white outline built in. Problem solved, order restored and I can see my mouse pointer in PuTTY when working via rdesktop.
Posted by Leeland
0 CommentsShooting Fireworks by Hacking My Camera
2008-07-05 01:44:35
Well 2 days of preparation and a lot of reading really paid off. The last few years I have not been very happy with my photographic results from events like the 4th of July shows. So this year I decided instead of being a rank amateur I would try and figure it out.
I do not have an expensive digital camera, it is a Canon A630 Powershot. But, I have figured out how to take enough good pictures that I am actually happy with it. I went through about 12 digital cameras since 1985 and until I bought this one I ended up giving them away to friends because I was so upset with performance I couldn't stand to look at the things. I was very happy taking pictures with my 1985 Canon Sureshot 35mm and I took fabulous almost professional quality pictures with that little work horse. Nighttime photos are just terrible. So what was I doing wrong?
Then I ran across the LifeHacker (http://lifehacker.com/387380/turn-your-point+and+shoot-into-a-super+camera)article on CHDK a bios replacement OS for digital cameras. After reading the article I decided to try it.
Then I read almost every page I could Google on CHDK, motion capture with CHDK and lightning capture with CHDK.
Armed with a lot of ideas, no notes (why I do not know) and a vague idea of what the aperture setting was about I played around and finally settled on the CHDK script Motion/Lightning-Detect for Canon A640 by Johan Van Barel http://chdk.wikia.com/wiki/UBASIC/Scripts/CanonA640:_Motion%2BLightning_Detect.
So in a 30 minute show using threshold=10, interval=5ms, delay=5, and blocksize=6 I took about 180 pictures with a manual focus set to infinity, a shutter time of 1 second and the default aperture and using the custom driver speed of taking 2 pictures every time the shutter is called. End results, WOW I am very, very happy with the results.
Here are some samples:
Pretty cool since I set it up, pushed the button and sat down. The camera sat there for more then 30 minutes before the show started and it took the pictures all by itself the whole show. All I did was sit back and enjoy. This is the way I like it. Let the computers do the work of recording and let me enjoy my life.
I do not have an expensive digital camera, it is a Canon A630 Powershot. But, I have figured out how to take enough good pictures that I am actually happy with it. I went through about 12 digital cameras since 1985 and until I bought this one I ended up giving them away to friends because I was so upset with performance I couldn't stand to look at the things. I was very happy taking pictures with my 1985 Canon Sureshot 35mm and I took fabulous almost professional quality pictures with that little work horse. Nighttime photos are just terrible. So what was I doing wrong?
Then I ran across the LifeHacker (http://lifehacker.com/387380/turn-your-point+and+shoot-into-a-super+camera)article on CHDK a bios replacement OS for digital cameras. After reading the article I decided to try it.
Then I read almost every page I could Google on CHDK, motion capture with CHDK and lightning capture with CHDK.
Armed with a lot of ideas, no notes (why I do not know) and a vague idea of what the aperture setting was about I played around and finally settled on the CHDK script Motion/Lightning-Detect for Canon A640 by Johan Van Barel http://chdk.wikia.com/wiki/UBASIC/Scripts/CanonA640:_Motion%2BLightning_Detect.
So in a 30 minute show using threshold=10, interval=5ms, delay=5, and blocksize=6 I took about 180 pictures with a manual focus set to infinity, a shutter time of 1 second and the default aperture and using the custom driver speed of taking 2 pictures every time the shutter is called. End results, WOW I am very, very happy with the results.
Here are some samples:
Pretty cool since I set it up, pushed the button and sat down. The camera sat there for more then 30 minutes before the show started and it took the pictures all by itself the whole show. All I did was sit back and enjoy. This is the way I like it. Let the computers do the work of recording and let me enjoy my life.
Posted by Leeland
0 CommentsPage 1
Archive
- July, 2010 1 posts.
- June, 2009 1 posts.
- May, 2009 1 posts.
- January, 2009 1 posts.
- December, 2008 1 posts.
- October, 2008 2 posts.
- August, 2008 5 posts.
- July, 2008 3 posts.
- June, 2008 9 posts.
- May, 2008 1 posts.
- November, 2007 1 posts.
- October, 2005 1 posts.

