A Link to NYTimes: Rivals Seize on Troubles of Facebook

posted 2 months ago

Ultimately, I doubt there’ll be enough momentum for any of these sites to really take off. And yes, I say that despite me backing Diaspora*. But I believe they will fail to attract a serious following because in the end, you go where your people are, and they’re not there yet. Herd mentality meets chicken & egg.

I—as an end user—would need to decide whether my jumping ship @ FB is more important than loosing the “posse” I’ve built there during the time I’ve used the site. And I think for most people the answer would be “no”.

That being said, I approve of all of these efforts to build some much needed competition for the four thousand million pound gorilla that is Facebook. The prospect of having a portable profile (see Diaspora* for more info) is exciting, but while I hope that their plans come to fruition (especially their hosted service) I remain skeptical.

Still running: Vibrams, Week 2

Tuesday, April 27, 2010

Wore my Nike Free yesterday, as they’re the most flexible (actual) shoes I own. No time for running, tho, also still some residue muscle pain.

Today: Beautiful morning, decided to ignore the bus and walk to the subway. 3.5 km in my Nikes, and while they’re pretty good, I miss the ability to wiggle my toes.

Came home, went for a 3.5 km VFF walk with Dana. My calves seem to man up, finally. With a bit of luck I might be able to go for a run on Thursday again!

Wednesday

Came home, my legs still aching a bit, but I thought “eh, what the eff” and went for a 5 km run. Didn’t even take a watch or anything; I just felt like running. The last time this happened to me was never. And I had fun.

To be honest, the combination of THE BOOK and MY NEW SHOES caused this almost eerie, constant desire to get out and run. I’m not making this up; it’s uncanny. I’ve never had this urge to just crunch some miles. And it’s not because of stress at work or anything. I’m calm, I’m my usual sunny self, not stressed out… It’s just a deep-seated feeling that running would be the right thing to do right fucking now. For no apparent reason. (Perhaps they’ve put brain-altering chemicals into the book; I don’t know… I don’t know.)

And I won’t lie, I’ll enjoy it for as long as it lasts. It might go away tomorrow or next week or in five years time, I don’t know, but I’m cool with it. There are worse urges, really.

Also: I can predict the future! Tomorrow, walking will hurt. (I wish my calves would man up quicker.)

Thursday

Turns out I can’t predict the future after all — I can walk rather painlessly today. Apparently all the extra post-run stretching and muscle rubbing1 was a good idea.

Had a discussion with another (ex) Y! about running barefoot’ish. It’s not just about not running on your heels, but about foot strength/health in general. In running shoes, the foot’s arch is bolstered and propped up to various degrees. And your toes are pretty much suspended. When running without shoes, the arch acts like a spring, and the toes react to the underground, but they can’t do that when shod.

The difference is not just that you’re running on your forefeet, it’s about giving the foot (and therefore the leg) a chance to work as intended.

Friday

5 km, ‘twas okay — not more, not less. The humidity took me a bit by surprise, and my big lunch wasn’t helping the cause either. So: eh.

My lower legs are slowly adjusting to the change. Atta boys!

One of the Vibrams is slowly coming apart a bit at the heel (where the mesh is glued to the rubber “skin”), which is a bit strange after only one week of moderate use. They’re not falling apart or anything, their function isn’t impaired, it’s just a visible “glitch” I’m not too happy with. They’re one week old after all.

I’ll hit the sports store on Monday and ask for either a replacement or (some) money back.

Saturday, Sunday

Rest of the week were wasted on shitty weather and/or me freezing, so no running.


  1. Not an euphemism, thankyouverymuch. 

posted 2 months ago in en Running Vibram FiveFingers Barefooting contains 1 note

Loading...

Still running: Barefooting

Reading Christopher McDougall’s highly interesting and inspirational “Born to Run”, I came back to my idea of running (semi-)barefoot. Turns out there are a lot of people with the same idea, and companies catering to this idea. So last Thursday I treated myself to a new pair of Vibram FiveFingers KSO.

VFF are basically what you would get if you dipped your feet into molten rubber, minus, you know, the excrutiating pain, blistering skin and earache caused by your own frantic screaming. They’re a thin, highly elastic second skin for your feet, and not much else, really. Needless to say, I love them.

