Categories
computer photography woodworking

MakerBot Thing-o-Matic 3D Printer Assembly Photographs

Hello, Slashdot. 🙂 After 12 hours of punishment, everything seems to be back up and responsive. Enjoy the pictures!

[Skip to the HD slideshow on Flickr.]

After an estimated 16 man-hour assembly effort, my brand new MakerBot Thing-o-Matic is fully assembled. The extruder motor is bad so I can’t print quite yet, but assembly is complete and the MakerBot support folks have been cool about shipping the replacement part. The new motor should arrive early next week.

The Thing-o-Matic is an Open Source 3D printer very similar to MakerBot’s earlier models (such as the Cupcake) as well as the RepRap, though MakerBot’s designs clearly depart from their RepRap origins. This is an extremely abbreviated set of high-level assembly pictures for those curious about the process. Assuming you already have a healthy assortment of common hand tools, the Thing-o-Matic “kit” version will set you back about $1,300 (USD).

The assembly process is intense, to put it lightly. Instructions are generally correct and straightforward 90% of the time, but given the intimidating complexity of the project, insane number of parts and dexterity required for some of the assemblies, simply locating the correct widget can sometimes be challenging. As the online assembly guide progresses, the instructions increasingly rely on your prior knowledge of repetitious concepts. We’re talking sanding, soldering, cutting, punching, scrubbing, gluing, and screwing hundreds of bolt/nut combinations. Only attempt this project if you’re the type of person that wakes up with ideas on the order of, “I think I’ll build an air conditioner this weekend.”, and actually completes the task. Like I said: intense.

[See the high-res slideshow version on Flickr instead.]

[slickr-flickr search=”makerbot” sort=”date” type=”slideshow” flickr_link=”on”]

[slickr-flickr search=”makerbot” sort=”date” items=”50″]

Categories
computer

AmericanExpress.com: Tip On Configuring Your Web App

For all you web application developers, I’d like to briefly note the following stack trace I received from the American Express website while clicking around:

And here is the same trace in plain-text format:

JSPG0036E: Failed to find resource /cardcenter/common/interstitial.jsp

Root Cause:

java.io.FileNotFoundException: JSPG0036E: Failed to find resource /cardcenter/common/interstitial.jsp
	at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:322)
	at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:284)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:126)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

Most developers might say, “So what? You just clicked on a broken link somewhere. Go back and go about your business.”

And that’s exactly what I did, since I just wanted to pay a credit card bill. But what if “my business” had been to gather forensic information about potential American Express website vulnerabilities? A stack trace may look innocuous, but we can be almost certain that this HTTP request was handled by a Java servlet. It uses Java Server Pages (JSPs) for view templating, and the application appears to be running on IBM WebSphere. Not only this, but we have line numbers for each stack frame, and the CSS appears to be some form of default styling.

Large institutions such as AmEx tend to not upgrade to the latest versions of development libraries until a future interal release cycle where the new version(s) can be internally vetted, tested, QA’d and put through a due diligence process. (Or for older apps, dependencies might not be upgraded at all.) This makes stack traces extremely valuable to an attacker. Why? Because I can obtain all historical versions of technologies such as WebSphere, and map every specific call in the stack trace back to the code until I find the software versions where the line numbers match up. The attacker should at least be able to narrow down the software version numbers to a range, if not the specific release version. After gathering this information, the attacker may choose to fixate on the older packages, and consult databases of vulnerabilities in legacy software until a vulnerability is discovered.

Long story short: turn off the rendering of stack traces in public-facing production applications. They’re convenient for validation of production errors, yes, but you don’t know what they may reveal.

Categories
computer

Introducing RailRoady: The Rails 3 UML Diagram Generator

I just released the first production version of the RailRoady gem about 5 minutes ago. If you’re a developer on Rail 3, you’ll definitely want to check it out. No more Vizio class diagrams! (RubyFlow announcement.)

Categories
computer

LaTeX Broken On MacPort “texlive” Update

