Posted: Jan 30, 2009
by Billy Gray
Tagged coworking, brooklyn, tcywts, jelly
My daily workspace is in Brooklyn at the Williamsburg Coworking space. I have to say it’s been a pretty rad place to work, and it’s way better than working out of the house or in a corporate office park. Needless to say, it’s your coworkers and environment that make it worth doing, and I’ve been pretty lucky that this space is run by a politically active art collective, and the people who show up here are all creative, positive folks who are also good coworkers; no one is noisy or rude, etc, and the atmosphere is quite relaxed.
In addition, we sometimes have really cool events here:
on friday, we will host “work at jelly” and at 2pm we will pipe the inaugural session of “Jelly Talks” featuring Chris Messina (Board member, OpenID) and Dave Morin (Senior Platform Manager, Facebook). starting at 5pm, we will break into a vivacious happier hour! we hope that you can clear your schedule, snag your laptop and join us – this friday (25 July) from 9:30 till 7pm!
I realize this is a bit late notice, but if you’re in Brooklyn today, feel free to drop by, say hello and check it out.
Posted: Jan 30, 2009
by Billy Gray
Tagged unspace, music, nerds, conferences, rockyoulikeahurricane
Something is apparently cooking over at unspace, the people who’s brainchild was the RubyFringe conference last Summer.
I’d been thinking of trying to put together some kind of geek talent show or battle of the band geeks or what have you, and talking to some other hackers about it (as in Zed and Hampton), and this is bringing the idea back into my head. (I’m a bit of a ham, so I’m inclined to do these sorts of things.)
Zed’s Freehacker’s Union (FU) is a really cool group/grouping/idea and he’s pretty into doing technology and instrument hacking and the idea of putting together regular presentations or performances. I had been thinking of just trying to find the various Rubyists and hackers in the amorphous community who have bands or performance projects and get them all to play some show together in tandem with a conference like RubyFringe or as some kind of accompanying nighttime event. There seems to be interest in this sort of thing. Hampton had mentioned he was looking to put together some kind of website or page presenting hacker music projects (or maybe mixtapes??? just occurred to me now).
Anyway, enough thinking out loud from me, there’s work to be done.
July 9-12: the nerds are planning something!
Posted: Jan 29, 2009
by Billy Gray
Tagged
My friend the writer Warren Ellis is full of good ideas (and various poisons), and the one that he’s been kicking around to some of us lately is really compelling. He calls it PAPERNET:
The social letterbox may just be as simple, in the first instance, as a dedicated Gmail account, where I can just press Print without opening the attached document. In kicking this around within a Secret Society, my friend Alasdair Watson knocked together a proof-of-concept in an hour — email comes in, paper comes out. Automagically, like a podcast that spits out paper.
It’s not like a fax machine, where some bastard buys your number and there’s a sheaf of junk hanging out of the thing in the morning. It’s roll-your-own one-sheet POD. And it’s also subscription-based POD, if you know someone who semi-regularly does interesting things with a sheet of paper and decides to share. They’re either sending directly to your letterbox-email, or you’re on an announcement-only mailing list (or Google Group). Or, as I say, as simple as me pressing Print so they’re spat out for me to take to the pub, or on a train journey. And if they’re not especially personal, I can just leave the buggers on the table or the seat when I’m done with them, too.
Wouldn’t it be cool to set something like this up, the input AND output end of it?
Posted: Jan 27, 2009
by Billy Gray
Tagged strip, iphone, update
Apparently there are more than a few people looking to keep an eye on our progress with Strip for the iPhone. Development was delayed in December and the beginning of January by a rush of year end work for some of our largest clients, which needed to take precedence. While that put us a bit off schedule, we’ve been making great progress in the last couple of weeks and should have more news soon on a beta of the application. Thanks for keeping on us! Since most of the inquiries are coming from users of Palm Strip, we’d love to hear from you about your favorite features, things you can’t live without, and things you never liked that you’d like to see resolved in the new version for the iPhone. Feel free to leave comments or write us: support@zetetic.net.
Posted: Jan 27, 2009
by Billy Gray
Tagged tempo, feedback, updates, patching
While we have a lot of development going on here behind the scenes with regard to our time tracking system Tempo, we’re always looking for more feedback from our customers. Ever since we launched the system we’ve gotten some incredibly thoughtful criticism and suggestions that have driven where we’ve taken the app and will continue to do so.
Last night I pushed out some minor adjustments to the interface and we’re planning to do a slew of such adjustments in the upcoming month. With that in mind, we’d like to hear from you about any tweaks you’d like to see. We all tend to notice things that bother us when we are using the site the most, which is generally right around now, at the end of the month. In particular, I’m interested in hammering down any nails that might be sticking up from the floorboards. If you have the time, please hit us up with any changes you’d like to see, major or minor, by writing us at support@zetetic.net.
Thanks again for your support!
Posted: Jan 26, 2009
by Billy Gray
Tagged tempo, updates, ux
We made a couple of small but necessary adjustments to Tempo’s user interface this evening. The date range selector at the top of the screen had been causing some confusion and from there some unexpected exceptional situations [also known as “bugs”]. As you can see here, there’s a date range selector, and a pair for date fields that allow you to select your own date range manually:

Previously, if you typed dates into those boxes or used the calendar pop-up to change their values, the date range would become immediately unselected. This is because the date range took precedence over what was present in the start_date and end_date fields. If you selected a new date range, the start_date and end_date fields would not change until you clicked “Run Report”, and then you’d see that the range took precedence in the report, and their values would be updated to match the range.
That’s a little bit confusing! Some users thought this was a bug and so would clear out the start_date and end_date fields, and then set a range, hit “Run Report”, and nothing would happen because the server wouldn’t process the report without the missing values – even though they would be ignored. Bug on my part.
So, not only has that been fixed, but the start and end date fields are now updated instantly to the correct dates when you select one of the ranges, so that you get the appropriate visual feedback and can see what it is you’re asking for when you run the report. Apologies for the confusion!
As always, if you see anything weird, please send us a message at support@zetetic.net.
Posted: Jan 22, 2009
by Billy Gray
Tagged strip, vader, japan, weird, obama, development
Sometimes you come across a webpage that is just so bizarre and absurb, you just don’t know how to introduce it to other people. But you still do it anyway. (h/t to Chip Z)

It only gets better from there (safe for work).
In other news we’re still hammering away at STRIP for the iPhone. We take breaks for food and small diversions, but we’re still plugging away.
Update: it would appear that not long after we posted this, the website in question took the page down.
Posted: Jan 21, 2009
by Billy Gray
Tagged
Warren Ellis writes:
So, are people rolling their own private microblogging networks yet? And knocking together mobile pages and writing/hacking desktop apps to work with their private microblogging networks yet? It would seem to me to be the obvious outgrowth of the Twitter phenomenon: ambient communication for secret societies.
(Which you can take to mean “gated communities,” “dev teams” “people who like their privacy” or “bomb-throwing anarchists.”) …
I’d happily run two microblogging desktop apps: one for Twitter, and one for My Spooky Friends Net. And, after a while, I’d probably stop using the Twitter app, I’d imagine.
I’d be willing to work on My Spooky Friends Net.
Update: There are a ton of apps that work with Laconica / identi.ca already!
Posted: Jan 21, 2009
by Billy Gray
Tagged rails, ruby, looper, daemons, scripts
There seems to be a bit of interest in the Ruby community lately in putting together handy libraries for creating Ruby daemons, so I thought I’d throw our own particular solution into the mix. Our solution intentionally avoids a lot of the common daemonizing tasks (like detaching from the terminal) so it might not be quite appropriate to call it daemonizing, but it fills our requirements nicely. (As an aside, check out Kenneth Kalmer’s new library daemon-kit for a nice actual-daemon implementation in Ruby.)
We originally tried coding things by hand using Daemons, and then modularizing our oft-repeated code to stay DRY, but we kept running into stability issues. Also, when you fork a Ruby daemon, particularly one that’s loaded up a large stack in memory, you end up at least briefly using twice as much memory. So, memory hogging and crashing needed to be avoided.
None of our daemons required advanced process handling, either. They were simple, single instance workers that had very particular tasks (like schedulers and message handlers for PingMe). We found ourselves asking, “do we really need to be forking child processes for this?”
The answer is no. Instead we are using a module we just pushed to Github that we call Looper. It allows us to take any bit of code or a class and run it as a kind of daemon. Or, more specifically, the class uses Looper to take advantage of its simple signal trapping, loop handling (including sleeping), and the class can rely on Looper to catch any unhandled exception, report it, and keep on keepin’ on.
The loopme method takes a block that it runs for you, handles sleeping between runs, and will catch any unhandled exceptions that bubble up. Thus, if you want to exit on a particular exception, you’ve got to rescue it in your code and set @run to false. It also sets up signal trapping so that signals TERM, INT and HUP will all cause the loop to end (I’d be open to changing this behavior or adding additional signal responses if anybody has an interest).
Here’s an example “daemon” that uses looper to kick it:
require 'looper'
require 'twitter'
class DoSomething
include Looper
def initialize(config)
@run = true
# do config stuff, etc...
@sleep = config[:sleep].nil? ? 60 : config[:sleep]
end # initialize
def run
loopme(@sleep) do
begin
# this is where the meat of your code goes...
messages = twitter.direct_messages({:since => Time.now.strftime("%a, %d %b %Y %H:%M:%S %Z")})
rescue Twitter::EpicFailure => e
puts "bailing out, dude!"
# set run to false to put the kabosh on the next run
@run = false
end
end
end
end
# and here's how we kick it off:
DoSomething.new( { :sleep => 10 } ).run
Pretty simple, right? No coding up the signals, the sleeping, the global exception handler, etc. You can take a look at looper.rb to see exactly what it does for you. From here, starting and stopping our script is really easy, and can be re-used for each of our daemons. It boils down to starting it up with nohup (and script/runner because we like having our rails stack), and then killing it later with the PID:
$ nohup script/runner -e RAILS_ENV /path/to/DoSomething.rb
There’s no need to use Rails’ script/runner, you could just call ruby itself and save yourself a lot of memory ;-)
The following is an init script that we use to start and stop any of our Looper daemons:
#!/bin/bash
#
# chkconfig: 345 70 30
# description: control script for daemons
#
usage(){
echo $"Usage: $0 {start|stop|restart} {daemon1|godzilla|voltron}"
}
# daemon name is required as second param
if [ "$2" = "" ]
then
usage
exit 5
fi
# RAILS_ENV?
if [ "$RAILS_ENV" = "" ]; then
RAILS_ENV='development'
fi
# RAILS_DIR?
if [ "$RAILS_ENV" = "production" ]; then
RAILS_DIR='/www/app/current'
else # assume development
RAILS_DIR='/www/dev.app/current'
fi
PROGRAM="${RAILS_DIR}/daemons/${2}/looper.rb"
RUNNER="${RAILS_DIR}/script/runner"
LOG="/var/log/app/daemon_${RAILS_ENV}.log"
# if the daemon is missing, well, the daemon is missing!
test -f $PROGRAM || exit 5
# See how we were called
case "$1" in
start)
nohup $RUNNER -e $RAILS_ENV $PROGRAM >> $LOG 2>&1 &
;;
stop)
PID=`ps auxw | grep ${PROGRAM} | grep -v grep | awk '{ print $2 }'`
echo "Stopping PID: ${PID}"
kill $PID
sleep 2
;;
restart)
$0 stop
$0 start
;;
*)
usage
exit 1
;;
esac
exit 0
Posted: Jan 21, 2009
by Billy Gray
Tagged
I need an HTCPCP daemon.
Or an intern.
There is coffee all over the world. Increasingly, in a world in which computing is ubiquitous, the computists want to make coffee. Coffee brewing is an art, but the distributed intelligence of the web-connected world transcends art…
I’m gonna go make some coffee. Blog post on really simple ruby daemonizing coming soon. Stay tuned.
Posted: Jan 16, 2009
by Billy Gray
Tagged ckFormLogin, nagios, support, awesome, enterprise, access, management
Today’s dose of win:
“Alright!! It’s working against the production servers – monitoring 6 web apps across three servers. My boss is very happy. That means I am even happier. I have been working with Nagios now for roughly 4 months. The user login test was the final piece of this project. Thanks again for the help.”
How cool is that? We have a plugin for Nagios called ckFormLogin that monitors login processes for popular asset management systems (Oracle CoreID Access Manager, CA eTrust Siteminder, Sun Access Manager, &c.), and when people have a little trouble with it, we’re pretty happy to help them out. But rarely do you get cool feedback like that.
Nagios itself is a really useful and highly configurable piece of monitoring software. The interface is a bit Soviet, sure, but it works great, and it’s open source. So is the ckFormLogin plugin.
Posted: Jan 15, 2009
by Billy Gray
Tagged tempo, virus, utilization, charts, timetracking
This post is probably not what you’d expect. But our time-tracker service Tempo has some great charting capabilities. Behold, the effects of a recent virus (of which I will spare you the horrific details) on my productivity:

Above is the Heads-Up-Display, at the top of the main screen. It reads pretty easily – my productivity was sent to bed!
Check out the utilization chart, which is a bit more instructive as to what happened, and when. That’s accessible by clicking the productivity percentage number box in the HUD, or just pulling it up from the Charts tab:

Brutal.
Utilization is a measurement concept in Tempo that is supposed to give you a ballpark idea how much of your time is accounted for, compared to how much time is generally available in a work-day. So, for every day in a report, the par for the day is considered to be 7 to 9 hours (which is a pretty common length for a workday), and that’s the horizontal, light-blue bar going across the graph between 7 and 9 on the Y-axis. The bars then show us a visual comparison of our utilization for the time periods. If I were to expand the date range enough, these would be grouped by week, then by month. Here’s what my utilization looks like since Nov 1st, 2008, until now:

So 2008 was a pretty productive year for us here at Zetetic. I can’t really go through it all right here and right now, but we’re quite excited about the new year, improvements we’ll be making to our existing products, and the new products and services we’re currently building.
And with that I’m going back to bed. Offers to send me comfort whisky, cheese burgers and nurses will not be turned away outright.
Posted: Jan 11, 2009
by Billy Gray
Tagged tetris, ptsd, stress
I guess it kinda makes sense that Tetris could interrupt the brain from developing PTSD, it definitely interrupted my childhood for a few solid months at a time: (h/t Tim F.)
These results support Holmes’s theory that Tetris can help to prevent PTSD flashbacks by occupying the brain’s energies during the narrow time window when traumatic memories are consolidated. …snip…
But EMDR is only used to treat PTSD and there are several ways of doing that. Holmes’s goal is more proactive – she wants to find ways of preventing the symptoms from appearing in the first place. There are a few potential options for doing that, from drugs to psychotherapy, but few can be delivered so quickly or cheaply as a quick game of Tetris on a handheld machine. The game has another big advantage in that it affects a person’s reactions to an event but not their actual memories of it – Holmes notes that they would feel relief, but their ability to, say, testify in court wouldn’t be diminished.
Yes, I just downloaded the version that’s available in the App Store. What an easy preventative to make available for people — pretty much everyone has a cell phone, especially troops in combat. Doesn’t take much processing power or graphics to run Tetris!
Posted: Jan 09, 2009
by Billy Gray
Tagged oracle, apex, application, express, lov, null, plsql, frameworks
In the environment of one of our clients, we use Oracle’s Application Express product quite heavily for their identity and access reporting — we’ve got five full blown apps running in that framework at this point. Once in a while we hit a snag in development of an application and post the solution here.
Imagine you’ve got this asset management application for a very large organization, called Conglomo, which has thousands of franchises all over the world. The application holds files that users can see in a portal app. Basically, you upload files, you assign them to organizations (franchises, districts, regions, &c.) and users, and when a user logs in, she can see the files assigned to her or to any orgs in her hierarchy. From there you have a management screen for files, that is basically a report listing them out, and giving you some filters to narrow it down. Say you want to see all files linked to a particular org. The piece of data you need is really the org’s unique ID number, but users need a real way to search for a franchise named “Jack’s Conglomo Outlets Inc,” perhaps and in particular, the one in Bakersfield, California. They don’t want to have to look for org # 5003886, they don’t even know the number.
Well, the ready made Popoup Key LOV form element is just the thing. You drop in some SQL to generate the LOV, and voila you get a nice searchable list. Using a query in this way you can easily concatenate a bunch of fields about the organizations so that when the use is searching for a particular dealer, they have other factors to look at besides the name (and many of them are named quite similarly):
select
id || '-> ' || arnumber ||' '|| name ||' ('|| division ||' '|| type || ')' as d,
id as r
from organization
order by 1
This gives us a Popup Key LOV that looks like this:

When you select an org, the form element drops the display name into that disabled text area, and in a hidden element it drops the key’s value:
<input type="hidden" name="p_t05" value="105" id="P5_ORG_HIDDENVALUE">
So in APEX-land, when we make a report, it’s nothing like what you see in other frameworks, really. We just have one big query that draws up our table. So when we add a new element above, we need to amend the WHERE clause on our query to include that criteria if it was specified. Here’s an example of what I mean:
SELECT
f.id,
f.title,
f.description,
f.file_name,
to_char(f.created_at, 'dd-MON-yyyy HH:MM AM') as created_at
FROM
naap_files f
WHERE
...SNIP...
AND ( :P5_ORG IS NULL OR f.id IN (
SELECT nof.file_id FROM organization_files_join_table nof
WHERE nof.organization_id = :P5_ORG
)
)
So, in this simple case, we’ll get all files if :P5_ORG IS NULL (that’s our Popup Key LOV element in our form). If it’s not null, we limit the list of files to those that are listed in the join table as belonging to the specified Org ID number.
And this really works out great until you need to clear the field because you’re no longer interested in files belonging to Org 105. In the image above you can see a “Clear this field” link in the popup. That’s actually the null option in the elements configuration, you can see it here:

When you click the null option, “Clear this field,” you’ll see the disabled text element get cleared. However, it isn’t really NULL that is sent back up to the host when you submit the form next. The hidden field we saw before is actually set to the string 'undefined'.
<input type="hidden" name="p_t05" value="undefined" id="P5_ORG_HIDDENVALUE">
So, when you submit the form, you’re not sending an empty string, which APEX just turns into a NULL value, you’re literally getting the string undefined, which your query then binds as the org id number! And then no rows come back! FAIL! This may be fixed in later versions of APEX (we’re working in 3.0x), but I did some digging and it doesn’t look like it.
Problems sending an actual NULL value for a select list or some other multi-select element in APEX are nothing new, basically the value that is actually sent is '%null%', even though you specify nothing at all. There are a few workaround, but I usually drop an application computation into each of my apps that zaps these guys and terms them into actual NULL values. I found this solution somewhere inside the APEX forum, I didn’t come up with it myself, but it’s pretty much SOP for anyone doing this kinda work, a PL/SQL block that is run On Submit After Computations and Validation:
BEGIN
FOR rItem IN
( SELECT ITEM_NAME
FROM APEX_APPLICATION_PAGE_ITEMS
WHERE APPLICATION_ID = TO_NUMBER(:APP_ID)
AND PAGE_ID = TO_NUMBER(:APP_PAGE_ID)
AND LOV_DISPLAY_NULL = 'Yes'
AND LOV_DEFINITION IS NOT NULL
AND LOV_NULL_VALUE IS NULL
)
LOOP
IF V(rItem.ITEM_NAME) = '%null' || '%'
THEN
Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
END IF;
END LOOP;
END;
Since we have this in place, we can just update this bad boy to zap ‘undefined’ values as easily:
BEGIN
FOR rItem IN
( SELECT ITEM_NAME
FROM APEX_APPLICATION_PAGE_ITEMS
WHERE APPLICATION_ID = TO_NUMBER(:APP_ID)
AND PAGE_ID = TO_NUMBER(:APP_PAGE_ID)
AND LOV_DISPLAY_NULL = 'Yes'
AND LOV_DEFINITION IS NOT NULL
AND LOV_NULL_VALUE IS NULL
)
LOOP
IF (V(rItem.ITEM_NAME) = '%null' || '%') OR (V(rItem.ITEM_NAME) = 'undefined')
THEN
Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
END IF;
END LOOP;
END;
It’s a little odd that even in this fairly recent version of APEX you still have to jump a hoop or two to handle null value submissions, and even weirder that you get '%null%' in some cases and 'undefined' in others. Any web framework has to deal with this kinda thing, but a little consistency would be nice. Hope this is a good primer and introduction to the problem if you’re new to APEX. Although, I have to say that aside from a few weird quirks like this, APEX is absolutely awesome for a situation in which you need to throw together a webapp in a client’s environment and they aren’t interested in any “risky” new fangeled technology like Rails!
It’s hard to convince large companies to work with emerging platforms. There is always a perception of risk that makes tried-and-true platforms like Oracle APEX attractive. I still sometimes yearn to have used Rails for one of these projects, but honestly I can throw together these applications MUCH faster and with way less overhead. I may not have quite the flexibility I get with Rails, but this is all really PL/SQL running on a giant modified mod_plsql, and you can do all kinds of crazy stuff in PL/SQL.
Posted: Jan 06, 2009
by Billy Gray
Tagged mobile, zetetic, palm, strip, perl-strip, iphone
I’ve responded to so many of these requests by email that it’s probably time to put up a reference for folks who’re looking for some answers.
Palm Strip has been a pretty popular and highly secure password manager for the Palm OS that Stephen built a while ago and released as open source. You can read more background on it over here. Due to the decline in the Palm platform over the last few years, we’re no longer supporting the program. Just as many of our users are migrating to other platforms, so are we. We decided to go with the iPhone platform first, and we hope to have the first version ready by the end of this month. It sports a fully encrypted database layer and the interface is coming along nicely.
As part of our effort to help our users migrate to the new platform, and to assist those users who can’t wait or are choosing to migrate to other platforms, we’re working on an exporter that will rip through the encrypted Palm Strip database (*.pdb) files and generate a file that you could use to migrate to another system. Needless to say, this isn’t ready yet, but it will be available by the time we’ve got our initial version out in the iTunes App Store.
Current options for exporting your data from the old Palm databases are fairly limited. Dave Dribin put together an excellent program called perl-strip a while back and a supporting Perl module. This provides you with an avenue if you’re technically inclined.
It is possible to run Strip on your desktop computer using an emulator:
- Get the emulator software by signing up for the developer program at Access Inc
- Download the PalmOS ROMs from your own device to the emulator (the safest approach). Alternatively you could try to grab ROMs at this link. Caveat emptor – we can’t vouch for their authenticity.
- Use the emulator to open up your backed up copies of the Strip databases
For those asking about whether the next version of Strip will be open source – yes and no. We are believers in open-source technology and the benefits it provides to security software in particular, so our data encryption layer is being made available as open source software for peer review. The rest of the source of the iPhone application will be private, and we will charge a modest fee for the software.
Please don’t hesitate to leave comments or to write us at support AT zetetic.net with any questions!
Posted: Jan 05, 2009
by Billy Gray
Tagged aws, cloud, xen, ec2, virtualization, comments, hackernews
There was a really quite interesting discussion over on Hacker News in response to an Ask HN query, “AWS or dedicated server?” over the last 24 hours. We haven’t made the jump to Amazon’s platform here at Zetetic, but I’d be lying if I said we haven’t been mulling it over. New year, time to revisit some of these questions.
Happy new year, by the way!
Totally off topic: I had intended to leave comments open on our recent post Ranting Considered Useful, and was wondering the other day why we saw none despite the surprising amount of traffic. This would be a PEBCAK error. The moment’s passed, but I have opened up the comments there for anybody who wants to respond.