Being the serial enthusiast I am, I’ll try to keep a short-form diary of my semi-barefoot running progress and findings for my own sake.

Thursday, April 22, 2010

Was paid by a client today, there’s money to be spent! Went to the sports store to see whether they have Vibrams in stock; the answer was a resounding yes. Tried them on and was sold. 10 minutes and €105 later I was the proud owner of a brown pair of Vibram FiveFingers KSO.

Wore them on my way home; not bad. A bit strange at first, but I quickly forgot about them. Went home, the weather’s nice, decided to go for a quick and easy run. Didn’t expect much, but was surprised.

Without trying to, I ran the first 5km straight, without much effort or being winded. Had to take a quick breather (while walking) because I was starting to feel light side stitches. Walked for ~250m, then took off again. When I got home and checked my time, I noticed I had beaten my usual time by roughly 5 minutes. And I was barely exhausted after those 7.4km.

The fun thing about barefoot running (or running with nothing but a thin layer of protection wrapped around your feet) is that your body instinctively knows what to do. You straighten up involuntarily, you (normally) don’t land on your heel but on your fore- or middlefoot, and you keep your feet right below your frame while running.

All you have to do is forgetting your old shod running style, really, and listen to your instincts.

Now, when your feet are cushioned (i.e., stuck in your average shock-absorbing running shoe), you tend to land heel-first while going for long strides. A long stride means more distance covered per step, right? True, but it’s rather unnatural, because if you’d do it without shoes, you’d end up in a world of pain as the body isn’t made for this kind of self-beating.

So, after the first few steps in my new VFF my body adjusted. I was going rather slow, well within my comfort zone, my back was straight as a candle, yet I didn’t fall into my usual thump-thump-thump rythm.

Awesome shoes! To be fair, when I got home I definitely felt my calves… they were more sore than usual. No, wrong… They were sore, and they usually aren’t. Then again, usually I am sweat-drenched and exhausted by the time I am back on my own doorstep — not this time, so I consider it a good deal. :)

When Dana came home, she wouldn’t stop laughing at them.

Friday, April 23, 2010

Holy shit, my calves. They feel like I’ve actually used them for the first time in my life.

Still, have a good feeling about the Vibrams; even about my calves. I was expecting sore muscles; after all, I’m completely changing the way I run. Obviously, I’ve done that.

Wore the VFF when getting out for lunch. Not much walking there, but I felt like giddy like a little boy about his new Spongebob shoes, and I never want to take them off again.

Saturday, April 24, 2010

Took Dana to the sports store so she could see whether the Vibrams are something for her. Like me (even more like me) she could use stronger feet, and naturally I want to share this new sensation with her. She’s picked out a pair of grey KSO.

After we got home we went for a casual 5km walk on my running trail. She liked it, although her feet and legs were a bit sore. Don’t tell her, but I was expecting this. ;)

My calves are still hurting a bit.

Sunday, April 25, 2010

Beautiful day, and despite the slightly sore muscles I decided to run. Not the best idea I’ve ever had, really. ;) Now they really hurt.

Well, suits me. I don’t blame the shoes, tho. I just didn’t listen to my body; the outcome should teach me.

Stupid me, always pushing too hard.

posted 3 months ago in en Running Vibram FiveFingers Barefooting contains 1 note

Loading...

Ephemera v1.1

Last night I’ve released a new version of Ephemera, my 2-way Instapaper/ebook-reader sync tool for Mac.

Here’s what’s new:

  • NEW: The app runs on both 32 and 64 bit Snow Leopard now.
  • NEW: When auto-sync is enabled and you plug in your reading device, Ephemera will show a “Going to sync…” dialog for 5 seconds, where you can temporarily disable syncing.
  • NEW: Support for password-less Instapaper accounts.
  • FIX: Preferences menu item will be correctly disabled during sync.
  • FIX: Multiple concurrent syncs will not stall anymore.
  • PLEASE NOTE: Involuntary archiving of all your unread articles at each sync will happen if you’ve set your Instapaper account to automatic archiving. See this support thread for how to change said Instapaper setting.

I’m especially happy about the 32 bit compatibility. Turns out I’ve managed to dig up an issue in MacRuby 0.5. Thanks to Thibault and the rest of the MR crew for hunting it down and fixing it. Hat tip, guys. :)