I spent about 4 hours today troubleshooting a stupid, stupid issue with the “texlive +full” package as provided by MacPorts, which is required to run certain GUI LaTeX editors such as TeXShop. Several days ago I ran an innocuous-looking…

preston$ sudo port sync
preston$ sudo port upgrade outdated

…and amongst many things that updated, texlive was one of them. Unfortunately, running tools such as the command-line “latex” command or GUIs such as TeXShop started giving me the following error:

This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010/MacPorts 2010_0)
restricted \write18 enabled.
—! /opt/local/var/db/texmf/web2c/pdftex/pdflatex.fmt doesn’t match pdftex.pool
(Fatal format file error; I’m stymied)

After much fruitless searching and hair pulling, I stumbled upon this ticket that notes the solution as:

preston$ sudo fmtutil-sys –all

After running this, LaTeX seems to work properly again. Sheesh.

(Note to product developers: I would personally pay at least $50 for a simple, clean, stand-alone OS X app that does LaTeX really well. TeXShop and TextMate both do a good job, but I’d really like a 5-star “just works” editor that doesn’t install a bunch of system-level stuff like MacTeX. Just sayin’. 🙂 )

Categories
computer personal

Amazon Kindle Customer Service Experience

Kindle 2 with M-Edge Leather Platform Jacket and optional e-Luminator 2 book light.

About a month ago I noticed the top of my Kindle 2’s e-ink display starting to go out. Starting from the top of the screen, row-by-row slowly ceased to display “ink” until I could no longer see the battery indicator area. I could surely have lived with this, but given that the device is less than a year old I gave the Kindle support number a call.

I purchase a lot from Amazon and have used pretty much every service they offer, including long-time Prime delivery service membership and I’m fairly certain that my Amazon book purchases would put me in their 99th percentile of perfered consumers–so perhaps the call handler knew to treat me better than the average Joe–but regardless, the process was a true 5-star experience. Abbreviated transscript of the call:

Me: The screen on my Kindle 2 is going out.

Rep: I’m very sorry to hear that. <additional scripted apologies designed to make me feel better> How about we overnight you a replacement?

Me: Srsly?

Rep: Sure. It’ll be delivered tomorrow morning.

Me: Sweet!

And that was it. The replacement arrived the next morning as stated. It took me less than 5 minutes total to deal with the issue. For a unit of anything under warrantee this is the level of service I would hope for. Bravo, Amazon!

Categories
computer

Upgrading From Ruby 1.9.1 to Ruby 1.9.2

I’ve spent half the day so far inbeded in the furious stressful upgrade process of a handful of Ubuntu Linux 10.04 and Mac OS X Snow Leopard systems from Ruby 1.9.1 to Ruby 1.9.2. I haven’t even gotten to the Rails 3.0.0 stuff yet: just the baseline Ruby installation. I’ve gone through the upgrade process on both types of systems so far and the base issues have been the same. Here’s a common issue that many people are running into:

preston$ gem1.9

/opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories’: undefined method `path’ for Gem:Module (NoMethodError)
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:883:in `source_index’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in `init_gemspecs’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in `initialize’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:841:in `new’
from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:841:in `block in searcher’
from <internal:prelude>:10:in `synchronize’
<…and so on…>

Assuming you’re upgrading from a previous Ruby installation, note that the “site_ruby” directories are no longer used, and will eff up your 1.9.2 installation if you fail to delete them after the install. On OS X, run:

sudo rm -rf /opt/local/lib/ruby1.9/site_ruby/

On Ubuntu Linux 10.04, run:

rm -rf /usr/local/lib/ruby/site_ruby/

…to correct this issue. All note that you may see errors such as this:

root@li92-132:~# rake –version

/usr/local/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path’: can’t find executable rake for rake-0.8.7 (Gem::Exception)

from /usr/local/bin/rake:19:in `<main>’

