Joho the Blogtech Archives - Page 2 of 37 - Joho the Blog

January 15, 2012

So you think you can scrape?

If you’re thinking about scraping a web page to extract the delicious data bits from it, ScraperWiki looks like a great place to start. It’s got tools, examples, and a community. Right now the tools are in Ruby, Python and PHP, but they’re thinking about adding Javascript.

If I have time this weekend, I’m going to give it a try scraping the weekly Berkman Buzz post. Until a couple of weeks ago, I was fairly routinely posting the Buzz on this blog, because I had written a little scraper and formatter that let me go from the email version to the blog markup I prefer. But then those bahstahds at Berkman went all HTML on the weekly email, which completely broke my scraper. But the Berkman page that lists the Buzz looks like it’s ripe for trying out the ScraperWiki tools. Looking forward to it…

3 Comments »

December 30, 2011

Quirky html

In the recent — and probably unabated — unpleasantness attending the launch of the update of this blog’s look, I have learned a little about Quirks mode. I learned this because Internet Explorer 9 was not displaying rounded corners or laying out divs (blocks of content) the way Firefox and Chrome were. Once I switched off Quirks mode in my blog pages, it worked much better.

There’s a good explanation and some very detailed info here. But as I “understand” the story, quirks mode was introduced to handle the problem that different browsers were expecting different sorts of markup (particular for CSS style information). Then, once the browsers realized it would be helpful to everyone if they agreed to support truly standardized standards, they had to decide what to do with the old code written in the particularities of each browser. So, they agreed to allow the HTML developer to specify whether the page she’s created should be interpreted according to the modern standardized standards, or if it’s quirky and ought to be interpreted according to the idiosyncratic expectations of the various browsers.

You, the HTML developer, specify your intentions in the DTD declaration at the very beginning of your HTML pages. This page will help you figure out exactly how that line should read.

Meanwhile, the shame and humiliation the launch of the new look of this blog has brought upon me only deepens, for I have given up on controlling the placement of divs by getting my floats in order. Screw it. I’ve plunked them into a table. Yeah, I’m CSS-ing like it’s 1995.

2 Comments »

September 12, 2011

How to embed a WordPress admin page

I’m posting this so I’ll remember, and in case someone else is googling around for it.

I have a little editor I wrote in javascript for creating blogposts. When I’m done editing, it loads the transmogrified text into an iframe that contains the WordPress /wp-admin/post.php page (which is the one you create posts with). Except that it stopped working recently, giving me “X-FRAME-OPTIONS” errors.

A little research showed that x-frame-options are set at the server to prevent people from capturing your pages in their own evil iframes (e.g., inserting your blog posts into their spammy site), either by preventing anyone from doing so, or preventing anyone from inserting into a page that isn’t from the same site as the source page.

I couldn’t figure out how to unset those options. But Chason C., at MediaTemple.net — my hosting company — got back to me within 24 hours with the answer. It turns out that MediaTemple isn’t setting that option; WordPress is. The solution is explained in this blog post, which Chason found for me.

The irony is that the blogpost with the answer has actually captured and embedded the original blog post by Igor at KrazyWorks, which you can find here.

2 Comments »

January 9, 2011

In honoring Quake, we honor all video games

You don’t have to fully understand these two brief videos from 15 years ago (I don’t) explaining solutions to tech problems building a 3D game (3D as in Quake, not as in putting on the funny glasses) to be reminded how hard it can be to do things that seem simple, and how damned clever our tech is.

3 Comments »

May 28, 2010

Linux on a stick

I’m excited. On the plane ride today, I got Linux loaded onto a USB stick which I then used to boot my Acer One netbook into Linux. Nothing special about that, but because Linux saves onto a 4G section of my USB stick, I now have a tiny, portable OS that saves the stuff I download and create.

My netbook comes loaded with Windows XP on one partition and Android on another. But it’s a particular sucky version of Android, and I’ve found I’m not using it for anything. But I’d rather not be running Windows when I don’t have to. So, the portable USB-ized Ubuntu is perfect for me.