If you’re using Ephemera already, its auto-updater will pop up soon enough. If not, go take a look.

If you like Ephemera, feel free to spread the word (there’s a little “Share” widget on the site), or tell IUseThis how you feel about the app. Thanks!

posted 5 months ago in apple osx ephemera instapaper

Assorted MacRuby Snippets #2

This post references MacRuby 0.5, used with Xcode 3.2 on Snopard (10.6.2); the general technique will likely work on other OS/Xcode version, tho. Just saying.

Apps with more than just one framework

The standard MR app template massages $LOAD_PATH a bit in order to have apps which embed the MR framework use said embedded framework in Release builds. The piece of code in question looks like this:

if Dir.exist?(NSBundle.mainBundle.privateFrameworksPath)
  $:.map! { |x| x.sub(/^\/Library\/Frameworks/, NSBundle.mainBundle.privateFrameworksPath) }
  $:.unshift(NSBundle.mainBundle.resourcePath.fileSystemRepresentation)
end

Which is quite alright if all you embed is the MacRuby framework and are building a release. But as soon as you add another one (Sparkle, for example), the test will always be true, whether you’re debugging without embedding MR or not, and your console will show Ruby load errors. The fix is easy, but it took me a few minutes to find the issue, so here we go.

if Dir.exist?( File.expand_path("MacRuby.framework", NSBundle.mainBundle.privateFrameworksPath) )
  $:.map! { |x| x.sub(/^\/Library\/Frameworks/, NSBundle.mainBundle.privateFrameworksPath) }
  $:.unshift(NSBundle.mainBundle.resourcePath.fileSystemRepresentation)
end

Just a heads-up: the rb_main.rb template in the current MR nightlies doesn’t contain the code above anymore — it appears the “magic” was moved into macruby_deploy (changeset), so it’s likely my fix will be unnecessary in MR 0.6.

posted 5 months ago in xcode code macruby ruby snippets apple osx contains 1 note

Loading...

Accessing the Keychain with MacRuby

This post references MacRuby 0.5, used with Xcode 3.2 on Snopard (10.6.2); the general technique will likely work on other OS/Xcode version, tho. Just saying.

At some point in my project I needed to access OSX’ Keychain to store sensitive userdata. Unfortunately, due to the lack of void pointers in MacRuby 0.5 (see Trac ticket), I couldn’t use standard methods like SecKeychainAddGenericPassword. The guys on the mailing list told me to use a wrapper instead. Doing some reading and poking around the interwebs I finally figured it out, and since it’s a neat trick I thought I’d scribble it down, so maybe it will safe someone in a position like me a bit of time. ;)

I’ve decided to go with ExtendMac’s EMKeychain class because it’s simple, clean, free and has a liberal license (MIT license, if I’m not mistaken).

Disclaimer: I’m not a Obj-C person, and what you’re about to read is what works for me. I’ve tinkered until everything was moving in the right direction. There might be better ways (I’m pretty sure there are), and if what I’ve done here is bollocks, I’d be delighted if you would share your knowledge with me. :) Also, I’d enjoy a comment with your thoughts about this here article. Any opinion will do. Just curious is all.

Step 1: Build the wrapper, EMKeychain.dylib

First, we’ll have to make EMKeychain into a dynamic library. Download it from the site, unzip it, and fire up Xcode. There, start a new project of the type “Cocoa Library”.

Starting a new project of the type "Cocoa Library"

When asked for the name, call it “EMKeychain”. It kind of makes sense. This is what you’ll end up with:

New project view

In the screenshot you’ll notice a file called EMKeychain_Prefix.pch. That’s a so-called “precompiled header”; Xcode creates it automatically for you on project creation.

Next, add the files EMKeychain.m and EMKeychain.h to your project by dragging them from the download folder to the “Classes” folder.

Two files added to the project

Since the EMKeychain documentation said the class needs to be linked against Carbon and Security frameworks, do that by right-clicking on the “Linked Frameworks” folder in the tree and selecting Add Existing Frameworks…:

The linked frameworks show up in my project

Following the related MacRuby tutorial’s advice, add a constructor to the end of EMKeychain.m:

void Init_EMKeychain(void) { }

Next, adjust the build settings — switch the base SDK to 10.5…

Base SDK set

… and enable GC.

GC enabled

Build a release, and you’ll have your wrapper.

Step 2: Using it

Now for the fun part.

  1. Add the just built EMKeychain.dylib to your MacRuby project. (Don’t forget to copy the file over.)
  2. Add EMKeychain.dylib to Targets ➔ [project name] ➔ Copy Bundle Resources.

And that’s it. If all went well, you should now be able to use EMKeychain’s EMGenericKeychainItem.

Step 3: Mopping up

It’s very likely that when running your release build it’ll crash and burn and complain about a missing /usr/lib/EMKeychain.dylib. In this case, you’ll have to adjust the built executable accordingly using install_name_tool.

You can do that by adding a new Run Script build phase to the target, which should contain this code.

install_name_tool -change /usr/lib/EMKeychain.dylib \
  "@executable_path/../Resources/EMKeychain.dylib" \
  "$TARGET_BUILD_DIR/$PROJECT_NAME.app/Contents/MacOS/$PROJECT_NAME"

It’s possible that on the next build the executable will mope about a missing /usr/local/lib/EMKeychain.dylib now. Duplicate the snippet and adjust the second one accordingly.

Step 4: Get yourself a beer

Because if all went according to plan, you’re done. :)

posted 5 months ago in macruby keychain osx apple code xcode obj-c howto

Ephemera for Mac

I’ve built my first Mac app: Ephemera, which offers two-way Instapaper.com sync for your ebook reader.

Ephemera main window

Here’s its story, my motivation, and what it does.


Preface

Ephemera is neither endorsed by nor affiliated with Instapaper.com or Marco Arment. I’m just a huge fan.

How it came to be

A few months ago, in Oct or Nov 2009, about an hour after getting my Kindle 21 I just knew that it would be the perfect device to read my news on.

I was happy with my Cybook gen3 so far, but once I got the Kindle, it became clear that it could’ve been quite a bit more. The whole K2 experience is superior in every imaginable way; the hardware feels more solid, the UI is much better laid out and consistent (a big plus), its font is lovely… I could go on and on. And for whatever reason, I’ve never developed the wish to read my news on the Cybook.

So chalk up another one for the Kindle for inspiring me.

Anyways, back then I usually caught up on my news using iPod touch/iPhone, using the wonderful Instapaper app, which (unsurprisingly) is a frontend for the even awesomefuller Instapaper.com.

(If you haven’t heard of Instapaper yet, go on, check it out real quick, I’ll wait. — Back? Cool.)

Well, how to get my Instapaper content onto my reader, then?

Application development on the Kindle was out of the question, and still is. (Yes, I know about the upcoming SDK, but what I’ve read so far doesn’t appeal to me in any way; bandwidth and hardware limitations and somesuch.) The next best thing would be a tool running on the Mac, then. Unfortunately, I knew squat about OSX development.

Hence, I’ve decided to keep it simple, and wrote a little Ruby script I would manually run whenever I wanted to sync the device. Worked well, aside from the manual part. It’s just too much work! Still, it was nice to see my Instapaper news on my reader with its “super-easy on the eyes” e-ink screen. Quite early in the process I’ve added 2-way synchronization: when I would delete an article on the device, it was automatically archived at Instapaper.com during the next sync. Even nicer!

Still, too much manual work.

Motivation

By end of 2009 I’ve decided I’d go into OSX programming for a change. I had a clearly defined need, there wasn’t a tool for it, plus I’d never built an OSX app before — that’s enough motivation. So the first three weeks of the year I dove into MacRuby and Cocoa, just grazing Objective-C2, all while building —drumroll!Ephemera.

Oh yeah, my first-ever Mac app! :D And within the time limit, too — my goal was three weeks from start to finish (“finish” being “have something you can show to other people without completely embarassing yourself”), and I’ve made it. (BTW, meeting tight goals is awesome, don’t underestimate the effect.)

Enough of the inane banter, what is it?

Ephemera will comfortably synchronize your ebook reader with Instapaper.com via USB. It works with the Amazon Kindle, Sony readers and pretty much any device capable of reading HTML, Mobipocket or EPUB files, which should cover quite a bit of ground.

