I went to the corner internet cafe to have a map printed. The map was a .ppt and when I saved it to the USB disk the .ppt became a .swf. I didn't know this, and at the cafe they couldn't open it, so I went back home to save it as a graphic. I was in a rush, so I just took a screen shot of gmail, saved it as a .png and brought it back to the cafe.
When I saved the .png back to the USB flash drive I saw that there was an autorun.inf file in there. Clearly I'd been infected by a virus. I went ahead and worked with the USB drive though since I don't care about windows viruses. I *could* get infected through wine, I guess, but I don't have that configured to autorun anything from devices. I don't even know if it *can* be configured to autorun programs and installers from removable devices.
The map got printed and the party was great fun.
I don't care too much about viruses since I don't use windows and am probably fairly immune. The thing to take away from this though is that windows viruses are everywhere. even if the windows user is 100% up-to-date with his/her antivirus definitions and runs two or three anti-virus programs (thus slowing down the computer by a LOT, buy twice or thrice the computer you'll really need if you want to run windows and antivirus) and practices safe computing practices, virus infection is probably inevitable (if only because, at some point, you're going to receive a real work related document from someone who isn't as virus safe as you, and they got hit by a zero-day virus and passed it on to you on the same day).
It's probably possible to go a year or two without virus infection by practicing ultra-safe windows computing. But everyone will get infected at some point. Ultra-safe windows computing is a pain too (never open attachments from anyone, never use removable media, never run as root, never go online to the internet, or if you do, never run flash, activex, java, javascript, don't run IE) and regular users just won't do it. Only geeks can be really safe from viruses, and even they are likely to weaken windows security because it's just too inconvenient. Oh yeah, don't visit pr0n sites, don't download and install free programs, etc.
Windows. What. A. Pain.
Thursday, January 24, 2008
Friday, January 18, 2008
Rude Poisoned Well
My wife, son and I are going to New Zealand in a few weeks. We applied for Work-to-Residence as Skilled migrants, were accepted and are on our way.
My wife, as principal applicant will work, while I, as burned out office worker, will take care of house and home. I am very liberated, but also trepidated :-).
We've got a program of sending out one work application per day while we wait for departure day (or, as ian sison would say, deportation day :-). Today sol sent out an application with a painstakingly crafted cover letter which got a rude reply to read the job specification, NZ residents only.
Either the employer didn't read to the end of the cover letter where it says that we're allowed to work in NZ (and just sent out a one sentence, accurate but rude reply), doesn't think that WTR matters because he means *currently*in*new*zealand*right*now*, or possibly is reacting rudely because the well has been poisoned by too many non-NZ applications who want the employer to work out their work visas.
It could be any of those, or any combination of those factors. In any case I'm glad that this was one of the jobs that I'm not enthusiastic about. We won't mind if the employer sticks by his guns and won't talk to us anymore since I doubt that my wife would actually want to work with anyone so rude. His loss too, my wife is an excellent developer with 15 years of software development experience in 4 languages.
My wife, as principal applicant will work, while I, as burned out office worker, will take care of house and home. I am very liberated, but also trepidated :-).
We've got a program of sending out one work application per day while we wait for departure day (or, as ian sison would say, deportation day :-). Today sol sent out an application with a painstakingly crafted cover letter which got a rude reply to read the job specification, NZ residents only.
Either the employer didn't read to the end of the cover letter where it says that we're allowed to work in NZ (and just sent out a one sentence, accurate but rude reply), doesn't think that WTR matters because he means *currently*in*new*zealand*right*now*, or possibly is reacting rudely because the well has been poisoned by too many non-NZ applications who want the employer to work out their work visas.
It could be any of those, or any combination of those factors. In any case I'm glad that this was one of the jobs that I'm not enthusiastic about. We won't mind if the employer sticks by his guns and won't talk to us anymore since I doubt that my wife would actually want to work with anyone so rude. His loss too, my wife is an excellent developer with 15 years of software development experience in 4 languages.
Wednesday, January 16, 2008
exploding gifs
I saw If WWII had been played in Age of Empires... on Reddit. That gif needs to be exploded into its individual frames. It slows down my computer something awful, and some parts of it run fast enough that I can't quite keep up (much like Age Of Empires, actually :-).
Some googling pointed me at GifSplitter (I've lost the link, and I don't care to link to it anyway). It's windows software, so I tried to get it to work with wine. It needs the vb6 runtime. I downloaded that, and it failed on some unimplemented OLE API function.
fixme:ole:OLEPictureImpl_SaveAsFile (0x144da8)->(0xa60be4, 1, (nil)), hacked stub.
A bit more googling pointed me at gifsicle. A quick sudo apt-get install gifsicle later and I was able to do:
gifsicle -e ghg.gif
which gave me the individual frames as ghg.gif_###, and another quick bash for loop later and I have the individual frames now. Next I need to actually do something with them, like put them into a powerpoint file or similar :-). Yeah, OpenOffice Impress is the RIGHT file format for this, but I bow to reality here. Maybe 1/3 of the people I email the file to will be able to read Impress, the others need an MS-Office compatible file. Reality sucks.
Some googling pointed me at GifSplitter (I've lost the link, and I don't care to link to it anyway). It's windows software, so I tried to get it to work with wine. It needs the vb6 runtime. I downloaded that, and it failed on some unimplemented OLE API function.
fixme:ole:OLEPictureImpl_SaveAsFile (0x144da8)->(0xa60be4, 1, (nil)), hacked stub.
A bit more googling pointed me at gifsicle. A quick sudo apt-get install gifsicle later and I was able to do:
gifsicle -e ghg.gif
which gave me the individual frames as ghg.gif_###, and another quick bash for loop later and I have the individual frames now. Next I need to actually do something with them, like put them into a powerpoint file or similar :-). Yeah, OpenOffice Impress is the RIGHT file format for this, but I bow to reality here. Maybe 1/3 of the people I email the file to will be able to read Impress, the others need an MS-Office compatible file. Reality sucks.
Monday, January 14, 2008
VB.Net uninstall
Despite using Linux for almost everything I do, I don't hold to any particular tech religion. I'm tech agnostic. So I don't see anything particularly wrogn with using FREE closed-source software.
I installed VB.Net Express Edition on a (legal) windows installation a few weeks ago. I've been trying to uninstall it today. Twice now. Both times I've given up because the uninstall starts but blocks at a certain point. I'm running it for the third time now and it's blocked again. I'm probably going to have to blow that Windows installation away and reinstall.
This reminds me of why I use Linux almost all the time.
I just wanted to learn C# and test it in Mono and and in Windows. But of course, the windows side is crepe. I haven't stressed the linux side enough yet to see what the quality is like there.
Follow-up. OK, the VB.Net uninstall never finished. I think I'll first try to repair the installation and then uninstall it. If that doesn't work, then I'll reinstall VB.Net Express and try to uninstall *THAT*. If that still doesn't work, then it's time to euthanize windows and reinstall everything from scratch.
I installed VB.Net Express Edition on a (legal) windows installation a few weeks ago. I've been trying to uninstall it today. Twice now. Both times I've given up because the uninstall starts but blocks at a certain point. I'm running it for the third time now and it's blocked again. I'm probably going to have to blow that Windows installation away and reinstall.
This reminds me of why I use Linux almost all the time.
I just wanted to learn C# and test it in Mono and and in Windows. But of course, the windows side is crepe. I haven't stressed the linux side enough yet to see what the quality is like there.
Follow-up. OK, the VB.Net uninstall never finished. I think I'll first try to repair the installation and then uninstall it. If that doesn't work, then I'll reinstall VB.Net Express and try to uninstall *THAT*. If that still doesn't work, then it's time to euthanize windows and reinstall everything from scratch.
Thursday, January 10, 2008
Bandwidth
I'm with Orly on Bandwidth. He's on Globe, but I get similar quality with my entry-level PLDT-DSL account. Last night I downloaded the CentOS 5 DVD. That finished overnight. Today I'm downloading opensolaris, one the developer edition installer itself, and one the pre-built vmware image. Those will finish by tomorrow (unless Sun's bandwidth gets flaky, as it did when I downloaded a previous opensolaris DVD installer). Or maybe that was PLDT, I don't think it was though, I was downloading from other sources at the time and they were'nt slow.
But, yeah, it's great that for a relatively low price (much less than unlimited dialup cost just 3 years or so ago, in Cagayan de Oro, anyway) I can download DVD ISOs overnight. I remember downloading linux CD ISOs over a week and a half (on dialup though).
My family and I are going to New Zealand. Apparently, the low end residential broadband offerings there have monthly bandwidth caps (which are less than a single DVD ISO) and once the cap is hit, either the subscriber pays per extra GB or bandwidth drops to 64kbps (or so). That's fine most of the time, but when I need to download legitimate software it's going to be a problem. I'll download everything I'll need between now and when I leave so that I can minimize the number of times I'll hit my bandwidth cap :-).
But, yeah, it's great that for a relatively low price (much less than unlimited dialup cost just 3 years or so ago, in Cagayan de Oro, anyway) I can download DVD ISOs overnight. I remember downloading linux CD ISOs over a week and a half (on dialup though).
My family and I are going to New Zealand. Apparently, the low end residential broadband offerings there have monthly bandwidth caps (which are less than a single DVD ISO) and once the cap is hit, either the subscriber pays per extra GB or bandwidth drops to 64kbps (or so). That's fine most of the time, but when I need to download legitimate software it's going to be a problem. I'll download everything I'll need between now and when I leave so that I can minimize the number of times I'll hit my bandwidth cap :-).
Saturday, December 22, 2007
Not about Windows+HP
So a bug in HP's software update, ahh, software for HP laptops allows malware to brick windows. It's not like I care. We recently bought an HP Pavilion for my wife and I installed Kubuntu on it. So we're safe from this sort of stupidity. It was pretty cool. We kept the (legal) windows on it for possible future use (we never actually use it, I always just nuke the windows partition and use it for extra storage, but I never learn). I had to uninstall a whole bunch of useless programs that come pre-installed with the laptop though. And, strangely enough, the time to uninstall those programs was LONGER than the time to resize the partition and install Kubuntu in the newly available free space.
I didn't backup the windows partition since I didn't really care if it got corrupted. The Kubuntu installer handled the partition resizing perfectly though. Windows still boots and Kubuntu works perfectly. I didn't need to configure anything (although, frankly I haven't tried out the firewire port yet, since I don't have any firewire devices :-), everything just worked.
If windows users keep getting victimized by malware like this (that exploits bugs in legitimate software) or just generally by malware (illegal downloading of programs that have viruses and such in them), well, I think those windows users should be punished continuously (just by continuing to use their windows boxen and living with the pain and malware that comes with that) until they learn better. Or not, I don't particularly care.
I didn't backup the windows partition since I didn't really care if it got corrupted. The Kubuntu installer handled the partition resizing perfectly though. Windows still boots and Kubuntu works perfectly. I didn't need to configure anything (although, frankly I haven't tried out the firewire port yet, since I don't have any firewire devices :-), everything just worked.
If windows users keep getting victimized by malware like this (that exploits bugs in legitimate software) or just generally by malware (illegal downloading of programs that have viruses and such in them), well, I think those windows users should be punished continuously (just by continuing to use their windows boxen and living with the pain and malware that comes with that) until they learn better. Or not, I don't particularly care.
Tuesday, December 18, 2007
Woohoo!
I've had an HP laptop burning a hole in my bedroom floor for a month or so. My brother sends laptops over from the U.S. and I try to sell them for him. Sol and I (mainly I) wanted this laptop for ourselves though. I've been trying to sell my laptop for cheap (PHP 22K) so I could get the HP. That didn't go over very well (since my laptop *definitely* looks used, although it's still a perfectly good laptop). So I gave up on trying to sell mine and switched to trying to sell my wife's IBM thinkpad. This is a single core Pentium M (1.7Ghz) with 1GB of RAM and a DVD writer. It's not very old, but it's certainly not new either (it's an actual *IBM*, not Lenovo).
It was QSR's Christmas lunch last Sunday and I offered the thinkpad to one of the QSR longtimers. She was happy to grab the thinkpad at the special pricing :-). In celebration I'll be installing Ubuntu on the HP tonight. The HP is widescreen, has altec lansing speakers, and has a very nice remote control for controlling DVDs and music player. It's too bad that we won't be able to use the remote once it's Ubuntu. Ah well, maybe we'll keep Windows on a very small partition and dual boot just for viewing DVDs and playing music. Oh yeah, I'd have had Ubuntu installed by now, but I realized that I didn't have a copy of Gutsy Kubuntu (my wife prefers KDE). So I downloaded via torrent. The CD is written, but now I have to get my donkey to work, so the Ubuntu installfest will have to wait til I get home.
It'd be nice for *me* to use the HP laptop. I could probably use the 2 cores in there. But it's lighter than *my* laptop, so I'll stick with my single core 1.5Ghz CPU and Sol can enjoy the lighter weight of the HP :-). I'll put those CPUs through their paces at night though :-), mainly re-encoding Timmy videos so that they're smaller.
It was QSR's Christmas lunch last Sunday and I offered the thinkpad to one of the QSR longtimers. She was happy to grab the thinkpad at the special pricing :-). In celebration I'll be installing Ubuntu on the HP tonight. The HP is widescreen, has altec lansing speakers, and has a very nice remote control for controlling DVDs and music player. It's too bad that we won't be able to use the remote once it's Ubuntu. Ah well, maybe we'll keep Windows on a very small partition and dual boot just for viewing DVDs and playing music. Oh yeah, I'd have had Ubuntu installed by now, but I realized that I didn't have a copy of Gutsy Kubuntu (my wife prefers KDE). So I downloaded via torrent. The CD is written, but now I have to get my donkey to work, so the Ubuntu installfest will have to wait til I get home.
It'd be nice for *me* to use the HP laptop. I could probably use the 2 cores in there. But it's lighter than *my* laptop, so I'll stick with my single core 1.5Ghz CPU and Sol can enjoy the lighter weight of the HP :-). I'll put those CPUs through their paces at night though :-), mainly re-encoding Timmy videos so that they're smaller.
Friday, December 14, 2007
Transition
I gave my current company about 1.25 to 1.5 years notice and the 1.5 years is up next week. The notice was that long since the reason I'm leaving is that my wife and I are immigrating to New Zealand. The process took that long. It could have taken less, but there were some complications having to do with my health records, and anyway, I enjoy my job enough that I've been dragging out the immigration process as long as possible.
The 13th month pay was a factor too, and my commitment to work through to the end of the year.
As it happens, I'm leaving on 21Dec, but nothing gets done after that anyway, till the end of the year :-).
I've been documenting into an internal wiki. There's not enough documentation yet, I figure I'm going to have to continue writing documentation for free for about 2 more months (but at a more leisurely pace). I'll do that if I retain my vpn access. I won't though if they revoke the VPN access (hard to write on a wiki if you're not online to the wiki itself).
Today I stopped my fetchmail job running on my desktop. My desktop at work has postfix and courier-imap running on it. And I had fetchmail downloading my email from gmail and pushing it to local postfix so I could grab it from my laptop. That won't be around for me anymore after the 21st though, so it's time to switch to downloading email from gmail directly. Or, more likely, installing courier-imap on my laptop so that I don't have to have evolution up and running all the time (and I can be more flexible, using procmail for some things, for instance).
One of the reasons I had that courier-imap setup at work was so that I'd have *three* copies of my email. One on gmail, one on my laptop, and I had a .forward to another local account on my work computer for backup. I don't think I'll have that .forward on my laptop though. My email is in multiple gigabytes now and I don't think I actually need *3* copies :-). Although, come to think on it, I actually had *4* copies and now I'll have 3, since I also regularly backup my email (among other things) to an external USB hard drive, and I have *versions*, since I use rdiff-backup :-).
I'm going to have to work with the sysad team too, so that all the cron jobs that I have running on one or another of the servers at work (including some on my desktop) are migrated to the official servers.
The 13th month pay was a factor too, and my commitment to work through to the end of the year.
As it happens, I'm leaving on 21Dec, but nothing gets done after that anyway, till the end of the year :-).
I've been documenting into an internal wiki. There's not enough documentation yet, I figure I'm going to have to continue writing documentation for free for about 2 more months (but at a more leisurely pace). I'll do that if I retain my vpn access. I won't though if they revoke the VPN access (hard to write on a wiki if you're not online to the wiki itself).
Today I stopped my fetchmail job running on my desktop. My desktop at work has postfix and courier-imap running on it. And I had fetchmail downloading my email from gmail and pushing it to local postfix so I could grab it from my laptop. That won't be around for me anymore after the 21st though, so it's time to switch to downloading email from gmail directly. Or, more likely, installing courier-imap on my laptop so that I don't have to have evolution up and running all the time (and I can be more flexible, using procmail for some things, for instance).
One of the reasons I had that courier-imap setup at work was so that I'd have *three* copies of my email. One on gmail, one on my laptop, and I had a .forward to another local account on my work computer for backup. I don't think I'll have that .forward on my laptop though. My email is in multiple gigabytes now and I don't think I actually need *3* copies :-). Although, come to think on it, I actually had *4* copies and now I'll have 3, since I also regularly backup my email (among other things) to an external USB hard drive, and I have *versions*, since I use rdiff-backup :-).
I'm going to have to work with the sysad team too, so that all the cron jobs that I have running on one or another of the servers at work (including some on my desktop) are migrated to the official servers.
Saturday, December 08, 2007
Gutsy dist-upgrade again - slow
My wife has finally finished (well, officially, of course there'll be support calls for a month or so) a lucrative software development project that is funding our immigration to New Zealand. She uses Kubuntu and she's at Feisty. I'd delayed upgrading her laptop so that there'd be no delays with her project.
With the project done, I've started the Gutsy upgrade. There's a bug with the Feisty restricted updates packages list. It's supposed to be .gz, but surfing to it shows that it's actually just a text file. so the first stage of the dist-upgrade fails because gzip tried to decompress the file and failed.
I didn't want to fight it, so I just removed restricted from apt-get/sources.list and restarted the dist-upgrade.
It then said that / was too small. So I cleared out /var/log/messages and since that didn't help enough, I also moved /usr/share to /home and linked /home/usr-share to /usr/share. Standard trick when I underestimate how large / should be :-). I'll move it back later when the dist-upgrade is done.
That's going to be *MUCH* later though. The packages are downloading, but at a glacial 11-20 kiloBITS per second. I'll crash now. A few hours after I wake up the downloads should be done and the upgrade can continue.
I've been sick today but I'm excited about finally upgrading her laptop, which is why I'm sitting t her computer right now, close to midnight. I'd wanted to install xdebug and protoeditor a few days ago but again, in the interest of stability, held off. When the upgrade is done, I'll install protoeditor and she'll finally be able to debug PHP programs in linux. *THAT's* really what I've been excited about. The upgrade is just a logical forward step to take before I get to install the debugger.
Protoeditor still has some bugs (mainly involving displaying some array entries). It's already very useful though. Just the ability to animate the flow of execution is a big deal (e.g., for figuring out incredibly bad legacy code, or incredibly good but complex code I wrote but don't understand anymore :-). Finding bugs is great too :-).
With the project done, I've started the Gutsy upgrade. There's a bug with the Feisty restricted updates packages list. It's supposed to be .gz, but surfing to it shows that it's actually just a text file. so the first stage of the dist-upgrade fails because gzip tried to decompress the file and failed.
I didn't want to fight it, so I just removed restricted from apt-get/sources.list and restarted the dist-upgrade.
It then said that / was too small. So I cleared out /var/log/messages and since that didn't help enough, I also moved /usr/share to /home and linked /home/usr-share to /usr/share. Standard trick when I underestimate how large / should be :-). I'll move it back later when the dist-upgrade is done.
That's going to be *MUCH* later though. The packages are downloading, but at a glacial 11-20 kiloBITS per second. I'll crash now. A few hours after I wake up the downloads should be done and the upgrade can continue.
I've been sick today but I'm excited about finally upgrading her laptop, which is why I'm sitting t her computer right now, close to midnight. I'd wanted to install xdebug and protoeditor a few days ago but again, in the interest of stability, held off. When the upgrade is done, I'll install protoeditor and she'll finally be able to debug PHP programs in linux. *THAT's* really what I've been excited about. The upgrade is just a logical forward step to take before I get to install the debugger.
Protoeditor still has some bugs (mainly involving displaying some array entries). It's already very useful though. Just the ability to animate the flow of execution is a big deal (e.g., for figuring out incredibly bad legacy code, or incredibly good but complex code I wrote but don't understand anymore :-). Finding bugs is great too :-).
Friday, November 30, 2007
php debugger finally
I've been looking around for free php debuggers. I never did get $DAYJOB to spring for nuedit phpED (and anyway, I couldn't get the demo to work when I downloaded and tried it). I've been struggling with Dmitri's DBG for a long time. Sometimes I'd get it working and sometimes not. Lately I had it pretty stable, but I never actually wanted to work with the command line debugger client since it was so ugly, not even being as nice as gdb, for instance.
I got xdebug working but didn't like the command line client. There are a lot of options though for clients. I could only test free clients though. I tried two windows clients under wine. Neither worked and I didn't care enough to work very hard at them.
Xdebug support is supposed to be in the PHP Development Tools but after trying that out for two hours or so last night (much of that time spent downloading eclipse, once from ubuntu, and once from PDT), I gave up and went to bed. I couldn't get the debugger to talk to the spawned command line program, or to a web program. I think that was mainly a failure of documentation though. It looks like a great plugin to eclipse, but I couldn't figure out how to make things work because I couldn't find any clear documentation (it may be there anyway, I just can't find it).
Timmy woke up early and I got him to sleep at 2:20AM. I went downstairs (the other hour of eclipse work) and, in between resizing videos I installed protoeditor. This was an install from source. I had to install a bunch of libraries it needed, but finally I got it compiled and running and actually stepping through a program (running under apache, and also under the command line).
This has got me sufficiently excited that I'm totally stressing my bandwidth at home and at work because I'm installing required packages on a centos 4.x vmware image at home and on my feisty box at work. Both downloads are going slow and are downloading huge numbers of packages. Ah well. I wouldn't install on the VM except I work with a team who all use a similar VM, so I need to be able to tell them how to install protoeditor on their VMs. They could install it on their host distros, but then they'd be on their own with that. Damn, I'm just at the initial yum update on the centos 4.x VM and it's downloading 95 packages!
Packages I needed to install (may not be complete since I've also previously manually installed a whole bunch of other software on this box, so it's not a virgin gutsy install anymore):
OK. I just installed that on my computer at work to see if protoeditor would ./configure. It is now. I'll test if protoeditor is really working tomorrow. I could test now, but I don't like running X applications remotely over my VPN :-).
It works great locally on my laptop though.
I got xdebug working but didn't like the command line client. There are a lot of options though for clients. I could only test free clients though. I tried two windows clients under wine. Neither worked and I didn't care enough to work very hard at them.
Xdebug support is supposed to be in the PHP Development Tools but after trying that out for two hours or so last night (much of that time spent downloading eclipse, once from ubuntu, and once from PDT), I gave up and went to bed. I couldn't get the debugger to talk to the spawned command line program, or to a web program. I think that was mainly a failure of documentation though. It looks like a great plugin to eclipse, but I couldn't figure out how to make things work because I couldn't find any clear documentation (it may be there anyway, I just can't find it).
Timmy woke up early and I got him to sleep at 2:20AM. I went downstairs (the other hour of eclipse work) and, in between resizing videos I installed protoeditor. This was an install from source. I had to install a bunch of libraries it needed, but finally I got it compiled and running and actually stepping through a program (running under apache, and also under the command line).
This has got me sufficiently excited that I'm totally stressing my bandwidth at home and at work because I'm installing required packages on a centos 4.x vmware image at home and on my feisty box at work. Both downloads are going slow and are downloading huge numbers of packages. Ah well. I wouldn't install on the VM except I work with a team who all use a similar VM, so I need to be able to tell them how to install protoeditor on their VMs. They could install it on their host distros, but then they'd be on their own with that. Damn, I'm just at the initial yum update on the centos 4.x VM and it's downloading 95 packages!
Packages I needed to install (may not be complete since I've also previously manually installed a whole bunch of other software on this box, so it's not a virgin gutsy install anymore):
- xlibs-dev
- libqt3-headers
- libqt3-mt
- libqt3-mt-dev (not sure if really needed, I installed it anyway)
- kde-devel (which pulls in a boatload of stuff)
OK. I just installed that on my computer at work to see if protoeditor would ./configure. It is now. I'll test if protoeditor is really working tomorrow. I could test now, but I don't like running X applications remotely over my VPN :-).
It works great locally on my laptop though.
Sunday, November 25, 2007
Don't use Union unless you know what you're doing
I got bitten by a little insect I didn't know about, the other day. I'd written a family of views to simplify something horribly complex. Except in the penultimate view I had used UNION instead of UNION ALL.
I *HAD* too read the postgresql documentation on SELECT which clearly states that:
But clearly I hadn't internalized it and continued preferring UNION because it was one word instead of two :-).
The bug report set me straight though. Now I will *definitely* remember the difference between UNION and UNION ALL (in that UNION folds duplicate rows into just one).
I *HAD* too read the postgresql documentation on SELECT which clearly states that:
The result of UNION does not contain any duplicate rows unless the ALL option is specified. ALL prevents elimination of duplicates. (Therefore, UNION ALL is usually significantly quicker than UNION; use ALL when you can.).
But clearly I hadn't internalized it and continued preferring UNION because it was one word instead of two :-).
The bug report set me straight though. Now I will *definitely* remember the difference between UNION and UNION ALL (in that UNION folds duplicate rows into just one).
Monday, November 12, 2007
Vista dialup plus winmodem -- can't help
A very good friend of mine bought a new computer. The new PC has Home Vista Basic on it. It works well enough for most things (that I try, anyway). There was some confusion with printer permissions for her children (she's the only administrator). I sorted that out a few weeks ago. Now she's complaining because there's a problem with the winmodem. I actually tested this a few days ago and, if I dialup to her (prepaid) ISP after a reboot, it works. I stay online for hours. But when I disconnect and try to dialup again it always fails. Diagnostics is useless (all it says is that the connection failed).
Rebooting fixes things. Just reboot, and I'll be able to connect again reliably. Unfortunately, after disconnecting, dialing up never works again until the next reboot.
I'm not able to help her because, much as I'd love to switch her to Ubuntu, I have never had any success with winmodems on linux and I'm not going to give her my US Robotics USB modem (if I could find it).
I guess she's just going to have to reboot between dialup connections to her ISP. It's the price to pay for going with windows. I'm sure things would go better with windows XP. Maybe I'll have her go back to where she bought her PC and get them to downgrade her to XP from Vista.
Microsoft, a whole bunch of bastards who force a pregnant woman to go to her PC store so they'll tell her they can't downgrade her to XP.
Rebooting fixes things. Just reboot, and I'll be able to connect again reliably. Unfortunately, after disconnecting, dialing up never works again until the next reboot.
I'm not able to help her because, much as I'd love to switch her to Ubuntu, I have never had any success with winmodems on linux and I'm not going to give her my US Robotics USB modem (if I could find it).
I guess she's just going to have to reboot between dialup connections to her ISP. It's the price to pay for going with windows. I'm sure things would go better with windows XP. Maybe I'll have her go back to where she bought her PC and get them to downgrade her to XP from Vista.
Microsoft, a whole bunch of bastards who force a pregnant woman to go to her PC store so they'll tell her they can't downgrade her to XP.
Wednesday, November 07, 2007
Catching up
The last 4 weeks or so have been hectic.
Things are getting back to normal though. Mainly because of the Nanny and hospital issues, I stopped reading email for a while. I just sped through my work email. Fortunately I'm caught up there. Now I need to get caught up on my tasks. That's going to be more hecticity for another week or two.
- Timmy's nanny had to go home to the province and then wasn't allowed to come back by her husband.
- Timmy got sick and we had to spend a work week in the hospital,
- I got to work but had to catch up on a lot of things (still not caught up),
- Preparations for Timmy's birthday, the actual birthday and then a long weekend (spent with family, so not much work got done)
Things are getting back to normal though. Mainly because of the Nanny and hospital issues, I stopped reading email for a while. I just sped through my work email. Fortunately I'm caught up there. Now I need to get caught up on my tasks. That's going to be more hecticity for another week or two.
Monday, November 05, 2007
Gutsy dist-upgrade
I waited a few weeks before upgrading to Ubuntu Gutsy Gibbon because I've always had trouble with Ubuntu dist-upgrades and I wanted to get past some milestones first (Timmy's birthday, for one) before trying to upgrade and possibly ending up with a broken system that I'd have to spend a day or more fixing.
I've never had success with any Ubuntu online distro upgrade, and I've been trying it since Dapper. Twice I've broken my system sufficiently badly that I had to reinstall from CD (I could probably have fixed it, but I'm not all that familiar with dpkg or grub, and both times I had problem with one or both of those subsystems).
I'm pretty sure that those failed online upgrades were my fault. I install packages from multiverse, universe and some lesser known repositories. I also will sometimes monkey with files that the packages require to exist or be in one or another format. In any case, I'd done some similar monkeying with Feisty, so I wasn't confident that the distro upgrade would work flawlessly.
I finally made the plunge last night after a marathon of converting images (renaming more logically/usefully, at my wife's request), videos (converting in kino to divx so that they're 1/4 to 1/6 original size), and backing up everything (rdiff-backup to my external hard drive, and the images and videos to my wife's external hard drive and laptop, because losing timmmy's pictures and videos is inconceivable).
As usual, I didn't get a flawless upgrade. Fortunately, however, this time there was just one major problem. Initially there was a weird minor issue when the distro upgrade seemed stuck. I did an strace on the process and noticed that it seemed to be in a loop working on the linux kernel image. So I killed that and after a
dpkg --configure -a
restarted the distro upgrade. It worked better after that, asking me what to do about config files that I'd manually modified. For some questions I kept my changes (always after viewing a diff of the config files), others I allowed the distro to replace my changes.
Again, though, the distro upgrade failed. This time on an openoffice.org package that involved mobile devices (not sure how I got that installed, probably with the openoffice.org evolution integration package). That was bad enough that I had to dpkg --configure -a again, and then remove all the openoffice.org packages so that the upgrade could continue.
I had to go to bed after some pressure from my wife, and then a 30 minute brownout almost broke the install. After more pressure from my wife (including her turning off and unplugging my laptop :-), I finally went to bed and restarted the distro upgrade in the morning. Fortunately, everything worked fine after that and I've got a usable Gutsy system now.
There is one problem though. Firefox 2.0.0.8 (even with all add-ons removed) crashes randomly on some sites, and consistently (as in EVERY SINGLE TIME) on blogger. Which is why I'm posting this using epiphany. I was going to use Opera, but I decided to try the different browsers available with Ubuntu first before switching to Opera. Galeon breaks in the same way Firefox does. Clearly it uses the same buggy library. Fortunately, epiphany works well. I think I'll switch to epiphany until Firefox is fixed. I'm sure going to miss adblock though, and noscript, etc.
I use gnomad2 (since we've got a creative nomad zen mp3 player which we use mainly to play lullabies for Timmy to sleep to), and that works perfectly. I'm hoping that kino and ffmpeg work a bit better in Gutsy. In Feisty, most files would convert to divx medium quality. But some files would produce zero length .avi files. Those I'd have to reconvert to the next higher quality level just so that it'd be divx (and still half the size of the original avi file). I'll have to test kino with ffmpeg again on those files :-).
Upgrade: I broke down and googled for the firefox problem (first I ran firefox in a terminal so I could see the error message when it died).
It's a bug with libhunspell. The workaround is to disable spell checking in firefox. Turn off Edit|Preferences|Advanced|Check my spelling as I type..
Cool. I was liking epiphany, but some things were irritating (no multiple home pages, no multiple rows of tabs, although I really liked how fast it was, but no NoScript or AdBlock).
I've never had success with any Ubuntu online distro upgrade, and I've been trying it since Dapper. Twice I've broken my system sufficiently badly that I had to reinstall from CD (I could probably have fixed it, but I'm not all that familiar with dpkg or grub, and both times I had problem with one or both of those subsystems).
I'm pretty sure that those failed online upgrades were my fault. I install packages from multiverse, universe and some lesser known repositories. I also will sometimes monkey with files that the packages require to exist or be in one or another format. In any case, I'd done some similar monkeying with Feisty, so I wasn't confident that the distro upgrade would work flawlessly.
I finally made the plunge last night after a marathon of converting images (renaming more logically/usefully, at my wife's request), videos (converting in kino to divx so that they're 1/4 to 1/6 original size), and backing up everything (rdiff-backup to my external hard drive, and the images and videos to my wife's external hard drive and laptop, because losing timmmy's pictures and videos is inconceivable).
As usual, I didn't get a flawless upgrade. Fortunately, however, this time there was just one major problem. Initially there was a weird minor issue when the distro upgrade seemed stuck. I did an strace on the process and noticed that it seemed to be in a loop working on the linux kernel image. So I killed that and after a
dpkg --configure -a
restarted the distro upgrade. It worked better after that, asking me what to do about config files that I'd manually modified. For some questions I kept my changes (always after viewing a diff of the config files), others I allowed the distro to replace my changes.
Again, though, the distro upgrade failed. This time on an openoffice.org package that involved mobile devices (not sure how I got that installed, probably with the openoffice.org evolution integration package). That was bad enough that I had to dpkg --configure -a again, and then remove all the openoffice.org packages so that the upgrade could continue.
I had to go to bed after some pressure from my wife, and then a 30 minute brownout almost broke the install. After more pressure from my wife (including her turning off and unplugging my laptop :-), I finally went to bed and restarted the distro upgrade in the morning. Fortunately, everything worked fine after that and I've got a usable Gutsy system now.
There is one problem though. Firefox 2.0.0.8 (even with all add-ons removed) crashes randomly on some sites, and consistently (as in EVERY SINGLE TIME) on blogger. Which is why I'm posting this using epiphany. I was going to use Opera, but I decided to try the different browsers available with Ubuntu first before switching to Opera. Galeon breaks in the same way Firefox does. Clearly it uses the same buggy library. Fortunately, epiphany works well. I think I'll switch to epiphany until Firefox is fixed. I'm sure going to miss adblock though, and noscript, etc.
I use gnomad2 (since we've got a creative nomad zen mp3 player which we use mainly to play lullabies for Timmy to sleep to), and that works perfectly. I'm hoping that kino and ffmpeg work a bit better in Gutsy. In Feisty, most files would convert to divx medium quality. But some files would produce zero length .avi files. Those I'd have to reconvert to the next higher quality level just so that it'd be divx (and still half the size of the original avi file). I'll have to test kino with ffmpeg again on those files :-).
Upgrade: I broke down and googled for the firefox problem (first I ran firefox in a terminal so I could see the error message when it died).
It's a bug with libhunspell. The workaround is to disable spell checking in firefox. Turn off Edit|Preferences|Advanced|Check my spelling as I type..
Cool. I was liking epiphany, but some things were irritating (no multiple home pages, no multiple rows of tabs, although I really liked how fast it was, but no NoScript or AdBlock).
Monday, October 29, 2007
Slow, interactive, but it works -- looking for scripts
I've got a lot of videos of my son. When imported from the camera they're AVI files (yes, I know that's just a container, but I don't know enough about video formats to know what the actual encoding is).
The videos are pretty large. I've found a good way to make the files smaller though. Using kino, I import them (I get a larger .dv file). And then convert it to MPEG4 AVI. That works pretty well. Large files (150MB or more) convert (at High Quality, full size, progressive, 2240 kb/s) to about 1/6th the original AVI size. Small files (30MB or so) only convert to half the original size. But that's pretty good, nevertheless. The proximate reason for looking for ways to encode the files to be smaller is because I post some of them to youtube and those original AVI files greater than 100MB get rejected.
Kino has a .FLV converter too. That's interesting. But I don't think I want to keep archives of .FLV files. I'm a bit conservative about file formats and I tend to go with standards (de-factor, or de-jure) when given the choice between file formats which are on different points on the standard-non-standard continuum.
I've looked around for scripts to do this conversion. Haven't looked hard enough though, apparently. I could read the manpages and learn enough about video and audio encodings and transcoding so that I could hack up my own scripts. Too lazy to do that though. I'll wait until something comes along that's better than what I've got.
This is what it feels like to be a mere user :-). Normally I'd just totally geek and learn what I needed to get something working. Taking care of my son, and taking videos, and juggling disk space so that the videos will fit and can be backed up though, that takes all my time :-).
I've looked (via ps auxw) at the command line commands that kino spews to do the conversion. I may test some of that out. I don't know if everything I need is in there though. If it is, and a test works tomorrow, I'll hack something up and possibly post it here. But possibly not, too. Nonworking holiday tomorrow, I'll be playing with my son :-).
The videos are pretty large. I've found a good way to make the files smaller though. Using kino, I import them (I get a larger .dv file). And then convert it to MPEG4 AVI. That works pretty well. Large files (150MB or more) convert (at High Quality, full size, progressive, 2240 kb/s) to about 1/6th the original AVI size. Small files (30MB or so) only convert to half the original size. But that's pretty good, nevertheless. The proximate reason for looking for ways to encode the files to be smaller is because I post some of them to youtube and those original AVI files greater than 100MB get rejected.
Kino has a .FLV converter too. That's interesting. But I don't think I want to keep archives of .FLV files. I'm a bit conservative about file formats and I tend to go with standards (de-factor, or de-jure) when given the choice between file formats which are on different points on the standard-non-standard continuum.
I've looked around for scripts to do this conversion. Haven't looked hard enough though, apparently. I could read the manpages and learn enough about video and audio encodings and transcoding so that I could hack up my own scripts. Too lazy to do that though. I'll wait until something comes along that's better than what I've got.
This is what it feels like to be a mere user :-). Normally I'd just totally geek and learn what I needed to get something working. Taking care of my son, and taking videos, and juggling disk space so that the videos will fit and can be backed up though, that takes all my time :-).
I've looked (via ps auxw) at the command line commands that kino spews to do the conversion. I may test some of that out. I don't know if everything I need is in there though. If it is, and a test works tomorrow, I'll hack something up and possibly post it here. But possibly not, too. Nonworking holiday tomorrow, I'll be playing with my son :-).
Sunday, October 21, 2007
Gmail Advanced
I just went and installed Better Gmail and Gmail Manager on my laptop, both firefox add-ons. I'm going to have to install both of those everywhere.
The Mail.app mac-like skin from Better Gmail looks great. I first tried Super Clean but abandoned it quickly since I found it unusable.
GMail manager lets me have two or more tabs to gmail, each tab being a different account. That's very useful and I may finally switch over to using web based gmail for my gmail accounts because of that (I'll still have to keep evolution for backup and for access to my IMAP email at work. But finally GMail is much more usable when I can have multiple tabs, one for each account.
I've also finally found a convenient way to download my spam (which I use to train a bogofilter adaptive filter, just for fun). I think Gmail must have fixed their POP3 support somehow. Previously, this technique didn't work but now it does. The solution is to:
A. go to the Spam folder
B. select all messages on the current page
C. add those messages to a label (e.g., ZSpamX)
D. mark the email not spam.
E. wait until they're downloaded by my fetchmail process running elsewhere.
F. once everything is downloaded, go into the label, select everything and mark them all Spam.
G. Go into Spam folder and delete all Spam.
Unfortunately, D doesn't work with the gmail "select everything" link that pops up as an option when we've pressed the (Select) All link. So if I've got several pages of spam, I need to do A-D for each page. That's not bad though since I've got gmail setup to show 100 emails at a time.
To be clear, that last is not a problem with either of the Gmail related plugins. It's an issue with how Gmail works to begin with. Probably as a bar against people making a dumb mistake that does too global a job to the selected email the "select everything" link that pops up when you click All does not all you to assign the same label to all matching emails, nor does it allow you to Unmark all matching emails Spam. I don't remember if it allows marking all matching email spam. I've already collected and remove all my spam, so now I don't remember whether marking all the spam messages spam again was one step or ten.
In any case, the C and F steps are vital. I don't think they previously worked. Or if they did, I didn't think to try them back then. It's great though, now, to be finally able to grab all my spam so I can train my own spam classifier. Sometimes spam gets past all the spam classifiers between me and the internet, then I'd like to have a personal spam classifier customized to my needs, similarly, sometimes mail from friends or mailing lists is marked spam by mistake. Seeing all the spam and running them through my own classifier gives me a better chance of finding the false positives since at least I control the classifier.
The Mail.app mac-like skin from Better Gmail looks great. I first tried Super Clean but abandoned it quickly since I found it unusable.
GMail manager lets me have two or more tabs to gmail, each tab being a different account. That's very useful and I may finally switch over to using web based gmail for my gmail accounts because of that (I'll still have to keep evolution for backup and for access to my IMAP email at work. But finally GMail is much more usable when I can have multiple tabs, one for each account.
I've also finally found a convenient way to download my spam (which I use to train a bogofilter adaptive filter, just for fun). I think Gmail must have fixed their POP3 support somehow. Previously, this technique didn't work but now it does. The solution is to:
A. go to the Spam folder
B. select all messages on the current page
C. add those messages to a label (e.g., ZSpamX)
D. mark the email not spam.
E. wait until they're downloaded by my fetchmail process running elsewhere.
F. once everything is downloaded, go into the label, select everything and mark them all Spam.
G. Go into Spam folder and delete all Spam.
Unfortunately, D doesn't work with the gmail "select everything" link that pops up as an option when we've pressed the (Select) All link. So if I've got several pages of spam, I need to do A-D for each page. That's not bad though since I've got gmail setup to show 100 emails at a time.
To be clear, that last is not a problem with either of the Gmail related plugins. It's an issue with how Gmail works to begin with. Probably as a bar against people making a dumb mistake that does too global a job to the selected email the "select everything" link that pops up when you click All does not all you to assign the same label to all matching emails, nor does it allow you to Unmark all matching emails Spam. I don't remember if it allows marking all matching email spam. I've already collected and remove all my spam, so now I don't remember whether marking all the spam messages spam again was one step or ten.
In any case, the C and F steps are vital. I don't think they previously worked. Or if they did, I didn't think to try them back then. It's great though, now, to be finally able to grab all my spam so I can train my own spam classifier. Sometimes spam gets past all the spam classifiers between me and the internet, then I'd like to have a personal spam classifier customized to my needs, similarly, sometimes mail from friends or mailing lists is marked spam by mistake. Seeing all the spam and running them through my own classifier gives me a better chance of finding the false positives since at least I control the classifier.
Tuesday, October 16, 2007
On 40 tips for optimizing PHP code
I saw something like Reinhold Weber's 40 tips for optimizing PHP code maybe a year ago. Recently, this particular set of 40 tips popped up on reddit. I decided to test. Now, my tests are trivial, on the command line, on Ubuntu. YMMV. Particularly with respect to "trivial", since the tests are so small they're likely to stay in L1 or L2 cache, so they may not look like other people's more complex tests since they're not likely to trigger cache misses.
Alright, after the first two tests, I've decided that this is probably not worth doing. I may continue writing some tests, but:
1 - use static if possible - 1.25 percent difference.
2 - echo is faster than print - yeah, by 1.35 percent.
Some of those tips might actually be pretty useful (I'll run some more tests over the next few days), but these two aren't very useful. Sure, if you applied 100 optimizations, each giving a 1 percent improvement you'd double the speed of your program. But I routinely improve the speed of programs by orders of magnitude by improving SQL queries, creating appropriate indexes and simplifying complex code. Most of those 40 tips sound like micro-optimizations which aren't worth the trouble to implement.
To be sure, error suppression with @, apart from being slow, is usually a mistake (turn on error logging in development, push error logging to a file or syslog rather than stdout in production), and $row[id] is just stupid and the sign of an incompetent developer, as are incrementing uninitialized variables and #31. Using mysql is almost always a mistake (it has its uses, but everywhere I've worked, mysql has always been the wrong tool and anyone who implemented it [i.e., me] always regretted the decision later).
3 - avoid magic (__get, __set, __autoload) functions - OK. magic __get and __set [together]
are half the speed of accessing the variables directly. So there's certainly some cost
to the indirection. It may be that high level frameworks could (and should) use the
magic functions to abstract away details. I've avoided them for now though since they
don't improve maintainability or quality of the code I currently work with, although I'd
be open to using them if I were to work on something significantly more complex than what
I work with now. I don't see anything that complex on the horizon though, I'd probably
switch to another language for anything complex (perhaps java, perhaps python, it'd depend
on the project).
Alright, after the first two tests, I've decided that this is probably not worth doing. I may continue writing some tests, but:
1 - use static if possible - 1.25 percent difference.
2 - echo is faster than print - yeah, by 1.35 percent.
Some of those tips might actually be pretty useful (I'll run some more tests over the next few days), but these two aren't very useful. Sure, if you applied 100 optimizations, each giving a 1 percent improvement you'd double the speed of your program. But I routinely improve the speed of programs by orders of magnitude by improving SQL queries, creating appropriate indexes and simplifying complex code. Most of those 40 tips sound like micro-optimizations which aren't worth the trouble to implement.
To be sure, error suppression with @, apart from being slow, is usually a mistake (turn on error logging in development, push error logging to a file or syslog rather than stdout in production), and $row[id] is just stupid and the sign of an incompetent developer, as are incrementing uninitialized variables and #31. Using mysql is almost always a mistake (it has its uses, but everywhere I've worked, mysql has always been the wrong tool and anyone who implemented it [i.e., me] always regretted the decision later).
3 - avoid magic (__get, __set, __autoload) functions - OK. magic __get and __set [together]
are half the speed of accessing the variables directly. So there's certainly some cost
to the indirection. It may be that high level frameworks could (and should) use the
magic functions to abstract away details. I've avoided them for now though since they
don't improve maintainability or quality of the code I currently work with, although I'd
be open to using them if I were to work on something significantly more complex than what
I work with now. I don't see anything that complex on the horizon though, I'd probably
switch to another language for anything complex (perhaps java, perhaps python, it'd depend
on the project).
Thursday, October 11, 2007
More RAM in my next job -- and multitasking limits (not enough RAM in my brain)
I've got a slow computer (800Mhz) with a reasonable amount of RAM (640MB) at work. My laptop is twice as fast, with twice as much memory. But of course, the laptop hard drive is slower than the desktop hard drive.
I've been twiddling my thumbs quite a lot lately because a lot of my work has been very disk intensive. I could be speeding things up by not doing svn update of 300MB of source, instead going to just the directories that have been modified and doing the svn update there, but then that would require knowing intimately what the other developers are doing. And *they* don't necessarily remember all the directories they committed into.
So, in my preference for dumb solutions that work all the time (e.g., svn update at the root of the tree) versus smart solutions that can easily fail (svn update to targeted directories, possibly missing other directories with fixes), I just svn update at the root. I do similar things with very large databases too, and very large file copies (rsync). The dumb solution that works all the time but is not always optimal is more cost-effective than the smart solution that will take three weeks to shake all the bugs and corner cases out of.
I'll optimize (spending that three weeks later on), when the need arises.
If I'm going to be doing much the same in my next job, then I'm going to require my employer to get me the right hardware. So I'll have 4GB of RAM (or more), and the fastest SCSI drives money can buy, in RAID-0 with rdiff-backup to RAID-1 slow SATA drives. And then I'm going to do all my svn work in a 2GB ramdisk. Hahahahaha.
I was discussing the edges of this (in the context of multitasking) with the boss of my boss and he said, "well, so you can do other things while waiting for those long tasks to finish, right?". This was in the context of a query that ran for 22 hours (and yes, I got pissed off enough at that to set up an aggregated materialized view built via triggers [postgresql] so that it now runs in an hour). At the time I said, yes, so I can multitask and need not twiddle my thumbs.
I'm finding that there are limits to multitasking though. I get confused and forget to do important steps when the list of tasks hits more than 5 or so. So its best to stick with 4-5 concurrent tasks. So if all 4 or 5 of those tasks take more than an hour, I'm back to twiddling my thumbs because I just don't do well if I add another task. As designated mentor at work, I don't actually have to twiddle my thumbs though. Instead, I can stick my nose into my colleagues work and offer unsolicited advice. Sometimes it's even good advice :-).
I've been twiddling my thumbs quite a lot lately because a lot of my work has been very disk intensive. I could be speeding things up by not doing svn update of 300MB of source, instead going to just the directories that have been modified and doing the svn update there, but then that would require knowing intimately what the other developers are doing. And *they* don't necessarily remember all the directories they committed into.
So, in my preference for dumb solutions that work all the time (e.g., svn update at the root of the tree) versus smart solutions that can easily fail (svn update to targeted directories, possibly missing other directories with fixes), I just svn update at the root. I do similar things with very large databases too, and very large file copies (rsync). The dumb solution that works all the time but is not always optimal is more cost-effective than the smart solution that will take three weeks to shake all the bugs and corner cases out of.
I'll optimize (spending that three weeks later on), when the need arises.
If I'm going to be doing much the same in my next job, then I'm going to require my employer to get me the right hardware. So I'll have 4GB of RAM (or more), and the fastest SCSI drives money can buy, in RAID-0 with rdiff-backup to RAID-1 slow SATA drives. And then I'm going to do all my svn work in a 2GB ramdisk. Hahahahaha.
I was discussing the edges of this (in the context of multitasking) with the boss of my boss and he said, "well, so you can do other things while waiting for those long tasks to finish, right?". This was in the context of a query that ran for 22 hours (and yes, I got pissed off enough at that to set up an aggregated materialized view built via triggers [postgresql] so that it now runs in an hour). At the time I said, yes, so I can multitask and need not twiddle my thumbs.
I'm finding that there are limits to multitasking though. I get confused and forget to do important steps when the list of tasks hits more than 5 or so. So its best to stick with 4-5 concurrent tasks. So if all 4 or 5 of those tasks take more than an hour, I'm back to twiddling my thumbs because I just don't do well if I add another task. As designated mentor at work, I don't actually have to twiddle my thumbs though. Instead, I can stick my nose into my colleagues work and offer unsolicited advice. Sometimes it's even good advice :-).
Wednesday, October 03, 2007
Software is Hard
Kyle Wilson has a great article on software development, compromises, economics, complexity, lines of code, and why Software is Hard
I use "economics" the way I normally do though (which is not the way it usually is meant in RL, but possibly how it would be meant among economists). It's not just about money but about compromises among competing values and how different weights among the different values affect the outcome (which is usually also measured along several dimensions).
I use "economics" the way I normally do though (which is not the way it usually is meant in RL, but possibly how it would be meant among economists). It's not just about money but about compromises among competing values and how different weights among the different values affect the outcome (which is usually also measured along several dimensions).
Monday, October 01, 2007
vim on slow links (sshfs)
Sometimes (as today), I need to edit files remotely. If the bandwidth is slow (PLDT myDSL has some occasional bogosity where my route to the office, which is normally just 5 hops, bounces between two internal routers whose IP addresses differ only by 1 in the last octet, so then my vpn goes to the other links and the hop count goes to 18 or so because it's overseas), editing remotely is intolerable.
Then I go with sshfs. I've got a script that mounts my working copy over sshfs. I always need to remember to setup vim though to not use swapfiles. So, from the man page,
-n No swap file will be used. Recovery after a crash will be impossible
Handy if you want to edit a file on a very slow medium (e.g. floppy).
Can also be done with ":set uc=0". Can be undone with ":set uc=200".
I've got an annotation in my ~/.vimrc (normally commented out) to set uc=0,
but I forget that it's there and I always google for sshfs vim swap file. And
then I go to this page, which doesn't have the answer :-).
I would post the solution so that the question doesn't stay unanswered indefinitely. If I could reply without joining the group I'd do that. But joining is required, and I'm no joiner. So the best I can do is point at it here.
Heheh, this will also help ME since I would normally query something like:
monotremetech sshfs vim swap
:-)
Then I go with sshfs. I've got a script that mounts my working copy over sshfs. I always need to remember to setup vim though to not use swapfiles. So, from the man page,
-n No swap file will be used. Recovery after a crash will be impossible
Handy if you want to edit a file on a very slow medium (e.g. floppy).
Can also be done with ":set uc=0". Can be undone with ":set uc=200".
I've got an annotation in my ~/.vimrc (normally commented out) to set uc=0,
but I forget that it's there and I always google for sshfs vim swap file. And
then I go to this page, which doesn't have the answer :-).
I would post the solution so that the question doesn't stay unanswered indefinitely. If I could reply without joining the group I'd do that. But joining is required, and I'm no joiner. So the best I can do is point at it here.
Heheh, this will also help ME since I would normally query something like:
monotremetech sshfs vim swap
:-)
Subscribe to:
Posts (Atom)