…despite have a rake gem installed. Apparently 1.9.2 comes with a version of rake internally, but is unable to find it for some reason relating to the rake.gemspec file. Remove the file to fix this issue. On Ubuntu Linux 10.04, run:
rm /usr/local/lib/ruby/gems/1.9.1/specifications/rake.gemspec
Notice the “1.9.1” path of the PATH. Yeah.. it’s weird. But for compatibility reasons your 1.9.2 installation will continue to use a path with 1.9.1. To quote the Ruby 1.9.2 FAQ page:
The standard library is installed in /usr/local/lib/ruby/1.9.1
This version number is “library compatibility version”. Ruby 1.9.2 is mostly compatible with the 1.9.1, so its library is installed in the directory.
I’m sure there’s a wonderful technical reason for this, but it’s still misleading and confusing as hell. I ended up manually deleting a bunch of stuff I shouldn’t have because I thought I was innocently “cleaning up” after the old version. Whatever. Additional suggestions:
  • Just to keep things clean, you may also want to remove your old Ruby 1.8.x builds. (I recommend doing so unless you have older apps that haven’t moved to 1.9.x yet.)
  • Phusion Passenger seems to work fine on Ubuntu 10.04 with the latest version of Apache 2 as of this writing, though don’t forget to recompile, reinstall, reconfigure and restart apache2 when you do so.
  • Check if you still need rack v1.0.1 installed (for older Rails app) before nuking everything. 🙁
I need a beer!
Categories
computer personal

Thanks, KindleTools Users!

Kindle 2 with M-Edge Leather Platform Jacket and optional e-Luminator 2 book light.

I just wanted to shout out a quick “thanks” to the thousands of Kindle fans that have used the Kindle Tools website to find the PIDs for their Kindle devices. I’m aware that the site doesn’t fully support all models and variations of Kindle hardware devices and software applications, but I am supporting the site and hope to do so one day. The public-facing portion of the site is super easy to use and I never expected it to generate the traffic that it does, especially considering it’s a “one-time use” kind of tool. It’s very encourage to periodically receive a package in the mail gifted by a grateful Kindle Tools user off my wishlist. I generally don’t reply but do get these tokens of apprecation and your support is VERY much appreciated.

Let’s all continue to support the Kindle community and Amazon.com, while simultaneously insisting on open standards, free data interchange, and the non-proprietary future of our data in the ebook domain. The last thing we want is non-interoperable ebooks, so make your voice heard!

Categories
computer

3D Desktop Ruby Applications On Linux

Over the past year I’ve put out a few working demos of how to develop full 3D, OpenGL-based OSX applications using Ruby. Most of the comments I’ve received have been positive, but I think the high learning overhead has been the prime limiting factor in addoption. I also decided to focus exclusively on Mac OS X, further limiting the potential audience.

I’m pleasing to learn that Martin “monkstone” Prout has successfully run the code contained within my Starfield.app–basically a folder of code on a OS X system that looks and behaves like an .exe does Windows–on a Kubuntu Linux system. I haven’t personally tried to replicate this myself due to a lack of time, but you can read how monkstone did it on his blog.

Categories
business computer

The Worsening Fragmentation of the eBook Market

On my way to the office this morning my bag seemed especially heavy, the natural effect of stuffing an attaché with a MacBook Pro, iPad, iPhone and Kindle. I felt silly feeling it necessary to keep all these electronic gismos simultaneously latched onto my shoulder within seconds reach of my left hand, each ready to perform some specific task that required firing on its individual display and taking a few milliamp hours off its individual lithium ion battery pack.

Each of these devices is especially good at performing certain types of tasks, to the point that it also feels silly to not use the tool best suited to the job.  To a computer scientist all four of these are technically Turing machines–more commonly known as “computers”–but each has its own practical strength and weaknesses. And while carrying a single device solely by itself one becomes incredibly mobile, taking all four is not. I’m like a sleep-deprived mother of quadruplets sluggishly pushing a custom designed stroller through the grocery store. The monstrousity of brushed metal widgets, cables and wall warts I’m toting reminds me of that fictional car designed by Homer Simpson.