It will fetch your news as single articles or in Instapaper’s premade bundles (Mobipocket & EPUB). Personally, I prefer the former. I can read an article, delete it on my reader, and during the next sync it’ll be archived on Instapaper.com.

Being the lazy guy, I’ve also implemented a feature I call “Plug, Sync & Go”: If you want it to, Ephemera will automatically start up, sync, and then unmount your reader when it detects the USB connection. My idea was that you’d configure the app once, and then just have it work — by simply connecting your reader.

I’ve tried to make it as simple and comfortable as possible to get your news onto your reader. For example, the main window has only two buttons, one of them is for opening the preferences, and the important other one you don’t even have to press most of the time. So I think I’ve succeeded.

It’s not perfect yet, of course, as there’s still a lot of work to do, and I do have a number of ideas I’d like to implement. But I mean, look: I’ve set up a support site and a Twitter account, so you know I mean business, right? ;)

At the moment Ephemera runs on 10.5 and up 10.63, 64 bit Intel only. I don’t think I’ll add 10.4 support, but I’m working on the 32 bit version (MacRuby is giving me quite a bit of flak on that front).

UPDATE 2010-02-16: I’ve released v1.1 today, which runs on all Snow Leopard machines.

Dev notes

Ephemera was made possible by MacRuby. MacRuby sits on top of Objective-C, can be embedded & compiled, which means you can build self-contained applications.

I’ve started using MacRuby v0.5b2; last weekend v0.5final was released. They say it’s not ready for production yet, but I laugh in the face of danger, quite manly actually, because that’s how I roll. ;) But yes, it’s still a bit rough around the edges (for example, as mentioned before I couldn’t get the compiled 32bit versions of the app to work, so I’ve filed a ticket and hope someone will look into it).

Also, due to the lack of void pointer support there were issues with accessing the OSX Keychain (i.e. it didn’t work), so I had to work around that. I’ve managed to do that; on the upside I know now how to bundle Obj-C libraries in .dylib files which you can then use from MacRuby. (A seperate article on this topic is coming up soon has been written, keep an eye on the MR section of my site if you’re interested.)

That being said, if you’re feeling a bit adventurous, take a look. It’s quite a remarkable and exciting project. Writing OSX apps using Ruby is fun and enjoyable once you get the hang of it. Also, there are brave men working on getting MacRuby going on the iPhone.

UPDATE: Forgot two links to good non-web resources — you might want to check out Peepcode’s “Meet MacRuby” screencast as well as PragProg’s “Programming Cocoa with Ruby” book. The latter is a RubyCocoa book, but the overall principles of app development apply to MacRuby as well.

That’s all, folks

Anyways, that’s the story. I know it’s not an app for everyone, but it’s been a while since I wrote something I myself would use on a daily basis, and that counts for something. I’ve showed it to a few people, and some of them actually replied and helped me testing (thanks Mike, Norm, Bernhard & Mat). The overall feedback was very positive, which is encouraging, to say the least.

Yes, and I’m proud of myself. In the eternal words of Chuck Noland4: “Look what I have created… I have made fire!”

Ephemera for Mac.


  1. Insert link here to glowing Kindle 2 review I’ve yet to write. 

  2. The place to be for bracket fetishists! 

  3. Snow Leopard only at the moment, as I’ve ran into some finer points of 10.5/10.6 compatibility settings in Xcode. Le sigh

  4. From the movie “Castaway”, which I’ve never watched. Nonetheless, iconic scene. 

posted 5 months ago in apple ephemera macruby osx ruby instapaper contains 34 notes

Loading...

Xcode & MacRuby: Embed, Compile, Fix

This post references MacRuby 0.5b2, used with Xcode 3.2 on Snopard (10.6.2).

At some point you’ll probably want to create a release build for your app. You’d like to compile it and embed the MacRuby framework so the app is self-contained. Cool beans.

Unfortunately, it’s not as easy as it seems. Yes, the MacRuby Xcode template contains both an “Embed” and a “Compile” target, and they seem to work fine. ;) The problem I ran into, though, was that whenever you would require anything from the Ruby standard library (say, yaml or stringio), the app would forget about the embedded version of MR and look for /Library/Frameworks/MacRuby.framework/….

