Mobile office - back online

Mobile office - back online
My soon to be sister-in-law (Gwen) kindly sent us her old nokia phone, as she's replaced it with something more spiffy. Our current Motorola phone sports a colour screen, polyphonic ringtones, compact design, and WAP. Oh, and the keypad glows electric blue in the dark. Gwen's old phone has a monochrome screen, monotonic ringtones, and no WAP. It's also larger and heavier? So why am I so excited about getting it?

Because the old Nokia has an infra-red port, which the oh-so-fashionable Motorola is notably missing. And given the choice between a phone which can talk to my Palm, and a phone that sounds like a slot machine paying out when it rings, I'll take the first any day.

Sure enough, within an hour of the new "old" phone arriving, I could dial in to my main server, establish a PPP connection, and fire up an ssh client to the host of my choice. Likewise, I can transfer vcards back and forth between palm and phone, rather than having to tediously enter them by hand.

Shame it doesn't play mp3s, or have a java virtual machine. I really miss that old phone.

Investment/Retirement
The whole process of min-maxing my finances is proving to be a very difficult task. I can continue working steadily for the next 8-9 years, with an incredibly stable and dull savings plan, and then live a life of luxury thereafter. That's not bad, but 9 years is a long way away.

I can work one year on, two years off. That gives me lots more free time now, but the "one year on" will be difficult. Work flows most easily when you're already too busy to take more. Switching from holiday mode to business mode is difficult when it comes to catching clients.

I can work steadily, but do something more creative with investments. This is tricky, because it's not something I'm experienced in, and past performance is not indicative of future growth. We could sink funds into buying numerous houses, trying to ride tax-effective capital gains, but that's more risky, and risk sucks. This is an area which I'll need to investigate further.

(read more...)

Retirement

Retirement
I have no interest in working until I'm 65. In fact, I would be very happy if I were able to stop work entirely in the very near future. Doesn't everyone? Not working means that I can persue more interesting endeavours (some of which may actually produce income, as well as being interesting).

With our current savings plan, we'll have our house entirely paid off this year, and complete financial independence by 2012. By complete financial independence, I mean that with a very conservative investment plan, we'll have enough income to last us indefinitely, even if we double our current outgoings. Most people would consider reaching this goal by the tender age of 35 quite an achievement. I would tend to agree.

However, I'm both impatient and lazy (with a bit of hubris mixed in), and don't want to wait until I'm 35 before retiring. I'd like to retire sooner. The good news for me, is that I can.

The complete financial independence plan allows for personal immortality. Since income is greater than or equal to expenditure, this plan sustains itself indefinitely. However, I'm not immortal, so I can actually retire with a lower level of assets and still live comfortably to the end of my days.

Unfortunately my back-of-the-envelope calculations show that the difference required in assets may only shave 1-2 years off my expected retirement age. That's a good start, but not as great as I would hope.

I still have more research to perform, and a few tricks which I may consider using. With luck, I may be able to shave a little more time off the final figure.

(read more...)

Chicken Behavior

Chicken Behavior
You're a chicken. You're feeling thirsty. You have the option of drinking:

  • Fresh rainwater collected in an empty pot, easily accessible.
  • Water from the drink-feeder, refilled yesterday afternoon, easily accessible.
  • Water from a stagnant bucket of rotted compost, complete with scum and floaties, difficult to reach.

You know which of the above would have the most flavour, and so do our chickens.

I can't believe we eat the eggs of these birds. On the other hand, I have an overwhelming admiration for their immune systems.

Three easy steps to keeping your consultant happy

  1. Learn how to use the shift key for capitals and punctuation. Learn how to use the enter key to make paragraphs.
  2. When the consultant states that something is an incredibly bad idea, at least pause and think about that for a moment. Don't respond by asking how soon it can be implemented.
  3. Pay your invoices on time.
(read more...)

Interesting Perl Bug

Interesting Perl Bug
To see an interesting bug which caused me many headaches, enter the following script, and mark it setuid. Then run it as any other user except the owner.
#!/usr/bin/perl -wT
$ENV{PATH} = "";
print "Hello World\n";
system($0,"1") unless @ARGV;

The result is a delightful message about how your kernel has a setuid script bug which is rather dangerous and easy to exploit... except that you don't

Perl is just getting confused because it looks like the interpretor has been started setuid before it's had a chance to do sanity checking and invoke suidperl. The result is the inability to have a setuid script invoke itself. Very bothersome.

The solution is to drop setuid privileges before the script calls itself again. Conveniently enough, Perl allows us to localise $> (effective UID), so the following program does work as intended:

#!/usr/bin/perl -wT
$ENV{PATH} = "";
print "Hello World\n";
unless (@ARGV) {local $> = $<; system($0,"1");}

Because of the use of local, setuid privileges are only dropped for the duration of the call to system. Of course, it's usually a good idea to drop setuid privileges as soon as possible, or only invoke them when you absolutely have to.

(read more...)

Bitcoin QR code This site is ad-free, and all text, style, and code may be re-used under a Creative Commons Attribution 3.0 license. If like what I do, please consider supporting me on Patreon, or donating via Bitcoin (1P9iGHMiQwRrnZuA6USp5PNSuJrEcH411f).