But such are the pro and cons of appliance computing. Not all of these hardware devices are technically needed on this particular Wednesday, but the combination of specialized functions provided by the union allows me a more productive day. I could have left at least one at home, provided that I had a reasonable amount of interoperability between them to shuffle data.

Stop. Oh god. I saw this coming the second Amazon announced they would use their own locked-down format (.azw/.mobi) for eBooks purchased through their store. (Aside: If you’re interested in Kindle encryption you may eventually find yourself at my KindleTools site for finding PIDs.) My biggest of fear with regards to the emerging ebook market is now in full swing. Not only are there subtle, often incompatible (and proprietary) differences in ebook data between reading application software, but most of the time I can’t even legally attempt it. It’s like Microsoft Office vs. Word Perfect vs Lotus Notes vs The People of Earth all over again.

Each content retailer is trying to be the de facto digital ebook data locker for the entire market, and the folks at the top of the food chain–most notably Amazon–have no business interest in supporting standardized (or at least conventionalized) data interchange with less popular consumer applications and devices. But why would they? If they can provide the content and the software and the hardware with a majority of the market, why not do everything possible to lock consumers into the monopoly? Here’s a painstakingly detailed scientific visualization of the current eBook market:

Amazon's view of the eBook market.

Let me make this clear: I am no stranger to paying for books. I read a LOT, and especially over the past year it hasn’t been unheard of for me to spend well over hundred dollars per month on eBook content alone, which I do for many reasons. Here’s the 8th-grade equation demostrating how I can scientifically demonstrate the value of this technology in my life:

Knowledge Gained (in the fictional unit of “knols“, K) x Ease of Future Reference (in the subjective economic unit of utils) / Content Cost (in dollars, $) x Total Consumption Time (in hours, 3600 x s)

This new unit of electronic book value that I’ll refer to as a Vebu–short for “value of ebookS unit”–reduces to this:

Vebu == knol utils per 3600 dollar seconds == uK/3600$s

In other words, we need to maximize the availability of meaningful information (knol utils) at a minimum of money and time (dollars hours) to achieve maximum value for our electronic virtual book libary, Vebu. A simple, unsophisticated yet meaningful quantity.

But here’s how this effed up market effects Vebu:

  • I have no less than 7 different, largely incompatible pieces of eBook reader software on iPad alone, as of today. Kindle, iBooks, Borders, B&N, Stanza, Free Books and Wattpad. (Effect: lower u, lowering Vebu.)
  • Borders, Barnes & Noble and the other brick-and-mortar vendors are freaking out, scaring they’ll become the next Blockbuster of the Netflix era. Each has their own application that works primarily with their own store, but not much else, forcing you to use their reader. Not all software is availble on all platforms, though, sometimes making lookups a major pain, and different retails of course carry different publishers, so it’s easy to unwittingly get sucked into all of them. (Effect: lower u and higher s, significantly lowering Vebu.)
  • None of the distributor reader apps are keen on “sharing” your content with friends/colleagues, forcing others to re-purchase content you should have been able to at least “lend” to them in the freakin’ first place. (Effect: higher $, lowering Vebu.)
  • O’Reilly, PragProg and other publishers don’t think the major distributors should be necessary, and some are leading the charge buy allowing you to directly purchase digital editions in a variety of formats. This is fine–I have no major qualms about this–but since most readers applications are trying to push you to the store of the vendor that wrote the apps, importing data can be a headache. (Effect: higher s, lowering Vebu.)
  • Amazon, already having a huge content delivery infrastructure, offers propriety features such as cross-device synchronization of bookmarks and highlights that isn’t as good in others. The Kindle hardware will also read to you in the car, but they only sync with Amazon services; Apple’s iBooks/iTunes is better with PDFs but doesn’t have text-to-speach; Stanza aggregates many different content sources but isn’t as great with commercial stuff… everything has distinct pros and cons. They’re all different and I have to use all of them because they can’t/won’t talk to each other and I can never remember which damn content locker to which I committed my stuff. (Effect: lower u, higher s, significantly lowering Vebu.)
  • The problem grows exponentially greater as more retailers, publishers, application developers, and independent authors enter the market, intentionally building walls that consumers have no interest in observing.

