Tag Archives: news

Ham Radio, Weight Loss, and other updates

Man, life has been too busy to keep this as up to date as I really want to! Sorry for that, but here’s another update for everyone.

First, since my last post, I have also passed my Extra class ham radio license test, and received my vanity callsign. I’m now N7TOX, which I picked because of two references you can get out of it, if you know me really well. First: N7 is a term from the Mass Effect universe, signifying a special forces operative of the highest level. Second: TOX is a reference to the online handle I’ve been using for the last 15 years, Utoxin. Plus, I like the sound of it more than KF7JLF. And it’ll fit better on a ham license plate.

Next, I’ve had a rough few weeks for weight loss. No major setbacks, but I haven’t made a lot of progress, until this last weekend. Finally started dropping pounds again on my daily weigh-ins. I’m still ahead of my new goal of 900 calories a day, and WELL ahead of my original goal of 750 calories a day, so no harm done by the brief hesitation in my weight loss. My last two weigh-ins have been under 270 for the first time, and my trend is heading towards the 270 mark in the next week or so I would guess. Very soon I’ll be at 40% of my goal. I’m almost halfway there. It’s so hard to believe, but so wonderful at the same time.

Speaking of diets, my project TweeterDiet hasn’t had many updates lately, for a few reasons. I’ve been working like crazy on paying work, first of all, because I had to take a pay cut recently at work. (Better than getting laid off, which happened to a bunch of other people.) Also, in the time I have had to work on it, I’ve been struggling with bugs in the new features I’m trying to add. I desperately want to get them done, but I have to pay my bills first. I hope to make some time in the next week or so to finish all of that stuff up. Also, if you’re hiring, and looking for a senior PHP developer, I’m in the market. I need a decent salary and medical benefits, or a VERY good salary without benefits. I’ve got 10 years of experience, and plenty of good references, so get in touch if you or someone you know is hiring.

My wife has been posting regularly to her blog, and her latest post is about Doctor Who, which we’ve both been enjoying immensely for a while now. Go over and read it, and browse her other posts as well. She’s running her site as a review blog for various media, and doing a good job of it so far, I think.

TweeterDiet.com and CakePHP

First things first. As of 11:45 PM last night, my latest project launched. Go take a look at TweeterDiet.com Go ahead. I’ll still be here when you get back.

Yes, I know it’s very minimal right now. I’ll be remedying that over the next week or so, by adding in some sample screen-shots and more features. But for now, it at least functions, and I’ve been using it personally for the last couple weeks. Here’s a basic rundown of the idea for the site. As you may know, if you read my blog regularly, or happened to glance over to the right sidebar, I’m trying to lose a lot of weight. To help me out, I’m going to the gym, but most importantly, I’m tracking my weight. I’m using a method borrowed from The Hacker’s Diet, which is quite simple: Weigh yourself once a day, and calculate a trended weight from that. The trended weight smooths out the daily fluctuations, and gives you a much better picture of what’s actually happening with your body. From that trend, you can calculate your daily calorie deficit, and know if you need to change things to lose weight faster or slower.

Read more »

Still Alive (But not an evil computer)

Been a while since my last update, but I’m still alive. I won NaNoWriMo again this year, and had an absolute blast being ML. I have a great group of writers here.

I’m also still planning a major overhaul of BayesSpam, but between NaNoWriMo, and my laptop dying, I’ve had several setbacks. But I should have my new laptop soon, and that’ll mean a lot more productive time with a computer, since my wife doesn’t like me back in the computer room all evening.

Anyway, just thought I’d drop a line here, to let people know I’m still alive.

Tokenizing a string in php

I decided today to resume development of my BayesSpam plugin for SquirrelMail. My first priority was speeding up the parsing of messages.

My first step was a simple one. I was doing this:

while (preg_match('/([a-zA-Z][a-zA-Z-_']{0,44})[,."')?!:;/&]{0,5}([ tnr]|$)/',$string,$matches)) {
    $string = preg_replace('/([a-zA-Z][a-zA-Z-_']{0,44})[,."')?!:;/&]{0,5}([ tnr]|$)/',' ',$string,1);
    if (isset($matches[1]) && $matches[1] && strlen($matches[1]) >= 3)
        $return[] = $token_type.': '.$matches[1];

I replaced it with this:

$token = strtok($string, " rnt,."()?!:;/&");
while($token !== false) {
    if (strlen($token) >= 3 && strlen($token) < 45) {
        $return[] = $token_type.': '.$token;
    $token = strtok(" rnt,."()?!:;/&");

Benchmarks show it as taking ~50% as long as the original version, which is a significant speedup.