Archive for the ‘coding’ Category

Affective News Feeds

Wednesday, March 10th, 2010

Just last night I found out the glory of Yahoo Pipes. The idea is one for which I’ve wanted & waited a long time: Take *any* web-source & turn it into (through combining, filtering, etc) any other web-source: iCal, RSS, etc.

So the consequence? I now have 3 rss feeds: One for Friend’s Statuses (twitter+facebook), one for news (google news feed) and another for everything else from friends blogs to tech-news.

It would only seem obvious that these 3 can and should be on the same rss reader (I use google reader’s iphone interface, even on my main computer).

The trouble with combining these 3 or 4 types of news into ONE ‘technological ontology’ (a single rss reader) is a simple lessons learned from psychology.. there’s lots of theories like this, but I learned it from Urie Bronfenbrenner, “The Ecology of Human Development.” Basically, we all have various circles, some more core than others, of family, friends, and aquaintences. They affect us differently.

Likewise, we can say data from each source must retain it’s affective priority. Notice how different this is than most News/Social Networking Aggregrates, which merely pull in everything without priority. Likewise, facebook and other marketing groups try to get your affectively involved in their little sphere.

With a little finesse and basic coding-think, yahoo pipes allows me to get each level of data from friends, news & otherwise. Reading them one by one allows me to maintain a relatively consistent affect when reading all 500 tweets, instead of trying to have little affective response to a random news-blip, and then to care deeply over another friends’ status, only to return to not caring. Perhaps that emotional flexibility is possible and desireable in kids, but I’m getting too old for that?

Wordpress Skills (How to hire a WP guy!)

Wednesday, December 16th, 2009

My job just asked me to make a list of what a sister agency should look for in WP ppl. Googling left me with nothing (as all search results seem to have been taken over by SEO ppl lately), so here’s my addition to the mix:

Basic (unquestioned assumptions):
* XHTML syntax, CSS2,
* Browser testing-abilities: IE6-8, FF1-3,Saf3-4, Chrome1-2

WP Basics:
* Upgrading (and fixing when broken!)
* Knowledge of a set of plugins for these common problems:
* “I want a contact form (with these 9 fields)”
* “I want backups”
* “I want a photo gallery (with lightbox)”
* “I want twitter/facebook integration”
* “I want a podcast”
* “I want google maps on my contact page”

WP Intermediate:
* Build/mod a template
* Build/mod a plugin
* jQuery instead of simple, good-ol’-fashioned javascript

Technical/Back-end:
* Can fix ‘broken’ DB’s
* Clean MySQL WP DB from hackers
* phpmyadmin
* MySQL command-line

Users (Teaching skills):
* Guide clients/staff through changing templates, adding special parameters for templates, plugins, upgrades.
* Explain the difference between the 2 editing modes of WP, as well as how a post, page, excerpt are all used.

WP Access controls:
* Should users sign up?
* How to handle editors, admin, readers?
* Public/private posts/pages
* How are comments filtered & what signups required?

