Showing posts with label web20. Show all posts
Showing posts with label web20. Show all posts

Idea: Recover my stolen stuff (dot com)

No comments:
Ok, so I just had a camera with lenses stolen, and I'm determined to find it. How can I do that? One thing is to register the SN with the national stolen goods registry (whatever that is - I could find no reference on the Internet).

Another thing I was going to try is to see if the combination of items was for sale in the usual places: craigslist, ebay, the recycler, and the local used photography places. But that's a lot of work, and I think that at least some of it could be automated.

So why not "recovermystolenstuff.com"?

Through the looking glass: the wonderful world of widgets

1 comment:
I was playing around with Sproutbuilder which is a really cool TTW WYSIWYG widget authoring tool. Now that's pretty cool, but it opened my eyes to a bunch of other synergistic tools, like gigya, which is something called a "widget network". Presumably this means "widget distribution network". Anyway, it appears that this is the tip of the iceberg.

You may wonder, what is so interesting about widgets? Constrained space design! Being efficient with the pixels you get is a kinda cool problem.

Micro Templating from John Resig: a code review

5 comments:
John Resig (author of jQuery) wrote a little script that implements client-side templating in JavaScript. This is of particular interest to me because I had to write something similar a few weeks ago. This code has a bunch of interesting idioms and features in it. It's unreadably short (IMHO) but here's a breakdown, statement by statment (generally going from outside in):
  1. (function(){})(); This is a new idiom to me; it's just a terse way to define a function then execute it. Contrast this with the YUI idiom that is YAHOO.namespace = function(){}; which usually attaches to a browser event at some point to start things off.
  2. var cache = {}; A private data area. It's a hash because you have to index the cache on the input string. This is an example of memoization.
  3. this.tmpl = function tmpl(str, data){...}; A somewhat verbose way to declare a function, but it combines with #1 to install a function on the global object. Generally, this isn't a very good idea, as there can be namespace collisions there.
  4. return data ? fn(data):fn; This is currying, I guess. (Return the transformed data, or the transformation if there is no data).
  5. var fn = expr0 ? [expr1] || [expr2] : [expr3]; This is idomatic JavaScript. Well, the expr1 || expr2 is idiomatic - it's a common way to say "if expr1 doesn't work, try expr2", very similar usage in perl. The nesting inside a ternary operator, and with complex multi-line expressions, just adds to the fun.
  6. !/\W/.test(str) - \W matches non-word characters. This is a handy way to say "if str only has word characters". Knowing what this means requires both regex and RegEx knowledge, if you know what I mean. (I personally hadn't run across the RegExp.test() method before). [Thanks for the correction!]
  7. new Function("obj", [method body]); I didn't know this, but JavaScript allows an alternate method of doing meta programming, the Function constructor, which doesn't require eval(). The Function() constructor takes arbitrary numbers of string arguments, the first of which are interpreted as names of declared parameters, the last being the function body. In this script, you call it by assigning to a var then calling the var as a normal function. Neat.
  8. var p=[],print=function(){p.push.apply(p,arguments);}; No idea what this does. push() is an array function that returns a number, so I'm not sure how "apply" is even defined here!
  9. with(obj){p.push(' - I know what this does, but not sure why it's here. Seems like p will have only element at this point. Yes, I realize this is the "outer push". Egads!
  10. split().join() is a fast way to do static replacement (according to John).
  11. with(obj){}; Flanagan's book (JavaScript: The Definitive Guide) warns against using "the with statement". However Resig uses it here so that the template expressions are evaluated relative to the data object. (Anyone who's coded in VB knows the with statement - I personally really liked it and wish it was in Java and was usable in JavaScript)
So, there are some moving parts here that I don't completely understand, especially the use of push() inside the with() expression. I mean, why bother with that? I'm pretty sure the answer will come eventually, but for now I find myself puzzled, just like when the post-doc TAs would skip like 10 steps doing that line integral. I'm pretty sure it has something to do with that wierd print assignment.

Of Linux Haters and the GUI problem

No comments:
Just ran across this rather unusual blog, that purports to hate Linux. But it really reads like a series of letters from a jilted lover who would probably be taken back in a heartbeat. (Cue Joan Jett's "I hate myself for loving you"). Of course, this end of the relationship is a human, the other is the rather nebulous cloud of "FOSS" - or free open source software, so a reconciliation may be fundamentally doomed.

That said, these 'letters' are profane, funny, technical, and insightful. Nothing on the internet highlights as clearly the irrational attachment to FOSS in general and Linux in particular that some people have. (Indeed, one could spend a lifetime making fun of people's irrational attachments. And some do.) The key theme, at least for me, is that there is a jolt of rightousness that comes with using FOSS that can render one's perspective dangerously opaque to weaknesses. (I see the same thing with the iPhone.)

What's really interesting to me, though, is that his posts focus heavily on UI issues. For example, in a post of about Samba he complains that he's had to learn smb.conf 20 times over the years, but then quickly forgot it. I know exactly what he means. He then talks about his options for a GUI, Fedora and Webmin. But wouldn't it be cool if you could create your own GUI for this kind of stuff? Or even better some record of what you did?

I ask because I think the poster is wrong - the problem is not silos. Breaking down silos can be a good thing, but there's no reason why file sharing ought to be coupled to a GUI toolkit (as he seems to be advocating).

You may be thinking, well, even if there was such a thing it would be a mess - so many GUIs, it's the whole "there are too many choices" thing all over again. However, I'm pretty sure that would sort itself out, as great GUI creators would rise to the top, and thanks to decoupling, could be tried without fuss.

MetaBlog: making the case for blog-through-the-mail

No comments:
ScribeFire has turned out to be quite unreliable, at least for long term storage of notes. At work I left my computer on for about 10 days, with Firefox (and Scribefire) open. When I came back, a memory leak (I think) had rendered the computer unstable and I had to force quite Firefox, and reboot the machine. When it came back up, Scribefire informed me that my notes file had become "corrupted".

Not good. I had a lot of work stored in those notes - mainly research, links, and a rather large idea bin.

There are other problems with Scribefire, such as it's inability to consume the Tab key for increasing indent (a problem which just recently arose). This is a critical problem for someone like me that uses nested lists alot.

I've come to a few realizations, in no particular order: Blogging through email is the key. This allows you to store 3 copies of your work, even in draft: a local copy, a draft copy on the email server, and a draft copy on your blog. Now that's a backup strategy. In addition, if you have multiple blogs, keeping track of where you're blogging to can be tricky - Scribefire was never very good at keeping all that straight. Finally, a single source of posts is easily searchable, and that's quite nice. Some difficulties that arise include tagging (some blogs are better than others - I still haven't found a way to indicate categories or tags in a blogger email). But of course a huge benefit is that the data remains in easily re-published form - you could publish your work to a different location if need be.)

On occasion you may want to post through the web or even with a tool like Ecto or Scribefire. The solution here is to funnel the post back into your email, with email notifications.

Now, this is all well and good, but Scribefire has a few really compelling features worth emulating - browser embedding foremost among them. An email client with strong composition tools embedded in the browser? What exists? A search reveals "not much".

Another feature that I would like to see in Scribefire is a "post to multiple blogs". This feature would either publish a copy to many blogs (not optimal) or publish to one, then publish a link to the others. This would be handy for those "globally interesting" entries that also have more specific applicability.

Client-side image compositing using background images

No comments:
I long for a day when such hacks will be unnecessary, hopefully when IE (particular lt 7) goes into obscurity. Anyway, that's an interesting hack because it uses background images rather than z-order. The basic idea is the same, though - you make an image appear rounded by placing a "frame" over it which is transparent, only letting a circular bit show through.

jQuery on a CDN - finally

No comments:
Google was kind enough to host jQuery on a CDN (they also have prototype, mootools, dojo and a few others). While they have a fancy loader script that offers conveniences like optional minification, you can also get the script the "old fashioned way", with something like this:

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

In truth jQuery just isn't that big (about 15kb) so this isn't really useful for saving bandwidth - it's more useful for improving first-time user usability by reducing their wait time by maximizing simultaneous downloads. Most modern browsers are limited to two connections to a given server, and so spreading the load across many servers is a Good Thing. I'm not sure if this limit has a name, or even an RFC. I do know that the limitation is designed to prevent unintentional DOS attacks.

While I don't see anything particularly nefarious about this, I would like to point out that Google and the Mozilla Foundation (who employ John Resig, author of jQuery) are extraordinarily friendly, and I'm glad Google is performing this service.

Instructables *almost* has it right

No comments:
Instructables almost has it right. They are so close. The problem is that they are treating instruction as static - that it's like content that you create, post, and walk away from. That's not how it is though. Instruction changes over time, people offer alternatives, and variants, but instructables doesn't capture any of that information!

Bumping into Information

No comments:
A paper from "The American Society of Information Science" is noteworthy more for the fact that it acknowledges (and indeed legitimizes) the notion that we run into information all fo the time, of the sort that we're not necessarily looking for, but which we find useful in unrelated endeavors.

RifleThru: A good use of GWT

No comments:
RifleThru - an improved ebay search application, written in GWT over Apache AxKit. It shows good use of GWT for usable design, and a very light-wieght, non-Java backend used to convert eBay's XML API into JSON.

Microsoft Yahoo Google in Pictures

No comments:


Yes, yes indeed.

The Google Command-Line: Goosh

No comments:
This little web2.0 application "Goosh" is a command line for Google. I'm not sure if it will make it's way into my day-to-day toolset, but it does make keyboard-only navigation of google and it's search results quite painless, especially combined with tabbed browsing and the CTRL+W shortcut.

I like the CLI UI, but goosh is lacking some important features of ordinary CLIs, first and foremost piping. One important feature that would make goosh more useful would be to introduce the notion of context - in it's simplest form, to build up a search one term at a time. "Command history" would also make a lot of sense.

I'm glad to see that people are thinking outside the box, and look forward to seeing how goosh, and the inevitable copy-cats, turn out.

Notes about the "Millennials"

2 comments:
Sound bites from this article about "millennials":
  1. Narcissistic praise hounds.
  2. Parents will phone HR departments on behalf of their kids.
  3. Blind careerism is begining to fade.
  4. Friends and family above work.
  5. There's no such thing as a dream job.
  6. Looming demographic crisis: there's a lack of people.
  7. Boss abuse works.

A clever hack to determine which sites you've visited

No comments:
Aza Raskin has done it - he's written a piece of javascript that exploits a bug in CSS to determine where you've been on the web. He is positioning it as something useful, to show users only the social networking sites that they've visited to avoid "badge blindness". And it is useful. But it's also an invasion of privacy.

First, how it works. Basically, if you read the script he creates a new iframe, writes a bunch of URLs into it, setting some style attributes if it has or has not been visited. He then checks the style of each URL node. Pretty simple. Ordinarily you cannot tell what the style is of a visited link, because it would be a privacy concern. But Aza got around it.

Second, how to defeat it. The bottom line is that the only way is to disable your browser history. You could specifically defeat this script with a bit of Greasemonkey, but a) most people won't bother and b) even if they did it would be easy to counteract.

I would guess that we'll be seeing a patch from the browser vendors soon.

The rise and fall, and rise of the thick client

No comments:
I've switched from Gmail to Thunderbird. Why? Two things: Firefox's instability and memory hogging ways, and Gmail's IMAP support.

The fact is that my firefox.exe process was getting into 400MB range and was crashing all of the time. It's not surprising: I was running gmail, meebo, firebug, and a bunch of other, smaller plugins. Firefox was essentially serving as a simple operating system.

Time to lighten the load. Thunderbird for email has been a big win - Firefox 2 never ran gmail very well, and Thunderbird is like a breath of fresh air. However much I miss email search and organizing messages by conversation, I like being able to write an email without fear of a crash even more. Plus, thick clients have other benefits like offline operation and better integration with other apps (e.g. I can use the "email this document" option in my applications now).

Meebo actually runs very stably, but it does take up a good deal of browser memory, and it doesn't do "auto detect whether I'm at my computer" thing - which has misled others to think I'm online when I'm not. Miranda does the trick (although it doesn't support Google Talk).

Steve Souders from Google Performance on making pages faster

No comments:
  1. A neat tool, called cuzillion
  2. Don't put inline javascript between two resources or parallel downloads will be blocked.


Beginner level CSS and HTML tips from Apple

5 comments:
It's brief, incomplete, and out of date. But that said, this page isn't all that bad for beginner level CSS and HTML tips. It has a very nice set of links, including one to a rather good css mailing list.

(I wish pages like this would sport an author and a date!)

The problem with wikis

No comments:
Wikis seem to go stale really fast. I know this because I've used internal wikis at every company I've worked for or with in the last 8 years, and in each case the wiki was never an important part of anything. (Indeed, the wiki was often used by managers as a kind of threat - "add it to the wiki" is a way of saying, "please do some meaningless work that will never be read and will be quickly forgotten.")

But all writing on the net gets stale fast. Why does it feel so particularly bad with wikis?

I have a theory. I think it's because wikis set your expectations differently than, say, a blog. You don't expect a blog to stay relevant. Wikis feel static, and you expect them to stay relevant. It's a classic UI problem, actually. In truth, wikis and blogs are both just representations of an author's activities. One is merely presented in a different way. I believe that blogs are actually closer to representing the moment - one has a thought, one writes. Wiki's still subscribe to the conceit that this is an article, something that is correct and timeless and that fell out of the sky. Wikis hide the serial nature of authorship, while blogs do not.

Review: Google Notebook

No comments:
Google Notebook[Caveat: I just installed it 5 minutes ago]

An odd little tool, Google Notebook. It's kind of like a blog. But not. Check out a little example.

Building FireFox

No comments:
Found a good HOWTO on building FF on Windows [update: don't use this page. Use this one instead], but that document is a bit out of date and needs some updating. In particular:
  1. Better to download a tarball of the source rather than do a CVS checkout. Note that the tarball includes CVS meta data so if you want to get updates later, you can. This reduces load on the mozilla servers (good for them), and is a fast way to bootstrap good for you).
  2. .mozconfig is optional - and the parameters have changed significantly since that document was written, and they no longer work.
  3. You need Cygwin, but you need to make sure Perl, Python, and Make are present. And possibly more stuff.
Notes:

http://developer.mozilla.org/en/docs/Configuring_Build_Options
http://mxr.mozilla.org/mozilla/source/browser/config/mozconfig?raw=1
be careful noto to save in PC format as make doesn't like CRLFs.

One bummer about this build is that it spends about 10 minutes doing environment checks. I bet there's a way to skip it, but I don't know what it is yet (probably setting correct build options). This wouldn't be so bad, except that the loop is {run build, get error, fix dependancy, repeat}. Every iteration gets you a bit farther, but it takes a lot of time. (Personally, I find solace in blogging about the experience while I wait.) A nice touch would be if make could remember all the checks it did last time it ran.

The HOWTO above very wisely warns the user that it probably won't work right the first time. But it should add that it probably won't work right the 2nd, 3rd, or 4th time either. :)

Things I had to install (or fix):
  1. make (cyg)
  2. bad options (edit .mozconfig)
  3. python (cyg)
  4. makensis (skip: --disable-installer)
  5. iconv (a character conversion library. at first I added C:\bin\xampp-1.6.4\apache\bin to build path but that didn't work; I read the gnu page and noticed it's probably called libiconv in cygwin. added the "dev" version, and that worked)
And at this point it's actually generating more makefiles, which is a start, I guess. I'll be really happy once it starts actually compiling stuff. :)

Getting this build to work reminds of me of a nice little puzzle game I ran into yesterday called "Thief" that basically dumps you into a puzzle with neither explanation or context. You just have to figure it out. I kind of like that genre of game.

While the build runs, I ran a search to see if anyone has built FF with the Eclipse CDT. The best link I found was from over 2 years ago, and the short answer is "not really". For a FF build I might try something like Pulse with only the single project in the workspace. (Holy crap I'm the 5th result for "genuitec pulse".)

(Ooh and now gcc is getting called, and it's not puking! Cool!)

Anyway, so yeah a stripped down, shiny new Eclipse 3.0 with just the CDT installed, a workspace with just one monster project.... Sounds to me like the experiment should be tried again.

(OMG it looks like the build is doing a depth-first traversal of a tree of about 6000 files, building a command line and then calling gcc on each file. I mean, whoah.)

Sigh. I should have known. 5 hours later, the build failed. Here's the output:

Creating .deps
/cygdrive/c/home/josh/moztools/mozilla/build/cygwin-wrapper /cygdrive/c/home/josh/moztools/bin/nsinstall -m 644 /
e/c/home/josh/moztools/mozilla/xpinstall/cleanup/InstallCleanupDefines.h ../../dist/include/xpinstall
make[5]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/xpinstall/cleanup'
make[5]: Entering directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/xpinstall/stub'
Creating .deps
make[5]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/xpinstall/stub'
make[4]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/xpinstall'
make[4]: Entering directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/security/manager'
/usr/bin/make -C /cygdrive/c/home/josh/moztools/mozilla/security/coreconf MAKE="/usr/bin/make -j1" -j1 CC="/cygdr
ome/josh/moztools/mozilla/build/cygwin-wrapper cl" SOURCE_MD_DIR=c:/home/josh/moztools/mozilla/firefox-objdir/dis
c:/home/josh/moztools/mozilla/firefox-objdir/dist NSPR_INCLUDE_DIR=c:/home/josh/moztools/mozilla/firefox-objdir/d
lude/nspr NSPR_LIB_DIR=c:/home/josh/moztools/mozilla/firefox-objdir/dist/lib MOZILLA_CLIENT=1 NO_MDUPDATE=1 NSS_E
CC=1 BUILD_TREE=c:/home/josh/moztools/mozilla/firefox-objdir NS_USE_GCC= NS_USE_NATIVE=1 OS_TARGET=WIN95 USE_DEBU
clean
make[5]: Entering directory `/cygdrive/c/home/josh/moztools/mozilla/security/coreconf'
../coreconf/rules.mk:368: target `c' doesn't match the target pattern
../coreconf/rules.mk:415: target `c' doesn't match the target pattern
../coreconf/rules.mk:416: warning: overriding commands for target `c'
../coreconf/rules.mk:369: warning: ignoring old commands for target `c'
../coreconf/rules.mk:444: target `c' doesn't match the target pattern
../coreconf/rules.mk:445: warning: overriding commands for target `c'
../coreconf/rules.mk:416: warning: ignoring old commands for target `c'
../coreconf/rules.mk:448: target `c' doesn't match the target pattern
../coreconf/rules.mk:449: warning: overriding commands for target `c'
../coreconf/rules.mk:445: warning: ignoring old commands for target `c'
../coreconf/rules.mk:452: target `c' doesn't match the target pattern
../coreconf/rules.mk:453: warning: overriding commands for target `c'
../coreconf/rules.mk:449: warning: ignoring old commands for target `c'
../coreconf/rules.mk:467: target `c' doesn't match the target pattern
../coreconf/rules.mk:468: warning: overriding commands for target `c'
../coreconf/rules.mk:453: warning: ignoring old commands for target `c'
../coreconf/rules.mk:471: target `c' doesn't match the target pattern
../coreconf/rules.mk:472: warning: overriding commands for target `c'
../coreconf/rules.mk:468: warning: ignoring old commands for target `c'
../coreconf/rules.mk:969: *** multiple target patterns. Stop.
make[5]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/security/coreconf'
make[4]: *** [.nss.cleaned] Error 2
make[4]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir/security/manager'
make[3]: *** [export_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/c/home/josh/moztools/mozilla/firefox-objdir'
make: *** [build] Error 2


I may need to contact the developer list or google groups for this one. I feel strangely unmotivated.

9pm After dinner and a little nap, I feel better about the whole
situation. I did a little searching, and I'm not the only one with this
problem. Apparently the culprit is make, and I need to go back to v
3.80. Having this problem actually pointed out a very nice HOWTO from Mozilla itself which is much better than the HOWTO I started off with. Not quite sure how I missed it....