Posts Tagged tech
The Contractors Holy Grail – Time Tracking
Posted by admin in entrepreneurs on 25Mar08
Everyone has a system. Here’s mine: http://timetrack.cognition.ca/
It doesn’t matter how good you are, or how many hours you work – if you don’t bill for it, you ain’t gonna get paid. Now I’ve put together a little tool that will allow you to keep track of how you’re spending your time (and BILL for it, if that’s your thing) – no matter where you are, or what you’re doing.
It’s a Twitter app, you see. So you can talk to it from:
- A webpage
- An instant-messaging client, or
- Your phone (via text-messaging)
You don’t even have to set up an account first – just follow http://twitter.com/timetrack, wait a minute or two for the bot to start following you back, and then send simple messages like this:
d timetrack start washingfloors
d timetrack stop washingfloors
If you match up the start and stop commands, the bot will total up the time for you. (Don’t worry, we’ll give you the exact times of every action regardless, so you can clean things up later if you forget something.)
Now, here’s my question for you – what sort of reports and exports would you like to see? Here are a few I’m considering:
- SalesForce.com export
- Blinksale (Invoicing) data
- CSV / Excel spreadsheet data
- XML / JSON
- Quickbooks payroll data
What have I missed?
I Wrote A MashUp, Just for You
Posted by admin in entrepreneurs on 22Mar08
If you’re one of those people who stood in “The Line”, then this isn’t for you.
If you get a strange, visceral pleasure in wasting hours, even days, of your life, waiting for your local WalMart to get more Beanie Babies in stock – then you should stop reading right now.
If you like to revisit your local grocery store every night, just to see if they’ve dropped the price on those great donuts in aisle 4… then hit the Back Button, and read something else.
But – if you have a life, and you still want to try and buy something online – I might have something that can help.
It’s called BuyLater, and that’s exactly what it’s for – buying Amazon products, later on.
Later can be: When it’s back “In Stock” (can someone say Wii?), or simply when it’s a little cheaper (or even on sale).
Unlike many of my ideas (which are unique, innovative, and incomprehensible), this one actually isn’t mine. My buddy Jesse Andrews did it first, with a Wii-only bot called WiiMe. I just took the idea, and strreeettched it a little.
My New Favorite WordPress Plugin
Posted by admin in entrepreneurs on 20Mar08
At NothernVoice last month, Mark Lise and I led an unconference session on “PowerBlogging“, which was intended to be an open discussion of everyone’s favorite tips and tricks. While I think we fell a little short on actionable content, everyone in the room got a great feeling about the level of expertise available to them (surprisingly HIGH) in the Canadian Blogging community. Here were some of the big surprises:
- In a room of around 50 people, more than 3 had written their own plugins
- More than 5 were pro-bloggers
- Over half had customized their themes
- More than 10 wrote their OWN themes from scratch
- NO one agreed on the most important WordPress Plugin
IE 8 Beta Released – A First Look
Posted by admin in entrepreneurs on 06Mar08
According to PC Magazine, Microsoft has just released the newest edition of Internet Explorer, in a Beta at the MIX08 conference in Las Vegas. You can grab yourself a copy.
In a nod to the trend of “backgrading” Vista machines to Windows XP, the IE beta will run on XP SP2 or newer – although it seems to require a different download for every possible flavour of OS. At 14.4 Mb, it weighs in a little heavy, but not unusual for a Microsoft product.
I’ll admit right off that I haven’t bothered to fire up Parallels to try it out – so what you’ll be getting here is purely jaded commentary. Read the rest of this entry »
Facebook Application Development How-to: 11 Tips You Don’t Want to Miss
Posted by admin in entrepreneurs on 28Feb08
I’ve built several facebook applications now, and although none of them are as successful as my friend Ben’s “Make A Baby” application, I’m very happy with how they run. Here are the tricks that I used – although you’ll find them mentioned elsewhere, and each of them is important by itself, if you’re just getting started on your first facebook application, you need to know: Read the rest of this entry »
The seduction of Browser Hacking
Posted by admin in entrepreneurs on 28Dec07
I’ve just spent another day in the Flock office. It’s like an addiction – browser coding is the opium of hacker drugs. Why?
- It’s really hard (cross-platform, mixed languages, and inherent complexity).
- Millions of people will use the result (at least, until they turn off Netscape).
- It’s not that hard to innovate.
Now, I imagine there are legions of Mozilla folks arguing with me on that last point, but if you look at this essay on browser featuresets, we’re essentially still living in the 90s – most of what most people need to do, most of the time, is still difficult, and poorly exposed.
Think I’m being harsh? Okay, try signing up for a new service with your browser – say, Firefox. Did you get this great dialog?