It took me a few tries to get it so that the USB saves the stuff I create while running Linux, and I’m not entirely sure why the slider that sets up the save area was grayed out. Eventually I booted into Linux off of another USB stick, and then used Linux’s own “create startup disk” feature to erase (and format?) the USB stick, which then, at last, let me set aside a save area.

Unfortunately, I have not yet found a way to tether the netbook to my Droid so I can avoid the $15/day Net access charge at the hotel while running Linux. So, for now I’m booting into Windows and using the fabulous PDAnet app.

5 Comments »

August 18, 2009

My new MacBook Pro

My new MacBook Pro 15″ is a thing of beauty. But not everything is as I expected. Here are some notes on the transition, from my first few hours with it:

In the past, when moving from one Mac laptop to another, I’ve just connected the old to the new via Firewire, and the new one pulls over all your old data and settings. It’s like moving into a new house except everything is exactly where you left it. This time, something went very wrong. While the new one recognized that there was another Mac plugged in to it, it timed out in the transfer after just a percentage or two were done. Worse, it behaved the same way whether I connected via Firewire or ethernet (with two different ethernet cables and multiple restarts). It eventually restored from Time Machine, but even then there was a glitch: It said “About one minute remaining” for about two hours. However, once it was done, my new laptop has just about everything I wanted from the old one.

I saved an image of my Windows partition onto my Mac partition via the free WinClone app (thanks for the pointer, Max!), and it restored it back easily, although it complained that the 32GB partition I’d made wasn’t big enough … even though that was the size of the partition on my old Mac.

I’m enjoying the multi-touch; I’d already been using the two-finger scrolling, but four-fingered task switching is a natural.

I had to look up on the Internets what the F5 and F6 keys do: They adjust the backlight under the keyboard.

Note to self: After installing XP in a Boot Camp partition, don’t forget to boot into XP and insert the OS X disk so that it can load all those delectable drivers.

The gorgeous screen is so large I don’t think it will ever be simultaneously clean in every spot.

With the aluminum unibody, I’m not worrying so much about holding it by the left front, which in the plastic MacBook is where the hard drive is. The aluminum also heats up real good, which will be a comfort during those long Boston winters. (Possible new tag line: “MacBook Pro 15: For Men who Have Moved Beyond Sperm Counts.”)

A small disappointment: The model I have has two graphics cards, but you have to log out in order to make the switch. A larger potential disappointment: With a fully charged battery and not too much running (but wi-fi on), I’m only getting about 4.25 hours of battery life. It promised more. But we’ll see. I haven’t tried minimizing all the power draws.

2 Comments »

August 16, 2009

New Mac, and cloning BootCamp XP

Because one of our children needs a new computer, I’ve ordered a brand new 15″ MacBook Pro … for myself. Our child will get my current MacBook 13″. Don’t look at me like that! I’m more of a power user than our child is. And I’m older. Also, I’m paying for it. But mainly it’s a totally rational decision that happens to work out in my favor.

I know that setting up the new Mac will be simple. I’ll plug my old one into the new one (I’m getting a firewire cable that’s 400 on one and 800 on the other, and if that doesn’t work, I’ll connect through the ethernet ports) and the new Mac will suck the life force (= my user directories ‘n’ stuff) out of the old one.

What will really take some time is rebuilding my Bootcamp Windows XP partition: Reinstall XP, and reinstall the few apps I use. (I am still using Microsoft Money, waiting for the new version of Quicken for the Mac, which keeps getting postponed.) I’d much rather clone the old Bootcamp partition onto the new machine. So, I looked around and found Bart PE and YouTube instructions for burning a Bart PE boot disk. I believe I now have to make a disk image of my current Windows partition, save it onto a USB hard drive, and then, well, I don’t exactly know, but I’ll figure it out. Maybe.

[Tags: ]

5 Comments »

July 26, 2009

A tip to the TSA

Here’s an except from a message Gary Stock sent to a mailing list (used with permission):

Works:
http://www.tsa.gov/

Fails:

http://tsa.gov/

Network Timeout
The server at tsa.gov is taking too long to respond.

(Don’t you suppose that’s hundreds of people, or more, every day?)