Here’s what needs to happen.

If you’re Amazon, Borders, B&N, or really any retailer that is gung-ho about becoming the provider of individual data lockers, that’s fine, but you need to give us the key. It’s understandable that you’re reluctant to open up your formats in a way that could be consumed in ways you can’t control, but consider this: if you never figure out how to allow publisher content to cross application and retailer boundaries, you are effictively capping Vebu to artifically low levels. If you instead focus on optimizing all the variables instead of restraining them, you’ll have a platform unmatched even by Amazon. I, for one, would switch to it in a heartbeat.

Categories
computer

Ruby: On The Perl Origins Of “&&” And “||” Versus “and” And “or”.

Overview

Avdi Grimm has a recent post noting the use of “and” and “or” Ruby keywords as essentially control flow operators, and hinting on their Perl origins. This instantly recalled several mental notes of old Perl programs, so I though I’d put out a few quick notes on the Perl equivalents for Ruby programmers not versed in Perl 5.

Perl Semantics

Perl actually borrows the precedence rules of “&&” and “||” from C, though I’m not entirely convinced the Perl and Ruby semantics of “and” and “or” are identical. We have to remember that Larry Wall is a linguist, and that some of Perl’s idiosyncrasies are due more to human considerations than machine. Programming Perl has several pages of great content on “and” and “or”. For example, here’s an excerpt from the circa 2000 version of Programming Perl:

But you can’t just up and replace instances of || with or. Suppose you change this:

$xyz = $x || $y || $z;

to this:

$xyz = $x or $y or $z; # WRONG

That wouldn’t do the same thing at all! The precedence of the assignment is higher than “or” but lower than ||, so it would always assign $x to $xyz, and then do the ors. To get the same effect as ||, you’d have to write:

$xyz = ($x or $y or $z);

The moral of the story is that you must still learn precedence (or use parentheses) no matter which variety of logical operator you use.

What Avdi says about precedence and control flow seems correct, though the reasons for it–in Perl at least–is to differentiate between two subtly distinct human linguistic semantics. For example, consider the following two English statements.

  1. I’m either traveling by car or just staying home.
  2. I’m either traveling by car or by train.

At first glance the semantics seem identical, but on closer inspection they are completely different. Let’s look at each.

I’m either traveling by car or just staying home.

In Perl, this is the equivalent of:

$traveling_by_car = can_use_car($me) or stay_home($me);

The semantics of or is to describe consequence (aka control flow) in a specific order. Either I’m traveling_by_car(), or else screw the whole thing and I’ll just stay_home() instead, in which case it makes little difference what the value of $traveling_by_car is. In other words, the semantics of the assignment trump that of the consequence, and should the consequence occur (which in this case probably has side effects), the assignment probably doesn’t matter. This is why Perl users often use or in the following context instead of ||:

open FOO, $file or die “a horrible death: $!”;
@lines = <FOO> or die “$file is empty?”;

I’m either traveling by car or by train.

In English, this is a misleading statement of truth for several reasons.

  1. What we mean is that one of the two options is true, but one and only one. As programmers we know this better as an xor statement–A is true if and only if B is false, and vice versa–but since there is no colloquial English equivalent of xor, we instinctively infer the meaning from the speakers misstatement.
  2. As programmers we tend to look at || as a short-circuit operator evaluated left to right. But this English statement defines no explicit evaluation order. This could have been written “I’m either traveling by train or by car” (notice “car” and “train” are reversed), but it means the same thing. In other words, we are evaluating the arguments for truth, not consequence. Thus, order should not affect truth.

Closing Thoughts

In most real-world Ruby contexts these operators will work interchangeably so long as precedence order is considered. But even so, keep in mind that mixing the two styles in different contexts is not necessarily a sign of inconsistency. Using the appropriate operator may actually be a sign of maturity: a way of communicating slightly different semantics in an otherwise logically equivalent context.