News for hackers. Stuff that matters.
Re:The story of round rectangles by siglesias on Thursday August 26, 2010 @03:05PM (#1636837)
Actually, this is a fine lesson in persuasion, something that Chip and Dan Heath point out in Switch and Made to Stick; that is, reasoning that is highly concrete and visual is far more convincing and impactful than appeal to models, forecasts, spreadsheets, and schematics. I think Jobs here could have simply demanded rounded rectangles or appealed to some vague need for geometric completeness in the product, but imagine how powerful it must have been to take a walk outside and actually see how reality presented rounded rectangles at every turn, and how truly crippling the program would feel with this observation in mind if it didn't ship with the feature. The lesson is to reach beyond the world of formal logic and into the visceral world of sight and touch, where the real "aha" and gut judgments reside.

Here's another example, cited in the design and creation of the Palm Pilot:

"Jeff Hawkins, the team leader, wanted the Palm Pilot to be simple. It would handle only four things: calendars, contacts, memos, and task lists, but it would do them well. Hawkins fought feature creep by carrying around a wooden block the size of the Palm. Hawkins would pull out the wooden block to "take notes" during a meeting or "check his calendar" in the hallway. When someone would suggest another feature, Hawkins would pull out the wooden block and ask them where it would fit. Hawkins knew that the core idea of his project needed to be elegance and simplicity. In sharing this core idea, Hawkins and his team used what was, in essence, a visual proverb. The block of wood became a visual reminder to do a few things and do them well."

taken from http://www.gsb.stanford.edu/news/bmag/sbsm0702/feature_ideas...

Re:The story of round rectangles by 10ren on Thursday August 26, 2010 @08:35PM (#1637657)
You're right; but I think uprooting the persuasion from its source kills it. Steve didn't use that technique because it was persuasive; he used it because that's what he saw. After that calligraph class that connected so deeply, I bet he became aware of curved corners everywhere; and hated that computers rendered everything squarely... so when he saw fast curves, he grabbed it by the neck. When questioned, he probably spluttered "b-b-but look! all around you! can't you see?!" It's not a persuasion technique; but simply sharing the reality he saw.

Uproot it from reality and use it in isolation, and it has no life in it to persuade. Therefore: improve at seeing, not persuading.

(He'd have been more savvy at persuasion techniques if he'd complimented the poor guy first.)

Re:The story of round rectangles by joubert on Friday August 27, 2010 @05:10AM (#1638329)
"Steve didn't use that technique because it was persuasive; he used it because that's what he saw."

You can see a lot by just looking.

Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:47PM (#1641114)
Nice. Talk about a Yogi Bera-ism!
Re:The story of round rectangles by duck on Thursday August 26, 2010 @04:55PM (#1637136)
I wonder if that wooden block had rounded corners?
Re:The story of round rectangles by chunkbot on Thursday August 26, 2010 @04:30PM (#1637077)
We're fitting a lot more into a wooden block than we used to.
Re:The story of round rectangles by megablast on Thursday August 26, 2010 @07:29PM (#1637503)
Love you last example, but of course what made the Palm so useful, and later on the iPhone, was the ability to add or code any application that you wanted. Palm eventually did this, and Apple made it incredibly easy (although 1 year after the first iPhones release).
Re:The story of round rectangles by Luc on Thursday August 26, 2010 @01:53PM (#1636646)
If you would like to do some archaeology, the QuickDraw source code can be downloaded here: http://www.computerhistory.org/highlights/macpaint/

It's really nicely structured and has lots of comments!

EDIT: The code is in the BumpOval procedure in DrawArc.a

Re:The story of round rectangles by paulitex on Thursday August 26, 2010 @05:20PM (#1637199)
I don't know what I was expecting (C I guess), but upon opening the project it blew me away that it was written entirely in assembly by hand.
Re:The story of round rectangles by wrs on Thursday August 26, 2010 @08:18PM (#1637621)
The original Mac had a 64K ROM. It's unbelievable what they packed in there. They used a lot of tricks to do it that are only possible in assembly.
Re:The story of round rectangles by netdog on Thursday August 26, 2010 @02:33PM (#1636755)
The "clever way to do the circle calculation that only used addition and subtraction", which the article attributes to Apple employee Bill Atkinson in 1981, is in fact a variant of the Bresenham algorithm, devised in 1962 by Jack Bresenham at IBM, when Bill was still a kid.

see http://en.wikipedia.org/wiki/Bresenham_algorithm

Re:The story of round rectangles by jcl on Thursday August 26, 2010 @04:02PM (#1637004)
Hmm... The Wikipedia article for the circle-drawing algorithm indicates that while it uses the same error-accumulation strategy as Bresenham's line-drawing algorithm, it was not actually invented by Bresenham.

http://en.wikipedia.org/wiki/Midpoint_circle_algorithm

I'm not sure how correct this is, as I don't have access to the full text of the papers involved. But it looks like if Bresenham did write the algorithm (and wasn't beaten to it by, say, Pitteway as Wikipedia implies), it wasn't until his 1977 paper, "A linear algorithm for incremental digital display of digital arcs".

Re:The story of round rectangles by Luc on Thursday August 26, 2010 @03:43PM (#1636951)
The circle version is here on Wikipedia (it includes the 1+3+5... trick): http://en.wikipedia.org/wiki/Midpoint_circle_algorithm

Generalized to ellipses: http://homepage.smc.edu/kennedy_john/belipse.pdf

Re:The story of round rectangles by msie on Thursday August 26, 2010 @01:18PM (#1636537)
Bill Atkinson is a programming god. He was such a pioneer in so many areas. He created QuickDraw, MacPaint and Hypercard! Is there nothing he can't do??? I wonder what his background was when he developed Quickdraw. Did he have any previous graphics experience? How much previous experience could you have when you're the one who created the graphic routines powering the Lisa/Mac?
Re:The story of round rectangles by philwelch on Thursday August 26, 2010 @02:22PM (#1636727)
"How many man-years did it take to write QuickDraw?", the Byte magazine reporter asked Steve.

Steve turned to look at Bill. "Bill, how long did you spend writing Quickdraw?"

"Well, I worked on it on and off for four years", Bill replied.

Steve paused for a beat and then turned back to the Byte reporter. "Twenty-four man-years. We invested twenty-four man-years in QuickDraw."

Obviously, Steve figured that one Atkinson year equaled six man years, which may have been a modest estimate.

http://folklore.org/StoryView.py?story=Mythical_Man_Year.txt

Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:50PM (#1641121)
But did Bill get 6 men's worth of pay? If the answer is no let that be a lesson to all super-talented/productive hackers out there whether you should strike it out on your man or work for The Man.
Re:The story of round rectangles by alex_c on Thursday August 26, 2010 @03:39PM (#1636938)
Amusingly, I'm looking around the room, and the most obvious examples of rounded rectangles are my MacBook, my iPad, and my iPhone.
Re:The story of round rectangles by mryall on Thursday August 26, 2010 @05:51PM (#1637269)
If you look a bit further, I'm sure you'll see more. I see chairs, tables, a television, a remote control -- all with rounded corners. So many rounded rectangles, yet I never noticed before I read this article. It's funny how a story like this can change how you look at the world.
Re:The story of round rectangles by DaemonXI on Saturday August 28, 2010 @03:41AM (#1641427)
Like my Zippo!
Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:48PM (#1641118)
We're luck that Steve didn't see dead people otherwise to this day our Macs would be full of ghosts.
Re:The story of round rectangles by barrkel on Thursday August 26, 2010 @08:01PM (#1637581)
Somewhat ironically, the object with sharp edges that annoys me most is my 2G iPod Nano, which, similar to the 4G iPod Nano, has a sharp rim all around both ends. The 2G is basically an extruded rounded rectangle and the 4G is like an extruded oval, in the same way a cylinder is an extruded circle.

I bought the 3G nano, but very seldom use it because the scroll wheel is too small. I didn't buy the 4G precisely because it had the same sharp edge problem as the 2G.

Re:The story of round rectangles by powrtoch on Thursday August 26, 2010 @02:14PM (#1636705)
For anyone else whose jaw dropped at "the sum of a sequence of odd numbers is always the next perfect square", Wikipedia has a helpful visualization:

http://en.wikipedia.org/wiki/Square_number#Properties

Re:The story of round rectangles by jacobolus on Thursday August 26, 2010 @04:55PM (#1637137)
> anyone else whose jaw dropped

Wait, really? You never worked out in school (or on your own before it ever came up in school) that

  1 + 2 + 3 + ... + n = n * (n + 1) / 2
and likewise that

  2 + 4 + 6 + ... + 2n = n * (n + 1)
and

  1 + 3 + 5 + ... + (2n - 1) = n * n
? (of course, it also comes up geometrically if you start looking at the number of little squares in a big square, and count the next row)
Re:The story of round rectangles by barrkel on Thursday August 26, 2010 @08:12PM (#1637612)
It always struck me as obvious; with a square of n*n, just add n + n (for the two sides) + 1 (for the corner) and you get the next square. 2n+1 progresses 1, 3, 5 etc., plain as day.

What got me thinking about it (at perhaps 11 or 13 or so) was trying to turn it into a way of calculating the square root.

Re:The story of round rectangles by InclinedPlane on Thursday August 26, 2010 @06:07PM (#1637296)
Re:The story of round rectangles by tonystubblebine on Thursday August 26, 2010 @04:54PM (#1637134)
The visualization makes it seem obvious. Thanks.
Re:The story of round rectangles by ck2 on Thursday August 26, 2010 @02:18PM (#1636716)
Sounds like a typical coder's week:

1. accomplish something pretty darn tricky to try to impress the boss/client

2. boss is only impressed for a split second before giving you a harder to accomplish task

Re:The story of round rectangles by blahedo on Thursday August 26, 2010 @09:20PM (#1637738)
Re:The story of round rectangles by megablast on Thursday August 26, 2010 @07:32PM (#1637509)
I remember a few times creating something incredibly clever, that I thought was not possible, and trying to explain this to my boss. Of course, not being technical, they had no idea what was so special.
Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @01:17PM (#1636530)
An unsatisfying story. The first half of the story is about an algorithm to produce ovals. Then most of the rest is Steve Jobs convincing the guy that rounded rectangles are desirable. Then, without any narrative about this actual central problem (which the guy had no idea how to do when the conversation with Jobs ends), we're told that he just happened to solve it.

EDIT: I find the bouncing up and down of votes for this interesting, particularly the reasons people give for disagreeing.

Re:The story of round rectangles by aycangulez on Thursday August 26, 2010 @02:00PM (#1636665)
I disagree. Rounded rectangles are a signature Mac OS user interface feature. Thanks to post-Steve Jobs Apple, there is renewed interest in everyhing Apple, and rounded rectangles are truly everywhere. You would have a hard time finding a popular web site not using them.

What is really interesting in this story is not the algorithm itself, but how Steve Jobs convinced Bill Atkinson by taking a walk outside with him to show how common rounded-corners are in "real-life".

Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @02:39PM (#1636770)
What does the importance of rounded rectangles have to do with how satisfying or well-told a story is?
Re:The story of round rectangles by mryall on Thursday August 26, 2010 @05:37PM (#1637236)
A story can be satisfying because of its relevance. I think that is the case here. The topic is interesting to developers who want to understand how Apple approaches design, even though the story's structure might have some flaws.
Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @06:09PM (#1637303)
You're misunderstanding my objection.

It does not matter how relevant you find some aspect of this story, it's still poorly told - and this should be especially clear if the focus on the the interaction between Atkinson and Jobs is what you consider key. Half of the story is about details of an algorithm that simply don't matter if the core of the story is Jobs badgering Atkinson into being willing to code rounded rectangles.

Re:The story of round rectangles by mryall on Thursday August 26, 2010 @06:26PM (#1637344)
The background about the algorithm helps you understand why Bill is reluctant to go back and implement a new different drawing primitive. His reluctance is the reason why Steve needs to work hard at convincing him, which demonstrates the theme of the story.

I agree that it's probably too detailed in the first bit, but I don't see it as a major flaw for a series of articles about the development of the original Macintosh. The intended audience consists of hackers and developers who get intrigued by technical details.

Re:The story of round rectangles by Semiapies on Friday August 27, 2010 @12:01PM (#1639174)
If the first algorithm is worth spending time on, so is the second. If the second isn't, then the first isn't.
Re:The story of round rectangles by megablast on Thursday August 26, 2010 @07:34PM (#1637514)
A bad story that is relevant, can still be interesting.

A bad story that is about some subject no one cares about, can not.

Re:The story of round rectangles by swombat on Thursday August 26, 2010 @01:54PM (#1636649)
Depends what you're looking for. This isn't a story about some bit of code. It's a story about someone (Steve Jobs) who knows how to inspire and motivate people, and a practical example of how he inspired this excellent programmer to push beyond what he thought was capable, by getting across exactly why it was so important.
Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @02:38PM (#1636767)
Most of the story isn't about that. If that's the center of the story, then the first half of it is merely going off on a tangent. It's a badly-composed story.

Nor do we need more "I told the programmer we needed this thing he said was problematic and he did it" management just-so stories.

Re:The story of round rectangles by philwelch on Thursday August 26, 2010 @10:06PM (#1637812)
Showing how clever the oval algorithm was gives us the right emotional setup to the conflict--Atkinson is justly proud of his own cleverness until Jobs, almost dismissively, demands even more from him. The central conflict of the story isn't between Atkinson and the problem, it's between Atkinson and Jobs, and the story holds itself to the emotionally salient facts about how that conflict is resolved--the rounded rectangles work and Atkinson is again very proud and happy.

Well, either that or Hertzfeld never got around to learning how roundrects were implemented.

I get your complaint, because that's not the conflict you wanted the story to center around, but given the conflict it does center around, I don't think it's that poorly composed.

Re:The story of round rectangles by Semiapies on Friday August 27, 2010 @11:59AM (#1639161)
Well, I'd rather the story center more firmly around the Atkinson/Jobs conflict or the whole sweep of Atkinson going from clever hack to being convinced about the rounded rectangles to figuring them out as well. I don't need to know the math to appreciate the trickiness of making quick ovals on Lisa hardware, but if we're going into that, I want to know how he worked out the roundrects as well.
Re:The story of round rectangles by mryall on Thursday August 26, 2010 @05:43PM (#1637249)
> Nor do we need more "I told the programmer we needed this thing he said was problematic and he did it" management just-so stories.

Why would that be? Is this a kind of story you disagree with for some reason? Are you arguing that it's a bad story because it's badly composed or because you don't like the theme?

This story wasn't written by the manager in question, so I also don't see how you can personify the author in the first person in your pseudo-quote.

Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @06:10PM (#1637306)
In order: because I think they're harmful, yes, and as I stated, both.

Also, I was not personifying the author.

Re:The story of round rectangles by avgarrison on Thursday August 26, 2010 @02:00PM (#1636667)
I agree...I want to see the algorithm for drawing rounded rectangles! I assume that he was able take his oval rendering code and use it for the corners of the square. Never mind, that would probably still leave the story unsatisfying.
Re:The story of round rectangles by sp332 on Thursday August 26, 2010 @02:10PM (#1636695)
Fine, here's the source file. http://github.com/jrk/QuickDraw/raw/master/RRects.a

Edit: Luc already linked to the source archive in this thread, so I changed my link specifically to the RRects.a file.

Re:The story of round rectangles by unwind on Friday August 27, 2010 @08:40AM (#1638622)
Thanks! It's weird that a) Bill Atkinson also used all-caps for his mnemonics, as did I when I grew up on the MC68k; b) how it brings me back to the Amiga (yes, I know this code pre-dates the Amiga, but still).
Re:The story of round rectangles by Jkeg on Thursday August 26, 2010 @02:50PM (#1636797)
Because everyone understands Assembly?
Re:The story of round rectangles by sp332 on Thursday August 26, 2010 @02:57PM (#1636816)
Don't worry, 68k assembly is easier to read than x86 assembly. This code is nicely structured and heavily commented. Don Knuth called Atkinson's QuickDraw and MacPaint code some of the best ever written.

Of course, if I'd actually read the code before linking to it, I'd have realized that this file doesn't really answer avgarrison's question because the algorithm is in DrawArc.a (see Luc's post earlier in this thread for an archive with the rest of the files).

Re:The story of round rectangles by HeyLaughingBoy on Thursday August 26, 2010 @05:43PM (#1637250)
Should we take it from your username and the comment about 68k assembly that you've played with the MC68332 a bit or is it just coincidence :-)
Re:The story of round rectangles by sp332 on Thursday August 26, 2010 @09:38PM (#1637763)
Haha, just coincidence :-)
Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @02:55PM (#1636811)
Not sure if you mean to be pointlessly snarky or not, but hearing about his thought process and how he got a quick algorithm for a harder problem to work would have been much more interesting - and from a storytelling POV, would have been much better - than an abrupt "and then he came up with the solution", especially after the long bit on how he generated ovals.
Re:The story of round rectangles by andrewf on Thursday August 26, 2010 @03:12PM (#1636857)
I'm actually endeared by the story being a dump of everything the author witnessed, rather than being carefully engineered (with some stuff expanded on, some stuff dropped) to provoke a particular reaction in the reader.
Re:The story of round rectangles by Semiapies on Thursday August 26, 2010 @03:19PM (#1636873)
Except, of course, that it isn't "a dump of everything the author witnessed" without things expanded or or dropped. A big chunk of it is exposition about an algorithm - and not even the one in question.

When you relate events, you inevitably "engineer" them, even if only unconsciously or by your judgement of what's relevant or not. Storytelling is about how to engineer usefully and usually entertainingly, particularly to the people you're telling the story to.

Re:The story of round rectangles by joblessjunkie on Thursday August 26, 2010 @01:58PM (#1636661)
I especially don't buy the idea that Bill Atkinson, after demonstrating fast ellipses, would then claim that rounded rects would be "really hard." Indeed, the enhancement would be trivial.
Re:The story of round rectangles by pavlov on Thursday August 26, 2010 @02:05PM (#1636680)
I think that Atkinson probably thought that roundrects would be a useless addition that would bloat the library. (Remember, the entire Mac OS and applications needed to fit in 128K!)

It's easier to dismiss something as "entirely too hard" than to get into an argument about whether it's worth implementing.

Re:The story of round rectangles by toddheasley on Thursday August 26, 2010 @07:41PM (#1637532)
A lot of the best inventions seem obvious after the first person comes up with them. Especially when it comes to code.
Re:The story of round rectangles by Someone on Thursday August 26, 2010 @06:50PM (#1637393)
I disagree. I think round rects have more edge cases than ovals (such as a 10 pixels high rectangle with corner radii of 8 pixels)

It could also be that he thought it would be too hard because he knew he only had 42 bytes of ROM space to play with.

Re:The story of round rectangles by DLWormwood on Thursday August 26, 2010 @09:03PM (#1637705)
I found this in the comments of the posted article’s website:

http://news.ycombinator.com/item?id=1637442

Re:The story of round rectangles by allwein on Friday August 27, 2010 @06:41AM (#1638442)
It's not that doing rounded rects would be hard, but that doing them really fast would be hard.
Re:The story of round rectangles by angrycoder on Friday August 27, 2010 @12:50PM (#1639343)
Everything is trivial in hindsight.
Re:The story of round rectangles by DLWormwood on Thursday August 26, 2010 @07:13PM (#1637451)
This story has probably been told repeatedly, and it lost something being written down instead of told…

See the comment I quoted here:

http://news.ycombinator.com/item?id=1637442

Re:The story of round rectangles by jonknee on Thursday August 26, 2010 @04:30PM (#1637078)
Everytime I get linked to a Folklore article I end up hitting next until I look up at the clock and get amazed at how much time has gone by. True hacker stories.
Re:The story of round rectangles by bombs on Thursday August 26, 2010 @08:38PM (#1637663)
It's also available in book form as Revolution in the Valley: The Insanely Great Story of How the Mac Was Made. It's always better to step away from the computer for a quick, inspirational read!
Re:The story of round rectangles by jonknee on Friday August 27, 2010 @01:15AM (#1638074)
I own it. I still lag on Folklore.
Re:The story of round rectangles by sspencer on Thursday August 26, 2010 @05:28PM (#1637217)
I did not know this site existed, and now I do. I predict that I will burn through these at a fast rate while my builds are running...

Thanks for more interesting reading material, HN!

Re:The story of round rectangles by robrenaud on Thursday August 26, 2010 @03:22PM (#1636882)
Are rounded rectangles actually hard? Isn't it just a matter of placing 4 quarter circles in the right places? If you can draw straight lines and you can draw ovals (and hence, the special case of circles), then you can draw rounded rects, right?
Re:The story of round rectangles by jonknee on Thursday August 26, 2010 @04:34PM (#1637089)
Almost everything is hard when you have 128KB of memory and a CPU that does only 8 MHz. Not to mention having to write in assembly.
Re:The story of round rectangles by Natsu on Thursday August 26, 2010 @04:59PM (#1637153)
Yeah, it's far easier on a CAD machine these days. I added that shape to our AutoLisp function library years ago and it only took me a few minutes, including testing.
Re:The story of round rectangles by Natsu on Friday August 27, 2010 @01:53AM (#1638121)
It's weird. We haven't sold any of those in months. Today, I had two orders for rounded rectangles at work.

I'm 99.99% sure it's coincidence and confirmation bias, but some part of me wonders if this story played any part. But, if anyone in the southwest bought a window or glass table in that shape today, I might have played a part in doing the CAD.

Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:53PM (#1641123)
Luxury! (Scottish accent)

I remember 48KB of memory and 4 MHz, no lowercase, no multi-tasking, only 40 columns text width, the keys were almost painfully hard to press down and you had to pay for all documentation, what little of it anywhere you could find.

Re:The story of round rectangles by DLWormwood on Thursday August 26, 2010 @07:09PM (#1637442)
From the comments section of the article…

    “At MacHack, when most of the original team was there and
    Andy told this story, Jef Raskin spoke up to say that he
    had told Steve about round rectangles being everywhere,
    and that's what got Steve obsessed about them.

    But what I found interesting was something Bill Atkinson
    said about creating the RoundRect routines. He said they
    turned out to be a lot easier to create than he thought
    they would be. I can't tell you how many times I've
    over-estimated something easy. I think it's something
    inherent in computer work.”
Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:55PM (#1641124)
I've had that happen a lot. Something I thought would be very hard turned out to be fairly easy. And vice versa. Happened more when I was younger though. I think with time and experience one's prediction ability evens out a bit.
Re:The story of round rectangles by shasta on Thursday August 26, 2010 @03:53PM (#1636979)
For the common case of a large rectangle with small radius corners, you can even just draw 3 rectangles and 4 ovals and have a tolerable amount of overlap.
Re:The story of round rectangles by Someone on Thursday August 26, 2010 @06:54PM (#1637406)
Not in this case. One of the variations must only draw an outline of the shape, and one must allow inversion of the pixels.
Re:The story of round rectangles by SkyMarshal on Thursday August 26, 2010 @10:16PM (#1637829)
HN Feature Request: A cron job that automatically submits and votes to the top of the front page 1 folklore.org story per week (or two weeks?).

Reason: Most of us that have been around a while have read this entire site, more than once usually, but most of the stories there are good enough to keep getting upvoted for any youngsters that haven't discovered it yet. Eg, it's one of the few links that can keep getting reposted over and over, and revoted to the front page over and over, probably till the end of the Internets. So lets just make it a cron job already.

Re:The story of round rectangles by mkramlich on Friday August 27, 2010 @11:46PM (#1641110)
Once again we see Steve's intensity and vision and single-mindedness.

Bill: Who cares?

Steve: Round rectangles.

Bill: Not important.

Steve: Round rectangles.

Bill: They're impossible.

Steve: Round rectangles.

Bill: Okay I'll try to figure out how to do them.

Steve: Okay now send in that Andy guy about that Switcher thing. And bring my checkbook.

Re:The story of round rectangles by steamer25 on Friday August 27, 2010 @03:52PM (#1639999)
We call 'em roundtangles.