I didn’t notice this at first since this folder exists on my dev machine (big surprise), but when I tested it on a clean machine (i.e. one where MacRuby isn’t installed), nothing would happen. Well, nothing except some lines in the system.log, that is:

Being a newb to the ancient arts of compiling shit self-written software I was scratching my head rather furiously. It took me several hours of digging around the Googles and macruby-devel to learn about install_name_tool, and how it’s used to adjust the path of a shared library inside a file.

And that’s what I did, then. I’ve created a new build target, “Embed and Compile”, which has two sub-targets:

  1. the reference to the default app build phase (which means “MyNewApp” is a direct dependency of the “Embed and Compile” target)
  2. a “Run Script” build phase named “Embed, Compile, Fix”

The script runs macruby_deploy and afterwards tells install_name_tool to do its dirty, dirty work. I found it’s not enough to have it adjust the executable only; for me it was necessary to fix all the *.rbo files as well.

So, that’s it. The above works for me, it might work for you as well. If you have comments, suggestions or recommendations, please sound off below. I’m still learning all of this, and any input is appreciated. :)

Oh, and in case I sound ungrateful or anything: I am not. MacRuby 0.5b2 is exactly what is says it is: the second beta of a software’s pre-1.0 version. It’s already pretty damn impressive but not really done yet. I had a hunch what I was getting into, so it’s cool. ;)

posted 6 months ago in code macruby ruby osx apple xcode snippets troubleshooting contains 1 note

Loading...

Assorted MacRuby Snippets

Some things I’ve learned or discovered during the last few days. Nothing special, but taking notes is usually a good idea, so there.

Get values fromInfo.plist

For example, app name and version:

info = NSBundle.mainBundle.infoDictionary
info.objectForKey("CFBundleName")
info.objectForKey("CFBundleVersion")

Open an URL in the default browser:

url = NSURL.URLWithString("http://municode.de/")
NSWorkspace.sharedWorkspace.openURL(url)

Run an AppleScript

Sometimes you want to execute a short AppleScript snippet to save yourself some time by using the higher-level functionality AS offers instead of writing a huge block of MacRuby. (For example, to eject a FS volume.) Here’s how you do it (the AS is deliberately simple):

script = "display dialog (\"omg\")"
pnt = Pointer.new_with_type("@")
as = NSAppleScript.alloc.initWithSource(script)
as.executeAndReturnError(pnt)

More info at developer.apple.com.

Delete nodes/tags from an XML document

Let’s say you have a variable doc which represents a NSXMLDocument, and you want to remove all em and cite tags:

error = Pointer.new_with_type("@")
selectors = [ "//em", "//cite" ].join("|")
doc.nodesForXPath( selectors, error: error ).each do |n|
  n.detach
end

More notes might follow at a later date. :)

posted 6 months ago in applescript code macruby ruby snippets xml xpath apple osx contains 1 note

Loading...

MacRuby compilation step fixes

Just a note, mostly to myself: The default XCode MacRuby rb_main.rb template will contain these lines:

Dir.entries(dir_path).each do |path|
  if path != File.basename(__FILE__) && path.match(/\.rb$/)
    require(path)
  end
end

Works fine for uncompiled files, but when you want to compile your app, there’ll be no *.rb files — just *.rbo files. So rb_main.rb needs to be adjusted.

Dir.entries(dir_path).each do |path|
  if path != File.basename(__FILE__) && path.match(/\.rbo?$/)
    require(path)
  end
end

I just spent 15 minutes wondering about these Unknown class 'Controller', using 'NSObject' instead. Encountered in Interface Builder file at path … in my system log, and I tend to forget this kind of detail so I wanted to jot it down as a reminder to future Carlo.

So, listen up, future Carlo. This is important.

posted 6 months ago in macruby ruby xcode code osx contains 1 note

Loading...

About this site and its Author

  • czottmann
The personal blog of Carlo Zottmann, a freelance software developer from Munich, Germany.

He builds "applications" or "sites" for them so-called "internets". Currently notable projects are TwerpScan and Ephemera, a Mac tool for Instapaper enthusiasts with ebook readers.

His hobbies include taming dolphins, riding lemurs and collecting spores, molds and fungus — the food of the future. GP