Presumably, because the underlying address is:

http://tsagov.edgesuite.net/

…which seems awfully damn strange to begin with!

I work in server config only infrequently, but there are at least two
very reliable methods to make “http://tsa.gov” function — some one of
which *should* be invoked. Either add a DNS CNAME record, OR use
.htaccess locally for a 301 redirect. (More obscure DNS record or
server conf alternatives are left as an exercise for the reader ;-)

Anyone at the TSA listening (= ego-surfing) and care to make the change? (PS: The TSA blog continues to be a model. Also, fun.)

[Tags: ]

Comments Off on A tip to the TSA

June 17, 2009

Testing Apture

I just upgraded WordPress (well, BradSucks actually did it for me. Thanks, Brad!) and while I (um, he) was at it, I upgraded to the latest version of Apture. Apture lets you overload a link with whole bunches of information that pop up when a user clicks on it. The new version lets you add the Apture links while you are typing into WordPress’s “Add New Post” edit box, as I’m currently doing. This is more convenient than having to go back through your post to add the Apture links, but, more important, links added while in the edit box get saved locally. So, if Apture should — perish the thought! — someday perish, the links will still work. (If you add more than one destination to an Apture link, as I did for the BradSucks link, only the first one is saved locally, which is a very reasonable solution.)

Apture is free to sites with fewer than 5M page views. The new version also lets you add your own sources of links, in addition to coming loaded with Wikipedia, Flickr, Yahoo search (because Google search doesn’t have the API Apture needs) and a bunch of others.

6 Comments »

June 2, 2009

Why did E Ink sell?

E Ink has sold itself to Prime View International, a large Taiwanese display manufacturer, and I don’t understand why.

Now, it’s not surprising I don’t understand why. I have no info about E Ink’s financial state other than this article by Robert Weisman in the Boston Globe, and in any case I’m not a great financial guy (and I have the bank statements to prove it). So, my surprise may well be due to nothing but ignorance. Nevertheless, here’s why I was taken aback by the announcement.
E Ink is on a roll in a market that is about to explode (in the good sense). After ten years of work developing a low-power, highly legible display, it’s got something that works. Thanks to Kindle, it’s proven itself in the mass market and it’s in lots of people’s hands. And the market is about to take off now that we have digital delivery systems, a new generation of hardware, and a huge disruption in the traditional publishing market. So, why would E Ink sell itself?

The price — $215M — seems relatively low for such a hot product. If they need the money to fund R&D or to build manufacturing facilities, surely (= it’s not at all sure) there were other possibilities. Apparently the market crisis made an IPO implausible, although, to tell the truth, I — with my weak financial grasp — am not convinced. Investors are looking for places to invest, and E Ink looks like it’s exactly the sort of company they’d love to back: a proven leader in a market that’s obviously on the verge of explosive growth. It’d be like getting in on the early stage of iPods, only potentially bigger, since everyone who reads eventually will have an e-reader. But, if an IPO was out, why wouldn’t E Ink have preferred other forms of investment, including giving a partnership and equity stake to Prime View?

The most likely explanation by far is that I don’t understand what I’m talking about. Another explanation is that the company and its investors simply wanted to cash in by cashing out; the Globe article suggests this. But, that again raises the question of why they’d want to exit a company with a product in a market that’s about to take off. Perhaps they have reason to think the market is not going to take off , but that seems wrong; note that Google yesterday announced it’s going to enter the online book sales business. Or maybe they have doubts about E Ink technology. Maybe they worry the cost won’t drop fast enough for a commoditized market. Maybe color isn’t on its way fast enough. Maybe they’re worried about the inability (or so I’m presuming) of their tech ever to handle video, since the winning e-reader will eventually be multimedia. Maybe they know about ebooks on the way — Apple iPad or whatever the presumed product will be called — that will make static, black-on-gray pages seem obsolete.

So, I don’t know. But it smells fishy to me…although, as I may have mentioned, my financial sniffer has never been very reliable, and I’ll be happy to be set straight about this.

[Tags: ]

13 Comments »

« Previous Page | Next Page »