Why would you do this to someone??
How bout this for an approach instead:
– We have just saved your password. <Undo that> <Undo, and Don’t ever do that>
In a browser bar – non-interruptive, and it’s already done the best thing. (Of course, this is predicated on having a “public” mode in the browser, or a “logged in” mode – wait, didn’t we have that in NS6?)
Anyway, I (of course) have been dreaming of the super browser since just before we started work on Netscape 8 (which was originally going to be NS 10 – ask me about that sometime). The one that *I* would want to use. The one that I quit my job at Mercurial to join Flock and build.
If I was business savvy, I would build the ElderBrowser. I know – I coined the term, at Gnomedex ’07. (And damn their shitty network connection, too – it died in the middle of my attempts to register the domain, and GoDaddy scooped it from me.) Talk about an unserved market. But honestly – it’s not really the browser that I want to build.
What does that browser look like? I’ve got 20 pages of notes. Perhaps I’ll put them up here. Would you use it?
Using SSH Tunnels to develop Facebook Applications
Posted by admin in entrepreneurs on 20Nov07
One of the most frustrating things I found early on when working on facebook applications, was that there was no simple way to create a local development environment. Because so many of the features of the platform existed only when the code was executed THROUGH the facebook proxy (fbml parsing, fb:ref cache content, etc), I found myself in an almost endless cycle of “svn commit”, “svn up” on the test server. Although I could have reduced this to a single step using a capistrano deployment task, or (heavens forbid) simply edited the code in place on the server using VI, I wasn’t happy with either of these options.
By happy coincidence, I spent the day hacking away on FB apps with my friend Ben Savage, who showed me how *he* does it – he simply port forwards port 4100 on his local router into his laptop, and then sets the facebook application to use his current outside IP:4100 as the app url.
I didn’t like this for a few reasons – first, it requires admin access to the router, a no-go from Starbucks. Second, I don’t like having to change my facebook application settings every time I change offices. So I decided to try using an ssh tunnel.
After mucking about a bit, I got it working! Here’s what I had to do (and yes, it’s pretty ugly and you probably want to do this on a non-critical junk proxy box you’ve got somewhere):
Changes to /etc/ssh/sshd_config
1. You have to make the ssh connection as root in order to bind to a privileged port (it’s probably trivial to use a non-privileged port for this, but I couldn’t be bothered). So you need to enabled root logins, by adding/changing
PermitRootLogin yes
2. In order to bind to a network address other than localhost on the remote server, you need
GatewayPorts yes
Then you simply run this from console on your local machine:
ssh root@mytunnelbox.com -p22 -N -R *:8090/localhost/80
This will forward port 8090 on your remote server to port 80 on your local workstation, via ssh tunnel. I don’t usually bother to fork into the background, because it’s nice to be able to ctrl-c to finish up.
Now get into your facebook developer application (you probably want to create a test application for this), and change the Callback URL to mytunnelbox.com:8090/. (You’ll only have to do this the first time).
Voila! Local development facebook application work – from Starbucks or anywhere else!
Checkmate? MySpace, Bebo and SixApart To Join Google OpenSocial (confirmed)
Posted by admin in entrepreneurs on 01Nov07
There’s nothing like twitter to bring home the reality that, at least when it comes to news, traditional search engines are horribly obsolete. Having heard about this from @Scobleizer, I immediately checked google.com, news.google.com, even the myspace homepage. Nothing.
Google may have just come out of nowhere and checkmated Facebook in the social networking power struggle.MySpace and Six Apart will announce that they are joining Google’s OpenSocial initiative.
Checkmate? MySpace, Bebo and SixApart To Join Google OpenSocial (confirmed)
Ironically, this may be the boost that OpenID (or some better system) needs – as per my previous post on Identitu.de, a cross-site API for developers immediately raises the ugly questions of duplicate accounts, and the merging and splitting required.
Hopefully there’s a better way than what I’ve been doing on the Facebook Platform – silently creating a new BountyUp user to match the Facebook user ID.
Blogged with Flock
Managing deleted records in a mysql database – Design Patterns and Best Practices
Posted by admin in entrepreneurs on 31Oct07
It’s a classic problem in application design – you’ve got a nicely normalized database, lots of tables with related records. You need to allow the user to delete a top-level object – which OUGHT to produce some cascading deletes through a bunch of tables. BUT! – you don’t trust the user. So you need to support some kind of undelete, some kind of audit trail. What to do?
1. Have another table for each table, and create “deleted” records in there.
2. Have a “deleted” column on each table.
Both have their challenges. When rapid prototyping, the first one is cumbersome because you need to remember to make data model changes in two places, ensuring data integrity between current and deleted data, etc. But the second one would seem to require an extra WHERE clause for every SELECT statement in the entire application.
MySQL 5.0 comes to the rescue with support for VIEWS. Simply define a mirrored view for each table, such that:
CREATE view bounties as SELECT * from bounty where deleted = 0;
Obviously CRUD needs to be executed against the underlying table, but now you can safely declare simple SELECT statements everywhere.
I’m considering a similar approach, using nested VIEWs, to address Adult Filters. I’ll let you know how that goes.
Blogged with Flock
RDF – The Graph, the Truth (value) and the (sql) Lite
Posted by admin in entrepreneurs on 04Aug07
At the heart of Web2.0, and indeed the new digital Age, is data. Lots and lots of it.
Much of this data is data about OTHER data – metadata.
Turning data into information involves being able to make connections and inferences between disparate BITS of data, recognizing and analyzing emergent patterns.
Keep all of this in mind on the ride ahead…
Many years ago, the good folks at Mozilla (which, in the days before it became the organization which could build anything, was known as Netscape) had to make some choices about the data that lives inside a web browser. Roughly speaking, these choices are:
* How should we store it?
* What structure should we model it after?
* What interface (or metaphor) should it present to the (platform) rest of the world?
The structure they chose, was a directed graph. And the interface, RDF – a simple reflection of that graph. Finally, they chose to store it in a variety of ways – as XML files, in the general case, as HTML files in the case of bookmarks, as a hash map in memory, and, occasionally, in Mork.
The reasons for these decisions are, largely, lost in time. (Mork, especially, seems to be entirely lost as well – although I have the source code, I have no idea how it works or what it looks like internally. Fortunately, I don’t have to.) And many of today’s coders second-guess these choices, or reject them without review. But recently we have been faced with the same questions at Flock – what structure, what interface, and what storage mechanism? To talk about how we’ve answered that, let’s talk about the data again.
Flock is a browser about people. And when you talk about people and metadata in the same conversation, things can get very busy very very fast. “Jonnie wrote a new blog post.” “Sally commented on Jonnie’s blog post.” “Billy took a picture of Sally, and posted it on Flickr.” “Billy, Sally and Jonnie are now friends.”
One pattern immediately jumps out – lots of data. Lots of unique events. But very few unique ITEMS. A small number of people (hundreds, maybe thousands), doing a small number of things (friending, commenting, blogging, photoing), in a small number of ways. All of it, related to itself. Graph, anyone?
So mozilla’s structure seems like a good fit. Next we come to the interface. Ah, RDF. That great, evil, monstrosity. Kill it, bury it. Put it out of it’s misery. “It’s complicated,” they say. “It’s legacy, archaeic,” they whine. “What is it good for?”
And that’s a funny question. Because, really, if you do a quick google search for RDF -mozilla, you’ll find that the only major thing it’s been used for is… FOAF. Friends of a friend. People data. Huh.
Simple factors to recommend RDF:
1. Directed graph is a good fit for the data. RDF is a good semantic model of a directed graph.
2. RDF code is FAST.
Now, immediately folks will start taking issue with this. “Fast, you say?” “Look, it takes a full 3 SECONDS to write to disk!” “Look at how it hangs the browser when we’re trying to add things to the RDF!”
Let’s back up a minute and talk about storage. Because here, I believe, is where Mozilla made an understandable mistake. You see, with Mork holding browser history, and HTML holding the bookmarks, the only thing left in RDF was the localstore, a simple collection of miscellaneous UI-related facts that were serialized only on shutdown. If they were lost in the event of a crash, no big deal. So the XML serialization code was slow, who cares, right?
Not so.
Skipping ahead a bit, let’s look at what Flock has added to the equation, and why I think it matters.
Step 1: RDF is a bitch to use.
It’s true – too many interfaces, too many services, ASSERTING and UNASSERTING is a totally new grammar for most folks. Enter Ian McKellan, stage left, the author of Coop.js. (Don’t confuse this with Mozilla’s The Coop, which came out a year later and is a totally different beast).
So what is it? Think ActiveRecord, for the directed graph. It’s a javascript ORM (object-relational-model) that makes it easy to read and write from an RDF datasource, with a surprisingly small overhead. (Ian will be surprised by that last part, but we’ve done a few things to coop since he last saw it.)
Great, now I can read and write to the graph just like getting and setting properties of a javascript object. But what about the SPEED?
Step 2: Get rid of the XML.
As part of his coop efforts, Ian had prototyped a SQL-backed RDF implementation, hoping to use SQL statements directly to work around some of the more expensive computations against a traditional graph (such as SUMS and COUNTS). We (Bruno, actually) ported that to C++ for speed, finished it off, and glued an In-Memory HashMap to the side of it as a cache. Voila – now every change is written out immediately, there’s no periodic 3-4 second freeze while the entire graph is serialized, and we’ve got the framework upon which to hang further performance improvements via direct SQL query.
But there’s still something missing.
Step 3: Split it up.
Take another look at the data we’re dealing with, here. People data, hmmm. Much of this data, like browser sessions, is transient. It really shouldn’t get written to disk at all. Supposing we had a separate datasource, purely in memory, into which we could stuff all this TRANSIENT data – where it could magically go away when the browser shuts down? Supposing that we could somehow COMBINE these datasources so that, to the UI layer, they would appear as a single, COMPOSITE datasource?
Those of you who know RDF, know that I’m playing a bit tongue-in-cheek at the moment, since one of the beautiful parts of RDF is its ability to COMPOSITE various datasources together (although there were a half-dozen bugs in the mozilla implementation of this that we had to iron out first).
Step 4: Watch it carefully.
A slight digression here for the particularly geeky – the new-and-improved observer. (Yet another Ian invention, executed this time by Mr. Yosh). One of the most important parts of data-driven UI is that it should respond dynamically to changes in the data, and while the RDF Templates system does this quite well, there are cases where it’s not the right tool for the job. (Such as when you only want to show the first ‘n’ items of a list, or when you need pagination. A mammoth oversight requiring an equally herculean effort to resolve. Template code is not for the faint of heart.) The traditional approach to this was a simple nsIRDFObserver – with a catastrophic side effect. Calling into arbitrary javascript for EVERY CHANGE in the RDF can become prohibitively expensive almost immediately, and in almost every case – you only care about a small subset of the changes that are occuring. The ArcObserver allows you to specify which patterns your code is interested in, and receive notifications only of RDF events matching that pattern.
Step 5: Profit?
There are still bugs, of course. (Check out the flock bugzilla site, and do a search for RDF). And vast opportunities for optimization. But here’s the state of the union:
1. We have a rich, well-matched data model.
2. We have a convenient set of tools for changing (coop) and observing (ArcObserver) that model.
3. We have rapid (Templates) and sophisticated (coop + E4X) ways of driving UI from that model.
4. We have a storage mechanism that is flexible (through compositing, we can use ANY datastorage mechanism we’d like), and FAST (the current sqlite RDF datasource will accept 1000 asserts per second, and we expect to double that number with planned improvements).
So in the end, maybe Mozilla was right the first time. I’d like to think that Flock is proving out the promise of RDF – in a world of data and metadata, where much of it is homogenous or intimately related, there is yet another truth – some of it never is. Some service, or some person, will want to store a fact about themselves or their relationships that no other service or person employs.
How would you cram that into a relational table structure?
How would you try and derive value from it?
Would it be any better than a graph?
Next up – best practices for Templates and Bindings, or, how to make the UI extensible as part of your open API.
Blogged with Flock
