![]() |
Out of Egypt:Halfway to the Promised Land"God is a place you will wait for the rest of your life." |
August 13, 2008
facebook + mysql = a surprisingly addictive combination
Tonight I learned for the first time about FQL (Facebook Query Language). Apparently, as the samples show, you can use it in your Facebook Platform applications to query Facebook's database. And you can test it live, as long as you have a Facebook account (and possibly also a developer account, which is also free). Obviously, there are a lot of possibilities.
Here's just one of them:
SELECT name, profile_url, notes_count FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = 146900075) AND notes_count > 0 ORDER BY notes_count DESC
That shows the names and profile urls of all my Facebook friends who have posted notes, ordered by how many notes they have posted.
If y'all can think of any other cool demos, post them in the comments.
August 10, 2008
from the realm of desperate marketing schemes
Microsoft's latest campaign to save Vista: "What do people say about Vista when they don't know it's Vista?"
Sounds like a desperate rebranding exercise to me. Ironically, the ad was placed next to Fareed Zakaria's article "What Bush Got Right."
July 20, 2008
fun with programming, pt. I: interactive pi in ruby
Here's a little program (pi_calc.rb) I adapted today from the devdaily blog to calculate the value of pi using the converging series
4/1 - 4/3 + 4/5 - 4/7 + 4/9 ....
The original program wasn't interactive so you had to keep editing the code just to see how much more accurate the calculation got as you went farther into the series. I fixed that.
You should be able to run the program on Mac OS X or on any other Unix-y system that has Ruby installed in /usr/bin. Just open the Terminal, go to the directory to which you've downloaded the script (by using cd), and type ./pi_calc.rb
If it doesn't work for you, try doing a chmod 755 pi_calc.rb in the directory to which you downloaded the script. Beyond that, I can make no guarantees about the performance of my code. It's the first Ruby script I've ever written.
July 13, 2008
wget debugging magic
(Explanation to come later. Wish that party next door would stop. It makes it hard to even want to sleep.)
Command: wget -S -p -Pwebtests/um.org/volunteer --output-file=volunteer.log http://www.urbanministry.org/volunteer
wget : gets web files, non-interactive
-S : get server headers
-Pdirectory : save to directory
-p : gets all necessary files
--output-file=file.log : file to save information in (is saved in your home directory)
http://www.example.com/page : page to get
Open the logfile that's created in your home directory and you have an instant log of how your site performs - a) total time, b) headers sent, and c) any 404 or 3xx errors.
July 12, 2008
got WordPress to work on XAMPP for Mac OS X
In case anyone else out there wants to know how to get WordPress working on XAMPP for Mac OS X, check this:
June 21, 2008
levertov has got our number...
"Those Who Want Out"
In their homes, much glass and steel. Their cars are fast - walking's for children, except in rooms. When they take longer trips, they think with contempt of the jet's archaic slowness. Monastic in dedication to work, they apply honed skills, impatient of less than perfection. They sleep by day when the bustle of lives might disturb their research, and labor beneath flourescent light in controlled environments fitting their needs, as the dialects in which they converse, with each other or with the machines (which are not called machines) are controlled and fitting. The air they breathe is conditioned. Coffee and coke keep them alert. But no one can say they don't dream, that they have no vision. Their vision consumes them, they think all the time of the city in space, they long for the permanent colony, not just a lab up there, the whole works, malls, racquet courts, hot tubs, state-of-the-art ski machines, entertainment...Imagine it, they think, way out there, outside of 'nature,' unhampered, a place contrived by man, supreme triumph of reason. They know it will happen. They do not love the earth.
the "gray goo" problem of new media
Filesharing havens like the Pirate Bay are unleashing round after round of "creative destruction" on intellectual property rights as we know them. And it's not easy to feel sympathetic for the MPAA, especially when you read about how they opposed the Betamax in its day.
However, I somehow doubt that the future of rock is an Outback Steakhouse commercial. We may be living in "Remix Culture", but when everyone's busy making YTMNDs and mashups, who's going to make the originals?
As a creative person, I know that there some things I won't do for free. Blog, yes; do investigative journalism, no. Blogging hotspots like Gawker.com are parasitic on the old media which they hold in such contempt. It's easier to be a blogger than to run a newspaper, but easier still to comment on someone else's blog. What happens when the disintermediators get disintermediated?
Since the birth of mass media, media creation has been a function of the market rather than of an intellectual elite. This has served us well in many respects, but not so well in others. The market cares about "content", not about culture. And content is a commodity which, like all commodities, is sought at the lowest price possible.
New media are beneficial insofar as they lower the barrier of entry for potential content creators. However, in doing this, they also have the potential to displace older media, just as television displaced radio dramas or film displaced vaudeville. Since hypertext is what I call a "master medium" - capable of conveying the content of all other media - it has the potential to displace all of them.
There would be nothing wrong with this except that hypertext as we know it is transmitted on the Web, and there is no generally accepted way of directly compensating content creators for Web content. Advertising is only a stopgap solution, and is especially dubious as long as Google has such market dominance.
Nearly everything that people create today is either directly offered for free online, or is available for free through illegal online services. This is destroying the incentive for many forms of content to be produced. Of course, new forms are taking their place, but these favor the lowest common denominator, rather than distinctive insights or creative genius. The two characteristic literary styles of "Web 2.0" are Wikipedia's denatured "NPOV" and the blogosphere's frenetic flamewars.
Jaron Lanier calls this "digital Maoism", but it's really just consistent capitalism. What is Digg if not a Wal-Mart of the postmodern mind, catering to all our cultural needs at the lowest prices?
Of course, "free culture" critics are free to create something better. But if they can't earn a living doing so, then they'll have to either: a) get a "real" job (doing IT or working at Starbucks - the two viable careers of a post-industrial age?) and "do culture" as a hobby, b) be subsidized by the state, or c) work for a nonprofit or academic institution (and depend on the kindness of strangers to keep their endeavor afloat). Compared to the position of the author, etc. in the pre-digital era, this seems like a step down.
Unless we can find a way to compensate creative people fairly for their work in the digital age, the "grey goo" of lowest-common-denominator "user contributed content" may supplant much of the culture we once had.
March 30, 2008
followup: editing the .bash_profile in a visual editor on mac os x
Using vi to edit the .bash_profile is all well and good, but its command structure is a bit inscrutable at first, and easy to get wrong later on. A visual editor might be nice. I recommend my favorite - TextWrangler.
But you have a problem. The .bash_profile is a hidden file. So how do you open it in a visual editor? If we were in Windows, we could use the "Show Hidden Files" option. But on Mac OS X, you have to use some obscure command-line wizardry to do the same thing, and then you might find you're seeing too much. (Macs, for some reason, have tons of hidden files in every directory.)
Fortunately, there's an easier way. The .bash_profile is located in your home directory, so just make sure that you're there (if you're using the default prompt, there should be a tilde before the dollar sign). Then just use ls -a to confirm that there's a .bash_profile there (if not, use touch .bash_profile to create it). Finally type in the following:
open -b com.barebones.textwrangler .bash_profile
Depending on the file permissions set on .bash_profile, you may have to put sudo at the beginning of that command (and then enter your admin (root) password). Otherwise, you should be set.
If you're curious about how I did that, just type man open. After reading about the -b switch, check out this article about application bundles to learn how I figured out what the application code for TextWrangler was.
serious geekery
So today I learned how to change your prompt on the Mac OS terminal. At first, I was confused, however, as to why if I ran the bash shell from the Terminal my changes would show up, but if I just clicked on New Shell from Terminal's File menu, they didn't.
Unsurprisingly for Unix, there was a complicated answer, having to do with the difference between two user profile files (which are actually shell scripts). One, .bash_profile, is executed on login (which is why it controls the Terminal settings); the other, .bashrc, is executed when the shell is invoked from inside another shell (or from inside X Windows, apparently, although that doesn't seem to hold true on the Mac).
If you really want to learn more about the difference between .bash_profile and .bashrc, you could read this article. Or you could just type diff .bashrc .bash_profile. </end stupid Unix joke>
February 27, 2008
the building blocks of code
In the past few months, I've been excited to work more with the "nitty-gritty" of our websites: HTML, PHP, and JSP (primarily staying away from the latter so as not to break it). I'm still no programmer, but at least I have a vague idea of what does what now.
Computer programming is based on a few simple concepts. Once you have a grasp of functions, variables, operators, conditionals, loops, arrays, error checking, and includes, you've pretty much covered the territory. All the rest is application.
November 26, 2007
digital fast
I didn't go online all weekend. Surprisingly, I didn't miss it. When you've found your place in a physical community, online communities tend to lose their luster.
Checking email becomes a hassle. YouTube isn't as funny as your family's stories. And Facebook gifts can't compare to real ones.
This is not to say that technology has not brought vast blessings to our lives. Without the Web, I don't know how I would've found the phone number for Monk's. Planning my route through Philly would've been much more difficult (though serendipity has its virtues). Email, SMS, and Facebook messages are a convenient way to orchestrate real-world events - using the power of the outboard brain to make things fall into place a little more quickly.
It's all too easy, however, for technology to stop being an aid to life and become a substitute for it. As publications editor for TechMission, I look at a lot of websites every day. All the new Web-based advocacy movements are exciting, but I am not . Without a commitment to "walking with the poor," our emailed petitions, PayPal microdonations, and hard-hitting blog posts are all just demonstrations of solitarity.
I once titled a post on UrbanMinistry.org "activism by mouse clicks," but that was inaccurate. Social justice workers can use new media to raise awareness of issues, help in soliciting donations, and show those in power that there is broad support for change, but they shouldn't view it as a panacea. The revolution will not be digitized.
The ancient Israelites kept Sabbath every Saturday to remind them that YHWH was Lord of their labor. Perhaps we should keep a digital sabbath, to remind us that we are not to be ruled by technology. Though such observance is no substitute for the real Sabbath rest of the people of God, it would be a first step toward the re-orientation of values which will bring about true social change.
October 7, 2007
i think i've decided what my next computer will be
Engadget may laugh, but this review makes me think my next computer will be an Amiga.
I want a fast system, not a flashy one. My newfound interest in the Amiga may seem ridiculous to most people out there, but perhaps this quote from the review will explain it: "Because the OS and its applications take up so few resources, it is possible to run an entire suite of programs—my typical usage is ten or so pages up in a browser, an IRC client, an MSN client, a text editor, a command shell, a 2D graphics editor, an e-mail client, a word processor, and a media player—and still have all these elements fit in a mere 256MB of RAM."
The Web is becoming an operating system (in the non-technical sense of the world, as "the space where people interact with their documents while on their computer"). I spend most of my time at work using it as such. Why then do I need the monstrosity of Vista, the laggard that is XP, or the extravagance of OS X?
Sure, I could switch to Linux, and I may do so in some sort of dual-boot arrangement. But despite the best efforts of its fans, Linux is still not a client operating system. Its slogan should by "By techies, for techies."
Amiga OS may be showing its age, but it looks like the perfect operating system to just mess around in. I just wish I could find the hardware to run it on.
I wonder if the OLPCs (if they are, in fact, released to consumers) would be able to run it? That might be a match made in heaven.
August 5, 2007
computer skills i plan to learn
(whether from book, or course, or hands-on)
In a further entry, I plan on describing why I want to acquire these skills.
- Mac OS X (adv. skills - esp. X Window & FreeBSD (OS X's Unix core))
- Unix/Linux (esp. w/r/t the web - cron, wget, ssh, sftp, file commands, vi, permissions, compiling, dependencies)
- HTML (though I know most of it already)
- CSS (esp. the box model, adv. selectors, and other more-recent additions to the standard)
- RSS/Podcasting
- JavaScript
- PHP
- XML (the basics)
- Other web programming: possibly Java, Ajax, Ruby, Perl... (choose some)
- Apache administration
- MySQL & MyPHPAdmin
- CMS's - Drupal, esp. (Joomla, WordPress, MovableType are the other big ones)
- Photoshop, Illustrator, InDesign
- Shockwave, Flash
- C++ (esp w/r/t Mac - since that's the platform on which I work)
- programming for major Web APIs (Googlemaps, Facebook, etc.)
So, can any of you recommend good resources for learning any of these things?