SEO:
* What the different HTTP Response numbers mean (#200, 301,302)
* .htaccess mod_rewrite for Apache/Linux servers
* forwarding old sites to WP pages
* forwarding old posts to a archive page
* making ‘pretty urls’ 301 (and why WP default doesn’t do it)
* maing ‘www.’ 301  (and why WP default doesn’t do it)
* The troubles with WP on MS/IIS Servers
* Why XML Sitemaps are good
* Why Google Analytics & Webmaster tools are worth it (and how to interp ‘em to clients)

Anything else out there?

Courier, please deliver soon, or I’ll make you out of Linux!

Wednesday, September 23rd, 2009

Everyone’s all abuzz with Microsoft’s latest leaked prototype: Courier. On an off-note, it’s hilarious to contrast the handwritten everything with the king of monospace fonts! (and previously, my latest interest has been the long-awaited crunchpad.)

But there’s 2 things I’m here to mention: my dream & the obvious rising behind Courier.

Why Courier is Obvious:

First off, how many people do you see carrying around a notebook/folio of some variety? Everyone. The business guys do it for their contacts, dates & files. College kids do it for their class notes. Artsy-kids do it for their scribble-pics. Christians have a habit of doing it for their Bible study/sermon notes. Everyone.

Second: netbook+eReader. Limited computing strikes again, and awaiting for a convergence.

Third: Intel’s atom platform (and I would argue ARM even more!) is ready for this kind of thin-and-goodness. Especially with ssd’s (heck, I’d be happy with an SDHC!)

My Little Dream:

I’m a fan of the UI-customizability of Linux. Always have been: it’s what keeps me away from MacOS. Right now, I’ve got a toolbar that has everything I need in it: time, calendar-on-click, applets & a task-switcher. All this overlays the wasted-space of window-titlebar. Most of the time I maximize my apps, so I can focus. But there are somethings that should be a sidebar: notably a tabbed filemanager (since I already have a tabbed term thanks to tilda).

lxpanel-coloredAnd there’s no reason why a quick photo-viewer, calculator, contacts & datebook cannot also be in this sidebar (especially if cache’d & synced from Google!) All this sidebar stuff is too perfect. Why not make a Window Manager that runs specific apps in specific ‘frames’ (yes, like HTML old-skool style). The frames are resizable & collapsable. Ths is so (similar but) much more useful than a tiling WM.

Next up, I’ve never, ever understood file dialog boxes. I do however understand Delicious’ tagging. It auto-generates recommendations, and why not do this for files?  Linux is built for this: symlinks.

And while we’re at it, why not kill off scrollbars & make everything grab-and-draggable. Just use a modifier key (or both-click). Then we can have the app be like a magnifying glass, with the edges smushed to show you how much more you have down there (in preview-style).

As for all this journally stuff, Xournal is the single-best program I have ever, ever, ever encountered. Multiple-layers? yup. Print to PDF? Yup. Wanna add a new page? Click the ‘next page’ button. It could remove all it’s menus if it just had a ‘preferences’ dialog box. It is the model for any journaling program.

Lastly, mouse-gestures are very hot lately. I don’t use them because I’d like ‘em to be like Courier: context-specific AND list suggested actions, instead of always acting on its own.

Dreams, dreams, dreams.

All I’m sayin’ is if ASUS puts out an Intel Atom dual-screen netbook/eReader next year, or even this year, I’m putting my dreams to work. Just need to solve 2 problems:  the sidebar thinger (update: “devilspie” might be halfway there for me) & handwriting recognition (and I’ve got a prototype system coming this december when classes are out!).

What makes bad software bad

Wednesday, April 29th, 2009

I spent the weekend installing a wireless HP 3-in-1 printer onto a Dell WinXP laptop. I don’t mind doing so for my grandparents-in-laws, but it gets tough explaining to them why the wireless software wouldn’t install. “The box says wireless, why isn’t it wireless?” I know. I’m sorry you have to deal with poor management of software.

  • When software installs, it should give options of what to install.
  • When software installs, it should give useful statistics of progress, not 9 flickering bars and a KBps rate (from a cd!)
  • When software uninstalls, it should remove everything. (including desktop icons to buy supplies!) This pseudo-overly helpful ploy of marketing is crap.

Subversion Mac fix

Tuesday, March 31st, 2009

Subversion is great for more than just simple backups.. it’ll let me know when files were edited, and which files were changed in each sync.

But Subversion was written for the land of *nix/Windows, where these obnoxious things called resource forks don’t exist, where Finder doesn’t auto-create files.

Hear ye, hear ye, I have created the solution.
Mac OS’ .DS_Store files: killed.
Mac OS’ ._blah files: killed.
KDE’s .directory files: killed.

Furthermore, this bash script will auto-update & commit too. Handy for an all-in-one’er. Now, I know, many of you out there are more subversion-knowledgeable, and use hooks for this, but this little beasty will solve already-present crap-files in a repository.

Hope it works for y’all. I’ve tested it against all my repos with lots of crazy characters.. all the quotes out there, etc.

Future improvements: I’m willing to hear about. (like perl regEx’ing svn’s errors to stop the script.. or one-control+c script-stopping)

#/bin/sh
####################################################
## Usage:
##     sh thisscriptfilename.sh folder
##
## Config: change the value of 'export loc'.
##
## Issues handled:
##  quotes in filenames: -print0 / xargs -0
##  spaces in filenames: -print0 / xargs -0
##  svn can't delete files not added: --force
##  svn can't --force delete files in un-added folders: rm -f after svn --force delete
####################################################

export loc="/Volumes/storage/"

cd "$loc/$1"

echo "Displaying status: $loc/$1"
svn status .

echo "Updating changes from server"
svn update .

echo "Cleaning up"
## no MacOS Resource forks!
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname "._*" -print0 | xargs -0  svn --force delete
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname "._*" -print0 | xargs -0  rm -f

## no KDE .directory!
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname ".directory" -print0 | xargs -0 svn --force delete
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname ".directory" -print0 | xargs -0 rm -f

## no .DS_Stores!
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname ".DS_Store" -print0 | xargs -0 svn --force delete
find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname ".DS_Store" -print0 | xargs -0 rm -f

### test:
## find "$loc/$1" \( ! -name .svn -o -prune \) -type f -iname "._*" -print0 | xargs -0 ls -lsa

echo "Adding.."
svn --force add .

echo "Status to send:"
svn status .

echo "Sending.."
svn commit -m '' .

echo "Final status:"
svn status .

Hardware Potential

Wednesday, March 18th, 2009

While everyone who cares is upset at the iPhone’s inability to run more than one application at once, honestly, it makes sense., especially to those of us who have owned WinMo phones and maxed them out.

One of the primary rules of software design has become “don’t make the user manage the memory”. This is good: if my system is maxed out because I’ve run too many programs that decided to not free their memory before closing, I’ll have a dead system fast.. something early WinMo devices fell prey too.

So on comes the iPhone which is determined to deliver the stability popularized by the BSD-based OSX. And most phones don’t run more than one Java app anyways. In my mind, issue resolved.

But what about the desktop? Especially with the low-powered netbooks? Microsoft will deliver a 4-application-only version of Vista. But why, oh why do all major desktops allow the user to slow them down to molasses? Why is there not a “user-friendly” version of the process/resources monitor overlaying the applications launcher, dimming the applications which are recommended to not run up to speed? This assumed-infinite potential leads to direct distrust in software, and leads to a pure guessing game for users: “Yeah, my system slows down after 4 programs.”

Now, I know each application uses different resources depending on the files (websites) opened, but this just shows a systemic failure in desktop design: why attempt to open a file why the system cannot support it? Surely there is a better way.

My New Fav. Website

Tuesday, January 27th, 2009

For us web-dev’ers, there’s usually a set of sites that we always come back around to, mostly because our brains are.. (crazy idea) finite. While I’ve successfully memorized “mdash” to be different than a hyphen, there’s all sorts of bulleting options that silly designers like to make me implement. For such occasions, I just found this list:

http://danshort.com/HTMLentities/

♕ takes ♜ !

UPDATE: IE7 in WinXP doesn’t support many of these entities, so using IE’s conditional comments saves the day: http://www.quirksmode.org/css/condcom.html

JS element justification

Tuesday, March 4th, 2008

So in an over-exuberant (and low-sleep) moment, I coded this one up. Say ya wanna have 5 elements on a page evenly spaced out, but you can’t depend on .. anything. Under normal circumstances a sane person would just use a table, with text-align:center & td.padding. Nope. Not me. I do things the hard way:

<script>
function justifier(par){
ulist=document.getElementById(par);
plain=0;
count=0;
/* determine widths for padding. Must set paddings to 0 for an accurate count */
for(i=0;i<ulist.childNodes.length;i++){
  if(ulist.childNodes[i].nodeType==1 && ulist.childNodes[i].nodeName=="LI"){
	pad(ulist.childNodes[i],0);
	plain+=parseInt(ulist.childNodes[i].offsetWidth);
	count++;
  }
}
wide=ulist.offsetWidth;
x=parseInt((wide-plain-count)/(count*2));	//due to FF, count !=ulist.childNodes.length
//alert("w:"+wide+" cw:"+plain+" ="+(wide-plain)+"/"+count+" pad:"+x);
/* change paddings: */
for(i=0;i<ulist.childNodes.length;i++){
  if(ulist.childNodes[i].nodeType==1 && ulist.childNodes[i].nodeName=="LI"){
	mainMenuItem=ulist.childNodes[i];
	pad(mainMenuItem,x);
  }
}

}

function pad(ele,x){
ele.style.paddingLeft=x+"px";
ele.style.paddingRight=x+"px";
}
</script>

<style>
#list{
width:40%;
border:1px red solid;
}
ul{
padding:0px;
margin:0px;
float:left;
list-style-type:none;
}
li{
padding:0px;
margin:0px;
float:left;
list-style-type:none;
}
</style>
<body onload="justifier('list')" onresize="justifier('list')">
<ul id="list">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>

</body>